Skip to Content
author's profile photo Former Member
Former Member

Interactive ALV

Hi all,

I am doing Interactive ALV..

i am finished first screen for grid display..

next how to go second screen for grid display click the first screen display?

how is the program??

reply me soon..

thx,

s.suresh..

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 04:32 AM

    Hi Suresh,

    for interactive display in ALV u need to know about the events,

    by using events we can go to the next level display.have a look on the following Interactive ALV Grid display.

    This is Interactive ALV report of displaying each row with colours and Headers.

    REPORT ZCS_PRG10.

    TYPE-POOLS SLIS.

    TYPES: BEGIN OF I_EKKO,

    EBELN LIKE EKKO-EBELN,

    AEDAT LIKE EKKO-AEDAT,

    BUKRS LIKE EKKO-BUKRS,

    BSART LIKE EKKO-BSART,

    LIFNR LIKE EKKO-LIFNR,

    L_COLOR(4) TYPE C,

    END OF I_EKKO.

    DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,

    WA_EKKO TYPE I_EKKO.

    TYPES: BEGIN OF I_EKPO,

    EBELN LIKE EKPO-EBELN,

    EBELP LIKE EKPO-EBELP,

    MATNR LIKE EKPO-MATNR,

    MENGE LIKE EKPO-MENGE,

    MEINS LIKE EKPO-MEINS,

    NETPR LIKE EKPO-NETPR,

    L_COLOR1(4) TYPE C,

    END OF I_EKPO.

    DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,

    WA_EKPO TYPE I_EKPO.

    DATA: V_REPID TYPE SY-REPID,

    I_FLDCAT TYPE SLIS_T_FIELDCAT_ALV,

    WA_FLDCAT TYPE SLIS_FIELDCAT_ALV,

    I_EVENTS TYPE SLIS_T_EVENT,

    WA_EVENT TYPE SLIS_ALV_EVENT,

    GD_LAYOUT TYPE SLIS_LAYOUT_ALV,

    GD_LAYOUT1 TYPE SLIS_LAYOUT_ALV.

    DATA: I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST ALV REPORT',

    I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDARY ALV REPORT'.

    INITIALIZATION.

    V_REPID = SY-REPID.

    PERFORM FLDCATALOG.

    PERFORM CALL_EVENTS.

    PERFORM POPULATE_EVENT.

    PERFORM BLD_LAYOUT.

    PERFORM BLD_LAYOUT1.

    START-OF-SELECTION.

    PERFORM DATA_RETRIEVAL.

    PERFORM DISPLAY_ALV_REPORT.

    FORM FLDCATALOG.

    WA_FLDCAT-TABNAME = 'IT_EKKO'.

    WA_FLDCAT-FIELDNAME = 'EBELN'.

    WA_FLDCAT-SELTEXT_M = 'PO NUMBER'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    WA_FLDCAT-TABNAME = 'IT_EKKO'.

    WA_FLDCAT-FIELDNAME = 'AEDAT'.

    WA_FLDCAT-SELTEXT_M = 'DATE'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    WA_FLDCAT-TABNAME = 'IT_EKKO'.

    WA_FLDCAT-FIELDNAME = 'BUKRS'.

    WA_FLDCAT-SELTEXT_M = 'DOCUMENT TYPE'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    WA_FLDCAT-TABNAME = 'IT_EKKO'.

    WA_FLDCAT-FIELDNAME = 'LIFNR'.

    WA_FLDCAT-SELTEXT_M = 'VENDOR CODE'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    ENDFORM.

    FORM CALL_EVENTS.

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    EXPORTING

    I_LIST_TYPE = 0

    IMPORTING

    ET_EVENTS = I_EVENTS

    • EXCEPTIONS

    • LIST_TYPE_WRONG = 1

    • OTHERS = 2

    .

    IF SY-SUBRC <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM.

    FORM POPULATE_EVENT.

    *READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.

    *IF SY-SUBRC = 0.

    • WA_EVENT-FORM = 'TOP_OF_PAGE'.

    • MODIFY I_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME = WA_EVENT-FORM.

    *ENDIF.

    READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.

    IF SY-SUBRC = 0.

    WA_EVENT-FORM = 'USER_COMMAND'.

    MODIFY I_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME = WA_EVENT-NAME.

    ENDIF.

    ENDFORM.

    FORM BLD_LAYOUT.

    GD_LAYOUT-INFO_FIELDNAME = 'L_COLOR'.

    ENDFORM.

    FORM DATA_RETRIEVAL.

    DATA LN_COLOR(1) TYPE C.

    SELECT EBELN AEDAT BUKRS BSART LIFNR

    FROM EKKO INTO TABLE IT_EKKO.

    LOOP AT IT_EKKO INTO WA_EKKO.

    LN_COLOR = LN_COLOR + 1.

    IF LN_COLOR = 8.

    LN_COLOR = 1.

    ENDIF.

    CONCATENATE 'C' LN_COLOR '11' INTO WA_EKKO-L_COLOR.

    MODIFY IT_EKKO FROM WA_EKKO.

    ENDLOOP.

    ENDFORM.

    FORM DISPLAY_ALV_REPORT.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    • I_INTERFACE_CHECK = ' '

    • I_BYPASSING_BUFFER = ' '

    • I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = V_REPID

    • I_CALLBACK_PF_STATUS_SET = ' '

    I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

    I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'

    • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

    • I_CALLBACK_HTML_END_OF_LIST = ' '

    • I_STRUCTURE_NAME =

    • I_BACKGROUND_ID = ' '

    I_GRID_TITLE = I_TITLE_EKKO

    • I_GRID_SETTINGS =

    IS_LAYOUT = GD_LAYOUT

    IT_FIELDCAT = I_FLDCAT[]

    • IT_EXCLUDING =

    • IT_SPECIAL_GROUPS =

    • IT_SORT =

    • IT_FILTER =

    • IS_SEL_HIDE =

    • I_DEFAULT = 'X'

    I_SAVE = 'A'

    • IS_VARIANT =

    IT_EVENTS = I_EVENTS

    • IT_EVENT_EXIT =

    • IS_PRINT =

    • IS_REPREP_ID =

    • I_SCREEN_START_COLUMN = 0

    • I_SCREEN_START_LINE = 0

    • I_SCREEN_END_COLUMN = 0

    • I_SCREEN_END_LINE = 0

    • I_HTML_HEIGHT_TOP = 0

    • I_HTML_HEIGHT_END = 0

    • IT_ALV_GRAPHICS =

    • IT_HYPERLINK =

    • IT_ADD_FIELDCAT =

    • IT_EXCEPT_QINFO =

    • IR_SALV_FULLSCREEN_ADAPTER =

    • IMPORTING

    • E_EXIT_CAUSED_BY_CALLER =

    • ES_EXIT_CAUSED_BY_USER =

    TABLES

    T_OUTTAB = IT_EKKO

    • EXCEPTIONS

    • PROGRAM_ERROR = 1

    • OTHERS = 2

    .

    IF SY-SUBRC <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM.

    FORM TOP_OF_PAGE.

    DATA: T_HEADER TYPE SLIS_T_LISTHEADER,

    WA_HEADER TYPE SLIS_LISTHEADER.

    WA_HEADER-TYP = 'H'.

    WA_HEADER-INFO = 'THIS IS MY FIRST ALV'.

    APPEND WA_HEADER TO T_HEADER.

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

    EXPORTING

    IT_LIST_COMMENTARY = T_HEADER

    • I_LOGO =

    • I_END_OF_LIST_GRID =

    • I_ALV_FORM =

    .

    ENDFORM.

    FORM USER_COMMAND USING R_COMM TYPE SY-UCOMM

    RS_SELFIELD TYPE SLIS_SELFIELD.

    CASE R_COMM.

    WHEN '&IC1'.

    READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.

    PERFORM FLDCAT_EKPO.

    PERFORM CALL_EVENT_EKPO.

    • PERFORM POPULATE_EVENT_EKPO.

    PERFORM DATA_RETRIEVAL_EKPO.

    PERFORM DISPLAY_ALV_REPORT_EKPO.

    ENDCASE.

    ENDFORM.

    FORM FLDCAT_EKPO.

    WA_FLDCAT-TABNAME = 'IT_EKPO'.

    WA_FLDCAT-FIELDNAME = 'EBELN'.

    WA_FLDCAT-SELTEXT_M = 'PO NUMBER'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_EKPO.

    WA_FLDCAT-TABNAME = 'IT_EKPO'.

    WA_FLDCAT-FIELDNAME = 'EBELP'.

    WA_FLDCAT-SELTEXT_M = 'LINE NO'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_EKPO.

    WA_FLDCAT-TABNAME = 'IT_EKPO'.

    WA_FLDCAT-FIELDNAME = 'MATNR'.

    WA_FLDCAT-SELTEXT_M = 'MATERIAL NUMBER'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    WA_FLDCAT-TABNAME = 'IT_EKPO'.

    WA_FLDCAT-FIELDNAME = 'MENGE'.

    WA_FLDCAT-SELTEXT_M = 'QUANTITY'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    WA_FLDCAT-TABNAME = 'IT_EKPO'.

    WA_FLDCAT-FIELDNAME = 'MEINS'.

    WA_FLDCAT-SELTEXT_M = 'BASE UNIT OF MEASURE'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    WA_FLDCAT-TABNAME = 'IT_EKPO'.

    WA_FLDCAT-FIELDNAME = 'NETPR'.

    WA_FLDCAT-SELTEXT_M = 'PRICE'.

    APPEND WA_FLDCAT TO I_FLDCAT.

    CLEAR WA_FLDCAT.

    ENDFORM.

    FORM CALL_EVENT_EKPO.

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    EXPORTING

    I_LIST_TYPE = 0

    IMPORTING

    ET_EVENTS = I_EVENTS

    • EXCEPTIONS

    • LIST_TYPE_WRONG = 1

    • OTHERS = 2

    .

    IF SY-SUBRC <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM.

    *FORM POPULATE_EVENT_EKPO.

    *

    *READ TABLE I_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.

    *IF SY-SUBRC = 0.

    • WA_EVENT-FORM = 'TOP_OF_PAGE'.

    • MODIFY I_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME = WA_EVENT-FORM.

    *ENDIF.

    *

    *ENDFORM.

    FORM BLD_LAYOUT1.

    GD_LAYOUT1-INFO_FIELDNAME = 'L_COLOR1'.

    ENDFORM.

    FORM DATA_RETRIEVAL_EKPO.

    DATA LN_COLOR1(1) TYPE C.

    SELECT EBELN EBELP MATNR MENGE MEINS NETPR

    INTO TABLE IT_EKPO

    FROM EKPO.

    LOOP AT IT_EKPO INTO WA_EKPO.

    LN_COLOR1 = LN_COLOR1 + 1.

    IF LN_COLOR1 = 8.

    LN_COLOR1 = 1.

    ENDIF.

    CONCATENATE 'C' LN_COLOR1 '11' INTO WA_EKPO-L_COLOR1.

    MODIFY IT_EKPO FROM WA_EKPO.

    ENDLOOP.

    ENDFORM.

    FORM DISPLAY_ALV_REPORT_EKPO.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    • I_INTERFACE_CHECK = ' '

    • I_BYPASSING_BUFFER = ' '

    • I_BUFFER_ACTIVE = ' '

    I_CALLBACK_PROGRAM = V_REPID

    • I_CALLBACK_PF_STATUS_SET = ' '

    • I_CALLBACK_USER_COMMAND = ' '

    I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE1'

    • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

    • I_CALLBACK_HTML_END_OF_LIST = ' '

    • I_STRUCTURE_NAME =

    • I_BACKGROUND_ID = ' '

    I_GRID_TITLE = I_TITLE_EKPO

    • I_GRID_SETTINGS =

    IS_LAYOUT = GD_LAYOUT1

    IT_FIELDCAT = I_FLDCAT[]

    • IT_EXCLUDING =

    • IT_SPECIAL_GROUPS =

    • IT_SORT =

    • IT_FILTER =

    • IS_SEL_HIDE =

    • I_DEFAULT = 'X'

    I_SAVE = 'A'

    • IS_VARIANT =

    IT_EVENTS = I_EVENTS

    • IT_EVENT_EXIT =

    • IS_PRINT =

    • IS_REPREP_ID =

    • I_SCREEN_START_COLUMN = 0

    • I_SCREEN_START_LINE = 0

    • I_SCREEN_END_COLUMN = 0

    • I_SCREEN_END_LINE = 0

    • I_HTML_HEIGHT_TOP = 0

    • I_HTML_HEIGHT_END = 0

    • IT_ALV_GRAPHICS =

    • IT_HYPERLINK =

    • IT_ADD_FIELDCAT =

    • IT_EXCEPT_QINFO =

    • IR_SALV_FULLSCREEN_ADAPTER =

    • IMPORTING

    • E_EXIT_CAUSED_BY_CALLER =

    • ES_EXIT_CAUSED_BY_USER =

    TABLES

    T_OUTTAB = IT_EKPO

    • EXCEPTIONS

    • PROGRAM_ERROR = 1

    • OTHERS = 2

    .

    IF SY-SUBRC <> 0.

    • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM.

    FORM TOP_OF_PAGE1.

    DATA: T_HEADER1 TYPE SLIS_T_LISTHEADER,

    WA_HEADER1 TYPE SLIS_LISTHEADER.

    WA_HEADER1-TYP = 'H'.

    WA_HEADER1-INFO = 'SECONDARY ALV LEVEL'.

    APPEND WA_HEADER1 TO T_HEADER1.

    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'

    EXPORTING

    IT_LIST_COMMENTARY = T_HEADER1

    • I_LOGO =

    • I_END_OF_LIST_GRID =

    • I_ALV_FORM = .

    ENDFORM.

    Reward points,if it is useful.

    Thanks

    chandu.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 02:09 PM

    declare hotspots on certain columns. e.G. material and then jump of to the corresponding TA. e.G. in case of material, either MM02 or MM03 if you wish to just VIEW.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 02:10 PM

    Hi,

    Sample Program for INTERACTIVE ALV

    &----


    *& Report ZINT_ALV

    *&

    &----


    *&

    *&

    &----


    REPORT zint_alv.

    TYPE-POOLS:slis.

    TABLES:mara,

    makt,

    mseg.

    DATA:BEGIN OF itab OCCURS 0,

    matnr LIKE mara-matnr,

    maktx LIKE makt-maktx,

    END OF itab.

    DATA:BEGIN OF itab1 OCCURS 0,

    mblnr LIKE mseg-mblnr,

    menge LIKE mseg-menge,

    meins LIKE mseg-meins,

    werks LIKE mseg-werks,

    END OF itab1.

    DATA:fcat TYPE slis_t_fieldcat_alv,

    fcat1 TYPE slis_t_fieldcat_alv,

    eve TYPE slis_t_event,

    eve1 TYPE slis_t_event.

    DATA:t_mat LIKE mara-matnr.

    SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.

    SELECT-OPTIONS:mat FOR mara-matnr.

    SELECTION-SCREEN:END OF BLOCK blk1.

    INITIALIZATION.

    PERFORM build_fcat USING fcat.

    PERFORM build_eve.

    START-OF-SELECTION.

    PERFORM get_data.

    PERFORM dis_data.

    &----


    *& Form build_fcat

    &----


    text

    -


    -->T_FCAT text

    -


    FORM build_fcat USING t_fcat TYPE slis_t_fieldcat_alv.

    DATA:wa_fcat TYPE slis_fieldcat_alv.

    wa_fcat-tabname = 'ITAB'.

    wa_fcat-fieldname = 'MATNR'.

    wa_fcat-seltext_m = 'Material'.

    APPEND wa_fcat TO t_fcat.

    CLEAR wa_fcat.

    wa_fcat-tabname = 'ITAB'.

    wa_fcat-fieldname = 'MAKTX'.

    wa_fcat-seltext_m = 'Description'.

    APPEND wa_fcat TO t_fcat.

    CLEAR wa_fcat.

    ENDFORM. "build_fcat

    &----


    *& Form build_eve

    &----


    text

    -


    FORM build_eve.

    DATA:t_eve TYPE slis_alv_event.

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    EXPORTING

    i_list_type = 0

    IMPORTING

    et_events = eve

    EXCEPTIONS

    LIST_TYPE_WRONG = 1

    OTHERS = 2

    .

    IF sy-subrc 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    READ TABLE eve INTO t_eve WITH KEY name = 'USER_COMMAND'.

    IF sy-subrc = 0.

    t_eve-form = 'USER_COMMAND'.

    MODIFY eve FROM t_eve TRANSPORTING form WHERE name = t_eve-name.

    ENDIF.

    ENDFORM. "build_eve

    &----


    *& Form get_data

    &----


    text

    -


    FORM get_data.

    SELECT maramatnr maktmaktx INTO CORRESPONDING FIELDS OF TABLE itab

    FROM mara INNER JOIN makt

    ON maramatnr = maktmatnr

    WHERE mara~matnr IN mat.

    ENDFORM. "get_data

    &----


    *& Form dis_data

    &----


    text

    -


    FORM dis_data.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = 'ZINT_ALV'

    i_callback_user_command = 'USER_COMMAND'

    i_grid_title = 'Interactive ALV'

    it_fieldcat = fcat

    it_events = eve

    TABLES

    t_outtab = itab

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    .

    IF sy-subrc 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM. "dis_data

    &----


    *& Form user_command

    &----


    text

    -


    -->U_COM text

    -


    FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.

    CLEAR fcat1.

    CASE u_com.

    WHEN '&IC1'.

    READ TABLE itab INDEX sel_field-tabindex.

    IF sy-subrc = 0.

    t_mat = itab-matnr.

    PERFORM build_cat1 USING fcat1.

    PERFORM build_eve1.

    PERFORM get_data1.

    PERFORM dis_data1.

    ENDIF.

    ENDCASE.

    ENDFORM. "user_command

    &----


    *& Form build_fcat1

    &----


    text

    -


    -->T_FCAT1 text

    -


    FORM build_cat1 USING t_fcat1 TYPE slis_t_fieldcat_alv.

    DATA:wa_fcat1 TYPE slis_fieldcat_alv.

    wa_fcat1-tabname = 'ITAB1'.

    wa_fcat1-fieldname = 'MBLNR'.

    wa_fcat1-seltext_m = 'Material Doc.'.

    APPEND wa_fcat1 TO t_fcat1.

    CLEAR wa_fcat1.

    wa_fcat1-tabname = 'ITAB1'.

    wa_fcat1-fieldname = 'MENGE'.

    wa_fcat1-seltext_m = 'Quantity'.

    APPEND wa_fcat1 TO t_fcat1.

    CLEAR wa_fcat1.

    wa_fcat1-tabname = 'ITAB1'.

    wa_fcat1-fieldname = 'MEINS'.

    wa_fcat1-seltext_m = 'UOM'.

    APPEND wa_fcat1 TO t_fcat1.

    CLEAR wa_fcat1.

    wa_fcat1-tabname = 'ITAB1'.

    wa_fcat1-fieldname = 'WERKS'.

    wa_fcat1-seltext_m = 'Plant'.

    APPEND wa_fcat1 TO t_fcat1.

    CLEAR wa_fcat1.

    ENDFORM. "build_fcat1

    &----


    *& Form build_eve1

    &----


    text

    -


    FORM build_eve1.

    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'

    EXPORTING

    i_list_type = 0

    IMPORTING

    et_events = eve1

    EXCEPTIONS

    list_type_wrong = 1

    OTHERS = 2.

    IF sy-subrc 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM. "build_eve1

    &----


    *& Form get_data1

    &----


    text

    -


    FORM get_data1.

    SELECT mblnr menge meins werks FROM mseg

    INTO CORRESPONDING FIELDS OF TABLE itab1

    WHERE matnr = t_mat.

    ENDFORM. "get_data1

    &----


    *& Form dis_data1

    &----


    text

    -


    FORM dis_data1.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

    EXPORTING

    i_callback_program = 'ZINT_ALV'

    it_fieldcat = fcat1

    it_events = eve1

    TABLES

    t_outtab = itab1

    EXCEPTIONS

    PROGRAM_ERROR = 1

    OTHERS = 2

    .

    IF sy-subrc 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    ENDFORM. "dis_data1

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 30, 2008 at 02:12 PM

    Hi Friend,

    For going into second screen, you hve to track through user-command event of the REUSE_ALV_GRID_DISPLAY.

    Write code in specified user command subroutine, you can go to another transaction, screen even another ALV.

    If you required more, pleaes reply.

    Regards

    Krishnendu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 02:20 PM

    Hi,

    Please refer to the link below :

    http://www.sapdev.co.uk/reporting/alv/alvgrid_ucomm.htm

    Thanks,

    Sriram Ponna.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 04:43 AM

    Hi Suresh,

    This can be done in two ways :

    1. Using Hotspot on the field.

    2. Writing the code in the specified User Command.

    Reward If Useful.

    Regards,

    Chitra

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.