SAP GOS Attachment : Authorization and Technical Overview
SAP GOS : Generic Object Services offer functions for Business Objects through different SAP Applications.
All object services are available in a function list (toolbox) in which the following functions are offered.
SAP GOS: Generic Object Services
- Entry of personal or general notes for an object
- Creation of attachments to an object
- Creation of relationships between an object and documents that are in the optical archive or that are subsequently scanned in and stored.
- Starts a workflow for an object
- Display of an overview of all workflows, where an object is involved
- Display of an overview of all business objects that are linked to an object You can call the linked objects by double-clicking – independent of whether the objects are from the current system or another SAP System.
- Sending of an object as an attachment of a message
- Subscription of an object. The user is then notified of changes to the subscribed object.
Adding an object to the favorites list.
( source: help.sap.com )
For Settings , you must have the authorizations in the roles
To use the Generic Object services, assign to user ( transaction SU01), these roles:
For Authorizations issues check the following SAP OSS Notes
491271 – Authorizations for generic object services
825348 – Authorizations for changes in the attachment list
552127 – FAQ: SAP office – Authorizations
This is a good guide for SAP Authorization:?Authorizations in SAP: 100 Things You Should Know About…
Technical Overview of SAP GOS
SAP GOS Tables Join
SELECT objtp objyr objno objdes file_ext objlen extct
APPENDING TABLE sood_tab FROM sood
PACKAGE SIZE 5000
FOR ALL ENTRIES IN lt_vbeln
WHERE objtp = lt_srgbtbrel-instid_b+17(3)
AND objyr = lt_srgbtbrel-instid_b+20(2)
AND objno = lt_srgbtbrel-instid_b+22(12).
SAP Mass extraction of Attachment
A recurrent business requirement is to mass extract PM attachment or Order Attachment,
Check this sample code to retrieve attachment and save them.
check this sample code: SAP Attachment Mass extraction.
SAP Mass Attachments Extraction for Sales Documents
SAP GOS Class
Here the list of Class that provides almost all the functionalities for GOS in SAP ( provided by blog.sap.com )
- The First method?GOS_GET_FILE_LIST: ?This method gets a listing of all the attachment details for a specific object type and key
- The Second Method?GOS_DOWNLOAD_FILE_TO_GUI:?This method by SAP GUI applications downloads the selected attachment to the workstation.
- Third Method?GOS_GET_FILE_XSTRING :?This method downloads attached files when using ABAP WebDynpro Applications.
- Next Method?GOS_GET_FILE_SOLITAB :?This method downloads attached files when using ITS Applications.
- The Method?GOS_ATTACH_FILE_XSTRING:?This method attaches files when using ABAP WebDynpro Applications.
- Method?GOS_ATTACH_FILE_SOLITAB:?This method attaches files when using ITS Applications.
- The method?GOS_EMAIL_ATTACHED_FILE :?This method will email attachments
- GOS_DELETE_FILE method helps to?delete attachments
You can get all the source code for this utility class for GOS to do almost everything with?Generic Object Services to download, convert, Attach, email and delete.
You may check this tutorial?SAP Mass Attachments Extraction for Sales Documents (ABAP)?as a business real case of the use of Attachments / SAP GOS extraction.
SAP GOS Activating Generic Object Services toolbar
An interesting SAP GOS Tutorial how to activate Generic Object Service Toolbar for two Case: ME21N ( for Purchasing Document ) and CS01/CS02 for SAP BOM.
It is based on the class?CL_GOS_MANAGER.
Here a sample implementation of CL_GOS_MANAGER class:
DATA: lr_gos_manager TYPE REF TO cl_gos_manager,
ls_borident TYPE borident.
" Keys for Object
ls_borident-objtype = 'BUS2081'.
ls_borident-objkey = '12345678902011'.
" Instanciate the GOS Manager Class
CREATE OBJECT lr_gos_manager
is_object = ls_borident
ip_no_commit = ' '
object_invalid = 1.
I tried to collect and select some helpful resources on GOS
- Attach files to GOS with Save, Retrieve, Delete functionality in SAP Web Dynpro ABAP 1/2
- Attach files to GOS with Save, Retrieve, Delete functionality in SAP Web Dynpro ABAP 2/2
- How to Maintain Generic Object Service List and Toolbar
- Frequently asked questions about Generic Object Services GOS