2008 Mar 04 3:56 PM
Hi,
I need to find a FM that adds an attachment to a requirement which is created from IDOC.
IDOC itself contains a link to the document that should be attached. The document is located on a network drive. The link is visable in created requirement in item texts.
As far as I could see it is imposible to use GOS in create tcode ME51n. However it is available in ME52n.
The attachment creation should be automatic.
Will appreciate ideas, clues and codes.
Regards,
MM
2008 Mar 04 5:26 PM
Try to find an userexit after save in ME51N and get the url from IDoc and try to use
data lo_attachment type ref to cl_gos_document_service.
clear ls_url.
create object lo_attachment.
call method lo_attachment->create_url
exporting is_object = ls_object
importing ep_url = lp_url.
In After save userexit you will also get the pur req docno also. this is needed for INSTID_A in the link table.
a®s
Edited by: a®s on Mar 4, 2008 12:28 PM
Hi,
I need to find a FM that adds an attachment to a requirement which is created from IDOC.
IDOC itself contains a link to the document that should be attached. The document is located on a network drive. The link is visable in created requirement in item texts.
As far as I could see it is imposible to use GOS in create tcode ME51n. However it is available in ME52n.
The attachment creation should be automatic.
Will appreciate ideas, clues and codes.
Regards,
MM
2008 Mar 04 5:26 PM
Try to find an userexit after save in ME51N and get the url from IDoc and try to use
data lo_attachment type ref to cl_gos_document_service.
clear ls_url.
create object lo_attachment.
call method lo_attachment->create_url
exporting is_object = ls_object
importing ep_url = lp_url.
In After save userexit you will also get the pur req docno also. this is needed for INSTID_A in the link table.
a®s
Edited by: a®s on Mar 4, 2008 12:28 PM
2008 Mar 05 2:24 PM
Thanks for your reply.
I have a problem with finding the right exit in which I would have a number of purchase requisition available.
Regards,
MMM