Current Position:Home > Definition of IMPORTING  IS_KEYINFO in reuse_alv_hierseq_list_display

Definition of IMPORTING  IS_KEYINFO in reuse_alv_hierseq_list_display

Update:11-30Source: network consolidation
Advertisement
function reuse_alv_hierseq_list_display.
*"  IMPORTING
*"     VALUE(IS_KEYINFO) TYPE  SLIS_KEYINFO_ALV
hi could anyone explain the purpose if this importing parameter in the FM and a definition of its usage.  PLZZ

The Best Answer

Advertisement
Main purpose of IS_KEYINFO is to store the relationship between header and line item tables. i.e. key field name(s) that is common to both of these tables.
For reference see this sample code:
REPORT z_alv_hierseq_list.
TYPE-POOLS: slis.                      " ALV Global types
SELECTION-SCREEN :
  SKIP, BEGIN OF LINE,COMMENT 5(27) v_1 FOR FIELD p_max.    "#EC NEEDED
PARAMETERS p_max(02) TYPE n DEFAULT '10' OBLIGATORY.
SELECTION-SCREEN END OF LINE.
DATA :
1st Table
  BEGIN OF gt_vbak OCCURS 0,
    vbeln LIKE vbak-vbeln,             " Sales document
    kunnr LIKE vbak-kunnr,             " Sold-to party
    netwr LIKE vbak-netwr,             " Net Value of the Sales Order
START-OF-SELECTION.
Read data
  SELECT * FROM vbak
             UP TO p_max ROWS
           INTO CORRESPONDING FIELDS OF TABLE gt_vbak.
  IF NOT gt_vbak[] IS INITIAL.
    SELECT * FROM vbap
             INTO CORRESPONDING FIELDS OF TABLE gt_vbap
              FOR ALL ENTRIES IN gt_vbak
            WHERE vbeln = gt_vbak-vbeln.
  ENDIF.
  PERFORM f_display.
      Form  F_DISPLAY
FORM f_display.
Macro definition
  DEFINE m_fieldcat.
    ls_fieldcat-tabname = &1.
    ls_fieldcat-fieldname = &2.
    ls_fieldcat-ref_tabname = &3.
    append ls_fieldcat to lt_fieldcat.
  END-OF-DEFINITION.
  DEFINE m_sort.
    ls_sort-tabname = &1.
    ls_sort-fieldname = &2.
    ls_sort-up        = 'X'.
    append ls_sort to lt_sort.
  END-OF-DEFINITION.
  DATA:
    ls_fieldcat TYPE slis_fieldcat_alv,
    lt_fieldcat TYPE slis_t_fieldcat_alv," Field catalog
    ls_sort     TYPE slis_sortinfo_alv,
    lt_sort     TYPE slis_t_sortinfo_alv," Sort table
    ls_keyinfo  TYPE slis_keyinfo_alv,
    ls_layout   TYPE slis_layout_alv.
  ls_layout-group_change_edit = 'X'.
  ls_layout-colwidth_optimize = 'X'.
  ls_layout-zebra             = 'X'.
  ls_layout-detail_popup      = 'X'.
  ls_layout-get_selinfos      = 'X'.
Build field catalog and sort table
  m_fieldcat 'GT_VBAK' 'VBELN' 'VBAK'.
  m_fieldcat 'GT_VBAK' 'KUNNR' 'VBAK'.
  m_fieldcat 'GT_VBAK' 'NETWR' 'VBAK'.
  m_fieldcat 'GT_VBAK' 'ERDAT' 'VBAK'.
  m_fieldcat 'GT_VBAK' 'WAERK' 'VBAK'.
  m_fieldcat 'GT_VBAP' 'POSNR' 'VBAP'.
  m_fieldcat 'GT_VBAP' 'MATNR' 'VBAP'.
  m_fieldcat 'GT_VBAP' 'NETWR' 'VBAP'.
  m_fieldcat 'GT_VBAP' 'WAERK' 'VBAP'.
  m_sort 'GT_VBAK' 'KUNNR'.
  m_sort 'GT_VBAP' 'NETWR'.
  ls_keyinfo-header01 = 'VBELN'.
  ls_keyinfo-item01 = 'VBELN'.
  CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
       EXPORTING
            i_callback_program      = sy-cprog
            i_callback_user_command = 'USER_COMMAND'
            is_layout               = ls_layout
            it_fieldcat             = lt_fieldcat
            it_sort                 = lt_sort
            i_tabname_header        = 'GT_VBAK'
            i_tabname_item          = 'GT_VBAP'
            is_keyinfo              = ls_keyinfo
       TABLES
            t_outtab_header         = gt_vbak
            t_outtab_item           = gt_vbap
       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.                               " F_LIST_DISPLAY
      FORM USER_COMMAND                                             *
FORM user_command USING i_ucomm     LIKE sy-ucomm
                        is_selfield TYPE slis_selfield.     "#EC CALLED
  CASE i_ucomm.
    WHEN '&IC1'.                       " Pick
      CASE is_selfield-tabname.
        WHEN 'GT_VBAP'.
        WHEN 'GT_VBAK'.
          READ TABLE gt_vbak INDEX is_selfield-tabindex.
          IF sy-subrc EQ 0.
          Sales order number
            SET PARAMETER ID 'AUN' FIELD gt_vbak-vbeln.
          Display Sales Order
            CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
          ENDIF.
      ENDCASE.
  ENDCASE.
ENDFORM.                               " USER_COMMAND
Regards,
Joy.
  • Definition of IMPORTING  IS_KEYINFO in reuse_alv_hierseq_list_display Update:11-30

    function reuse_alv_hierseq_list_display. *"  IMPORTING *"     VALUE(IS_KEYINFO) TYPE  SLIS_KEYINFO_ALV hi could anyone explain the purpose if this importing parameter in the FM and a definition of its usage.  PLZZMain purpose of IS_KEYINFO is to

  • Fields in ALV that is showing FM REUSE_ALV_HIERSEQ_LIST_DISPLAY Update:10-11

    Hello: I have problems with ALV that FM ALV FM <b>REUSE_ALV_HIERSEQ_LIST_DISPLAY </b>is showing. Problem 1: I have got a input field (fieldcat-input = 'X') but when this field is modified in ALV (in screen) it is not modified in internal table

  • Items are not displayed --- REUSE_ALV_HIERSEQ_LIST_DISPLAY Update:10-11

    Hi experts, i'm stuck in this weird problem. Items (it_items) are not displayed in table. I've cheked with debugger and it_items contains lines. Thanks in advance. REPORT  z_hier. TYPE-POOLS: slis. DATA: fieldcatalog TYPE slis_t_fieldcat_alv. DATA: i

  • User-command in 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' Update:10-11

    Hai all,          I am trying to include a checkbox coloum in 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' in edit mode and process the rows which are selected.     i am successful in editing the check box ,but user-command is not working and also the List is no

  • Help on how to use FM REUSE_ALV_HIERSEQ_LIST_DISPLAY... Update:10-11

    Hello Experts, I am having problems using the said FM. Based on my code below, can you please tell me what am I doing wrong. Hope you can help me guys. Thank you and take care! [code] *& Report ZFI_CASH_PROOF_SHEET *& PROGRAM TYPE  : Report *&

  • Error in REUSE_ALV_HIERSEQ_LIST_DISPLAY..... Update:10-11

    Hi, unable to see output.... Please help me where is the error .. Thanks in Advance, kiran. TABLES:EKKO,EKPO. TYPE-POOLS:SLIS. SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001. SELECT-OPTIONS: SO_EKORG FOR EKKO-EKORG,                 SO_E

  • REUSE_ALV_HIERSEQ_LIST_DISPLAY and new Page Update:10-11

    Hi all, I am using FM REUSE_ALV_HIERSEQ_LIST_DISPLAY to display ALV List. Now, i want to print a New page on every Header record , is it possible?if Yes, then how? thanks in advance.Hi VIpin, Please find the code and function module .. *& Report  Z8A

  • REUSE_ALV_HIERSEQ_LIST_DISPLAY i_interface_check Update:10-11

    hello, I the function "REUSE_ALV_HIERSEQ_LIST_DISPLAY" exists an parameter "i_interface_check" to check the interface. It doesn´t work, when I use the function "REUSE_ALV_GRID_DISPLAY", but when I use "REUSE_ALV_LIST_DIS

  • Example/help for CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' editable Update:11-30

    hello experts, are there any example using function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'  with editable columns. Or, have somebody an idea to resolve my problem. I can edit the fields in the alv-grid, but I don't see the changes in the internal table usi

  • How to handle ALV background run when we use REUSE_ALV_HIERSEQ_LIST_DISPLAY Update:11-30

    Hi, I am working on a program which outputs ALV "Hierarchical sequential list output" by using function module "REUSE_ALV_HIERSEQ_LIST_DISPLAY"(pls see the code below for reference). When i run this report with the menu option "Ex