‎2008 Sep 08 10:31 AM
Hi ,
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 ._
‎2008 Sep 08 10:55 AM
Hi ,
I am not getting which PAI actually its going on list-processing screen o/p their no pbo , pai ?
‎2008 Sep 08 10:33 AM
Hi,
You need to handle the user command.
If you are using ALV to display the resulting messages, you shall have a USER-COMMAND parameter for the FM used to display the ALV.
You need to handle that.
Check for the ok-code or sy-ucomm. Assign a F-code for the button in the STATUS declaration in SE41. Use the F-Code to perform action in your program.
Regards,
Kiran
‎2008 Sep 08 10:38 AM
Hi,
You can assign a function code to that button in the screen painter. Once the function code is assigned, to check in the user has clicked on the button, you need to catch the OK_CODE field from the screen.
Say your Function code is 'CLICK' in your PAI, you need to handle this as below.
if OK_CODE = 'CLICK'.
====>> Your commands
endif.
Regards,
Pramod
‎2008 Sep 08 10:55 AM
Hi ,
I am not getting which PAI actually its going on list-processing screen o/p their no pbo , pai ?
‎2008 Sep 08 11:45 AM
Hi Rishu,
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.
Regards,
Pramod