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 button and call transaction

Former Member
0 Likes
1,309

Hi,

I have 2 buttons - activate and deactivate in the selection screen of a classical report. I use call transaction to do the process and both the buttons work. But I have to click on the execute button on top left everytime before clicking on activate or deactivate buttons. Otherwise it gives the message No changes made after doing the call transaction.

How to make it work without clicking on the execute button everytime?

Regards,

bindazme

4 REPLIES 4
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
849

Hi,

Looks like there is problem in the way you are handling your Button's function types. That is problem with SY-UCOMM handling.

Can you show us the code? it will be easy to find out the error.

Regards,

Sesh

Read only

0 Likes
849

Hi Sesh,

here is the code.

&----


*

  • Selection Screen Declaration

&----


selection-screen : begin of block blk1 with frame title text-001.

parameters: s_matnr like qmat-matnr.

parameters: s_werks like qmat-werks.

parameters: p_insty like qmat-art.

selection-screen : end of block blk1.

selection-screen : begin of block blk2 with frame title text-002,

begin of line,

pushbutton 2(20) but1 user-command clk1,

pushbutton 32(20) but2 user-command clk2,

selection-screen : end of line,

end of block blk2.

&----


  • Selection Screen Output

&----


at selection-screen output.

but1 = 'Activate Insp type'.

but2 = 'DeActivate Insp type'.

&----


  • Start of selection

&----


at selection-screen.

&----


  • Acitvate Inspection type

&----


if sy-ucomm = 'CLK1'.

perform screen using: 'SAPLMGMM' '0060'.

perform field using: 'BDC_CURSOR' 'RMMG1-MATNR',

'RMMG1-MATNR' s_matnr,

'BDC_OKCODE' '=AUSW'.

...

call transaction 'MM02' using bdctab mode 'N' update 'L'.

endif.

&----


  • DeActivate Inspection type

&----


if sy-ucomm = 'CLK2'.

perform screen using: 'SAPLMGMM' '0060'.

perform field using: 'BDC_CURSOR' 'RMMG1-MATNR',

'RMMG1-MATNR' s_matnr,

'BDC_OKCODE' '=AUSW'.

...

call transaction 'MM02' using bdctab mode 'N' update 'L'.

endif.

Read only

0 Likes
849

Hi,

Can you try to put the code of handling the SY-UCOMM under

AT USER-COMMNAD event block.

Rather than AT SELECTION-SCREEN.

Also clear SY-UCOMM after the processing.

Regards,

Sesh

Read only

Former Member
0 Likes
849

first set status

set pf status.

write codeing.