Output of intern table xyz as List

Hi Experts,
I want to show my intern table gt_xyz as list.
What have I to do?
Regards,
Mike

hi,
For a Simple List:
If the table consists of multiple records.
Loop at <itab>.
  write: / 2 itab-field1,
            12 itab-field2,
            & so on...
endloop.
For an ALV list use the function module 'REUSE_ALV_LIST_DISPLAY'
DATA: REPID LIKE SY-REPID.
DATA: XFIELD TYPE SLIS_T_FIELDCAT_ALV.
DATA: X_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA: GT_XEVENTS TYPE SLIS_T_EVENT.
XDATA is the internal table which holds the data for output.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
            I_CALLBACK_PROGRAM = REPID
            IT_FIELDCAT        = XFIELD
            IS_LAYOUT          = X_LAYOUT
            IT_EVENTS          = GT_XEVENTS
       TABLES
            T_OUTTAB           = XDATA.
regards,
Sireesha

Similar Messages

  • Hierarchial list output to internal table

    Hi Folks,
    REPORT  ZMB51                                   .
    DATA LIST_TAB TYPE TABLE OF ABAPLIST.
    <b>DATA: BEGIN OF olist OCCURS 0,
            filler1(1500)   TYPE c,
          END OF olist.</b>
    submit RM07DOCS EXPORTING LIST TO MEMORY
                     AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        LISTOBJECT = LIST_TAB
      EXCEPTIONS
        NOT_FOUND  = 1
        OTHERS     = 2.
    IF SY-SUBRC = 0.
      CALL FUNCTION 'LIST_TO_ASCI'
        EXPORTING
          LIST_INDEX         = -1
        TABLES
          <b>LISTASCI           = oLIST</b>    
         LISTOBJECT         = LIST_TAB
        EXCEPTIONS
          EMPTY_LIST         = 1
          LIST_INDEX_INVALID = 2
          OTHERS             = 3.
    BREAK-POINT.
    write:/ sy-subrc.
    ENDIF.
    The above program is getting the MB51 output into an internal table.So far it is fine but this internal table can't  be used for further processing.I want to get the MB51 output into an internal table which can be used for further processing.
    data:begin of itab1 occurs 0,
         matnr  like mara-matnr,
         maktx like makt-maktx,
         werks like vbrp-werks,
         sloc like zmmstoragebin-storage,
         bwart like mseg-bwart,
         mblnr like mseg-mblnr,
         zeile like mseg-zeile,
         budat like bkpf-budat,
         menge like mseg-menge,
         meins like mara-meins,
         end of itab1.
    If I delcare an internal table as above and given itab1 instead of olist it is going for dump.How to achieve this?
    Thanks,
    K.Kiran.

    Hi Kiran,
    You will be getting all the fields in the concatenation form into the string of oLIST.
    Is there any delimitor like space or Tab between the fields or not?
    so try to use Split the oLIST-filler1 into different fields at the delimiter
    or you have to offet oLIST-filler1  to different fields
    like example 
    itab1-matnr = oLIST-filler1+0(18)
    itab1-werks = oLIST-filler1+19(4) like that
    based on the fields data in oLIST-filler1   you have to do it
    Regards
    Anji

  • Save report painter output into internal table

    Hi,
      i have created a report painter for vendor aging report. got output in drill down format.
    i need to show the data in smartform as well. so need to save the report painter output into an internal table. can anyone please help me resolving this.
    regards,
    sudha.m

    Hi Sudha
    You can use sample below:
    DATA: list_tab TYPE TABLE OF ABAPLIST.
    SUBMIT NROWS EXPORTING LIST TO MEMORY
                  AND RETURN VIA SELECTION-SCREEN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    IF sy-subrc = 0.
      CALL FUNCTION 'WRITE_LIST'
        TABLES
          listobject = list_tab.
    ENDIF.
    Best regards

  • Standard Report RM07MLBB output  in internal Table

    Hi Experts  ,
    i want Standard Report output  which is in basic List    to internal table  .
    standard report  RM07MLBB . i don't want  to use enhancement   nor Export /import 
    is there any other way  .
    regards
    Deepak.

    hi JACk  ,
    It was a perfect solution of using Include   and  using internal table of that report
    i have done certain modification  in  calling Program such as
    include rm07mlbb.
    at selection-screen output.
      perform hide_fields.                         " in order to hide screen of  include rm07mlbb  .
    loop at screen.
        if screen-name = 'LIFNR-LOW'  or
           screen-name = 'LIFNR-HIGH' or
           screen-name = 'MATNR-LOW'  or
           screen-name = 'MATNR-HIGH' or
           screen-name = 'WERKS-LOW'  or
           screen-name = 'WERKS-HIGH'  or
           screen-name = 'BUKRS-LOW'  or
           screen-name = 'BUKRS-HIGH'  or
           screen-name = '%_LIFNR_%_APP_%-TEXT' or
           screen-name = '%_LIFNR_%_APP_%-OPTI_PUSH' or
           screen-name = '%_LIFNR_%_APP_%-TO_TEXT' or
           screen-name = '%_LIFNR_%_APP_%-VALU_PUSH' or
           screen-name = '%_MATNR_%_APP_%-TEXT' or
           screen-name = '%_MATNR_%_APP_%-OPTI_PUSH' or
           screen-name = '%_MATNR_%_APP_%-TO_TEXT' or
           screen-name = '%_MATNR_%_APP_%-VALU_PUSH' or
           screen-name = '%_WERKS_%_APP_%-TEXT' or
           screen-name = '%_WERKS_%_APP_%-OPTI_PUSH' or
           screen-name = '%_WERKS_%_APP_%-TO_TEXT' or
           screen-name = '%_WERKS_%_APP_%-VALU_PUSH' or
           screen-name = '%_BUKRS_%_APP_%-TEXT' or
           screen-name = '%_BUKRS_%_APP_%-OPTI_PUSH' or
           screen-name = '%_BUKRS_%_APP_%-TO_TEXT' or
           screen-name = '%_BUKRS_%_APP_%-VALU_PUSH'  or
           screen-name = '%B002006_BLOCK_1000' or
           screen-name = '%B001000_BLOCK_1000' or
           screen-name = '%_ALV_DEF_%_APP_%-TEXT' or
           screen-name = 'ALV_DEF' or
           screen-name = 'NULLS'   or
           screen-name = '%_NULLS_%_APP_%-TEXT' .
         screen-invisible = 1.
          screen-active = 0.
          modify screen.
        endif.
      endloop.
      if not p_werks is initial .
        werks-low = p_werks.
        append werks.
      endif.
      if not p_bukrs is initial .
        bukrs-low = p_bukrs.
        append bukrs.
      endif.
      delete adjacent duplicates from werks comparing low.
      delete adjacent duplicates from bukrs comparing low.
    endform  " hide_fields
    Regards
    Deepak.

  • Report output into internal table and going ahead

    Hi Folks,
    We have a report MB51.It is showing some details.Now along with these details I wanna fetch some more detail and show it in the same report.
    One way is I can copy this into Z and then go ahead with the changes.But I would like to know can we SUBMIT MB51  program in my ZPROGRAM and then get the output into an internal table and then again populate this internal table with the rest of the data and again display it as final output.
    To be precise,is it possible to get the final output of MB51 into an internal table by using submit.
    K.Kiran.

    dear kian
    pls check the below code for example:
    DATA LIST_TAB TYPE TABLE OF ABAPLIST.
    DATA: BEGIN OF olist OCCURS 0,
            filler1(1500)   TYPE c,
          END OF olist.
    SUBMIT YTEST04 WITH MATNR EQ 't000001'
                     EXPORTING LIST TO MEMORY
                     AND RETURN.
    BREAK-POINT.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        LISTOBJECT = LIST_TAB
      EXCEPTIONS
        NOT_FOUND  = 1
        OTHERS     = 2.
    IF SY-SUBRC = 0.
      CALL FUNCTION 'LIST_TO_ASCI'
        EXPORTING
          LIST_INDEX         = -1
        TABLES
          LISTASCI           = oLIST
          LISTOBJECT         = LIST_TAB
        EXCEPTIONS
          EMPTY_LIST         = 1
          LIST_INDEX_INVALID = 2
          OTHERS             = 3.
      BREAK-POINT.
    ENDIF.

  • Checkbox as one of the field in the internal table in the list

    Hi,
    I have a requirement of processing the certain records of the internal table for which checkboxes are selected in the list.
    The selected records need to be updated in the custom table and the unselected records need to be ignored.
    I have created the PF status and the application tool bar and a button on the tool bar.
    Then when the report is executed the list is displayed with the records with one of the field as a checkbox.
    At user-command.
    Then in the at user-command handling the button click event.
    I want to know which records are been selected and which are not.
    If some one knows please let me know.
    Thanks
    S Patel

    This is exactly what you need to do:-
    PBO
    CREATE OBJECT g_custom_container
             EXPORTING container_name = g_container.
      CREATE OBJECT g_grid
             EXPORTING i_parent = g_custom_container.
    Select data from your table
      PERFORM select_data CHANGING pt_outtab[].
    Build fieldcat
      PERFORM build_fieldcat CHANGING pt_fieldcat.
    Exclude standard buttons from the Toolbar
      PERFORM exclude_tb_functions CHANGING lt_exclude.
    Display output in ALV grid
      CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          it_toolbar_excluding = lt_exclude
        CHANGING
          it_fieldcatalog      = pt_fieldcat
          it_outtab            = pt_outtab[].
    PAI
    Get modified data
      CALL METHOD gv_grid->check_changed_data.
      LOOP AT gt_output INTO wa_output WHERE zzchkbox EQ c_x.
        MOVE-CORRESPONDING wa_output TO wa_selblk.
        APPEND wa_selblk TO lt_selblk.
      ENDLOOP.
    This method will give you all the records which are selected in the list output. Collect them and modify your custom table.
    Edited by: Rudresh Chand on Feb 28, 2010 8:26 AM

  • REPORT OUTPUT to Internal table

    Hi,
    I order to achieve my requirement i need to know if this can happen:
    Q: I want to write a report REP1 (which has ITAB1) in which I want to run an already existing report REP2 and direct the result of the REP2 to ITAB1. So that upon this ITAB1 contents i will again perform some queries.
    Is this possible? If YES can anyone please let me know how?
    Thanks in advance,
    Karuna.

    Hi,
    Try using the command
    SUBMIT report_name AND RETURN EXPORTING LIST TO MEMORY.
    This will call the report and store the output of called report in momory. Then you can retrieve it in your main program by FM 'LIST_FROM_MEMORY'.
    See Below Sample Code.
    Hope it Helps. Reward points if useful.
        SUBMIT zefl_soff_update_single
                           WITH so_objid IN fin_tran
                          AND RETURN
                          EXPORTING LIST TO MEMORY.
        CALL FUNCTION 'LIST_FROM_MEMORY'
          TABLES
            listobject = t_list
          EXCEPTIONS
            not_found  = 1.
        REFRESH t_ascii.
        CALL FUNCTION 'LIST_TO_ASCI'
          TABLES
            listasci           = t_ascii " list converted to ASCII
            listobject         = t_list
          EXCEPTIONS
            empty_list         = 1
            list_index_invalid = 2
            OTHERS             = 3.
    Regards,
    Shailesh Jadhav

  • Retrieve Filtered ALV output into Internal Table in Program

    Guys,
    I want to update my internal table with the filtered output that the user has selected in the output.
    Lets say my internal table had 6 entries which was outputted.
    Now the the user filters that output ( say where material is initial ) so that there are only 2 entries left on the output.
    How can i know which 2 entries are left on the output screen ?
    ( i need to know as i am deleting entries from a table )
    I came across this slis_filter_alv0 but could not use it in my user exit command routine.
    Any ideas would be very helpful.
    Cheers.....

    Try the method get_filtered_entries
    This method teturns a table with all indexes that are currently hidden on the screen using the standard "filter" function.
    CALL METHOD
    <ref.var. to CL_GUI_ALV_GRID>->get_filtered_entries
       IMPORTING
          ET_FILTERED_ENTRIES  = <int tbl of type LVC_T_FIDX >.
    Then by using this internal table you can find out the entries which are shown in the output.
    Hope this helps.
    Thanks,
    Balaji

  • How to create CMPCTRL attribute of the type internal table (as global list)

    Hi,
    I want to create global internal table to be able to access it across all my webdynpro views.
    Ideally I will create this global internal table in CMPCTRL and will add different values from diffent methods of one view and use in another view as table of values. So I am thinking to use CMPCTRL Attribute declaration to my make internal table as global internal table. How do I achieve this ? Please help
    Thanks
    Praveen

    Thanks Aditya, But I am getting "comp_attr" unknown.
    I am pasting here What I am doing, Please let me know ehere is the error?
    CMPCTRL:
    it_pod     Public clicked, Type Clikced  Assoc Type:Element_<node_name>.
    View access
    DATA lo_nd_<node_name> TYPE REF TO if_wd_context_node.
      DATA lo_el_nd_<node_name> TYPE REF TO if_wd_context_element.
      DATA ls_nd_<node_name> TYPE wd_this->Element_<node_name>.
    data podetails TYPE TABLE OF WD_COMP_CONTROLLER->IT_POD.
    Here it says IT_POD unknown. any issues?
    Thanks
    Praveen

  • Help on ALV GRID display outputting format for 2 internal tables

    Hi,
        I have requirement in ALV GRID where I need to display the data from 2 internal tables. The first internal table has the content of Delivery due list data and second the internal table has the corresponding stock transfer data of the Delivery Due list. I have a checbox on my selection screen, when unchecked it should output the 1st internal table data, i.e for Delivery due list. When it is checked then it should output 1st Internal table data + 2nd internal table data of stock transfer. For example, 1 document delivery due list data and 2nd line for that document should show the stock transfer data. You can also check the transaction code VL10E for that will show a delivery due list...and for stock tranfer,you need to check with Purchase order in in the USer Role tabstrip. Pls suggest.
    Regards,
    Mira

    Hi,
    U can try out this code
    REPORT zzz_test NO STANDARD PAGE HEADING
                           MESSAGE-ID zz.
    The Data Declarations
    INCLUDE zzm_test_alv_data.
    The Selection Screen Definition
    INCLUDE zzm_test_alv_selscrn.
    The definition and implementation of the event reciever class
    INCLUDE zzm_test_alv_class.
    START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM f1000_load_itabs.
    END-OF-SELECTION
    END-OF-SELECTION.
      IF NOT cb_disp IS INITIAL.
        CALL SCREEN 9001.
      ENDIF.
    Include for getting data
      INCLUDE zzm_test_alv_forms.
    Include for PAI and PBO of screen
      INCLUDE zzm_test_alv_screen.
      INCLUDE ZZM_TEST_ALV_DATA                                          *
    This include has all the data declaration defined
    Author............: Judith Jessie Selvi
    Creation Date.....: 28/03/2005
    Table Declarations:
    TABLES: mara,
            makt.
    Internal Tables:
    The following structure type must be defined in the data dictionary
    DATA:  i_fieldcat  TYPE lvc_t_fcat,
           i_fieldcat1 TYPE lvc_t_fcat,
           i_output1   TYPE STANDARD TABLE OF mara,
           i_output2   TYPE STANDARD TABLE OF makt,
    Work Areas:
           w_output1   TYPE STANDARD TABLE OF mara,
           w_output2   TYPE STANDARD TABLE OF makt.
    Variable:
    DATA: lv_repid    LIKE sy-repid.
    lv_repid = sy-repid.
      INCLUDE ZZM_TEST_ALV_SELSCRN                                       *
    Author............: Judith Jessie Selvi
    Creation Date.....: 28/03/2005
    SELECTION-SCREEN BEGIN OF BLOCK b_main WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP 1.
    PARAMETERS: cb_disp AS CHECKBOX.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN END OF BLOCK b_main.
      INCLUDE ZZM_TEST_ALV_CLASS                                         *
    This include has all the data declaration defined for ALV
    Author............: Judith Jessie Selvi
    Creation Date.....: 28/03/2005
    INCLUDE <icon>.
    Predefine a local class for event handling to allow the
    declaration of a reference variable before the class is defined.
    DATA : o_alvgrid1 TYPE REF TO cl_gui_alv_grid ,
           o_alvgrid2 TYPE REF TO cl_gui_alv_grid ,
           cont_for_cognos1   TYPE scrfname VALUE 'BCALC_GRID_01_9100',
           cont_for_cognos2   TYPE scrfname VALUE 'BCALC_GRID_01_9200',
           custom_container1 TYPE REF TO cl_gui_custom_container,
           custom_container2 TYPE REF TO cl_gui_custom_container,
          Work Area
           w_layout TYPE lvc_s_layo ,
           w_variant TYPE disvariant.
          Constants
    CONSTANTS : c_lay(1) TYPE c VALUE 'A' .                  " All Layouts
    CONSTANTS: BEGIN OF c_main_tab,
               tab1 LIKE sy-ucomm VALUE 'MAIN_TAB_FC1',   "
               tab2 LIKE sy-ucomm VALUE 'MAIN_TAB_FC2',   "
               END OF c_main_tab.
      INCLUDE ZZM_TEST_ALV_FORMS                                         *
    This Include has the various forms used in the program
    Author............: Judith Jessie Selvi
    Creation Date.....: 28/03/2005
    *&      Form  f9001_build_field_cat
          To Build Field Catalog
         -->P_I_FIELDCAT  text
         -->P_0021   text
    FORM f9001_build_field_cat TABLES   p_fieldcat STRUCTURE lvc_s_fcat
                          USING value(p_structure).
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
           EXPORTING
                i_structure_name       = p_structure
           CHANGING
                ct_fieldcat            = p_fieldcat[]
           EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
      IF sy-subrc <> 0.
        MESSAGE i005 WITH 'Error in ALV field catalogue creation'.
                                                                " text-e05.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.                    " f9001_build_field_cat
    *&      Form  f9000_objects_create
          For creating Custom Containers
    -->  p1        text
    <--  p2        text
    FORM f9000_objects_create.
      CREATE OBJECT custom_container1
          EXPORTING
              container_name = cont_for_cognos1
          EXCEPTIONS
              cntl_error = 1
              cntl_system_error = 2
              create_error = 3
              lifetime_error = 4
              lifetime_dynpro_dynpro_link = 5.
      CREATE OBJECT custom_container2
          EXPORTING
              container_name = cont_for_cognos2
          EXCEPTIONS
              cntl_error = 1
              cntl_system_error = 2
              create_error = 3
              lifetime_error = 4
              lifetime_dynpro_dynpro_link = 5.
      IF sy-subrc NE 0.
    add your handling, for example
        CALL FUNCTION 'POPUP_TO_INFORM'
             EXPORTING
                  titel = lv_repid
                  txt2  = sy-subrc
                  txt1  = 'The control could not be created'(510).
      ENDIF.
      CREATE OBJECT o_alvgrid1
           EXPORTING i_parent = custom_container1.
      CREATE OBJECT o_alvgrid2
           EXPORTING i_parent = custom_container2.
    ENDFORM.                    " f9000_objects_create
    *&      Form  f9003_layout
          To define the layout
         -->P_SY_TITLE  text
         -->P_0030   text
         -->P_0031   text
         -->P_0032   text
    FORM f9003_layout USING  value(ptitle)
                             value(pzebra)
                             value(pmode)
                             value(pwidth).
      w_layout-grid_title  = ptitle.
      w_layout-zebra       = pzebra.
      w_layout-sel_mode    = pmode.
      w_layout-cwidth_opt  = pwidth.
      w_variant-report     = sy-repid.
    ENDFORM.                    " f9003_layout
    *&      Form  f9006_error_handle
         To handle event
         -->P_PTEXT  text
    FORM f9006_error_handle USING value(ptext).
      IF sy-subrc NE 0.
        CALL FUNCTION 'POPUP_TO_INFORM'
             EXPORTING
                  titel = text-e03 " Error Note
                  txt2  = sy-subrc
                  txt1  = ptext.
      ENDIF.
    ENDFORM.                    " f9006_error_handle
          FORM EXIT_PROGRAM                                             *
    FORM exit_program.
      CALL METHOD custom_container1->free.
      CALL METHOD custom_container2->free.
      CALL METHOD cl_gui_cfw=>flush.
      IF sy-subrc NE 0.
        CALL FUNCTION 'POPUP_TO_INFORM'
             EXPORTING
                  titel = lv_repid
                  txt2  = sy-subrc
                  txt1  = 'Error in FLush'(500).
      ENDIF.
    ENDFORM.
    *&      Form  f1000_load_itabs
          Select from Database
    -->  p1        text
    <--  p2        text
    form f1000_load_itabs.
      SELECT * FROM mara
               INTO TABLE i_output1
               UP TO 50 rows.
      SELECT * FROM makt
               INTO TABLE i_output2
               UP TO 50 rows.
    endform.                    " f1000_load_itabs
      INCLUDE ZZM_TEST_ALV_SCREEN                                        *
    2/ Description / Include functions
    This include contains PBO and PAI events for the screen of report
    ZZZJJ_TEST_ALV
    3/ Responsibility
    Author............: Judith Jessie Selvi
    Creation Date.....: 28/03/2005
    DATA FOR TABSTRIP 'MAIN_TAB'
    CONTROLS:  main_tab TYPE TABSTRIP.
    DATA:      BEGIN OF i_main_tab,
                 subscreen   LIKE sy-dynnr,
                 prog        LIKE sy-repid VALUE
                                  'ZZZ_TEST',
                 pressed_tab LIKE sy-ucomm VALUE c_main_tab-tab1,
               END OF i_main_tab.
    *&      Module  STATUS_9001  OUTPUT
          text
    MODULE status_9001 OUTPUT.
    IF custom_container1 IS INITIAL.
      SET PF-STATUS 'ZSTATUS'.
      SET TITLEBAR 'ZTITLE'.
      Creating Object
        PERFORM f9000_objects_create.
      Building the field catalog
        PERFORM f9001_build_field_cat TABLES i_fieldcat
                                USING 'MARA'.
        PERFORM f9001_build_field_cat TABLES i_fieldcat1
                                USING 'MAKT'.
      Modifying the field catalog
       PERFORM f9002_modify_field_cat TABLES i_fieldcat.
      For Layout
        PERFORM f9003_layout USING sy-title 'X' 'B' 'X'.
    ENDIF.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  MAIN_TAB_ACTIVE_TAB_SET  OUTPUT
          Call method to display in the output grid
    MODULE main_tab_active_tab_set OUTPUT.
      main_tab-activetab = i_main_tab-pressed_tab.
      CASE i_main_tab-pressed_tab.
        WHEN c_main_tab-tab1.
      To display report
         i_main_tab-subscreen = '9100'.
          CALL METHOD o_alvgrid1->set_table_for_first_display
          EXPORTING
             is_variant                    = w_variant
             i_save                        = c_lay
             is_layout                     = w_layout
          CHANGING
             it_outtab                     = i_output1[]
             it_fieldcatalog               = i_fieldcat[]
          EXCEPTIONS
             invalid_parameter_combination = 1
             program_error                 = 2
             too_many_lines                = 3
             OTHERS                        = 4.
      IF sy-subrc <> 0.
        MESSAGE i000 WITH text-e06."Error in ALV report display
        LEAVE LIST-PROCESSING.
      ENDIF.
        WHEN c_main_tab-tab2.
      To display report
          i_main_tab-subscreen = '9200'.
          CALL METHOD o_alvgrid2->set_table_for_first_display
          EXPORTING
             is_variant                    = w_variant
             i_save                        = c_lay
             is_layout                     = w_layout
          CHANGING
             it_outtab                     = i_output2[]
             it_fieldcatalog               = i_fieldcat1[]
          EXCEPTIONS
             invalid_parameter_combination = 1
             program_error                 = 2
             too_many_lines                = 3
             OTHERS                        = 4.
      IF sy-subrc <> 0.
        MESSAGE i005 WITH text-e06."Error in ALV report display
        LEAVE LIST-PROCESSING.
      ENDIF.
    WHEN OTHERS.
         DO NOTHING
      ENDCASE.
    ENDMODULE.                 “MAIN_TAB_ACTIVE_TAB_SET OUTPUT
    *&      Module MAIN_TAB_ACTIVE_TAB_GET INPUT
          Check & Process the selected Tab
    MODULE main_tab_active_tab_get INPUT.
      CASE sy-ucomm.
        WHEN c_main_tab-tab1.
          i_main_tab-pressed_tab = c_main_tab-tab1.
        WHEN c_main_tab-tab2.
          i_main_tab-pressed_tab = c_main_tab-tab2.
        WHEN OTHERS.
         DO NOTHING
      ENDCASE.
    ENDMODULE.                 “MAIN_TAB_ACTIVE_TAB_GET INPUT
    *&      Module USER_COMMAND_9001 INPUT
          User Command
    MODULE user_command_9001 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          PERFORM exit_program.
          SET SCREEN '0'.
        WHEN 'EXIT' OR  'CANC'.
          PERFORM exit_program.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 “USER_COMMAND_9000 INPUT
    *&      Module MAIN_TAB_ACTIVE_TAB_SET INPUT
          Set sunscreen
    MODULE main_tab_active_tab_set INPUT.
      main_tab-activetab = i_main_tab-pressed_tab.
      CASE i_main_tab-pressed_tab.
        WHEN c_main_tab-tab1.
            i_main_tab-subscreen = '9100'.
        WHEN c_main_tab-tab2.
            i_main_tab-subscreen = '9200'.
        WHEN OTHERS.
         DO NOTHING
      ENDCASE.
    ENDMODULE.                 “MAIN_TAB_ACTIVE_TAB_SET INPUT
    Thanks & Regards,
    Judith.

  • How to store output of SQ01 into internal table.

    Hello Experts
    How to store output of SQ01 into internal table.
    Thanks,
    Umesh

    You can't store the sq01 output into internal table.
    Once you create the query it will generate the abap program, in that program you can see the contents.
    Regards
    Sasi

  • Multiple internal table display

    Hi All,
    I have query regarding the internal tables,
    Is it possible to display more than one internal table in ABAP List view
    one beneath another......in the same page.....?
    thanks in advance.....

    Hi,
      Yes,   in classical  do like this
      loop at itab.
    write:/
    endloop.
      loop at itab1.
    write:/
    endloop.
    and in alv refer this code.
    *&      Form  sub_alv_display                                          *
    This form displays the output using REUSE_ALV_GRID_DISPLAY          *
    function module                                                     *
    FORM sub_alv_display .
    *--Local Variables
      DATA : lv_index LIKE sy-tabix.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
           EXPORTING
                i_callback_program = v_repid.
      wa_layout1-colwidth_optimize = 'X'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
           EXPORTING
                is_layout                  = wa_layout1
                it_fieldcat                = it_fieldcat[]
                i_tabname                  = 'it_final'
                it_events                  = it_events
           TABLES
                t_outtab                   = it_final
           EXCEPTIONS
                program_error              = 1
                maximum_of_appends_reached = 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.
      LOOP AT it_fieldcat INTO wa_fieldcat.
        lv_index = sy-tabix.
        IF wa_fieldcat-fieldname = 'ERDAT'.
          wa_fieldcat-fieldname = 'TITLE'.
          wa_fieldcat-seltext_m = text-026.
          wa_fieldcat-outputlen = 10.
        ENDIF.
        MODIFY it_fieldcat FROM wa_fieldcat INDEX lv_index TRANSPORTING
                                            fieldname seltext_m outputlen.
        CLEAR : wa_fieldcat.
      ENDLOOP.
      wa_layout2-no_colhead = 'X'.
      wa_layout2-colwidth_optimize = 'X'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
           EXPORTING
                is_layout                  = wa_layout2
                it_fieldcat                = it_fieldcat[]
                i_tabname                  = 'it_total'
                it_events                  = it_event1
           TABLES
                t_outtab                   = it_total
           EXCEPTIONS
                program_error              = 1
                maximum_of_appends_reached = 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.
      wa_layout3-no_colhead = 'X'.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
           EXPORTING
                is_layout                  = wa_layout3
                it_fieldcat                = it_fieldcat2[]
                i_tabname                  = 'it_ship'
                it_events                  = it_event2
           TABLES
                t_outtab                   = it_ship
           EXCEPTIONS
                program_error              = 1
                maximum_of_appends_reached = 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.
      IF NOT it_final IS INITIAL OR
         NOT it_total IS INITIAL OR
         NOT it_ship IS INITIAL.
        CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
             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.
      ENDIF.
    ENDFORM.                                  "sub_alv_display
    Regards,
    Prashant

  • How to pass the internal table defined in program to ALV

    Hi Friends,
    I have a doubt regaring the ALV's,
    How can we pass the internal table defined in the program to ALV by not filling the attribute (I_STRUCTURE_NAME) in the REUSE_ALV_LIST_DISPLAY.
    I have tried many ways but unable to pass the structure of the internal table. I am getting the error message "Field Catalog Not Specified......" and its terminating and when i am giving the I_STRUCTURE_NAME = 'INTERNAL-TABLE-NAME' then its displaying a blank screen with all the tool-bars and icons...(No output of internal table data is seen on the screen) .
    and when i am passing the DDIC table or structure ( for eg. LFA1) to I_STRUCTURE_NAME then its displaying with any error.
    Plaese help in resolving this problem....
    Regards
    Pradeep Goli

    Hi,
    Check this thread which gives example of ALV. This will give you an idea.
    Interactive ALV
    ashish

  • Mail to all the employess in the internal table.

    Hi Experts,
    I have a internal table where the employee IDs are saved.. I need to send a mail to all the employees in the internal table. How will i be able to send a mail from the function module SAP_WAPI_START_WORKFLOW? where will i pass the internal table values and what need to be put in the mail recepient part?
    Regards,
    Lavanya

    First, if you are ONLY sending e-mails, you need to look into solutions other than workflow.
    Still, since you already have the workflow, you can pass an internal table with a list of all e-mail addresses to the workflow:
    - Define a multiline container element (import parameter) in the workflow. You could utilize the current e-mail address field (just mark it as multiline.
    - Pass that multiline element as the recipient of the e-mail (you can click F4 on the recipient field and then select the blue-looking table field).

  • Ex cel to Internal Table

    hello friends i have written this piece of code, it dose not have any error but when ececuted it gives a dump.
    tables : zash.
    DATA : BEGIN OF it_table OCCURS 0,
             vbeln LIKE zash-vbeln,
             posnr LIKE zash-posnr,
             uepos LIKE zash-uepos,
             netwr LIKE zash-netwr,
             matnr LIKE zash-matnr,
           END OF it_table.
    TYPE-POOLS: slis.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa>,
                   <dyn_field>.
    DATA: it_fldcat TYPE lvc_t_fcat,
          wa_it_fldcat TYPE lvc_s_fcat.
    TYPE-POOLS : abap.
    DATA: new_table TYPE REF TO data,
          new_line  TYPE REF TO data.
    DATA: xcel TYPE TABLE OF alsmex_tabline WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text .
    PARAMETERS: p_file TYPE  rlgrap-filename DEFAULT
    'C:\Test.csv'.
    PARAMETERS: p_flds TYPE i.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
    Add X number of fields to the dynamic itab cataelog
      DO p_flds TIMES.
        CLEAR wa_it_fldcat.
        wa_it_fldcat-fieldname = sy-index.
        wa_it_fldcat-datatype = 'C'.
        wa_it_fldcat-inttype = 'C'.
        wa_it_fldcat-intlen = 10.
        APPEND wa_it_fldcat TO it_fldcat .
      ENDDO.
    Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fldcat
        IMPORTING
          ep_table        = new_table.
      ASSIGN new_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA new_line LIKE LINE OF <dyn_table>.
      ASSIGN new_line->* TO <dyn_wa>.
    Upload the excel
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_file
          i_begin_col             = '1'
          i_begin_row             = '1'
          i_end_col               = '200'
          i_end_row               = '5000'
        TABLES
          intern                  = xcel
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
    Reformt to dynamic internal table
      LOOP AT xcel.
        ASSIGN COMPONENT xcel-col OF STRUCTURE <dyn_wa> TO <dyn_field>.
        IF sy-subrc = 0.
          <dyn_field> = xcel-value.
        ENDIF.
        AT END OF row.
          APPEND <dyn_wa> TO it_table.
          CLEAR <dyn_wa>.
        ENDAT.
      ENDLOOP.
    the dump occurs at the append statement into the internal atble it_table.
    any advice,
    Shejal Shetty.

    HI shejal,
    In your program, you are trying
    to create a dynamic internal table,
    using some list of fields.
    1.
      For this purpose,
      in my program,
    <b>  there is an INDEPENDENT FORM</b>
       whose inputs are
    <b>  LIST OF FIELDS, (just as u require)</b> 
    and from those, it consructs dynamic table.
    2. Here is the program.
    the dynamic table name will be
    <DYNTABLE>.
    3. U can use this program (FORM in this program)
    to generate any kind of internal table
    by specifying list of fields.
    4.
    REPORT abc.
    COMPULSORY
    FIELD-SYMBOLS: <dyntable> TYPE ANY TABLE.
    FIELD-SYMBOLS: <dynline> TYPE ANY.
    DATA: lt TYPE lvc_t_fcat.
    DATA: ls TYPE lvc_s_fcat.
    FIELD-SYMBOLS: <fld> TYPE ANY.
    DATA : fldname(50) TYPE c.
    DATA : ddfields LIKE ddfield OCCURS 0 WITH HEADER LINE.
    START-OF-SELECTION.
    field list
      ddfields-fieldname = 'BUKRS'.
      APPEND DDFIELDS.
      ddfields-fieldname = 'MATNR'.
      APPEND DDFIELDS.
      PERFORM mydyntable .
    see <DYNTABLE> in debug mode.
      BREAK-POINT.
    INDEPENDENT FORM
    FORM mydyntable .
    Create Dyn Table From FC
      FIELD-SYMBOLS: <fs_data> TYPE REF TO data.
      FIELD-SYMBOLS: <fs_1>.
      FIELD-SYMBOLS: <fs_2> TYPE ANY TABLE.
      DATA: lt_data TYPE REF TO data.
      data : lt TYPE lvc_t_fcat .
    CONSTRUCT FIELD LIST
      LOOP AT ddfields.
        ls-fieldname = ddfields-fieldname.
        APPEND ls TO lt.
      ENDLOOP.
      ASSIGN lt_data TO <fs_data>.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog           = lt
        IMPORTING
          ep_table                  = <fs_data>
        EXCEPTIONS
          generate_subpool_dir_full = 1
          OTHERS                    = 2.
      IF sy-subrc <> 0.
      ENDIF.
    Assign Dyn Table To Field Sumbol
      ASSIGN <fs_data>->* TO <fs_1>.
      ASSIGN <fs_1> TO <fs_2>.
      ASSIGN <fs_1> TO <dyntable>.
    ENDFORM. "MYDYNTABLE
    regards,
    amit m.

Maybe you are looking for

  • Reference behaviour of strictly typed controls

    I have a question regarding the bahaviour of a user-made cluster which I have set to strictly typed. I am using a reference to this cluster (Which in turn contains other clusters) to automatically read an ini file. I also have an array within one of

  • Help needed in using cl_gui_alv_grid  and cl_gui_custom_container.

    Hi experts,    I have created a screen with custom control( cl_gui_custom_container ) and displayed a alv using cl_gui_alv_grid in the screen. I have to enter tha values into the alv displayed on screen.The problem here is i have to make 2 fields as

  • Regarding ECC 6.0- CRM and BW. URGENT....Please help!!

    Dear All, I have a small query- Are CRM and BW an integral part of ECC 6.0? I mean, if I install ECC 6.0, will CRM and BW also get installed OR Do I need to explicitly install CRM and BW after installing ECC 6.0? If CRM and BW are an integral part of

  • Regarding dropdown box on selection screen

    Hi Abapers, I am facing a problem in handling dropdown box. please suggest . My Problem description below. There is one Text field and other is one dropdown box on the selection screen. Now When user enter the Prod Order number and press enter then a

  • Two node cluster - disk not responding to selection

    I'm building 2 node cluster (Solaris 10/SC3.2) on Dell's 1950/PERC6i servers with quorum as a virtual server. Because I need to introduce quorum server to the cluster - my cluster nodes are still in install mode. I have tried to add quorum using scse