Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

File upload option grayed out using Generic Object Services (GOS) toolbar on a custom program

Njabulo
Explorer
0 Kudos

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.
2 REPLIES 2

raymond_giuseppi
Active Contributor
0 Kudos

Did you check for

  • Authorization check failure (SU53)
  • Active implementation of BAdI GOS_SRV_SELECT (SE19)