‎2007 Aug 07 5:24 AM
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
‎2007 Aug 07 5:28 AM
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
‎2007 Aug 07 5:40 AM
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.
‎2007 Aug 07 6:12 AM
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
‎2007 Aug 07 5:28 AM