Skip to Content

Activating Generic Object Services Toolbar in SAP Objects

Business Requirement

Many a times there is a business requirement of linking documents, entering notes, sending notes or linking an internet address to various SAP objects. These external attachments can be reference documents, pictures, Email attachments, designs, diagrams or related spreadsheets. To meet this requirement SAP has provided a tool bar called ‘Generic Object services toolbar’ or ‘GOS toolbar’.

What is GOS

The GOS is a toolbar that provides different functions such as adding an attachment, creating a document link, displaying all the attachments etc. The attachments are not generic for that transaction but are specific for a particular SAP object. The GOS toolbar can be activated using a class CL_GOS_MANAGER.

Currently in the system the GOS toolbar is available by default only for certain SAP objects.

For Ex. ME21N. See screen shot below. The GOS toolbar is highlighted.



As shown above, the attachments created in ME21N screen will be linked to a particular purchase order and cannot be seen for any other purchase order in ME22N or ME23N screens.

Services that the GOS toolbar provides

The following list shows all possible object services. Not all object services are available – it depends on objects that are already active. Individual object services can also only be accessed using a sub-menu, so that the symbol is not displayed in the toolbox.

Activating Generic Object Services toolbar

The Class CL_GOS_MANAGER is used for activating the GOS toolbar. We have to create an instance of the class. The instance of the class can be created by calling the constructor method. Also, a variable of type BORIDENT needs to be created for the application business object. The object type and object key is assigned to this variable which is then passed to the instance of the class CL_GOS_MANAGER as shown below. This entire code has to be written either inside a suitable user-exit, enhancement point. If both user-exit and enhancement point are not applicable, implicit enhancement can be created inside the standard of that transaction where GOS has to be activated.

The syntax is:




LS_BORIDENT-OBJKEY = ‘12345678902011’.







Here the object key is the combination of the SAP fields that are mandatorily required to execute those transactions. This will publish the GOS with the supplied BO instance if it is used in an executable program.

Earlier the Function Module SWU_OBJECT_PUBLISH was used for activating the GOS toolbar which now has become obsolete. The object type and the object key were passed as the import parameters to the function module.


For the material BOM transactions (CS01, CS02, CS03), the GOS tool bar is not provided by standard SAP. See screen shot below.


We will see below how we can activate the GOS toolbar using above class for transactions CS01 / CS02 / CS03.

To activate it we need to do an enhancement in include ‘LCSDIFCD’ inside form OKCODE_BEARBEITEN. For transaction ‘CS03’ material number, plant, BOM usage are the required fields. See screen shot below:


  1. So the object key for above example is combination of values of material number, plant and BOM usage.

        How to get the object key

  The object key can be found out from the object type. Enter the object type in transaction ‘SWO1’


   Click on display.


E.g. If material number is 100000000000000099,

        plant is – 1234 and

        BOM usage – 5, the object key will be

        Object-key = ‘10000000000000009912345’

   2. The object type can be found in table TOBJ and also from transaction SWO1.The object type for Material BOM (CS01/02/03) – BUS1082.

   3. Leave the IP_NO_COMMIT parameter as blank.
       If the parameter IP_NO_COMMIT is set, it means that your application should start ‘COMMIT WORK’ command. That is also the default value.

       If the parameter is empty, the object services will call the ‘COMMIT WORK’. In this case, the data passed should be consistent.

       When called because the database changes cannot be reversed using ‘ROLLBACK’.

   4. The GOS toolbar / Button will now be visible and activated in t-codes CS01, CS02 and CS03 after the enhancement is activated.


   5. For Sales order, the service can be activated by setting user parameter.Set parameter SD_SWU_ACTIVE = ‘X’ in the user profile. This will activate the

      generic object services for VA01, VA02 and VA03.


Steps to create attachments for a Material BOM

1] Click on the GOS toolbar. Different options will be displayed.


2.  Click on ‘Create-> Create attachment’ option.


3. A pop-up window will be opened to find a file or attachment as shown below.

  Select the file and click on open.


4. A success message will be displayed in the task bar.


5. Now let us create an external document link. Follow the screen shot below:


6. Click on Enter.


A success message will be displayed at the status bar ‘The attachment was successfully created’.

Viewing the attachments

1] To view the list of attachments, go to attachment list as shown below.


2] The list will be displayed as shown below.


Some transactions where GOS is activated using this class.


You must be Logged on to comment or reply to a post.
  • Hi,

    I am not able to write the code that you provide in above part in enhancement include "LCSDIFCD" for CS01/CS02/CS03.

    Please explain me how i will resolve this Issue.


    • Hi Ashutosh,

      If I understand your query correctly, the business object will always be known as to which SAP object needs to be enhanced to have the GOS toolbar and will not be dynamic.For e.g. you will have clear requirement to enhance this particular transaction.Whereas the object key will always be dynamic and its values will be obtained in the standard structures (table,workareas) which get filled run-time inside the includes where you write the code.

      Hope this helps.


  • Hi Abhijeet,

    After doing the Implicit enhancement i did the code in below format then its working for all the material,Plant and BOM Usage.



    data : l_objky(23) type c.



    IS_BORIDENT-OBJKEY  = l_objky.




    IP_NO_COMMIT = ' '



    Thanks a lot for your Document.

    • Hi Aditya,

      Thank you for your query. You can achieve the requirement by following the above post.

      If you debug, you will get an include in the PBO for CJ30 where you can add this piece of code thru implicit enhancement.

      The include name is - MKBUDF02

      Form name - INIT_PROJ_PBO

      Click on the 'Enhance' button (Shift + F4). Go to Menu->Edit->Enhancement Operations->Show implicit enhancement options.

      A dotted line will appear. Right click->Enhancement implementation->Create

      Then write following code:







      IP_NO_COMMIT = ' '



      Activate the enhancement, executee CJ30 and you will see the GOS toolbar.

      Hope this helps. Try this out and let me know if you face any issues.


      Abhijeet Kapgate

      • Hello!

        We activated GOS for CJ30, but the menu 'Store business document' isn't active.

        Although it's active in CJ20N, where I can assign documents to Project Definition (2001) and view.

        Any ideas why it's disabled in CJ30?

  • Hi I am trying to use the GOS for VA41. Currently the service is enabled for VA42 and VA43. But the business requirement is to enable the service for VA41 also. I did get the following docmantation for "Publishing Object and offering the Toolbox Directly" where it talks about using BOR_ID in Create transactions.

    As I am new to GOS I still dont where exactly that peice of code should be implemented.

    Like above reply could someone help me to let me know where I can implement the GOS for VA41.

    Any help is appreciated.



    • Hi Hima,

      You can achieve this by doing implicit enhancement in include 'MV45AF0T_TRANSAKTION_INIT' in form 'TRANSAKTION_INIT'.



      LS_BORIDENT-OBJKEY = vbak-auart.

      in the above code.

      Activate the enhancement and the GOS toolbar will be activated for VA41.


      Abhijeet Kapgate

      • Thank you very much for quick reply. It worked lika a charm.

        I had one issue though. For customer we have implemented 2 new functionality for GOS. And those are coming in for VA41 also. How do I avoid that.

        • Hi Abhijeet,

          Thank you for your response. I have placed the condition already as I dont want this to be enabled for VA01.

          here is my code.

             IF sy-tcode = 'VA41'.
                  LS_BORIDENT TYPE BORIDENT.

            LS_BORIDENT-OBJTYPE = 'BUSISM0030'
            LS_BORIDENT-OBJKEY = vbak-auart.

                IS_OBJECT = LS_BORIDENT
                IP_NO_COMMIT = 'X'
                IP_NO_INSTANCE = 'X'
                OBJECT_INVALID = 1.

          here is my issue. The workflow Icon is activate, but Start workflow, workflow overview, or Archived workflows options are greyed out.

          But these options are available in VA42 and VA43 GOS which are standard.


    • Hi Hima,

      The ICON 'Workflow' has three options - Start workflow, workflow overview and Archived workflows.

      A]Start workflow - This is used for starting workflows that use the object. All suitable workflows automatically determine the system and are offered for execution.

      The SAP System contains active workflows that fulfill the following prerequisites:

      1.They must be allowed to start the workflow.

      2.The workflow is only allowed to have the object as an obligatory import parameter.

      When you click on start workflow - All active workflows which fulfill the prerequisites above are displayed.

      B] Display workflow - This will display the overview of the workflow, if any.

      C] Archieved workflow - All workflows that are running or have been executed, in which your document (object) has already been edited, are displayed.

      So as described above this is standard feature. In my case the behavior of the 'Workflow' button on the GOS toolbar is same for VA41, VA42 and VA43 i.e. workflow Icon is activate, but Start workflow, workflow overview, or Archived workflows options are greyed out.



      • Thank Abhijeet for you reply,

        in our system SAP ERP 6.06 the GOS button does not appear in CN28 Transaction by standard.

        i implemented the solution of this document and it function OK.  but my problem now is the integration between CN28 Transaction and OpenText Throughout SAP ARCHIVELINK.

  • Hi Abhijeet (and others too!),

    One remark and one question.

    The remark :

    Despite of what you have written above "5. For Sales order, the service can be activated by setting user parameter.Set parameter SD_SWU_ACTIVE = ‘X’ in the user profile. This will activate the generic object services for VA01, VA02 and VA03." the system is not activated for VA01 but for VA02 and VA03 only. Can you comment?

    The question :

    Do you know how to achieve in VA01 a simultaneous creation in "Services for Object" of a (default) link to internal network address for sales order on one hand and in Windows of a (default) folder named as "SAP sales odrer number" & "SAP customers name" ?

    The business background would then be for sales clerk to populate whenever needed the Windows folder created in such automated way with whatever external document (email, plan, spreadsheet, picture) he needs in order to manage the follow-up of customer order. Thus any person authorized to display customer order (VA03) could check the current status of customer order processing beyond SAP-related matters without systematically disturbing the sales clerk.

  • Hi Abhijeet(and others too!),

        Thanks for all ur valuable suggestions.Iam working out GOS in FMX1 transactions.

    IN PBO of the FMX1 we have include 'LFMFRF05(1444)'.Here with implicit enhancement i wrote the below code




             LS_BORIDENT-OBJTYPE = 'FMRE'.


              CREATE OBJECT lr_gos_manager


                      is_object        =        LS_BORIDENT

                      ip_no_commit     =    'X'


       The Gos activated successfully and I can able to use create attachement service.But when I click on the Attachment list it is giving dump like below.



    Thanks In advance,


  • Hi,

    I tried to activate the GOS- Generic Object Services for VA01/VA02/VA03 using the user parameter SD_SWU_ACTIVE = ‘X’, but it did not work. Any ideas why?



    • Hi Tanmoy,

      This should work. Probably you will have to log-off after making the changes and log-in again.

      The changes should be visible on your next log-in.

      If still not, then you will have to contact the basis team.



  • Thanks for this document!  Do you know of this process being used to attached documents to a batch?  (I.e. MSC2n?)


  • Hi Abhijeet,

    i need to activate GOS for the following tcodes with the business objects listed

    Code Desc Object
    MIGO GRN BUS2017
    ML81N Service Sheet Entry BUS2091
    MB1A Goods Issue BUS2017
    QA32 Change Inspection lot BUS2045
    PA30 HR Master BUS1065
    CS01 BOM bus1080
    QP01 Inspection Plan BUS1191
    C201 Recipe Master BUS1041
    MI10 Physical Inventory Posting BUS2028

    1.for CS01, i have used the technique you suggested. its working but the problem is option 'store business object' is inactive
    2. how do i make enhancement for QP01 and C201 in the same include(as per your doc)? what must be the object key for both?
    3. how do i activate 'store business object' in every transactions?

    please do help me

    thanks in advance

  • Abhijeet,

    Great information. How can you notify a user who is displaying the object that an attachment exists? This is needed because a user may not know that an attachment exists. Also how can you require an attachment?



  • Hi Sap Team,

    I Created the docuemnt type in oad5 for CRC3 Tranascation. But , Am not able to attach the document. If Error through a Store Business Document is Inactivate Mode. How to re-solve the enable the Store Business document in gos.Store Business Document.png

    Store Business Document.png
    • Hi Reddy,

      You may Try the following,

      1. goto SM30

      2. maintan the table SGOSATTR

      3. select the entry with folowing
            Name         : ARL_LINK
            Description : Store Business Object

            Quick Info   : Store business document

            Class         : CL_ARL_SRV_LINK

            Icon           : ICON_VIEWER_OPTICAL_ARCHIVE

            next           : BARCODE


      4. then check the 'commit' check box for the same entry
      5. Save

      Log off and Log in again and check it


  • If object services icon does not appear, there may be the next reasons:

    1. User type must be dialog

    2. The user parameter must be set up SD_SWU_ACTIVE   =  X

    3. The user parameter FLAG_DIALOG_STATUS must not be equal X

  • Hi Abhijeet,

    my requirement is to add GOS to CS01/CS02/CS03 and CA03/CA02/CA01.

    I have gone through your document which is very usefull.Our system is ECC5 System hence there is no scope to create inplicit enhancement spot in the inculde "LCSDIFCD" for CS01 and "LCPDIFH1"for CA01.Can you please suggest how can this be achived in ECC5 system

  • Hi Abhijeet,

    For PO ME23N, RFQ ME43 and ME33L Transactions, is there any parameter available like SD_SWU_ACTIVE  for VA03 or do we need to activate the enhancement for purchase related documents.

    In document archiving process, we are viewing attachments with the GOS icon "Attachment List"  from a external server and this works fine with the sales documents but "Attachment List"  is inactive in the GOS icon for purchase related documents. Is there any parameter available for Purchase documents.



    • Hi Sudesh,

      The parameter 'SD_SWU_ACTIVE' is only for VA01/02/03. You will need to activate the GOS.

      Regarding the 'Attachent List', it should be active if there are any documents.


      Abhijeet Kapgate

  • Hi Abhijeet Kapgate,

       It's really a very good document for all those who wants to learn GOS toolbar activation. I was noticed your document while searching for GOS activation process. Seriously it helped a lot. Then my query is that i just want to activate GOS toolbar for MB21/Mb22/Mb23(Material reservation). I am using ECC6.0. Can you guide me which include/coding part would be feasibily to inorder to achieve this? Thank you so much in advance. Eagerly waiting for your response.

    With Regards,


    • Hi Kavi,

      Glad that the document helped you.

      For activating the GOS for material reservation, please use the include MM07RFP0.

      Alternatively you can find other includes by debugging, if this include does not serve your purpose. Use the following code in the implicit enhancement:



            LS_BORIDENT-OBJTYPE = 'BUS2093'.





      IP_NO_COMMIT = ' '



      I tested and it worked. Hope this helps you.

      Thank You.

      Abhijeet Kapgate

      • Hi Abhijeet Kapgate,

            Thanks for your valuable info ūüôā Then i tried out this by inserting those coding into implict enhancement. It can be activated the GOS toolbar. Attachments can be inserted. But there is a new problem that the attachment list is not refreshing properly.

           For instance, i have attached one file into one material reservation number say '10001'. Then when i go to mb21 for creating another reservation that old attachment contains for this newly created reservation as well(Instead the attachment list should be empty as its a new creation right?). That is attachment list is not refreshing. It is containing old material number attachment as well. Pls advise whether we need to do code for refresh attachment list if go to Mb21. If yes then how it can be applicable for MB22./MB23. Once again many thanks for your great support ūüôā

        • Hi KAVI,

          I suppose the attachments are being stored for the transaction and not for particular material reservation. May be you can try to use different include to create implicit enhancement and write the code there.



  • Hi Abhijeet,

    How do we control the events associated with this toolbar from our own custom program?

    For example, I have an alv grid display & as validation, I need to achieve the following:

    If I select more than one record in alv & click on this GO toolbar, it should give an error.

    To achieve this validation, I need to get the control of this GOS in my program. How can we do it? Please reply.

    Thanks in advance,


  • Hi Abhijeet,

    Found the reason for the old attachment repetition in MB21 and MB22. As SAP standard process, we are not supposed to add attachments in creation documents such as VA01, ME21N and MB21 etc. Because all attachments will be stored as binary format in table SRGBTBREL according to object type.

        So in my case, even i add attachment in MB21, it will get stored with ID '0000000000' since document number will be created only after it get saved. So that's the reason whenever i go into MB21 freshly i could see the old attachments. Now i have removed it using below selection coding. It's working fine. Thanks for your support.

        Select count(*) into lv_count

               from SRGBTBREL

               where INSTID_A = '0000000000' AND TYPEID_A = 'BUS2093'.

        DO lv_count TIMES.

        Delete FROM SRGBTBREL where INSTID_A = '0000000000' AND TYPEID_A = 'BUS2093'.

        IF sy-subrc <> 0.




    With Regards,


  • Hi Abhijeet,

    Can you please confirm if we have to implement the BADI -- "CL_PLM_AUDIT_GOS" to enable GOS in PLMD_AUDIT transaction?

    OR GOS will be enabled by implementing the code mentioned in the blog above in one of the includes of PBO? Also what if there is no business object related to the transaction?


    • Hello Luis,

      You can use the business object BUS3005 for condition type. The key field is ConditionRecordNo. Please try the above approach and see .

      You might need to add required attributes and methods to this object.


      Abhijeet Kapgate

    • Hi you can put the enhancement in Include¬†MV130F0F¬†¬†¬† :¬†FORM¬†FCODE_BEARBEITEN

      if sy-tcode = 'VK12' and xvake-knumh is not INITIAL .




      IS_BORIDENT-OBJKEY  =  xvake-knumh .

      IP_NO_COMMIT = ' '


  • Hi Abhijeet n Everyone,

    Just wanted to know that in my system i dont get sub option "Create Attachment" in VA02/VA03.

    I get only 4 option on clicking create button:

    "Create Note"

    Create External Document(URL)

    Store Business Document

    Enter Barcode

    but i am not getting the "Create Attachment" option which should allow me upload an excel or word document to Sales order.

    Thanks for your help in advance



  • /
    • Hi Holger,

      Sorry for the delayed response. I have used the same business object for inspection plan and the key would comprise of MATNR, WERKS and PLNNR. Hope this helps.


      Abhijeet Kapgate

      • Hi Abhijeet,

        no probleme.

        Could you please give more details how to run BUS1191 via QP01-QP03?

        With CWBQM it already works fine but I would like to run with QP01 to QP03.

  • Hi Abhijeet,

    Its really a very useful document. I am facing a problem in attaching the invoice document to the attachment list in VF02 transaction. I am trying to attach the invoice using an output type(External Send) the document is not getting attached.

    Could you please suggest how to attach the invoice document output generated via external send?

  • Hi Hemanth,

    For Sales order, the service can be activated by setting user parameter.Set parameter SD_SWU_ACTIVE = ‘X’ in the user profile. This will activate the generic object services for VA01, VA02 and VA03 T-codes.


    Mahendra Reddy.P

    SAP OpenText Consultant.

  • Hello abhijeet,

    Thanku very much for this valueable document. is it possible to insert GOS in transaction like POP1, POP2 and POP3 via enhancement??

    Best regards


  • Hi Abhijit,

    I have the same requirement as mentioned above by Atul, I am trying to activate GOS toolbar for EHS&M modules transaction EHSAMBTAET where it does not have any standard Business Object. Here we have created a custom business object and trying to create a document link from SAP to Open text.

    Let me know your thoughts.



    • Hi Wali,

      So, have you tried the code by passing the business object type and the object key in the class-CL_GOS_MANAGER.



  • Hi Abhijeet,

    I am having a similar requirement for IW41 (PM Order Confirmation) transaction. Could you please let me know what would be the business objtect type for the same in order to active the GOS functionality. The F4 help of SWO1 provides a big hit list. Not sure which one to take.



    • Hi Shubhadip,

      Sorry for the delayed response. Please try with the following as I am also not sure about the exact one:






  • Hello Abhijeet,

    Thanks a lot for such a descriptive document. It helps a lot.


    I am working on a custom class based workflow where i need to proide GOS tool bar functionality. Could you please tell me how to utilize custom class instead of Business Object for creating GOS toolbar ?



  • I've implemented GOS in outline agreement and I'm using BOR BUS2014. Insert code into badi name ME_PROCESS_PO_CUST.
    The reason why I insert this GOS in ME35K because the approver normally will check the attachments in contract before
    approve it. Here the method I used.

    DATA: lr_gos_manager TYPE REF TO cl_gos_manager,
    ls_borident TYPE borident,
    lv_ekko(15) type c,
    it_ekko type ekko.

    FIELD-SYMBOLS <ekko> TYPE ekko.

    IF sy-tcode EQ 'ME33K'.

    lv_ekko = '(SAPMM06E)EKKO'.
    ASSIGN (lv_ekko) TO <ekko>.
    it_ekko-ebeln = <ekko>-ebeln.

    ls_borident-objtype = 'BUS2014'.

    ls_borident-objkey = it_ekko-ebeln.

    CREATE OBJECT lr_gos_manager
    is_object = ls_borident
    ip_no_commit = ' '
    object_invalid = 1.


  • Hi Abhijeet,

    I tried the same with ME31L t-code and while creating Schedule Agreement I am attaching one Excel file but when I saw that schedule agreement in ME33L I couldn’t find the attachment.   This is my below code.

    DATA: lr_gos_manager TYPE REF TO cl_gos_manager,
    ls_borident TYPE borident,



    CREATE OBJECT lr_gos_manager
    is_object      = ls_borident
    object_invalid = 1.


  • Hi Abhijeet,

    Thanks for the post.

    I have a requirement to activate GOS for FB11 transaction. I added the piece of code you have provided in an implicit enhancement. The GOS tool bar appears.

    The user wants the workflow overview option. But in my case, GOS is activated and works for only few documents.

    For rest of them it throws a message : There are no workflows that have already worked with this object.


    Could you please help me with this. Is there a way I can debug GOS and see why no workflow data is being pulled out.


    Note: I can see workflow items for this particular document in SWI1.




  • For CS02/CS03 I did the following:

    1. Added an implicit enhancement in include LCSDIF2B (FORM CUA_SETZEN_U0 )
    2. Added the code below


    * Activate GOS for CS02/CS03
    data: lr_gos_manager type ref to cl_gos_manager,
          ls_borident    type borident.
      if sy-tcode = 'CS02' or sy-tcode = 'CS03'.
        ls_borident-objtype = 'BUS1080'.
        concatenate tsd-matnr tsd-werks tsd-stlan into ls_borident-objkey.
        create object lr_gos_manager
            is_object = ls_borident
            ip_no_commit = ' '
          object_invalid = 1.
  • For transaction MSC3N, add implicit enhancement in include LCHRGF02 (End of Form init_screen_data )

      DATA: lr_gos_manager TYPE REF TO CL_GOS_MANAGER,
            is_borident TYPE BORIDENT.
      CONCATENATE dfbatch-matnr dfbatch-charg dfbatch-werks INTO is_borident-OBJKEY.
      IS_BORIDENT-OBJTYPE = 'BUS1001002'.
      CREATE OBJECT lr_gos_manager
      IS_OBJECT = is_borident
      IP_NO_COMMIT = ' '