Execute specific task from button on list-processing screen
In Module Program , one BDC is runnig and after that all message is displaying by using
SET PF-STATUS 'SPACE'.
LEAVE TO LIST-PROCESSING.
Now Requirement is on list-processign output screen , one button will be their in application toolbar ,
if user click on that button then it will execute specific function .
_But Problem is i am not able to catch when user has click that button ._
Pramod Manjunath replied
When they are displaying the BDC messages which screen number are they using ( if they are using a separate screen of course). IF they are using any separate screen you find out that screen. goto SE51 and give the screen number. Go to flow logic and create a New PAI for it and handle the button click there as i have shown in my code above.
If they are displaying the message on Just the normal standard SE16 list(not calling a separate screen). You need to use the event 'AT USER-COMMAND' in your calling program.
In that event you need to check for sy-ucomm. Your button will have a function code specified in the 'SPACE' pf-status. So if sy-ucomm = fcode of your button then perform the function you require.