Skip to Content
author's profile photo Former Member
Former Member

How to auto-press a button in MD48

There is a button in MD48 labeled "All Plants". We have made a slightly modified version of MD48 called ZD48. Since it is a 'Z' version, we can make custom changes. When the screen appears, the users would like the "All Plants" button to be automatically pressed. How would I trigger this button in the ABAP code? The sy-ucomm value is ''%GC 120 1". This is handled by some event handler which figures out the function code of 'PLALL'. I've gone through it in debug mode and see what is happening, but am unsure of how to trigger such an event in ABAP. Your suggestion would be greatly appreciated. Thanks. -Mark

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Dec 14, 2011 at 12:29 AM

    Hi, You can achieve this, just make this code and place it where you exactly want it,

    try like this...

    CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
     EXPORTING
        FUNCTIONCODE                 =  'YOUR_FUNCTION_CODE'
    EXCEPTIONS
      FUNCTION_NOT_SUPPORTED       = 1
      OTHERS                       = 2
              .

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.