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: 

double click in alv

Former Member
0 Kudos

Hi,

I am doing interactive report where i am using user command for PF-Status again in the

same program i need to use user command for interactive report.

  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  EXPORTING
   I_CALLBACK_PROGRAM                = SY-CPROG
   IS_LAYOUT                         = S_LAYOUT
   IT_FIELDCAT                       = IT_FIELDCAT[]
   I_CALLBACK_PF_STATUS_SET       = 'ZFOREIGN'
   I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
   I_SAVE                            = 'X'

   TABLES
     T_OUTTAB                          = IT_FINAL[].

FORM ZFOREIGN USING T_MENU TYPE SLIS_T_EXTAB.

  SET PF-STATUS 'ZFOREIGN'.

ENDFORM.                                                    "ZDISP_BAS

FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
                  RS_SELFIELD TYPE SLIS_SELFIELD.

  CASE R_UCOMM.
    WHEN 'ENTER'.
      LOOP AT IT_FINAL.
          IT_FINAL-TLC = IT_FINAL-EX_RATE * IT_FINAL-TFC.
        MODIFY IT_FINAL.
      ENDLOOP.
  ENDCASE.
ENDFORM.

In the same program i need interactive report where i declared user command already.

How to declare one more user command.

Suggest some ideas.

With Regards,

Bathri.

4 REPLIES 4

Former Member
0 Kudos

Hi ,

Wat i would suggest is that instead of using two routines its better to use the same routine and then inside the routine differentiate it with respect to the sel field.

Regards,

Varghese

Former Member
0 Kudos

Hi

FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM

RS_SELFIELD TYPE SLIS_SELFIELD.

CASE R_UCOMM.

WHEN 'ENTER'.

LOOP AT IT_FINAL.

IT_FINAL-TLC = IT_FINAL-EX_RATE * IT_FINAL-TFC.

MODIFY IT_FINAL.

ENDLOOP.

When '&IC1'

U r code

......

.....

ENDCASE.

ENDFORM.

Kiran....

Former Member
0 Kudos

Hi Friend,

try this user command u ill get idea, if u have dought please let me ,

FORM user_command1 USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

  • CLEAR rs_selfield.

READ TABLE iekpo INDEX rs_selfield-tabindex.

CASE rs_selfield-fieldname.

WHEN 'EBELP'.

PERFORM iebelp USING rs_selfield-value.

WHEN 'MATNR'.

PERFORM imard USING rs_selfield-value.

ENDCASE.

Regards

jinku

Former Member
0 Kudos

answered