How to provide Hotspot in ALV tree????

Hi experts,
I have provided a double click event in ALV tree display. As of now I am able to open the transactions when I click on some the fields in output. But now I want to have a hotspot on those fields. See plz help me with this.
This is my catalog:
** get fieldcatalog
  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
       EXPORTING
            i_structure_name = 'ZPP_STR_BAR'
       CHANGING
            ct_fieldcat      = t_fieldcat.
LOOP AT t_fieldcat INTO ls_fieldcat.
    CASE ls_fieldcat-fieldname.
      WHEN 'AUFNR'.
        ls_fieldcat-no_out = 'X'.
        ls_fieldcat-key    = 'X'.
        ls_fieldcat-scrtext_s = text-t21.
        ls_fieldcat-tooltip   = text-t01.
      WHEN 'TXT'.
        ls_fieldcat-outputlen = 40.
**      ls_fieldcat-do_sum = 'X'.
        ls_fieldcat-scrtext_s = text-t22.
        ls_fieldcat-tooltip   = text-t02.
      WHEN 'CHARG'.
        ls_fieldcat-outputlen = 16.
    ENDCASE.
    MODIFY t_fieldcat FROM ls_fieldcat.
ENDLOOP.
Is there any field in field catalog which i need to set?
or is there any event to provide hotspot?
<REMOVED BY MODERATOR>
Thanks in advance,
Sachin
Edited by: Alvaro Tejada Galindo on Feb 22, 2008 2:31 PM

hi,
  You Can give hotspot using the Fieldcatalog.
hotspot_fieldname type slis_fieldname, " fieldname flag hotspot
key_hotspot(1) type c,        " keys as hotspot " K_KEYHOT
Hope this helps u,
Reagrds,
Arunsri.

Similar Messages

  • How to provide hyperlink in alv

    Hi,
    how to provide hyperlink only for one column in alv in webdynpro abap
    Thanks and regards,
    Sridevi.D

    DATA:
        lr_column_settings TYPE REF TO if_salv_wd_column_settings,
        lr_link_to_action TYPE REF TO cl_salv_wd_uie_link_to_action,
        lr_col type ref to cl_salv_wd_column.
      lr_column_settings ?= wd_this->alv_config_table.
      lr_col = lr_column_settings->get_column( 'MATNR' ).
      CREATE OBJECT lr_link_to_action.
      lr_link_to_action1->SET_TEXT_FIELDNAME('MATNR').
      lr_col->set_cell_editor( lr_link_to_action ).
    The variable alv_config_table is defined in the attribute tab of the view which is reference to the class CL_SALV_WD_CONFIG_TABLE
    Use this code in the init method of the View.
    Reward points if helpful.
    Thanks in advance.

  • How to refresh the ALV Tree

    Hi,
    I have an ALV Tree report developed using the OOPS. In my ALV Tree output, I have some buttons which will update the database after clicking. The data is correctly updating in the database. But, it is not getting updated in the ALV Tree display. That means, it is not REFRESHing the ALV Tree display. We have to again execute the program in order to see the updated output.
    Could anyone please suggest me how to Refresh the ALV Tree display..?
    We can't use the method 'REFRESH_TABLE_DISPLAY' as it is a PRIVATE method is the class CL_GUI_ALV_TREE.
    Please share your valuable thoughts.
    Thanks & Regards,
    Paddu.

    Hi paddu.
    please check out the link mentioned below,this will help u.
    How to Refresh data on ALV tree
    Regards
    Theres

  • Download from ALV Tree

    Dear All,
    Do anybody know how to download data from ALV tree into local PC. For example transaction O3O_MT10. Can we download it?
    Thanks
    Regards
    Hadi

    Thank a lot Rainer,
    It's definitely answer the question. I think I learn something new in here.
    Regards
    Hadi

  • MiniSAP 6.20: ALV tree not working in background

    Good day!
    SAP provides a sample ALV tree program, BCALV_TREE_DEMO, which could be submitted in the background.
    However, it does not work in MiniSAP 6.20. It's kind of bizarre as it works in our Test system.
    Does anyone has any idea what's happening.

    Good day!
    The ALV tree report is submitted in the background.
    By right, it should produce an ALV tree report in the print spool.
    However, it does not seem to work. I checked the program and found there is a logic to check whether it's a background job or not. If it is, it would not create the container.
    It's bizarre that it does not work in MiniSAP 6.20 but it works in 6.10

  • ALV TREE in Web Dynpro

    Hi guys,
    I am trying to display data from the internal table to ALV tree by using TreeByKeyTableColumn.
    can anyone please help me out or suggest proper way to display.
    thanks,

    >
    Kalpana Arumugam wrote:
    > Hi ,
    >      I was telling abt the SAP LOGON release version ( 640 Final Release ) and ofcourse not the WAS version . WAS is 7 0 only .
    >     The example which is given by you is not having any sample data . So im not able to find the tree .
    >  Now i have created a tree structure . But could you help me out in adding child nodes to the corresponding parent node in alv tree ?  .
    >
    > Thanks in advance .
    Although you might not have the sample data to run the application, you should still be able to look at the source code of the application. Also don't be confused by the File Upload prompt of the test applications.  It just is there if you want to override the data in the database.  If you just press the upload button without specifying the file it will instead read the data from the database.  If you database tables are empty, you can run the program BCALV_GENERATE_ALV_T_T2.
    Now as far as adding child nodes - that isn't exactly how things work with the ALV TREE. You don't actually have a heirarchy of nodes like when creating a tree element.  You can only set set columns as hierarchy columns.  It then uses sorting and grouping based upon these columns to make a psedo tree. However your data has to remain flat.
    For example you can take the flat SFLIGHT data in the example and define a hierarchy column of CARRID and CONNID.
    http://www.flickr.com/photos/tjung/2802287945/
    You then get output that looks like this:
    http://www.flickr.com/photos/tjung/2802287971/
    If you simply change the hierarchy column definition to add the Departure Date, the output changes (without any changes to the underlying data structure):
    http://www.flickr.com/photos/tjung/2802287989/

  • How to provide hyperlink for a particular field in ALV

    Hi,
      How to provide hyperlink for a particular field in alv report.
    Regards,
    Ramu.

    Yes you can do that. using the fieldcatalog there is an option for that. give HOT_SPOT = 'X'. for the column you want.
    wa_field-hotspot = 'X'.
    REPORT  ztest_alv.
    TYPE-POOLS:slis.
    DATA:it_fieldcat  TYPE  slis_t_fieldcat_alv,
         wa_field LIKE LINE OF it_fieldcat.
    DATA: BEGIN OF it_likp OCCURS 0,
           vbeln TYPE likp-vbeln,
          END OF it_likp.
    DATA: layout TYPE slis_layout_alv.
    wa_field-fieldname = 'VBELN'.
    wa_field-tabname = 'IT_LIKP'.
    wa_field-hotspot = 'X'.
    wa_field-outputlen = 10.
    wa_field-no_zero = 'X'.
    wa_field-seltext_l = 'Sales'.
    APPEND wa_field TO it_fieldcat.
    SELECT vbeln FROM likp
    UP TO 10 ROWS
    INTO TABLE it_likp.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program      = sy-repid
        is_layout               = layout
        i_callback_user_command = 'USER_COMMAND'
        it_fieldcat             = it_fieldcat
      TABLES
        t_outtab                = it_likp
      EXCEPTIONS
        program_error           = 1.
    *&      Form  user_Command
    *       text
    *      -->UCOMM      text
    *      -->SELFIELD   text
    FORM user_command USING ucomm TYPE sy-ucomm
                        selfield TYPE slis_selfield.
      CASE ucomm.
        WHEN '&IC1'.
          SET PARAMETER ID 'VL'  FIELD selfield-value.
          CALL TRANSACTION 'VL02N' AND SKIP FIRST SCREEN.
      ENDCASE.
    ENDFORM.                    "user_Command

  • How to change the color of specific row in ALV tree

    Hi,
    I m using method set_table_for_first_display of a class CL_GUI_ALV_TREE.
    The req is to change the color of specific row. Now can anybody tell me how to change the color of ALV tree. As in ALV tree and in this method 'set_table_for_first_display', there is no parameter IS_Layout.
    Pls suggest...

    hi
    hope this code will help you.
    Reward if help.
    REPORT zsharad_test1.
    TABLES: ekko.
    TYPE-POOLS: slis. "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    statu TYPE ekpo-statu,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    menge TYPE ekpo-menge,
    meins TYPE ekpo-meins,
    netpr TYPE ekpo-netpr,
    peinh TYPE ekpo-peinh,
    line_color(4) TYPE c, "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
    wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE slis_layout_alv,
    gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM data_retrieval.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_alv_report.
    *& Form BUILD_FIELDCATALOG
    Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
    I.e. Field type may be required in-order for
    the 'TOTAL' function to work.
    fieldcatalog-fieldname = 'EBELN'.
    fieldcatalog-seltext_m = 'Purchase Order'.
    fieldcatalog-col_pos = 0.
    fieldcatalog-outputlen = 10.
    fieldcatalog-emphasize = 'X'.
    fieldcatalog-key = 'X'.
    fieldcatalog-do_sum = 'X'.
    fieldcatalog-no_zero = 'X'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'EBELP'.
    fieldcatalog-seltext_m = 'PO Item'.
    fieldcatalog-col_pos = 1.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'STATU'.
    fieldcatalog-seltext_m = 'Status'.
    fieldcatalog-col_pos = 2.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'AEDAT'.
    fieldcatalog-seltext_m = 'Item change date'.
    fieldcatalog-col_pos = 3.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'Material Number'.
    fieldcatalog-col_pos = 4.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MENGE'.
    fieldcatalog-seltext_m = 'PO quantity'.
    fieldcatalog-col_pos = 5.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MEINS'.
    fieldcatalog-seltext_m = 'Order Unit'.
    fieldcatalog-col_pos = 6.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'NETPR'.
    fieldcatalog-seltext_m = 'Net Price'.
    fieldcatalog-col_pos = 7.
    fieldcatalog-outputlen = 15.
    fieldcatalog-datatype = 'CURR'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'PEINH'.
    fieldcatalog-seltext_m = 'Price Unit'.
    fieldcatalog-col_pos = 8.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    ENDFORM. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    Build layout for ALV grid report
    FORM build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
    gd_layout-info_fieldname = 'LINE_COLOR'.
    gd_layout-totals_only = 'X'.
    gd_layout-f2code = 'DISP'. "Sets fcode for when double
    "click(press f2)
    gd_layout-zebra = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text = 'helllllo'.
    ENDFORM. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    Display report using ALV grid
    FORM display_alv_report.
    gd_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = gd_repid
    i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    i_callback_user_command = 'USER_COMMAND'
    i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    it_special_groups = gd_tabgroup
    IT_EVENTS = GT_XEVENTS
    i_save = 'X'
    is_variant = z_template
    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. " DISPLAY_ALV_REPORT
    *& Form DATA_RETRIEVAL
    Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    DATA: ld_color(1) TYPE c.
    SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
    UP TO 10 ROWS
    FROM ekpo
    INTO TABLE it_ekko.
    *Populate field with color attributes
    LOOP AT it_ekko INTO wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
    i.e. wa_ekko-line_color = 'C410'
    ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
    IF ld_color = 8.
    ld_color = 1.
    ENDIF.
    CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
    MODIFY it_ekko FROM wa_ekko.
    ENDLOOP.
    ENDFORM. " DATA_RETRIEVAL

  • How to make some fields in ALV tree editable

    Hello All,
    Can any one tell me how to make some fields in ALV tree editable.
    If possible please post some code.
    Regards,
    Lisa.

    Hi Lisa,
    I want to make 3 fields in the ALV tree editable and update the saved values in ztable.
    I tried making the wa_fieldcat-edit = 'X' But in vain.
    Also i made the layout fields  wa_layout-edit = 'X'  and wa_layout-edit_mode = 'X'.
    But still the alv tree field appears as display.
    As you have mentioned in the post as answered, So please guide me to make the field editable.
    I am using oops method.
    Please provide me code if any.
    Thanks & Regards,
    Mozila

  • How to make field editable in ALV tree in OOPs?

    Hi Gems,
    Again I need help from you all.
    I am writing a program using OOPs and the uotput will be in ALV tree. I need to make a field editable in a perticular row.
    I am doing it using layout but the program is giving error during
    CALL METHOD CL_GUI_CFW=>FLUSH
          EXCEPTIONS
            CNTL_SYSTEM_ERROR = 1
            CNTL_ERROR        = 2.
    This method is returning sy-subrc = 2 and I am unable to get the output.
    I am using below code to make the field editable:
    DATA: LT_LAYOUT_ITEM TYPE LVC_T_LAYI,
                LS_LAYOUT_ITEM TYPE LVC_S_LAYI.
      LS_LAYOUT_ITEM-FIELDNAME = 'ACPCKTWRT'.     "ACPCKTWRT is the field name in the Internal table
      LS_LAYOUT_ITEM-EDITABLE = 'X'.
      APPEND LS_LAYOUT_ITEM TO LT_LAYOUT_ITEM.
    CALL METHOD G_ALV_TREE->ADD_NODE
        EXPORTING
          I_RELAT_NODE_KEY     = FP_RELAT_KEY
          I_RELATIONSHIP       = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
          IS_OUTTAB_LINE       = LS_TMP_FINFCNO                                                "structure of the internal table
         IS_NODE_LAYOUT       =
          IT_ITEM_LAYOUT       = LT_LAYOUT_ITEM                                                "Added layout to make the field editable
          I_NODE_TEXT          = LV_NODE_TEXT                                                      "Node text
        IMPORTING
          E_NEW_NODE_KEY       = FP_NODE_KEY
        EXCEPTIONS
          RELAT_NODE_NOT_FOUND = 1
          NODE_NOT_FOUND       = 2
          OTHERS               = 3
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Please help me and let me know how to get the solution.

    Hello
    The ALV tree control is not intended for making values editable (e.g. see
    [How to make ALV tree columns editable|http://sap.ittoolbox.com/groups/technical-functional/sap-abap/how-to-make-alv-tree-columns-editable-2052414])
    However, if you need an editable tree control then you have to use a different class (e.g. CL_ITEM_TREE_MODEL or CL_COLUMN_TREE_MODEL) but you will not have the ALV functionality of the ALV tree control.
    Regards
      Uwe

  • How to handle the check box in the alv tree display

    Hello,
    in my ALV Tree Report i have a check box in the output.
    I have one check box in the selection screen as select all .
    if this is selected then all the check boxes in the output must be selected that is (X).
    am using CL_GUI_ALV_TREE  for this.
    Please give me some input how to make that check boxes 'X' in the above mentioned case.
    With Regards,
    Sumodh.P

    Sumodh,
    check this
    Re: Select all checkbox in ALV tree
    please search before posting
    Thanks
    Bala Duvvuri

  • How to avoid blank column display in output in ALV TREE

    how to avoid blank column display in output while decreasing the length of other columns in ALV Tree.
    Example: please refer to BCALV_TREE_01 and see the output, then decrease the length of all columns . Then you can see a blank column appearing in screen at last, i.e in container. so how to avoid that.
    Thanks for reply.
    Edited by: morpeous on Jul 1, 2009 1:53 PM

    Hi,
    Check BCALV_TREE_02 on how to hide columns.
    Thanks & Regards,
    Anand Patil

  • How to download the datas of ALV tree without passing iternal table

    Hi,
      I want to download the values of ALV tree output in an Excel file without using any internal table.
    Please suggest your thoughts on the same.
    Regards,
    Shasiraj.C
    Edited by: Raj Shasi on Aug 1, 2008 8:44 AM

    There is one option -Export' in menu bar of ALV grid itself. Click on that and then click 'Local File'. Then choose 'Spreadsheet' option and provide local PC path for download.
    Regards,
    Aparna Gaikwad

  • How to provide Menu Options like BACK in ALV Grid display?

    Hi Guys,
              My problem is after displaying Multiple ALV grids using OO .I was not able to provide Back option and all those are Deactivated onj the Menu bar.So,How to provide those options.?We have a GreenButton with Symbol Correct on that Menu Bar.I was not able to see Back button and it is Deactivated.How to activate that Button.so that after displaying i can click on Back button and go to selection options.
    Thanks,
    Gopi.

    Hi Rich,
             I changed likie what u told.But still not working.I was not able to go to the Selection screen even after clicking F3 or F5 or back button.
    Standard Toolbar
    Icon Function Key                   Function Code        Function Text
         F3                             F3                   Back
         Alt-Arrow <                    F3                   Back
    Function Key Setting
    Function Key                   Icon Function Code        Function Text
    F5                                  F3                   Back
    Ctrl-N                              F3                   Back
               These are all the things which i kept in se41 tr code.
    Thanks,
    gopi.

  • How to 'grid' an ALV tree

    hi there,
    i have a program with ALV tree.
    is it possible to 'grid' the columns ? i mean to put vertical lines between each field like it is in standard-alv-grid ?
    reg, Martin

    Hi,
    *****HIERRACHIAL ALVS FOR KNA1 AND VBAK
    *& Report  ZJE_ALV_HIERRACHIAL1
    REPORT  zje_alv_hierrachial1.
    TYPE-POOLS: slis.
    TABLES: kna1, vbak ,vbap.
    TYPES: BEGIN OF ty_kna1,
             kunnr LIKE kna1-kunnr,
             land1 LIKE kna1-land1,
             name1 LIKE kna1-name1,
             ort01 LIKE kna1-ort01,
             var1,
           END OF ty_kna1.
    TYPES: BEGIN OF ty_vbak,
             KUNNR LIKE VBAK-KUNNR,
             vbeln LIKE vbak-vbeln,
             erdat LIKE vbak-erdat,
             ernam LIKE vbak-ernam,
             netwr LIKE vbak-netwr,
           END OF ty_vbak.
    TYPES: BEGIN OF ty_vbap,
             vbeln LIKE vbap-vbeln,
             posnr LIKE vbap-posnr,
             matnr LIKE vbap-matnr,
           END OF ty_vbap.
    DATA: it_kna1 TYPE STANDARD TABLE OF ty_kna1,
          wa_kna1 TYPE ty_kna1.
    DATA: it_vbak TYPE STANDARD TABLE OF ty_vbak,
          wa_vbak TYPE ty_vbak.
    DATA: it_vbap TYPE STANDARD TABLE OF ty_vbap,
          wa_vbap TYPE ty_vbap.
    DATA: kinfo TYPE slis_keyinfo_alv.
    DATA: wa_layout TYPE slis_layout_alv,
          it_fieldcat TYPE slis_t_fieldcat_alv,
          wa_fieldcat TYPE slis_fieldcat_alv,
          it_event_kna1 TYPE slis_t_event,
          wa_event_kna1 TYPE slis_alv_event,
          it_event_vbak TYPE slis_t_event,
          wa_event_vbak TYPE slis_alv_event,
          it_event_vbap TYPE slis_t_event,
          wa_event_vbap TYPE slis_alv_event.
    SELECT-OPTIONS: s_kunnr FOR kna1-kunnr DEFAULT 1000 TO 1500.
    INITIALIZATION.
      PERFORM layout.
      PERFORM fieldcat.
      kinfo-header01 = 'KUNNR'.
      kinfo-item01 = 'KUNNR'.
    START-OF-SELECTION.
      PERFORM datafetch_kna1.
      PERFORM datafetch_vbak.
      PERFORM display.
    *&      Form  fieldcat
          text
    FORM fieldcat .
      REFRESH it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = 'KUNNR'.
      wa_fieldcat-seltext_l = 'CUSTOMER NUMBER'.
      wa_fieldcat-datatype = 'CHAR'.
      wa_fieldcat-outputlen = 30.
      wa_fieldcat-tabname = 'IT_KNA1'.
      wa_fieldcat-key = 'X'.
      wa_fieldcat-hotspot = 'X'.
      wa_fieldcat-emphasize = 'C21'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = 'LAND1'.
      wa_fieldcat-seltext_l = 'COUNTRY CODE'.
      wa_fieldcat-datatype = 'CHAR'.
      wa_fieldcat-outputlen = 30.
      wa_fieldcat-tabname = 'IT_KNA1'.
      wa_fieldcat-hotspot = 'X'.
      wa_fieldcat-emphasize = 'C31'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = 'NAME1'.
      wa_fieldcat-seltext_l = 'CUSTOMER NAME'.
      wa_fieldcat-datatype = 'CHAR'.
      wa_fieldcat-outputlen = 35.
      wa_fieldcat-tabname = 'IT_KNA1'.
      wa_fieldcat-hotspot = 'X'.
      wa_fieldcat-emphasize = 'C71'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = 'ORT01'.
      wa_fieldcat-seltext_l = 'COUNTRY '.
      wa_fieldcat-datatype = 'CHAR'.
      wa_fieldcat-outputlen = 30.
      wa_fieldcat-tabname = 'IT_KNA1'.
      wa_fieldcat-hotspot = 'X'.
      wa_fieldcat-emphasize = 'C51'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = 'VBELN'.
      wa_fieldcat-seltext_l = 'SALES ORDER'.
      wa_fieldcat-datatype = 'CHAR'.
      wa_fieldcat-outputlen = 30.
      wa_fieldcat-tabname = 'IT_VBAK'.
      wa_fieldcat-key = 'X'.
      wa_fieldcat-hotspot = 'X'.
      wa_fieldcat-emphasize = 'C11'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = 'ERDAT'.
      wa_fieldcat-seltext_l = 'CREATED ON'.
      wa_fieldcat-datatype = 'DATS'.
      wa_fieldcat-outputlen = 35.
      wa_fieldcat-tabname = 'IT_VBAK'.
      wa_fieldcat-hotspot = 'X'.
      wa_fieldcat-emphasize = 'C61'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = 'ERNAM'.
      wa_fieldcat-seltext_l = 'CREATED BY'.
      wa_fieldcat-datatype = 'CHAR'.
      wa_fieldcat-outputlen = 35.
      wa_fieldcat-tabname = 'IT_VBAK'.
      wa_fieldcat-hotspot = 'X'.
      wa_fieldcat-emphasize = 'C21'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = 'NETWR'.
      wa_fieldcat-seltext_l = 'NET VALUE'.
      wa_fieldcat-datatype = 'CURR'.
      wa_fieldcat-outputlen = 30.
      wa_fieldcat-tabname = 'IT_VBAK'.
      wa_fieldcat-hotspot = 'X'.
      wa_fieldcat-emphasize = 'C41'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ENDFORM.                    "fieldcat
    *&      Form  layout
          text
    -->  p1        text
    <--  p2        text
    FORM layout .
      wa_layout-zebra = 'X'.
    wa_layout-colwidth_optimize = 'X'.
    wa_layout-totals_text = 'GRAND_TOTAL'.
    wa_layout-subtotals_text = 'SUB_TOTAL'.
    wa_layout-Box_fieldname = 'X'.
      wa_layout-expand_fieldname  = 'VAR1'.
    ENDFORM.                    "layout
    *&      Form  DATAFETCH_KNA1
          text
    -->  p1        text
    <--  p2        text
    FORM datafetch_kna1 .
      SELECT   kunnr land1 name1 ort01
               FROM kna1
               INTO TABLE it_kna1
               WHERE kunnr IN s_kunnr.
    ENDFORM.                    " DATAFETCH_KNA1
    *&      Form  DATAFETCH_VBAK
          text
    -->  p1        text
    <--  p2        text
    FORM datafetch_vbak .
      SELECT  KUNNR vbeln erdat ernam netwr
             FROM vbak
             INTO TABLE it_vbak
             FOR ALL ENTRIES IN it_kna1
             WHERE kunnr = it_kna1-kunnr.
    ENDFORM.                    " DATAFETCH_VBAK
    *&      Form  DISPLAY
          text
    -->  p1        text
    <--  p2        text
    FORM display .
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
      I_INTERFACE_CHECK              = ' '
         i_callback_program             = sy-repid
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
         is_layout                      = wa_layout
         it_fieldcat                    = it_fieldcat
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
         i_screen_start_column          = 5
         i_screen_start_line            = 1
         i_screen_end_column            = 150
         i_screen_end_line              = 35
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
      IT_EVENTS                      =
      IT_EVENT_EXIT                  =
          i_tabname_header               = 'IT_KNA1'
          i_tabname_item                 = 'IT_VBAK'
      I_STRUCTURE_NAME_HEADER        =
      I_STRUCTURE_NAME_ITEM          =
          is_keyinfo                     = kinfo
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                =
      IR_SALV_HIERSEQ_ADAPTER        =
      IT_EXCEPT_QINFO                =
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          t_outtab_header                = it_kna1
          t_outtab_item                  = it_vbak
       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.                    " DISPLAY
    Regards,
    Jagadish

Maybe you are looking for

  • LOG_FILE_NOT_FOUND when running cleaner manually after some data purge

    I hit LOG_FILE_NOT_FOUND error when running cleaner manually after some data purge, I searched the forum, found someone also faced the same issue before, but cannot find any clue on how to fix it. Below is the error trace and followed by our configur

  • Unable to open "Help and support"

    When i click on help and support i get the error message: "Internet explorer cannot download / from help" How do i fix this?

  • Remote Desktop and Licensing

    I wrote my own licensing scheme and I would like to know how to prevent multiple executions of my app. The licensing is on a per machine basis where it looks at the mac address of the computer to see if it's allowed to run. Because through remote des

  • Adobe Indesign, Illustrator, and Photoshop wont update

    I'm trying to use the Folio Builder in InDesign CS6 but when I access the panel it says updates are required. I went to Help>Updates and it says : "The update server is not responding.  The server might be offline temporarily, or the Internet or fire

  • How to track agents and there actions at all levels in a workflow

    Hi All, We have a requiement where in the task description we are required to give the details of the people who had executed the workflow and the action they have taken. That is suppose  a user approves or rejects a workiitem. Then the another user