Quantcast
Channel: SCN : Blog List - ABAP Development
Viewing all articles
Browse latest Browse all 943

Handy SAP function module to automate PAI events

$
0
0

Let me start my first blog with a handy function module that I came to know while solving one of the commonly faced issues in SAP(ABAP).

 

MESSAGE 'Text' TYPE 'E'.

On execution of this statement,processing stops,screen input field(s) gets disabled and the poor end-user has to press ENTER key to input again the screen input values. During my initial days as an ABAPer,I was not aware of the useful message_options of the MESSAGE statement (DISPLAY LIKE 'W' and 'E'). So I googled without any hope to find out if there is any way that I could automate the event of user pressing the ENTER key.Wow! I got one.Made me wonder whether there is anything that ABAP doesn't provide. ABAP is too good!!!!!

 

*Begin-Auto triggers ENTER command

 

     CALLFUNCTION'SAPGUI_SET_FUNCTIONCODE'

       EXPORTING

            functioncode           ='ENTER'

       EXCEPTIONS

            function_not_supported =1

            OTHERS                    =2.

*End-Auto triggers ENTER command


SIMILARLY YOU CAN WORK AROUND WITH OTHER STANDARD AND CUSTOM FUNCTION CODE VALUES (viz.,SAVE,EXECUTE etc.) THAT NEEDS AUTO-TRIGGER.

 

Cheers,

-K.ArunPrabhu


Viewing all articles
Browse latest Browse all 943

Trending Articles