46C: Reversing an invoice - creating attachments

R Tannert tnn at ornl.gov
Mon Oct 7 17:09:22 EDT 2002


Kjetil,
 
I haven't done this myself, but it appears you can use BOR method
OBJRELSERV.CreateRelation to attach an existing note or other
document to an object such as an invoice.  This method calls function
BAPI_REL_CREATERELATION.  Based on research into ABAP class
CL_GOS_DOCUMENT_SERVICE and the SGOS* functions, I expect you'll pass
the value 'NOTE' in the RELATION field of the OBJECTS parameter,
since you're dealing with a note.  (You would use 'ATTA' to attach a
usual SAPoffice document.)
 
I don't see any standard tasks based on OBJRELSERV.CreateRelation.
 
In case you don't find exactly what you need, you should be able to
build something fairly easily.  The class and functions I mentioned
above should have everything you need.
 
Rob
 
>When a manager refuses to accept an invoice which has been blocked for
>payment (the situation should of course ideally never occur because it
>should be caught before it was posted) the manager creates a note to
>explain why he/she will not accept it. I would like to attach this note to
>the invoice which should be reversed, but I can't find any method neither
>for any of the objects I was hoping could supply such a service (BUS2081,
>BKPF, SOFM).
>
>Is there no such method, i.e. are the object services not available through
>an API?
>Can't help it, I find that difficult to believe....
>
>After a peek in The Book the class CL_GOS_SRV_ATTACHMENT_CREATE was
>discovered, but of course: Document CL_GOS_SRV_ATTACHMENT_CREATE is not
>available in language EN
>--
>Kjetil Kilhavn
>
>-------------------------------------------------------------------
>The information contained in this message may be CONFIDENTIAL and is
>intended for the addressee only. Any unauthorised use, dissemination of the
>information or copying of this message is prohibited. If you are not the
>addressee, please notify the sender immediately by return e-mail and delete
>this message.
>Thank you.
 


More information about the SAP-WUG mailing list