ALV Example with multiple headers, tree, editable column combined...

Hello Experts,
Any examples would be highly appreciated.Thank you and take care!

Hi,
Check this thread for ALVs -
Interactive ALV
ashish

Similar Messages

  • ALV Grid with Multiple Headers

    Dear All ,
    I want to know is it possible to display Multiple header in the ALV Grid Display it is possible in List Display that i dne but i want in
    My requirment is :
                Header  1                                          |                           Header 2
       SubHeader 1       |   SubHeader 2              |    SubHeader 3      |   SubHeader 4
            R1                    |              R2                    |         R1                    |              R2                    |
            R1                    |              R2                    |         R1                    |              R2                    |
            R1                    |              R2                    |         R1                    |              R2                    |
            R1                    |              R2                    |         R1                    |              R2                    |
            R1                    |              R2                    |         R1                    |              R2                    |
            R1                    |              R2                    |         R1                    |              R2                    |
    Header line 1 and Header line 2 in this format .
    How it could be possible Please suggest or its not at all possible .  Please suggest .
    Thanks & Regards,
    Aryan

    >
    Aryan@sap wrote:
    > That i will do in end but i want with ALV Grid . If it wont be possible with ALV grid i will finally do with ALV List .
    > If any solution possible through ALV Grid then Please Suggest .
    Then go for ALV List. But i am not sure if you can achieve this using the method suggested by Soumyaprakash.
    You can give it a try though.
    It is possible because that I have seen in standard here i cant paste the screen shot . but how its comming tht i am not able to analysis .
    This is news to me now. Which standard code are you referring to?
    Good luck !!

  • ABAP list with multiple headers

    Hi experts,
    i have to display a table with multiple headers. Example:
    Header 1 = Sales order header
    Header 2 = Sales order items
    It's possible to create an ABAP list with 2 headers?
    Thanks in advance.

    Hi Dan,
    FYI .
    [ALV Grid with Multiple Headers;
    Regards
    Abhii

  • Smartform with multiple Headers & Respective Item Details and Totals?

    Dear All,
    Appreciate if anyone clarify my doubt.
    My requirement is to develop a smartform for billing with multiple headers & respective items and totals. For more clarity I'm explaining below.
                        Header Section1
    variable1          variable2          variable3          variable4          variable5
         variable6          variable7          variable8
    variable9          variable10          variable11
    Item Details1
    s no     vebeln     verpr     col4     col5     col6
    total                    123.21
    total in words -
                   value     321.21
                   value     982.98
                   value     some value
    footer details
                        Header Section2
    variable1          variable2          variable3          variable4          variable5
         variable6          variable7          variable8
    variable9          variable10          variable11
    Item Details2
    s no     vebeln     verpr     col4     col5     col6
    total                    123.21
    total in words -
                   value     321.21
                   value     982.98
                   value     some value
    footer details
                        Header Section3
    variable1          variable2          variable3          variable4          variable5
         variable6          variable7          variable8
    variable9          variable10          variable11
    Item Details3
    s no     vebeln     verpr     col4     col5     col6
    total                    123.21
    total in words -
                   value     321.21
                   value     982.98
                   value     some value
    footer details
    Is this possible using smartforms?
    Now they are using a classical report and takes printout in preprinted stationery.
    requirement is to develop a smartform for this. there is a selection screen for the print program which accepts billing docs.
    Thanks,

    Rajiv,
    Actually for your case you don't need a table inside the Main Window. 
    1.) First Populate all the data(header + item) in an internal table in the print program itself.
    2.) Pass this internal table to the smartform.
    3.) In the smartform give exact dimensions to the main window.
    4.) In the Main Window Use a Loop on this internal table.
    5.) Create a template for the header data giving the exact dimensions.
    6.) Create another template for the item data giving exact dimensions to the template.
    7.) If there is pre-printed text between these templates, insert a text element between these templates. This text element will have nothing just give a paragraph format to it. Go to smartstyle, create a style in which create a paragraph format setting line spacing parameter of this paragraph format of the same size as that of pre-printed text.
    8.) Only 1 page is required since Loop statement will print the second record on the second page if the dimension of templates are exact.
    9.) Dimensions you can easily measure from the pre-printed form.
    <removed by moderator>
    Edited by: Thomas Zloch on Mar 6, 2012

  • ALV Hierarchical With multiple boxes

    Hello.
    I have an alv hierarchical with multiple boxes.
    Can I  insert a buttom in Gui status of alv that allows me to  expand  all the boxes of  hierarchy?
    Regards
    Angela

    Hi Narendra,
    Try this program:
    TABLES : sflight.
    TYPE-POOLS: slis.
    DATA : w_repid LIKE sy-repid.
    w_repid = sy-repid.
    DATA: BEGIN OF it_sflight OCCURS 0,
    checkbox(1),
    carrid LIKE sflight-carrid,
    END OF it_sflight.
    *layout
    DATA: wa_layout TYPE slis_layout_alv.
    *field catalog
    DATA: it_fieldcatalog TYPE slis_t_fieldcat_alv,
    wa_fieldcatalog TYPE slis_fieldcat_alv.
    START-OF-SELECTION.
    SELECT carrid FROM sflight
    INTO CORRESPONDING FIELDS OF TABLE it_sflight.
    END-OF-SELECTION.
    CLEAR it_fieldcatalog.
    REFRESH it_fieldcatalog.
    wa_fieldcatalog-fieldname = 'CHECKBOX'.
    wa_fieldcatalog-outputlen = '3'.
    wa_fieldcatalog-col_pos = '1'.
    wa_fieldcatalog-seltext_m = 'Chk'.
    wa_fieldcatalog-checkbox = 'X'.
    wa_fieldcatalog-edit = 'X'.
    APPEND wa_fieldcatalog TO it_fieldcatalog.
    CLEAR wa_fieldcatalog.
    wa_fieldcatalog-fieldname = 'CARRID'.
    wa_fieldcatalog-outputlen = '10'.
    wa_fieldcatalog-col_pos = '2'.
    wa_fieldcatalog-seltext_m = 'Carrid'.
    APPEND wa_fieldcatalog TO it_fieldcatalog.
    CLEAR wa_fieldcatalog.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = w_repid
    is_layout = wa_layout
    i_callback_user_command = 'USER_COMMAND'
    it_fieldcat = it_fieldcatalog
    TABLES
    t_outtab = it_sflight
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    *& Form USER_COMMAND
    FORM user_command USING p_ucomm TYPE sy-ucomm
    p_selfld TYPE slis_selfield.
    CASE p_ucomm.
    WHEN '&DATA_SAVE'.
    DATA ref1 TYPE REF TO cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    e_grid = ref1.
    CALL METHOD ref1->check_changed_data.
    LOOP AT it_sflight WHERE checkbox = 'X'.
    DELETE it_sflight INDEX sy-tabix.
    ENDLOOP.
    p_selfld-refresh = 'X'.
    ENDCASE.
    ENDFORM. "user_command
    Hope this helps you.
    Regards,
    Chandra Sekhar

  • [svn] 949: Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name , it causes a ClassCastException in the server

    Revision: 949
    Author: [email protected]
    Date: 2008-03-27 07:12:59 -0700 (Thu, 27 Mar 2008)
    Log Message:
    Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name, it causes a ClassCastException in the server
    QA: Yes - try again with legacy-collection true and false.
    Doc: No
    Checkintests: Pass
    Details: Another try in fixing this bug. When legacy-collection is false, Actionscript Array on the client becomes Java Array on the server and my fix yesterday assumed this case. However, when legacy-collection is true, Actionscript Array becomes Java ArrayList on the server. So added code to handle this case.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-96
    Modified Paths:
    blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/proxy/RequestF ilter.java

    Hi all!
    Just to post the solution to this if anyone ever runs accross this thread...
    For some reason i had it bad the first time, don't have time right now to see why but here is what worked for me:
    HashMap primaryFile = new HashMap();
    primaryFile.put("fileContent", bFile);
    primaryFile.put("fileName", uploadedFile.getFilename());
    operationBinding.getParamsMap().put("primaryFile", primaryFile);
    HashMap customDocMetadata = new HashMap();
    HashMap [] properties = new HashMap[1];
    HashMap customMetadataPropertyRoom = new HashMap();
    customMetadataPropertyRoom.put("name", "xRoom");
    customMetadataPropertyRoom.put("value", "SOME ROOM");
    properties[0] = customMetadataPropertyRoom;
    customDocMetadata.put("property", properties);
    operationBinding.getParamsMap().put("CustomDocMetaData", customDocMetadata);
    Basically an unbounded wsdl type is an array of objects (HashMaps), makes sense, i thought i had it like this before, must have messed up somewhere...
    Good luck all!

  • [svn] 931: Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name , it causes a ClassCastException in the server

    Revision: 931
    Author: [email protected]
    Date: 2008-03-26 11:31:01 -0700 (Wed, 26 Mar 2008)
    Log Message:
    Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name, it causes a ClassCastException in the server
    QA: Yes - we need automated tests for this basic case.
    Doc: No
    Checkintests: Pass
    Details: RequestFilter was not handling multiple headers with the same name properly.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-96
    Modified Paths:
    blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/proxy/RequestF ilter.java

    Hi all!
    Just to post the solution to this if anyone ever runs accross this thread...
    For some reason i had it bad the first time, don't have time right now to see why but here is what worked for me:
    HashMap primaryFile = new HashMap();
    primaryFile.put("fileContent", bFile);
    primaryFile.put("fileName", uploadedFile.getFilename());
    operationBinding.getParamsMap().put("primaryFile", primaryFile);
    HashMap customDocMetadata = new HashMap();
    HashMap [] properties = new HashMap[1];
    HashMap customMetadataPropertyRoom = new HashMap();
    customMetadataPropertyRoom.put("name", "xRoom");
    customMetadataPropertyRoom.put("value", "SOME ROOM");
    properties[0] = customMetadataPropertyRoom;
    customDocMetadata.put("property", properties);
    operationBinding.getParamsMap().put("CustomDocMetaData", customDocMetadata);
    Basically an unbounded wsdl type is an array of objects (HashMaps), makes sense, i thought i had it like this before, must have messed up somewhere...
    Good luck all!

  • ALV with multiple headers

    Hello All,
         i have a requirement where i have to have multiple headers in a single alv.
    The exact requirement is like.
    Header1----
    row1
    row2                     1 unit
    row3
    row4----
    Header2
    row1
    row2
    row3
    row4
    Header3
    row1
    row2
    row3
    row4
    and the number of individual units is not fixed and will be determined at runtime.
    Can somebody tell me the steps to achieve it.
    actually i tried using block alv in loop but it is showing inconsistent data and moreover it has a limitation of 19 appends.

    make you are looking a break page
    check this
    http://hosteddocs.ittoolbox.com/kk021909.pdf

  • Posting an Idoc with Multiple Headers and Multiple Lines

    Hi all,
    I have a scenario like this fileXIIdoc
    Invoice file comes in text file with multiple header and multiple lines like this
    111               aaa     13214234    US   (header)
    09082010     ABC    9999            A     (Line)
    222               ccc     43454543    US   (header)
    09082010     XYZ    7777            B     (Line)
    09082010     PQR    8888            C     (Line)
    I need to post single Idoc with all the headers and lines
    we are planning to use Custom Idoc,Is this possible by having the header segment as unbounded??
    Regards
    Edited by: Vamsi Krishna on Sep 8, 2010 8:05 PM

    hi,
    lets go again.
    you have to edit the custom IDoc and change the ocurrance on the header segment. also modify the details segment adding an addtional field that identify which header that this detail belong.
    for this case you cannot change the occurrance in SAP PI because you wont identify what i have told you before.  in PI apply to change the occurrance if you could send ONE Idoc Per Header.
    now is better clear???
    Let us know.
    Thanks
    Rodrigo P-.

  • Hierarchy problem when creating IDoc with multiple headers

    Hi,
    In general, When you create an inbound IDoc for the IDoc Type FIDCCP02, you have all the data records arranged in hierarchical order (while viewing it in the we02 transaction).
    Our requirement is to have m number of headers(E1FIKPF) and in turn it has n number of items(E1FISEG) inside a same IDoc. We have a problem in viewing the hierarchy of them in the data records tab. It comes down in a flat order without hierarchical division.
    If we have only one header, we get the hierarchy sorted by default. If we have multiple headers we see the same problem again.
    We guess some make-ups in the EDIDD structure which contains segnum, hlevel etc needs to be done.
    Let us know the correct method to get this fixed.
    Points will be rewarded.Thanks in advance.
    Regards,
    Reni

    Every Idoc segment has a place to put in the parent segment for that Idoc. When you "fill" the Idoc , this tsep might not be executing for some reason.
    Is this some customer development?
    in EDID4 ,see these fields
    PSGNUM-Number of the hierarchically higher SAP segment
    HLEVEL Hierarchy level.
    Regards

  • ALV Report for multiple headers with Line Items

    Hi Sap All.
    here i have got a requirement to change the exisiting Zprogram which writes all the header information with line items in a normal simple report,now i have got to change the program in order to display in an ALV Format .
    in the exisiting program they are using EXTRACT ,INSERT Statement and multiple select statements for getting the values into each field ofheader and line items for writing in a simple report.
    so ijust want to know how i can populate all the data into alv grid.
    can any one help me in this.
    regards.
    Varma

    you have to store all header records in an internal table and all item records in a second table
    then you call function module REUSE_ALV_HIERSEQ_LIST_DISPLAY with both parameters T_OUTTAB_HEADER and T_OUTTAB_ITEM

  • Example of an OO ALV that reflects changes from an editable column...

    Hello Experts,
    I am currently developing a report wherein I need to add the value entered by the user to
    another column. For example, Column A is editable and the user entered the value 100 in a
    given cell. I need to add that value(100) to column B. Simple examples would be highly appreciated.
    Thank you guys and take care!

    Hi use this One.
    WA_FIELDCAT-EDIT         = 'X'.
    WS_LAYOUT-EDIT_MODE           =  'A'.
          CLASS event_receiver DEFINITION
    CLASS EVENT_RECEIVER DEFINITION.
      PUBLIC SECTION.
        METHODS: HANDLE_TOOLBAR_SET
                 FOR EVENT TOOLBAR OF CL_GUI_ALV_GRID
                 IMPORTING E_OBJECT E_INTERACTIVE,
                 HANDLE_USER_COMMAND
                 FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
                 IMPORTING E_UCOMM SENDER,
                 DATA_CHANGED_FINISHED
                 FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
                 IMPORTING ER_DATA_CHANGED.
    ENDCLASS.                    "event_receiver DEFINITION
    *&       Class (Implementation)  event_receiver
           Text
    CLASS EVENT_RECEIVER IMPLEMENTATION.
      METHOD HANDLE_TOOLBAR_SET.
      ENDMETHOD.                    "HANDLE_TOOLBAR_SET
      METHOD HANDLE_USER_COMMAND.
       ENDMETHOD.                    "HANDLE_USER_COMMAND
      METHOD DATA_CHANGED_FINISHED.
        LOOP AT ER_DATA_CHANGED->MT_MOD_CELLS INTO WA_T_MODI.
          READ TABLE IT_FINAL INTO WA_FINAL INDEX WA_T_MODI-TABIX.
          IF SY-SUBRC = 0.
            CASE WA_T_MODI-FIELDNAME.
              WHEN 'INTEREST'.
                WA_FINAL-INTEREST = WA_T_MODI-VALUE.
                WA_FINAL-TOTTDS = WA_FINAL-TDSAMT   + WA_FINAL-SURCHG + WA_FINAL-ECESS + WA_FINAL-HECESS +
                                  WA_FINAL-INTEREST + WA_FINAL-OTHERS .
                MODIFY IT_FINAL FROM WA_FINAL INDEX WA_T_MODI-TABIX
                  TRANSPORTING INTEREST TOTTDS.
              WHEN 'OTHERS'.
                WA_FINAL-OTHERS = WA_T_MODI-VALUE.
                WA_FINAL-TOTTDS = WA_FINAL-TDSAMT   + WA_FINAL-SURCHG + WA_FINAL-ECESS + WA_FINAL-HECESS +
                                  WA_FINAL-INTEREST + WA_FINAL-OTHERS .
                MODIFY IT_FINAL FROM WA_FINAL INDEX WA_T_MODI-TABIX
                  TRANSPORTING OTHERS TOTTDS.
            ENDCASE.
          ENDIF.
        ENDLOOP.
        CALL METHOD GV_GRID->REFRESH_TABLE_DISPLAY
              EXCEPTIONS
                FINISHED = 1
                OTHERS   = 2.
      ENDMETHOD.                    "DATA_CHANGED_FINISHED
    ENDCLASS.               "event_receiver
    DATA : LCL_OBJ TYPE REF TO EVENT_RECEIVER.
    CREATE OBJECT LCL_OBJ.
      CREATE OBJECT CONT
        EXPORTING
          CONTAINER_NAME              = 'CC_ALV'
        EXCEPTIONS
          CNTL_ERROR                  = 1
          CNTL_SYSTEM_ERROR           = 2
          CREATE_ERROR                = 3
          LIFETIME_ERROR              = 4
          LIFETIME_DYNPRO_DYNPRO_LINK = 5
          OTHERS                      = 6.
      CREATE OBJECT GV_GRID
        EXPORTING
          I_PARENT          = CONT
        EXCEPTIONS
          ERROR_CNTL_CREATE = 1
          ERROR_CNTL_INIT   = 2
          ERROR_CNTL_LINK   = 3
          ERROR_DP_CREATE   = 4
          OTHERS            = 5.
      SET HANDLER LCL_OBJ->HANDLE_TOOLBAR_SET     FOR GV_GRID.
      SET HANDLER LCL_OBJ->HANDLE_USER_COMMAND    FOR GV_GRID.
      CALL METHOD GV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          IS_VARIANT                    = WS_VARIANT
          I_SAVE                        = 'A'
          IS_LAYOUT                     = WS_LAYOUT
          IT_TOOLBAR_EXCLUDING          = IT_FCODES
        CHANGING
          IT_OUTTAB                     = IT_FINAL
          IT_FIELDCATALOG               = IT_FIELD_CAT
        EXCEPTIONS
          INVALID_PARAMETER_COMBINATION = 1
          PROGRAM_ERROR                 = 2
          TOO_MANY_LINES                = 3
          OTHERS                        = 4.
      CALL METHOD GV_GRID->SET_READY_FOR_INPUT
        EXPORTING
          I_READY_FOR_INPUT = 1.
      CALL METHOD GV_GRID->REGISTER_EDIT_EVENT
        EXPORTING
          I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
      SET HANDLER LCL_OBJ->DATA_CHANGED_FINISHED  FOR GV_GRID.
    Edited by: VipulKumar Darji on Oct 20, 2010 11:29 AM

  • Help req : alv grid with multiple row selection

    Hi all sap gurus,
    i have a alv list display program , in which i can select the o/p rows(multiple rows)
    and perform some actiom based on some icons .
    now i have to convert this in to grid display
    this is initial code i.e for list
    DATA :  BEGIN OF itab OCCURS 0.
            INCLUDE STRUCTURE ztest.
    DATA :  checkbox type c.
    DATA : END OF itab.
    s_layout-box_fieldname = 'CHECKBOX'.
      ty_events-name = slis_ev_top_of_page.
      ty_events-form =  'TOP_OF_PAGE'.
      APPEND ty_events TO it_events.
    ALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                i_program_name     = v_repid
                i_internal_tabname = 'ITAB'
                i_inclname         = v_repid
           CHANGING
                ct_fieldcat        = build_fieldcatalog.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
       I_INTERFACE_CHECK              = ' '
       I_BUFFER_ACTIVE                = ' '
         i_callback_program             = v_repid
         i_callback_pf_status_set       = 'SET_PF_STATUS'
         i_callback_user_command        = 'USER_COMMAND'
         i_structure_name               = 'ITAB'
         is_layout                      = s_layout
         it_fieldcat                    = build_fieldcatalog[]
       IT_EXCLUDING                   =
       IT_SPECIAL_GROUPS              =
       IT_SORT                        =
       IT_FILTER                      =
       IS_SEL_HIDE                    =
       I_DEFAULT                      = 'X'
       I_SAVE                         = ' '
       IS_VARIANT                     =
         it_events                      = it_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
    IMPORTING
       E_EXIT_CAUSED_BY_CALLER        =
       ES_EXIT_CAUSED_BY_USER         =
          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.
    FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
      IF ucomm = 'DELE'.
        LOOP AT iTAB WHERE CHECKbox = 'X' .
        ENDLOOP.
        MODIFY  ztEST FROM TABLE itAB.
      ENDIF.
      selfield-refresh = 'X'.
    ENDFORM.
    NOW I HAVE A LIST O/P WHERE I CAN SELECT THE BOX AND CLICK DELETE ICON.
    NOW I WANT TO CHANGE TO GRID, SO I KEPT EVERYTHING SAMRE AND I CHANGED  " LIST" TO "GRID"
    NOW TWO THINGS HAPPEND
    1) I SEE A EMPTY COLUMN IN THE O/P , I GUESS THATS BECAUSE CHECKBOSX IN INTERNAL TABLE , SO I REMOVED IT
    SO THIS MADE ME TO REMOVE
    IF ucomm = 'DELE'.
        LOOP AT iTAB." WHERE CHECKbox = 'X' .------PROBLEM
        ENDLOOP.
        MODIFY  ztEST FROM TABLE itAB.
      ENDIF.
      selfield-refresh = 'X'.
    NOW I DON'T SEE THE EMPTY COLUMN , BUT NOW PROBLEM  IS I CANNNOT DISTINGUISH AS TO WHICH IS SELECTED AND AT ANY POINT OF TIME I CANSELECT ONLY ROW.
    ALL I WANT IS
    1) I WANT TO SELECT MULTIPLE ROWS AND SHOULD BE ABLE TO KNOW WHICH ROWS WERE SELECTED IN THE O/P SCREEN.
    IN THE LIST DISPLAY I HAD CHECKBOX = 'X' FOR ALL THE ROWS THAT WERE SELECTED , I WANT THE SIMILAR THING in grid display
    LET ME KNOW whether this can be done without USING 00 LANG.
    thanks

    Hi Swati,
    Below code might help full for you. Description: is It selects multiple rows from ALV and display it on the next ALV.
    *************************Reward Point If help full********************************************
    *& Report   z7cc_alv_oops_show_next_alv                                *
    *&          DEVELOPERS NAME : CHIDANAND CHAUHAN
    *&          DATE: SATURDAY 08-07-2006
    *&          DESCRIPTION: TO CREATE AN OBJECT ORIENTED ALV
    REPORT      z7cc_alv_oops_show_next_alv MESSAGE-ID  z5hs .
    DATA : BEGIN OF it_mara OCCURS 0,
      mark  TYPE flag,
      matnr TYPE matnr,
      mtart TYPE mtart,
      meins TYPE meins,
    END OF it_mara.
    DATA : BEGIN OF it_mara1 OCCURS 0,
    *  mark  type flag,
      matnr TYPE matnr,
      mtart TYPE mtart,
      meins TYPE meins,
    END OF it_mara1.
    DATA : BEGIN OF it_mara2 OCCURS 0,
    *  mark  type flag,
      matnr TYPE matnr,
      mtart TYPE mtart,
      meins TYPE meins,
    END OF it_mara2.
    DATA : t_fieldcat TYPE lvc_t_fcat,
             t_fieldcat1 TYPE lvc_t_fcat,
          s_fieldcat LIKE LINE OF t_fieldcat.
    DATA : s_layout TYPE lvc_s_layo.
    DATA : control TYPE REF TO cl_gui_custom_container,
           grid  TYPE REF TO cl_gui_alv_grid.
    DATA: BEGIN OF wa ,
      mark  TYPE flag,
      matnr TYPE matnr,
      mtart TYPE mtart,
      meins TYPE meins,
    END OF wa.
    *       CLASS lcl_events_box DEFINITION
    CLASS lcl_events_box DEFINITION.
      PUBLIC SECTION.
        METHODS :
    *Handler_Data_Changed for event Data_Changed of cl_gui_alv_grid
    *imporTing er_data_changed,
        handler_user_command FOR EVENT user_command OF cl_gui_alv_grid
        IMPORTING e_ucomm,
        handler_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
        IMPORTING e_object e_interactive.
    ENDCLASS.                    "lcl_events_box DEFINITION
    *       CLASS lcl_events_box IMPLEMENTATION
    CLASS lcl_events_box IMPLEMENTATION.
    * method to handle the user command.
      METHOD handler_user_command.
        PERFORM form_usercommand CHANGING e_ucomm.
      ENDMETHOD.                    "Handler_user_command
    *& Mehod to handle the toolbar.
      METHOD handler_toolbar.
        PERFORM form_toolbar CHANGING e_object e_interactive
        e_object->mt_toolbar.
      ENDMETHOD.                    "Handler_ToolBar
    ENDCLASS.                    "lcl_events_box IMPLEMENTATION
    START-OF-SELECTION.
      DATA : w_events TYPE REF TO lcl_events_box.
      SELECT matnr mtart meins FROM mara INTO CORRESPONDING FIELDS OF TABLE
      it_mara.
      CALL SCREEN 100.
    *&      Module  pbo_module  OUTPUT
    *       text
    MODULE pbo_module OUTPUT.
      IF grid IS INITIAL.
        CREATE OBJECT control
          EXPORTING
            container_name     = 'CUST_CTRL'.
        CREATE OBJECT grid
          EXPORTING
            i_parent          = control.
        PERFORM build_catalog.
        PERFORM build_catalog1.
        PERFORM build_layout.
        CALL METHOD grid->set_table_for_first_display
          EXPORTING
            is_layout       = s_layout
          CHANGING
            it_outtab       = it_mara[]
            it_fieldcatalog = t_fieldcat.
        CREATE OBJECT w_events.
        SET HANDLER : w_events->handler_toolbar FOR grid,
                      w_events->handler_user_command FOR grid.
        CALL METHOD grid->set_toolbar_interactive.
      ELSE.
        CALL METHOD grid->refresh_table_display.
      ENDIF.
    ENDMODULE.                 " pbo_module  OUTPUT
    *&      Form  BUILD_CATALOG
    FORM build_catalog .
      s_fieldcat-col_pos = '1'.
      s_fieldcat-fieldname = 'MARK'.
      s_fieldcat-checkbox = 'X'.
      s_fieldcat-edit = 'X'.
      APPEND s_fieldcat TO t_fieldcat.
      CLEAR s_fieldcat.
      s_fieldcat-col_pos = '2'.
      s_fieldcat-fieldname = 'MATNR'.
      s_fieldcat-scrtext_m = 'MATERIAL'.
      APPEND s_fieldcat TO t_fieldcat.
      s_fieldcat-col_pos = '3'.
      s_fieldcat-fieldname = 'MTART'.
      s_fieldcat-scrtext_m = 'MATERL TYPE'.
      APPEND s_fieldcat TO t_fieldcat.
      s_fieldcat-col_pos = '4'.
      s_fieldcat-fieldname = 'MEINS'.
      s_fieldcat-scrtext_m = 'UOM'.
      APPEND s_fieldcat TO t_fieldcat.
    ENDFORM.                    " BUILD_CATALOG
    *&      Form  BUILD_LAYOUT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_layout .
      s_layout-zebra = 'X'.
    * S_LAYOUT-CWIDTH_OPT = 'X'.
      s_layout-grid_title = 'Material Details'.
    ENDFORM.                    "BUILD_LAYOUT
    " BUILD_LAYOUT////////////////////////////////////
    " USER_COMMAND_0100  INPUT
    *&      Form  FORM_USERCOMMAND
    *       text
    *      <--P_E_UCOMM  text
    FORM form_usercommand  CHANGING p_e_ucomm.
      CASE p_e_ucomm.
        WHEN 'INT1'.
          DO.
            READ TABLE it_mara INDEX sy-index TRANSPORTING mark matnr.
            IF sy-subrc <> 0.
              EXIT.
            ENDIF.
            IF it_mara-mark = 'X'.
              READ TABLE it_mara INTO wa TRANSPORTING matnr mtart meins .
              MOVE-CORRESPONDING wa TO it_mara1.
              READ TABLE it_mara1 TRANSPORTING matnr mtart meins .
              MOVE-CORRESPONDING it_mara1  TO it_mara2.
              APPEND it_mara2.
              CALL METHOD grid->set_table_for_first_display
                EXPORTING
                  is_layout       = s_layout
                CHANGING
                  it_outtab       = it_mara2[]
                  it_fieldcatalog = t_fieldcat1.
    *       SET PARAMETER ID 'MAT' FIELD IT_MARA-MATNR.
    *       CALL TRANSACTION 'MM02'.
            ENDIF.
    *      ENDIF.
          ENDDO.
      ENDCASE.
    ENDFORM.                    " FORM_USERCOMMAND
    *&      Form  FORM_TOOLBAR
    *       text
    *      <--P_E_OBJECT  text
    *      <--P_E_INTERACTIVE  text
    *      <--P_E_OBJECT_>MT_TOOLBAR  text
    FORM form_toolbar  CHANGING p_e_object TYPE REF TO
    cl_alv_event_toolbar_set
    p_e_interactive
    mt_toolbar TYPE ttb_button.
      DATA wal_button TYPE stb_button.
    *WAL_BUTTON-ICON = ICON_status_reverse.
      wal_button-text = 'GO'.
      wal_button-quickinfo = 'PROCEED'.
      wal_button-function = 'INT1'.
      wal_button-butn_type = 0.
      wal_button-disabled = space.
      INSERT wal_button  INTO p_e_object->mt_toolbar INDEX 1.
    ENDFORM.                    " FORM_TOOLBAR
    *&      Module  PF-STATUS  OUTPUT
    *       text
    MODULE pf-status OUTPUT.
      SET PF-STATUS 'Z7CCSTAT'.
    ENDMODULE.                 " PF-STATUS  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  BUILD_CATALOG1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_catalog1 .
      s_fieldcat-col_pos = '1'.
      s_fieldcat-fieldname = 'MATNR'.
      s_fieldcat-scrtext_m = 'MATERIAL'.
      APPEND s_fieldcat TO t_fieldcat1.
      s_fieldcat-col_pos = '2'.
      s_fieldcat-fieldname = 'MTART'.
      s_fieldcat-scrtext_m = 'MATERL TYPE'.
      APPEND s_fieldcat TO t_fieldcat1.
      s_fieldcat-col_pos = '3'.
      s_fieldcat-fieldname = 'MEINS'.
      s_fieldcat-scrtext_m = 'UOM'.
      APPEND s_fieldcat TO t_fieldcat1.
    ENDFORM.                    " BUILD_CATALOG1

  • Seperating data with multiple headers

    Hello,
    I have a data set that has 6 columns with headers containing information for one cycle of a part (Data File is Attached). About 200 rows later I have another set of data with 6 columns for cycle 2 with a space and a new header, and at about another 400 rows later I have the data for cycle 5 with a space and a new header. This pattern repeats throughout the data set.
    I need a way to seperate this data so that I can plot the individual cycles. When I import this data set into Diadem with the DataPlugin Wizzard it does not recognize the spaces and new headers. It labels the spaces and headers as "NO VALUE", so there are discontinuities in the data. Is there a way to seperate the cycles in this data set in Diadem?
    For example, I would like to have rows 6 thru 215, rows 220 thru 630, rows 635 thru 1046, rows 1051 thru 1462, etc. This way I can plot the individual cycles against the running time.
    Solved!
    Go to Solution.
    Attachments:
    Sample_Data2.csv ‏774 KB

    Hi wils01,
    Here's a DataPlugin I created that loads your posted data file with each cycle in a separate Data Portal Group.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments
    Attachments:
    wils01_Cycles_CSV.uri ‏9 KB

  • ALV data with DOUBLE HEADERS

    Dear friends,
    I am getting problems in one ALV Report, the i need to display data with as following format(two headers).
    volume stock                   |             being stock                                             |
    _____________________  |___________________________________________|
    matnr    |  mat.descr         |  plant1  | plant2    |   plant3   |    palnt4                   |
    00110   :  limston material |  1001   |  1002     |   1004    |      1005                    |
    00111   :  himston material |  1111   |  1112     |   1114    |      1115                   |

    Hi Vasu,
    Check out the link.
    Re: TOP OF PAGE with CL_GUI_ALV_GRID
    data: o_html             TYPE REF TO cl_dd_document,
    o_event_receiver   TYPE REF TO lcl_event_receiver.
    CLASS lcl_event_receiver IMPLEMENTATION.
    *-- Top of Page
      METHOD handle_print_top_of_page.
      ENDMETHOD.                    "handle_print_top_of_page
      METHOD handle_top_of_page.
      ENDMETHOD.                    "handle_top_of_page
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
        CREATE OBJECT o_dockingcontainer
          EXPORTING
            ratio                     = '95'
         EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5
          OTHERS                      = 6.
        IF sy-subrc NE 0.
          MESSAGE i000 WITH text-013.   " Error in object creation
          LEAVE LIST-PROCESSING.
        ENDIF.
    *--Create Splitter Container
        CREATE OBJECT o_split
          EXPORTING
            parent            = o_dockingcontainer
            sash_position     = 20
            with_border       = 0
          EXCEPTIONS
            cntl_error        = 1
            cntl_system_error = 2
            OTHERS            = 3.
    *--Get the containers of the splitter control
    <b>o_container_top = o_split->top_left_container.</b>-TOP
    o_container_bot = o_split->bottom_right_container. -ALV
      ENDIF.
      CREATE OBJECT o_alvgrid
         EXPORTING
           i_parent = o_container_bot.
    *-- <b>Print Top of Page</b>
    DATA: lws_text  TYPE sdydo_text_element.
      IF cl_gui_alv_grid=>offline( ) IS INITIAL.
    *-- Object for HTML top container
        CREATE OBJECT o_html
            EXPORTING style            = 'ALV_GRID'
                      background_color = 35.
    *-- Top of Page
        CALL METHOD o_alvgrid->list_processing_events
          EXPORTING
            i_event_name = 'TOP_OF_PAGE'
            i_dyndoc_id  = o_html.
    *-- Total Record Text
        CALL METHOD o_html->add_text
          EXPORTING
            text         = text-014
            sap_emphasis = text-017.
        CALL METHOD o_html->add_gap
          EXPORTING
            width = 8.
    **-- Total record Value
        lws_text = cnt_total.
        CALL METHOD o_html->add_text
          EXPORTING
            text         = lws_text
            sap_emphasis = text-017.
        CLEAR  lws_text.
        CALL METHOD o_html->new_line
          EXPORTING
            repeat = 1.
    **-- Total Success text
        CALL METHOD o_html->add_text
          EXPORTING
            text         = text-015
            sap_emphasis = text-017
            fix_lines    = c_x.
        CALL METHOD o_html->add_gap
          EXPORTING
            width = 12.
        lws_text = cnt_success.
        CALL METHOD o_html->add_text
          EXPORTING
            text         = lws_text
            sap_emphasis = text-017
            fix_lines    = c_x.
        CLEAR  lws_text.
        CALL METHOD o_html->new_line
          EXPORTING
            repeat = 1.
    *-- Total Failed text
        CALL METHOD o_html->add_text
          EXPORTING
            text         = text-016
            sap_emphasis = text-017
            fix_lines    = c_x.
        CALL METHOD o_html->add_gap
          EXPORTING
            width = 16.
        lws_text = cnt_failed.
        CALL METHOD o_html->add_text
          EXPORTING
            text         = lws_text
            sap_emphasis = text-017
            fix_lines    = c_x.
        CLEAR  lws_text.
    *-- Display Report Header
        CALL METHOD o_html->display_document
          EXPORTING
            parent = o_container_top.
      ENDIF.
    http://abap4.tripod.com/download/alvstub.txt
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_endlist.htm
    Reward points if this helps.
    Manish
    Message was edited by:
            Manish Kumar
    Message was edited by:
            Manish Kumar

Maybe you are looking for

  • Photoshop CS3 and Light Room color issues on Mac

    Hi, I'm a photographer and I work mostly on my Mac. Recently however I started having issues when editing in Lightroom and Photoshop CS3 as the colors are very off from Lightroom. I attached these 2 images to show the differences. From Photoshop or d

  • Photos app crashes when migrating data from iphoto

    Every time I open the photos app it crashes and the migration process of the data from iphoto doesn't complete on iPad 3, is there a solutio?.

  • Fireworks screws up colors from photoshop

    I'm working on a website and I'm having issues with the color shift from Illustrator to Photoshop to Fireworks. Illustrator to Photoshop is no that bad but Fireworks is really screwing the color up. Any suggestions? It's all RGB...I posted an image h

  • Using Printers and scanners with mac book

    Hello, Ive just got a new mac book and need to scan images to use in word. My printer is a hewlett packard combined printer and scanner i can get it to print but cant get it to work as a scanner? ive tried using image director but the mac dosnt seem

  • Easing into stricter passwords

    Hi everyone,  Our domain server is running server 2008 r2. We are planning on requiring stricter passwords soon here, and i understand how to change group policy relating to passwords and everything. My question is, when I change group policy will ev