2017 Nov 03 10:13 AM
Hi, Guys Need your Help. I want to use SAP GOS(Generic Object Services) to Attach, save and Display the Attachments in my Customized Application.
i want to know how MM02 saves and retrieves the attachments against material number. i want to add same functionality in my program.
I have used
SGOS_DOCUMENT_CREATE_DIALOG this FM to save the Attachment but it does not save the File in SRGBTBREL Table with key field.
2017 Nov 03 12:05 PM
2017 Nov 03 2:08 PM
Which business object did you use ?
GOS Manager in MM02 uses BUS1001006.
You can set a break point in constructor of CL_GOS_MANAGER.
DATA:
ls_object TYPE borident,
lc_objkey TYPE borident-objkey.
ls_object-objkey = '100-100'.
ls_object-objtype = 'BUS1001006'.
ls_object-logsys = space.
CALL FUNCTION 'SGOS_DOCUMENT_CREATE_DIALOG'
EXPORTING
is_object = ls_object
ip_title = 'SDN'
IMPORTING
ep_document = lc_objkey.
WRITE: / lc_objkey.
COMMIT WORK.
Method CL_GOS_DOCUMENT_SERVICE->CREATE is a wrapper for FuMo SGOS_DOCUMENT_CREATE_DIALOG.