Generic Object Services Toolbar in your Infoset Query Selection Screen
Author: Jogeswara Rao Kavala
Introduction
Image may be NSFW.
Clik here to view.
We all are very familiar with this icon, and very well know the capabilities of this tool in storing our documents, notes, URLs etc.
So I am not going to list the uses of the same here neither how to operate this tool,
All we are going to see here is:
How to get this to my Infoset Query Selection Screen?
We start here
The pre-requisite is that we need to have a GOS Business Object in the System ( in this case it is ZPM )
(Business Object is Created through Tcode SWO1 .Your technical person will be able to help in knowing this)
Now Let's get into the Main Exercise
Everything weneed to do is in theInfosetonly(SQ02).
And here Everything we have to do is in the Code Section of Extras area.
We know in the Code tab, there are different sections like
Image may be NSFW.
Clik here to view.
We need to give GOS code at the places shown by the arrows, namely, the DATA section and the AT SELECTION-SCREEN OUTPUT
Give the following Code in the DATA section
CONSTANTS: objtype TYPE borident-objtype VALUE 'ZPM'.
DATA: manager TYPE REF TO cl_gos_manager,
obj TYPE borident.
Image may be NSFW.
Clik here to view.
*----------------------------------------------------------------------------------------------------------------------------------
*Observe the Business Object in the above code
*----------------------------------------------------------------------------------------------------------------------------------
Give the following Code in the AT SELECTION-SCREEN OUTPUT section
CLEAR obj.
obj-objtype = objtype.
SELECT SINGLE tcode FROM tstct
INTO obj-objkey WHERE tcode = sy-tcode.
CREATE OBJECT manager
EXPORTING
is_object = obj
ip_no_commit = 'R'
EXCEPTIONS
OTHERS = 1.
Image may be NSFW.
Clik here to view.
*----------------------------------------------------------------------------------------------------------------------------------
Job done.
Now run the Infoset Query once through SQ01 and Execute.
You will find the GOS icon before the Title of the Selection Screen.
Do not attach your documents here.
Now, run your Tcode.You will find the GOS toolbar before the Selection Screen Title in your Infoset Query Tcode. Here you can create attachments, URLs, Notes and many possibilities you know about the GOS features.
The End result is
Image may be NSFW.
Clik here to view.
Note: In case Readers want to know how to create a GOS Business Object through SWO1, there are many documents available in SCN on this subject.
I am hopeful this will be useful for the Infoset users.
Thank you
Jogeswara Rao K
Adding this part on How to Create a GOS Business Object for the convenience of Readers
Creating a GOS Business Object say ZTEST.
Run Tcode SWO1, Click on Create, give these values and proceed.
Image may be NSFW.
Clik here to view.
Now you are in this screen.
Keep cursor on Interfaces node and click on Create (F5) icon.
Image may be NSFW.
Clik here to view.
Give value IFGOSXSERV in the pop-up and continue
Image may be NSFW.
Clik here to view.
So this Interface is added like this.
Image may be NSFW.
Clik here to view.
Save Image may be NSFW.
Clik here to view..
Place cursor on ZTEST.GOSAddObjects in Methods node
Image may be NSFW.
Clik here to view.
and click on the icon Redefine
Image may be NSFW.
Clik here to view.
Now keep cursor on ZTEST.GOSAddObjects and click on the push button Program
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
Say Yes to this pop-up
Image may be NSFW.
Clik here to view.
Do nothing here. Just SaveImage may be NSFW.
Clik here to view. the resulting program screen below, and Click on Back Image may be NSFW.
Clik here to view. arrow
Image may be NSFW.
Clik here to view.
Now Implement the Object by Edit --> Change Release Status --> Object Type --> To implemented
Image may be NSFW.
Clik here to view.
SaveImage may be NSFW.
Clik here to view.
In a similar way to the above set the Object Type status To Released .
(Ignore pop-ups appear if any)
SaveImage may be NSFW.
Clik here to view.
Now the final Step.
Click on to generate.Image may be NSFW.
Clik here to view.
You will get a Success message in the Status bar.
Now your GOS object ZTEST is ready for use.
(This can be used in the place where ZPM is used in the code used in the above document.)
Best of Luck
Jogeswara Rao K