Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CL_GUI_TOOLBAR

Former Member
0 Kudos

Hello,

Can we achieve the functionality of the cl_gui_toolbar exactly like we have it in <b>ME23N</b> under the heading <i>Services for Object</i> How can we get a toolbar attached on the title bar of the SAP application.

Regards,

Shekhar kulkarni

1 ACCEPTED SOLUTION

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can add the GOS icon on the title bar with the following code, you must use a object type and key.



REPORT ZRICH_0001 .


parameters: p_check type c.


at selection-screen output.

  CALL FUNCTION 'SWU_OBJECT_PUBLISH'
    EXPORTING
      objtype                 = 'BUS2038'
      objkey                  = '000010004288'
*     CREATOR                 = ' '
*     METHOD                  = ' '
*   TABLES
*     CONTAINER               =
   EXCEPTIONS
     OBJTYPE_NOT_FOUND       = 1
     OTHERS                  = 2.


start-of-selection.



Regards,

Rich Heilman

5 REPLIES 5

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can add the GOS icon on the title bar with the following code, you must use a object type and key.



REPORT ZRICH_0001 .


parameters: p_check type c.


at selection-screen output.

  CALL FUNCTION 'SWU_OBJECT_PUBLISH'
    EXPORTING
      objtype                 = 'BUS2038'
      objkey                  = '000010004288'
*     CREATOR                 = ' '
*     METHOD                  = ' '
*   TABLES
*     CONTAINER               =
   EXCEPTIONS
     OBJTYPE_NOT_FOUND       = 1
     OTHERS                  = 2.


start-of-selection.



Regards,

Rich Heilman

0 Kudos

Hello,

Yes it does work Rich. However one thing i wanted to know is from SWO1 we can find the object what about the key. From where do we get the key. Another thing I wanted to know is if i store a document where does get stored. How do i access it by other means or transaction.

Regards,

Shekhar Kulkarni

0 Kudos

from SWO1 enter the object and click display, which will display a tree and one of the nodes is <i><b>Key Fields</b></i>

For example BO BUS1001 the key field is material.

other means of getting the document.

Transaction OAOR

Enter the class name and class type as 'BO' and then the object key value .

Regards

Raja

0 Kudos

Well, in this case, the key is a maintenance order number. Eash business object would have its own "key".

For example, BUS1001 - Material, chances are that the key would be material number. I do not know where to look to be sure.

When you store a document, it gets uploaded into SAP. Don't know the exact tables where the binary code exists. I believe that you can access them via FMs and the classes which start with CL_GOS*.

Regards,

Rich Heilman

Former Member
0 Kudos

Hello Shekhar,

I'm not sure if it is going to be all that easy to have your buttons on the <i>title bar</i> of an SAP screen. The object services is a different concept altogether.

the thread has a related discussion.

Regards,

Anand Mandalika.