09-28-2020 10:30 AM
I am having trouble with adding the upload functionality for files to a custom program (a report in this case). After searching I came across the Generic Object Services option which I have tried.
To implement the GOS toolbar with its functions it requires an object type and object key. I had to use the tcode SWO1 to make a Business object "ZGOS" and implement it as shown below.
The program works and does display the GOS toolbar but it has the upload functionality which I require "Store business document" greyed out, as shown on the screenshot:
I then tested another scenario without using the custom Business object (ZGOS) but instead for Object type I used "KNA1" and Object key used "KUNNR" and the GOS toolbar works and does show the "Store business document" option to upload files.
Please advise how I might solve this or if there's another way of uploading documents via custom programs, we also have DMS if that's possible to use.
This is the test code I used to test:
REPORT <name>.
CONSTANTS : objtype TYPE borident-OBJTYPE VALUE 'ZGOS'. " custom object type
DATA: lo_manager TYPE REF TO cl_gos_manager,
la_obj TYPE borident.
PARAMETERS: p_kunnr TYPE kna1-kunnr.
at SELECTION-SCREEN OUTPUT.
clear la_obj.
* set object type to 'ZGOS' - custom object type created via tcode SWO1
la_obj-OBJTYPE = objtype.
* set object key = report name
select SINGLE name
FROM trdir
INTO la_obj-OBJKEY
WHERE name = sy-repid.
*START-OF-SELECTION.
* Set object Key, this is for testing the alternative to custom business object ZGOS
* la_obj-objtype = 'KNA1'.
* la_obj-objkey = p_kunnr.
* GOS toolbar (will be displayed in the toolbar)
CREATE OBJECT lo_manager
EXPORTING
is_object = la_obj
ip_no_commit = space
EXCEPTIONS
OTHERS = 1.
09-28-2020 10:43 AM
Did you check this link ?
https://blogs.sap.com/2017/01/26/generic-export-import-gos-attachments-of-business-objects/
09-28-2020 11:41 AM
Did you check for