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 :
When you click on the arrow you will find a menu like this one :
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 :
I could attach a file using the menu :
SAP will open you a pop-up windows to select a file.
And when it's done, the option "Attachment list" is activated.
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
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. |
The result will be
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
We define two document types : A picture and the documentation in PDF format.
Declare the links
Transaction OAC3
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
(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_lpor-typeid EQ 'BUS1001006'. * Create material attachment MOVE : 'I' TO is_option-sign , 'EQ' TO is_option-option , 'ZMM_MATERIAL' TO is_option-low. APPEND is_option to et_options. * Attachment list MOVE : 'I' TO is_option-sign , 'EQ' TO is_option-option , 'VIEW_ATTA' TO is_option-low. APPEND is_option to et_options. * Archive (delete) MOVE : 'I' TO is_option-sign , 'EQ' TO is_option-option , 'ARL_LINK' TO is_option-low. APPEND is_option to et_options. ENDIF. ENDMETHOD. |
Result
You see only the 3 entries filtered
If you select Material attachment you will have a pop-up :
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.
If I ask for the attachment list
The entry was created in the TOA01 table