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

Adding button in output screen

Former Member
0 Likes
2,868

Hi Experts,

I need a help in FM. I am creating a remote function module(RFC) and executing it. While executing the remote function module we have to enter the input parameters and execute it.Then it will show the output screen. In the output screen, i want a "Proceed" button. Once ithe user click the button u201Cproceedu201D , the output result should to be downloaded.

Can you help me how to add a button in RFC output screen and how to download the result based on user click the u201Cproceedu201D button. Please help me on this.

Thanks

1 ACCEPTED SOLUTION
Read only

praveen_reddy2
Active Participant
0 Likes
1,348

Hi,

call screen xxxx.

using Set PF-status 'xxxx' ( HERE U WILL MAINTAIN THE BUTTON )

PASS THIS PF STATUS IN YOUR FUNCTION MODULE.

6 REPLIES 6
Read only

praveen_reddy2
Active Participant
0 Likes
1,349

Hi,

call screen xxxx.

using Set PF-status 'xxxx' ( HERE U WILL MAINTAIN THE BUTTON )

PASS THIS PF STATUS IN YOUR FUNCTION MODULE.

Read only

Former Member
0 Likes
1,348

Hi,

You can use some text with hotspot like this.


Write 'PROCEED' hotspot on color 3.

then at AT LINE-SELECTION Event write this type of code.


case sy-lsind.
when 1.
----write your code to download-----
endcase.

Hope this helps.

Aswath.

Read only

Harsh_Bansal
Contributor
0 Likes
1,348

Hi,

Refer this code -


DATA: f TYPE char255.
WRITE: 'Proceed' HOTSPOT COLOR 5.

AT LINE-SELECTION.
  GET CURSOR VALUE f.

IF f EQ 'Proceed'.
 -- your code --
ENDIF.

Regards,

Harsh Bansal

Read only

Former Member
0 Likes
1,348

Hi Kelvin,

I guess you have developed a function module and after running it you want to have user interaction by giving proceed button and if press the buttoon o/p of the FM shoould be downloaded.

If this is the case you can give one more import parameter and if user pass 'X' to this parameter then you can run this FM and write the download logic.

Thanks,

Pawan

Read only

Former Member
0 Likes
1,348

Hi Kelvin,

I Think you cannot write in the output screen from a function module. If you are using an RFC then you will call it from some Non SAP system.

Can you please explain the exact requirement. If you are trying to execute report which uses this FM and you are displaying the exporting parameter of the FM. now you need a Button in the report o/p on clicking it you have to download the data.

Or else

you can call a screen from the FM and display your data in the screen and add a button in the screen on pressing that button you can download the data to the file. that screen should be in the same function group.

can you Please explain your requirement again.

Thank & Regards,

Praveenkumar T.

Read only

0 Likes
1,348

Hi,

I am not creating RFC.I have developed a function module and after running it , in the output screen i want to have user interaction by giving proceed button and if press the buttoon o/p of the FM should be downloaded.

To add the button in o/p screen i used the Screen statement AT USER COMMAND, AT LINE-SELECTION. But FM not access these screen statements.Then i created a screen 100 with PF Status, in that screen i have maintained the proceed button. Then i call this screen inside the FM. The screen is coming along with the proceed button. But the FM o/p not coming along this proceed button screen. Please help out to have a button for user interaction in o/p of the FM.

Thanks.

Kelvin