10-11-2007 7:11 AM
my reqiurement is as follows:
1. when pushbutton is clicked the transaction should go to 'CJ01'
following is my code;
tell me where my code went wrong:
FORM USER_COMMAND USING RF_UCOMM LIKE SY-UCOMM
SEL_FIELD TYPE SLIS_SELFIELD.
CASE RF_UCOMM.
WHEN '&IC1'.
*WHEN '&NEXT'.
LOOP AT I_FINAL INTO WA_FINAL.
IF WA_FINAL-CHECKBOX = 'X'.
SET PARAMETER ID: 'PSP' FIELD wa_final-pspid,
'PRO' FIELD wa_final-posid.
CALL TRANSACTION 'CJ03' AND SKIP FIRST SCREEN.
ELSE.
CONTINUE.
ENDIF.
ENDLOOP.
ENDCASE.
ENDFORM.
Thanks in advance
10-11-2007 7:24 AM
CASE RF_UCOMM.
WHEN '&IC1'.<b> " refers to double click</b>
<b>"you should replace '&IC1' by the function code for the pushbutton you created in gui "status
</b>
*WHEN '&NEXT'.
LOOP AT I_FINAL INTO WA_FINAL.
IF WA_FINAL-CHECKBOX = 'X'.
SET PARAMETER ID: 'PSP' FIELD wa_final-pspid,
'PRO' FIELD wa_final-posid.
CALL TRANSACTION 'CJ03' AND SKIP FIRST SCREEN.
ELSE.
CONTINUE.
ENDIF.
ENDLOOP.
ENDCASE.
ENDFORM.
Regards.
10-11-2007 7:30 AM
if I remove the '&IC1' statement
how the pushbutton identifies the click and proceed.....it has to be clicked first and then only it can pass to tcode CJ03.............
10-11-2007 7:35 AM
Hi,
When you carete a push button in screen painter you have to give the Function Code for that.
For example you carete one Push Button name as "Save" and the double click the push button.
Then it dispplays the Field attributes menu. In that menu you have to give any function code like "Save_But".
Then when ever the user clicks the "save" button the system assigns that function code to your Push Button.
Then write the code under the Push button.
Ex:
WHEN 'SAVE_BUT'.
Write your code here.
Thanks,
Reward If Helpful.
10-11-2007 7:36 AM
when u created that button u shud give it a function code..a 4 char value
so that becomes its function code so while writing the code
instead of
FORM USER_COMMAND USING RF_UCOMM LIKE SY-UCOMM
SEL_FIELD TYPE SLIS_SELFIELD.
CASE RF_UCOMM.
WHEN '&IC1'.
write WHEN '<>'
<> refers to the 4 char code u gave to that button.
rest of the code is fine..hope it soves ur doubt
Reward if helpful
10-11-2007 8:03 AM
I got my this doubt cleared.......
still my original doubt remains......how to pass values from internal table i_final to call transaction cj03......in my code................
10-11-2007 9:13 AM
can anyone tell me how to read in an internal table whether checkbox are marked or not....
i m finding difficulty in identifiyng my checkboxes as marked or not....dynamically....
Thanks in Advance.......