Application Development 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: 

ALV REPORT:

Former Member
0 Kudos

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

6 REPLIES 6

dev_parbutteea
Active Contributor
0 Kudos

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.

0 Kudos

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.............

0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

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................

0 Kudos

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.......