Application Development and Automation 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: 
Read only

Interactive ALV Block list

Former Member
0 Likes
521

hi,

For the first time,the second list is coming when i double click the basic list.

But when i come back and again when i double click the basic list,nothing happens.Its staying on the basic list only..

Why its not displaying?..Does anything I am missing in the code??..


  CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
    EXPORTING
      I_CALLBACK_PROGRAM             = SY-REPID
*   I_CALLBACK_PF_STATUS_SET       =
     I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'.
*   IT_EXCLUDING                   =

*&---------------------------------------------------------------------*
*&      Form  USER_COMMAND
*&---------------------------------------------------------------------*
*
*----------------------------------------------------------------------*

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

  CASE R_UCOMM.

    WHEN '&IC1'.

      CLEAR: L_CHTEXT,L_CHANNEL.
      CLEAR W_MD.
      READ TABLE T_MD INTO W_MD INDEX RS_SELFIELD-TABINDEX.
      IF SY-SUBRC = 0.
        L_CHTEXT = W_MD-VTEXT.
        L_CHANNEL = W_MD-VTWEG.
      ELSE.
        READ TABLE T_MD_UP INTO W_MD_UP INDEX RS_SELFIELD-TABINDEX.
        IF SY-SUBRC = 0.
          L_CHTEXT = W_MD_UP-VTEXT.
          L_CHANNEL = W_MD_UP-VTWEG.
        ENDIF.
      ENDIF.

      IF L_CHANNEL EQ '10' OR L_CHANNEL EQ '30'.
        PERFORM SUB_DISP_REP USING L_CHANNEL L_CHTEXT.
      ENDIF.
  ENDCASE.

ENDFORM.                    " USER_COMMAND

3 REPLIES 3
Read only

Former Member
0 Likes
470

hi

Try to refresh the selfield

rs_selfield-refresh = con_true.

data: g_repid type sy-repid.

use the variable in the FM.

Thnaks

(r u tried Refresh command?)

Edited by: dharma raj on Jul 2, 2009 12:43 PM

Edited by: dharma raj on Jul 3, 2009 3:01 PM

Edited by: dharma raj on Jul 3, 2009 3:02 PM

Read only

asik_shameem
Active Contributor
0 Likes
470

Hi,

From your coding I can find out a mistake. But I don't know that cause your problem or not.

Inside USER_COMMAND, you are blindly using RS_SELFIELD-TABINDEX with out considering RS_SELFIELD-TABNAME.

Did you try to debug at the following point? Is it going inside PERFORM SUB_DISP_REP .

IF L_CHANNEL EQ '10' OR L_CHANNEL EQ '30'.

Read only

0 Likes
470

Even if i use tabname no difference..

Second time its not going to the user_command form..its just executing the default SAP code when i double click..and staying on the same basic list.Can any one tell me why its happening like this??..