Generic Object Services

SAP define GOS has the link between ArchiveLink and the SAP Business Workflow.

Simply, GOS is a set of tools you could find in a lot of standard transaction. These tools allow you to save document, URL, .. and link them to transaction.

GOS quickly

You will have a GOS active (sometimes is not active) when you see this icon in the left upper :

/wp-content/uploads/2014/01/oam1_363772.png

When you click on the arrow you will find a menu like this one :

/wp-content/uploads/2014/01/oam1_363772.png

This menu could change with the SAP Release.

Example : Transaction MM03

If I open the transaction MM03, enter a material number, select the first view, I will have :

/wp-content/uploads/2014/01/oam1_363772.png

I could attach a file using the menu :

/wp-content/uploads/2014/01/oam1_363772.png

SAP will open you a pop-up windows to select a file.

And when it’s done, the option “Attachment list” is activated.

/wp-content/uploads/2014/01/oam1_363772.png

/wp-content/uploads/2014/01/oam1_363772.png

You could have lines without the creator name. It’s the case of the document store in the content server.

Modification of the menu

First, remember that GOS is mutual of all the transaction where it’s activated.

The table SGOSATTR

The table SGOSATTR contain the menu, you could change it using the SM30 transaction.

The logic of the menu order is done with the column NEXT

The logic of the folder entry is done with the column SUBSERVICE

/wp-content/uploads/2014/01/pomme_363873.png

The line CREATE_ATTA is a directory, the type is set to “3”

The line PCATTA_CREA is an action line, the type is set to “1”

You could also find into this table the class. For example the line PCATTA_CREA is link to the class CL_GOS_SRV_ATTACHMENT_CREATE

You could insert your own entry into this table (don’t forget to set the correct class), or you could set your own class.

The BADI GOS_SRV_SELECT

You could modify the menu using this BADI by filtering.

Example : I would like to keep only the possibility to create an attachment and display the list of attachment for the MM03 transaction.

Code

METHOD if_ex_gos_srv_select~select_services.

   data is_option type SGOS_SELS.

* For Material Master
   IF is_lportypeid EQ ‘BUS1001006’.

*   Create …
     MOVE : ‘I’           TO is_optionsign ,
            ‘EQ’          TO is_optionoption ,
            ‘CREATE_ATTA’ TO is_optionlow.
     APPEND is_option to et_options.

*   Create attachement
     MOVE : ‘I’           TO is_optionsign ,
            ‘EQ’          TO is_optionoption ,
            ‘PCATTA_CREA’ TO is_optionlow.
     APPEND is_option to et_options.

*   Attachment list
     MOVE : ‘I’           TO is_optionsign ,
            ‘EQ’          TO is_optionoption ,
            ‘VIEW_ATTA’   TO is_optionlow.
     APPEND is_option to et_options.

   ENDIF.

ENDMETHOD.

The result will be

/wp-content/uploads/2014/01/oam1_363772.png

I’m sure you will say “OK, that”s cool, but why doing this ?”

When you store document inside SAP, not in HTTP Content Server, most of the time the document is saved in the table SOFFCONT1. If you have users like to doing this, your table will grow very quickly. In my previous job, this table was 1/4 of the SAP database size.

So I lock all the possibility to create attachment with this BADI.

And others point, is to create specific document type, lets do an example.

Add specific entries in Material Master GOS

Declare document type

Transaction OAC2

/wp-content/uploads/2014/01/oam1_363772.png

We define two document types : A picture and the documentation in PDF format.

Declare the links

Transaction OAC3

/wp-content/uploads/2014/01/oam1_363772.png

For the two document type, we define the link. We will used the Content Repository Z1 (define in the first doc) and the link table TOA01

Modify the menu

Transaction SM30 + SGOSATTR

/wp-content/uploads/2014/01/oam1_363772.png

(it’s a screenshot of SE16)

First we need to modify a line to insert the new key. We modify the NEXTSRV of the existing line BARCODE

We insert a new line ZMM_MATERIAL with the class CL_ARL_SRV_LINK.

Insert the code to limit the menu for the MM0(1,2,3) transaction

SE19 for the BADI GOS_SRV_SELECT

CODE

METHOD if_ex_gos_srv_select~select_services.

   data is_option type SGOS_SELS.

* For Material Master
   IF is_lportypeid EQ ‘BUS1001006’.

*   Create material attachment
     MOVE : ‘I’            TO is_optionsign ,
            ‘EQ’           TO is_optionoption ,
            ‘ZMM_MATERIAL’ TO is_optionlow.
     APPEND is_option to et_options.

*   Attachment list
     MOVE : ‘I’           TO is_optionsign ,
            ‘EQ’          TO is_optionoption ,
            ‘VIEW_ATTA’   TO is_optionlow.
     APPEND is_option to et_options.

*   Archive (delete)
     MOVE : ‘I’           TO is_optionsign ,
            ‘EQ’          TO is_optionoption ,
            ‘ARL_LINK’   TO is_optionlow.
     APPEND is_option to et_options.

   ENDIF.

ENDMETHOD.

Result

/wp-content/uploads/2014/01/oam1_363772.png

You see only the 3 entries filtered

If you select Material attachment you will have a pop-up :

/wp-content/uploads/2014/01/oam1_363772.png

To post document or picture you only have to make a drag & drop or you could double click on the element : Document or Picture of material.

/wp-content/uploads/2014/01/oam1_363772.png

If I ask for the attachment list

/wp-content/uploads/2014/01/oam1_363772.png

The entry was created in the TOA01 table

/wp-content/uploads/2014/01/oam1_363772.png

To report this post you need to login first.

3 Comments

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

  1. Saurabh Tiwari

    Hi Frederic,

    I have gone through you document. One thing is not clear to me.

    Where you have defined the ‘Content Repository’ . How we will manage the content repository?

    I could see only the ID of it but no direct interface.

    Could you please throw some light on where the data is stored in content repository physically?

    Does it mean that in the above screen shot, system is showing us the saved data (pdf) which is just shown here and it is not stored here and while accessing it it is fetching/calling data from the other content repository. Am I right?

    Thanks & Regards

    Saurabh

    (0) 
  2. Jay Zhang

    Hi Frederic,

    i upload CAD file as matrrial attachment using GOS, It’s works fine and the document save to my HTTP CS server! but it was can not be previewed when I click ‘Display’ Icon in the attachment list dialog screen, is there any way to open GOS attachment document using locl PC application program ??  in my case, I hope I can disply the CAD file using my local PC CAD application.

    Thanks!

    (0) 

Leave a Reply