scn-gos

13
Generated by Jive on 2014-10-31+01:00 1 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.

Upload: vijay-kumar-hebbal

Post on 18-Aug-2015

35 views

Category:

Documents


2 download

DESCRIPTION

SAP GOS

TRANSCRIPT

Generated by Jive on 2014-10-31+01:001Activating Generic Object Services Toolbar inSAP ObjectsBusiness Requirement Many a times there is a business requirement of linking documents, entering notes, sendingnotes or linking an internet address to various SAP objects. These external attachments can bereference documents, pictures, Email attachments, designs, diagrams or related spreadsheets.To meet this requirement SAP has provided a tool bar called Generic Object services toolbar orGOS toolbar. What is GOSThe 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 aparticular 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.Activating Generic Object Services Toolbar in SAP ObjectsGenerated by Jive on 2014-10-31+01:002As shown above, the attachments created in ME21N screen will be linked to a particular purchase order andcannot 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 objectsthat are already active. Individual object services can also only be accessed using a sub-menu, so that thesymbol is not displayed in the toolbox. Adding an attachment Entering a Note with an Object Sending an Object with a Note Starting a Workflow for an Object Linking an Internet Address Entering a Bar Code Tracing Events for the Object (Subscription) Telephony Displaying Object History Displaying Workflows for the Object Displaying Transmissions for an Object Displaying RelationshipsActivating Generic Object Services Toolbar in SAP ObjectsGenerated by Jive on 2014-10-31+01:003 Displaying Attachments Activating Generic Object Services toolbar The Class CL_GOS_MANAGER is used for activating the GOS toolbar. We have to create an instance ofthe class. The instance of the class can be created by calling the constructor method. Also, a variable oftype BORIDENT needs to be created for the application business object. The object type and object key isassigned to this variable which is then passed to the instance of the class CL_GOS_MANAGER as shownbelow. This entire code has to be written either inside a suitable user-exit, enhancement point. If both user-exitand enhancement point are not applicable, implicit enhancement can be created inside the standard of thattransaction where GOS has to be activated.The syntax is: DATA: LR_GOS_MANAGER TYPE REF TO CL_GOS_MANAGER,LS_BORIDENT TYPE BORIDENT. LS_BORIDENT-OBJTYPE = 'BUS2081'.LS_BORIDENT-OBJKEY = '12345678902011'. CREATE OBJECT LR_GOS_MANAGEREXPORTINGIS_OBJECT = LS_BORIDENTIP_NO_COMMIT = ' 'EXCEPTIONSOBJECT_INVALID = 1. Here the object key is the combination of the SAP fields that are mandatorily required to execute thosetransactions. 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 hasbecome obsolete. The object type and the object key were passed as the import parameters to the functionmodule. ExampleFor the material BOM transactions (CS01, CS02, CS03), the GOS tool bar is not provided by standard SAP.See screen shot below.Activating Generic Object Services Toolbar in SAP ObjectsGenerated by Jive on 2014-10-31+01:004We 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 formOKCODE_BEARBEITEN. For transaction CS03 material number, plant, BOM usage are therequired fields. See screen shot below: Activating Generic Object Services Toolbar in SAP ObjectsGenerated by Jive on 2014-10-31+01:005 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 transactionSWO1Activating Generic Object Services Toolbar in SAP ObjectsGenerated by Jive on 2014-10-31+01:006 Click on display.Activating Generic Object Services Toolbar in SAP ObjectsGenerated by Jive on 2014-10-31+01:007 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 MaterialBOM (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 COMMITWORK command. That is also the default value. If the parameter is empty, the object services will call the COMMIT WORK. In this case, the datapassed 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 theenhancement is activated.

5. For Sales order, the service can be activated by setting user parameter.Set parameterSD_SWU_ACTIVE = X in the user profile. This will activate thegeneric object services for VA01, VA02 and VA03.

Steps to create attachments for a MaterialBOM1] Click on the GOS toolbar. Different options will be displayed.Activating Generic Object Services Toolbar in SAP ObjectsGenerated by Jive on 2014-10-31+01:0082.Click on Create-> Create attachment option. 3. A pop-up window will be opened to find a file or attachment as shown below.Activating Generic Object Services Toolbar in SAP ObjectsGenerated by Jive on 2014-10-31+01:009Select the file and click on open. 4. A success message will be displayed in the task bar.Activating Generic Object Services Toolbar in SAP ObjectsGenerated by Jive on 2014-10-31+01:0010 5. Now let us create an external document link. Follow the screen shot below:Activating Generic Object Services Toolbar in SAP ObjectsGenerated by Jive on 2014-10-31+01:00116. Click on Enter.A success message will be displayed at the status bar The attachment was successfully created. Viewing the attachments1] To view the list of attachments, go to attachment list as shown below.Activating Generic Object Services Toolbar in SAP ObjectsGenerated by Jive on 2014-10-31+01:0012 2] The list will be displayed as shown below.Activating Generic Object Services Toolbar in SAP ObjectsGenerated by Jive on 2014-10-31+01:0013 Some transactions where GOS is activatedusing this class.