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

exec button

Former Member
0 Likes
950

Hi,

I have created one EXEC button using set pf-status at my output screen. I have written some code for the EXEC button. When i was checking sy-ucomm it is not showing EXEC.What might be the reason?Here is my code.

top-of-page.

perform set_header.

end-of-page.

start-of-selection.

if P_XBLNR eq '' and P_EBELN ne ''.

message i000(zm) with 'Please enter Delivery Note'.

leave list-processing.

elseif P_XBLNR ne '' and P_EBELN eq ''.

message i000(zm) with 'Please enter Purchase order'.

leave list-processing.

else.

perform get_data.

endif.

perform display_data.

<b>set pf-status 'EXEC'.</b>

at selection-screen.

<b> if sy-ucomm = 'EXEC'.</b>

if chk = 'X'.

perform process_bdc.

endif.

endif.

end-of-selection.

And another doubt is my browser showing only half of the screen.Iam not getting complte posts. If i drag with mouse iam getting the posts. What i need to do? Can any one give me suggestiongs..

reward guaranteed

cheers

kaki

1 ACCEPTED SOLUTION
Read only

andreas_mann3
Active Contributor
0 Likes
883

hi,

i think it's the false event for ouput screen-

use : <b>AT user-command.</b>

7 REPLIES 7
Read only

Former Member
0 Likes
883

Dear please place the below one

under intialization.

<b>initialization.</b>

set pf-status 'EXEC'

Read only

0 Likes
883

Hi Vijay,

If i place pf-status under initialization 'BACK','EXIT','CANCEL' buttons are not working.And EXEC button anyway not working.

kaki

Read only

0 Likes
883

Listen,

along with EXEC ,try to put BACK,CANCEL,EXIT also and handle them .along with exec button...

what you do is assign focdes to back,cancel,exit also...

and then

use

at selection-screen.

case sy-ucomm.

when 'EXEC'.

***do some thinfff

when 'BACK'.

***leave...

when others.

endcase.

try it is working for me...

Read only

0 Likes
883
report ztest.


start-of-selection.
set pf-status 'ABC'.


end-of-selection.

write: 'a'.


at user-command.

case sy-ucomm.

when 'EXEC'.

when 'BACK'.

endcase.
Read only

andreas_mann3
Active Contributor
0 Likes
884

hi,

i think it's the false event for ouput screen-

use : <b>AT user-command.</b>

Read only

0 Likes
883

you wanted to execute a report and in the report output you want to have your own application toolbar button and on click of them you want to do some processing right.

follow these steps.

report zxxx.

parameters: .....

select-options....

start-of-selection.

set pf-status 'XXX' .

do selection from database / operation for data collection and manipulation.

write the report result.

at user-command.

  • here check for user command which you specified when creatin the gui status.

case sy-ucomm.

when 'XXX' .

do something.

when 'YYY' .

do somethin.g

when others.

endcase.

Hope this is clear.

Regards

Raja

Read only

Former Member
0 Likes
883

Hi,

Try with at user-command.


DATA: NUMBER1 TYPE I VALUE 20, 
      NUMBER2 TYPE I VALUE  5, 
      RESULT  TYPE I. 

START-OF-SELECTION. 
  WRITE: / NUMBER1, '?', NUMBER2. 

AT USER-COMMAND. 
  CASE SY-UCOMM. 
    WHEN 'ADD'. 
      RESULT = NUMBER1 + NUMBER2. 
    WHEN 'SUBT'. 
      RESULT = NUMBER1 - NUMBER2. 
    WHEN 'MULT'. 
      RESULT = NUMBER1 * NUMBER2. 
    WHEN 'DIVI'. 
      RESULT = NUMBER1 / NUMBER2. 
    WHEN OTHERS. 
      WRITE 'Unknown function code'. 
      EXIT. 
  ENDCASE. 
  WRITE: / 'Result:', RESULT. 

hope this may help you.

regards,

venu.