Quantcast
Channel: SCN : Document List - ABAP Development
Viewing all articles
Browse latest Browse all 935

Configuring HTTP Content Server (3) - GOS

$
0
0

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 :

 

oam1.png

 

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

oam1.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 :

oam1.png

I could attach a file using the menu :

oam1.png

 

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

 

And when it's done, the option "Attachment list" is activated.

oam1.png

oam1.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

 

pomme.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_lpor-typeid EQ 'BUS1001006'.

*   Create ...
     MOVE : 'I'           TO is_option-sign ,
            'EQ'          TO is_option-option ,
            'CREATE_ATTA' TO is_option-low.
     APPEND is_option to et_options.

*   Create attachement
     MOVE : 'I'           TO is_option-sign ,
            'EQ'          TO is_option-option ,
            'PCATTA_CREA' 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.

   ENDIF.


ENDMETHOD.

 

The result will be

oam1.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

oam1.png

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

 

 

Declare the links

 

Transaction OAC3

oam1.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

oam1.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_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

 

oam1.png

You see only the 3 entries filtered

 

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

oam1.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.

oam1.png

 

If I ask for the attachment list

oam1.png

 

The entry was created in the TOA01 table

 

oam1.png


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>