Skip to Content
avatar image
Former Member

ALV REPORT:

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 11, 2007 at 06: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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

  • avatar image
    Former Member
    Oct 11, 2007 at 06: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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

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