Application Development and Automation 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: 
Read only

Execute specific task from button on list-processing screen

Former Member
0 Likes
809

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 ._

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
647

Hi ,

I am not getting which PAI actually its going on list-processing screen o/p their no pbo , pai ?

4 REPLIES 4
Read only

Former Member
0 Likes
647

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

Read only

Former Member
0 Likes
647

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

Read only

Former Member
0 Likes
648

Hi ,

I am not getting which PAI actually its going on list-processing screen o/p their no pbo , pai ?

Read only

0 Likes
647

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