ALV in Dialog program

Hi Folks ,
    I have tab strip in which in the first three tabs I'm displaying table controls. I have a requirement to display a alv when I click on the fourth tab. The alv has to be displayed on the subscreen related to the fourth tab.
Thank & Regards,
    Santosh

DATA: grid TYPE REF TO cl_gui_alv_grid,
      container TYPE REF TO cl_gui_custom_container,
      mycontainer TYPE scrfname VALUE 'ALV1',
      gs_layout TYPE lvc_s_layo.
CREATE OBJECT container
    EXPORTING
      container_name = mycontainer.
  CREATE OBJECT grid
    EXPORTING
      i_parent          = container
    EXCEPTIONS
      error_cntl_create = 1
      error_cntl_init   = 2
      error_cntl_link   = 3
      error_dp_create   = 4
      OTHERS            = 5.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  gs_layout-grid_title = 'Purchase Order'(100).
  CALL METHOD GRID->set_table_for_first_display
    EXPORTING
      i_structure_name              = 'EKKO'
      is_layout                     = gs_layout
   is_print                      =
    CHANGING
      it_outtab                     = i_ekko
   it_fieldcatalog               =
   it_sort                       =
   it_filter                     =
EXCEPTIONS
   invalid_parameter_combination = 1
   program_error                 = 2
   too_many_lines                = 3
   others                        = 4
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

Similar Messages

  • ALV Grid Dialog Program Variant Problem

    Hi Gurus-
    Please help!!! I got the following problem-
    The ALV dialog screen will have fields with display options as well as a number of fields as input options (editable). Based on user inputs in the input fields and other displayed fields, the user selects "Process"/F8 and it calls the BAPI_MATERIAL_EDIT functions to update material.
    The problem is, I want to use variants in the input fields (Maybe REUSE_ALV_VARIANT_F4) when I select a variant it loops through the selected rows and fills out the input fields with the values stored in the variant. I want to use sample ALV grid program such as BCALV*.
    The question is, can I use variants in ALV grid dialog program and if yes, how do I define variants to loop through and fill out the values in the input/editable fields on the ALV grid?
    Any help will be greatly appreciated! Rep points for sure!
    Thanks!!!

    hi james ,
    look at this link u will get an idea .
    http://www.sapfans.com/forums/viewtopic.php?f=13&t=229912
    http://sgstocks.tripod.com/alvgrid_control.htm
    thanks,
    Gaurav.
    Edited by: gaurav.singh on Apr 20, 2010 7:53 AM

  • Oo abap-alv in dialog program.

    My scenario is: in one screen(module pool) i shud display a 2 column list in alv. when i selct few recs and clik left arrow, those recs shud move 2 left alv.
    how can i do this.
    shud i have 2 alvs to obtain this? or is there a single method to do this entire thing including the left & right arrows functionality?
    can i get any sample codes for this.
    note: i am using ecc6.0. so i shud do this only by OO-ABAP.
    plz let me know.
    tx. kiran

    Hello Kiran,
    Here is a sample code.I have used double click event for this.You can use Left push-button instead and write the code in its user-command module.I have used two containers placed side by side and named as <b>CONTAINER1</b> and <b>CONTAINER2</b>.
    ZSAMPLE.
    DATA:
    <b>*first container and grid</b>
    cont1 type ref to cl_gui_custom_container,
    alv1 type ref to cl_gui_alv_grid,
    <b>*second container and grid</b>
    cont2 type ref to cl_gui_custom_container,
    alv2 type ref to cl_gui_alv_grid,
    <b>*table displayed in first grid</b>
    itab_spfli type table of spfli,
    wa_spfli like line of itab_spfli,
    <b>*table displayed in second grid</b>
    itab_sflight type table of spfli,
    wa_sflight like line of itab_sflight,
    ok_code type sy-ucomm.
    <b>*local class for handling the double click event of first grid</b>
          CLASS lcl_eh DEFINITION
    class lcl_eh definition.
      Public section.
        Methods:DOUBLE_CLICK FOR EVENT DOUBLE_CLICK of cl_gui_alv_grid
                importing E_ROW E_COLUMN ES_ROW_NO .
    endclass.
    DATA: lo_obj TYPE REF TO lcl_eh.
          CLASS lcl_eh IMPLEMENTATION
    class lcl_eh implementation.
      Method double_click.
      <b>  read table itab_spfli into wa_spfli INDEX e_row-index.
      append wa_spfli to itab_sflight.
      delete itab_spfli INDEX e_row-index.</b>
       CALL METHOD ALV2-><b>SET_TABLE_FOR_FIRST_DISPLAY</b>
        EXPORTING
        I_STRUCTURE_NAME              = 'SFLIGHT'
        CHANGING
          IT_OUTTAB                     = itab_sflight.
    CALL METHOD ALV1-><b>REFRESH_TABLE_DISPLAY</b>
    EXPORTING
       IS_STABLE      =
       I_SOFT_REFRESH =
    EXCEPTIONS
       FINISHED       = 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.
      endmethod.
    endclass.
    <b>
    *selection-screen parameter</b>
      PARAMETERS : carrid type spfli-carrid.
    AT SELECTION-SCREEN.
      SELECT * from spfli into table itab_spfli where carrid = carrid.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'GUI'.
    SET TITLEBAR 'xxx'.
    <b>*create first container and grid</b>
      CREATE OBJECT CONT1
        EXPORTING
          CONTAINER_NAME              = 'CONTAINER1'.
      CREATE OBJECT ALV1
        EXPORTING
          I_PARENT          = cont1.
    <b>*set handler to handle the double click event</b>
    <b>create object lo_obj.
    set handler lo_obj->double_click for alv1.</b>
      CALL METHOD ALV1->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
        I_STRUCTURE_NAME              = 'SPFLI'
        CHANGING
          IT_OUTTAB                     = itab_spfli.
    <b>*create second container and grid</b>
    CREATE OBJECT CONT2
        EXPORTING
          CONTAINER_NAME              = 'CONTAINER2'.
      CREATE OBJECT ALV2
        EXPORTING
          I_PARENT          = cont2.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    case ok_code.
    when 'BACK'.
    leave to screen 0.
    when 'EXIT'.
    leave program.
    endcase.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    regards,
    Beejal
    **Reward if this helps

  • Can someone give me ABAP Dialog program /ALV Step by Step hands on examples

    Can someone give me a document for ABAP Dialog programming(module pool) and ALV - but i need Step by Step example ,with sreenshots and explanations.
    In general any ABAP, STEP BY STEP hands on examples - Smartform, Sapscrips, Report, BDC will be highly appreciated.
    I only need hands on examples please - regular Abap courses does not work because they dont have examples.
    Please help ASAP.
    Bob
    Welcome to SCN - but please read the rules of engagement before posting
    Edited by: Rob Burbank on Jun 14, 2009 4:28 PM

    What temporary files are you talking about?

  • Dialog program that lists an ALV Grid

    Hello Experts,
    i want to create a <b>screen divided in two parts</b>. The <b>upper side</b> shows general(Header) information and the <b>lower side</b> shows detail information using ALV grid.
    When i select a record in the header of the Upper side grid , then the lower side grid will display the corresponding details.
    ( Initially the first record should be selected and the details for that first record will be displayed . Later user can choose any other record .........)
    Could anyone pls tell me the detailed procedure for developing this..i need help.
    Thanks & Best Regards
    Sudhansu

    This example is implemented using docking containers on a selection screen to give you a cut and paste example.  Simply copy and past the code into a test program and run it.  double click on any line item from the grid at the top.  the grid at the bottom will change.
    report  zrich_0001.
    data: imara type table of mara.
    data: xmara like line of imara.
    data: imarc type table of marc.
    data: dockingbottom type ref to cl_gui_docking_container,
          dockingtop  type ref to cl_gui_docking_container,
          alv_bottom    type ref to cl_gui_alv_grid,
          alv_top     type ref to cl_gui_alv_grid,
          repid type syrepid.
    *       CLASS lcl_event_handler DEFINITION
    class lcl_event_handler definition.
      public section.
        class-methods handle_double_click
                   for event double_click of cl_gui_alv_grid
                                  importing e_row e_column.
    endclass.
    *       CLASS lcl_event_handler IMPLEMENTATION
    class lcl_event_handler implementation.
      method handle_double_click.
        read table imara into xmara index e_row-index.
        select * into table imarc from marc
                      where matnr = xmara-matnr.
        call method alv_bottom->refresh_table_display( ).
      endmethod.
    endclass.
    parameters: p_check type c.
    start-of-selection.
    at selection-screen output.
      repid = sy-repid.
      select * into corresponding fields of table imara
                  from mara up to 100 rows.
      read table imara into xmara index 1.
      check dockingbottom is initial.
      create object dockingtop
                  exporting repid     = repid
                            dynnr     = sy-dynnr
                            side      = dockingtop->dock_at_top
                            extension = 200.
      create object alv_top
                  exporting i_parent = dockingtop.
      call method alv_top->set_table_for_first_display
         exporting
              i_structure_name       = 'MARA'
         changing
              it_outtab       = imara[].
    *   handler for ALV grid
      set handler lcl_event_handler=>handle_double_click for alv_top.
      create object dockingbottom
                  exporting repid     = repid
                            dynnr     = sy-dynnr
                            side      = dockingbottom->dock_at_bottom
                            extension = 200.
      create object alv_bottom
                    exporting i_parent = dockingbottom.
      select * into table imarc from marc
                   where matnr = xmara-matnr.
      call method alv_bottom->set_table_for_first_display
          exporting
               i_structure_name       = 'MARC'
          changing
               it_outtab       = imarc[].
    The implementation in a dialog program is pretty much the same, you do the logic in the PBO and use custom containers instead of docking containers.
    Regards,
    RIch Heilman

  • Field catalogue for ALV Grid when program is run in the background

    Hi All,
    I have an ALV report that contains approx 27 fields.  Not all of these fields will be relevant for different Users, and many will want to change the order the fields appear in.
    When running on line the User can set a variant to present the data as they wish.  However, I need to email this report to the SAP Inbox with the fields displayed in the same Order with uncessary fields hidden as stated in the Field Catalogue.
    On-line none of this is an issue, however GET_FRONTEND_FIELDCATALOG cannot be used in Background, and attribute MT_FIELDCAT_LOCAL is Private and cannot be accessed.
    I have looked at using Class CL_ ALV_VARIANT to try to read the Variant being used, but couldn't get the information about the Variant coming back, instead I get an error in CL_ALV_VARIANT->LOAD_VARIANT.
    Can anybody recommend how to the Field Cat for a Variant for background processing?
    Thanks,
    Tony.

    Hi.
    You can not use an ALV report in Background or write to spool because it is a kind of dialog program.
    You can write only  a List report to spool so please find others sulotions.
    Hope it helps.
    Sayan.

  • Selection screen dialog programming

    I have used a selection screen in the dialog programming.
    I have written some code in the at selection screen to display the output on a table control in another screen 1001.
    my problem is that when i try to enter the multiple values for material ,
    it goes to the at selection screen and displays the output again.
    if i write the code in start of selection instead of at selection screen
    it doesnt give any output at all.
    how do i correct this error?
    SELECTION-SCREEN BEGIN OF SCREEN 2000 .
    SELECT-OPTIONS : s_ersda FOR MCHB-ERSDA OBLIGATORY.
    SELECT-OPTIONS : s_matnr FOR MCHB-MATNR.
    SELECT-OPTIONS : s_matkl FOR MARA-MATKL.
    SELECT-OPTIONS : s_ferth FOR MARA-FERTH.
    SELECTION-SCREEN END OF SCREEN 2000.
    at selection-screen.
    statements to fill the output table
    screen containing table control
    call screen 1001

    Friends,
    Req for ABAP HR
    ROLE: SAP HR ABAP DEVELOPER
    Location: TULSA, OK
    Duration: 3 + MONTHS
    REQUIRED SKILLS: SAP ABAP / Dialog and regular / R/3 and HR / Workflow / smartforms
    / ALV / LSMW for HR and R/3 / Modules - MM , SD , HR, PD , PS
    Start Date: 11-12-07
    If interested Please send the cvs to [email protected]

  • Calling dialog program screen in custom control and using drag n drop

    Hi Experts,
    SCENARIO:
    I have a custom container control. I want to insert a dialog program screen in custom container control in one half and tree nodes in the other half.
    Now my dialog screen has a table control. I want that the user can drag n drop the nodes in the cells of my table control.
    Please help.

    I don't think drag n drop works in table control. You may need to change table control to ALV grid control.

  • REUSE_ALV_LIST_DISPLAY on a dialog program

    Hi,
    I have a requirement where in I have to call REUSE_ALV_LIST_DISPLAY on a dialog program.
    Can any one tell me how we can call a list display from a dialog program.
    Regards,
    Abhishek.

    hi vijai,
    i have the same problem using reuse_alv_list_display on a dialog program
    i can solved it using the way you posted before, but how if my alv list also in the same program? but in a different screen?
    so far i manage to display  the alv out, but i cannot callback my user command
    for example:
    WHEN 'MASS_TRP'.
          CALL SCREEN 0400.
    and on screen 0400.
    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.----> "if i'm not using return to screen 0, everytime i click back, it will only go back to my alv list, while what i want is go back to my main program, any suggestion?"
    SUPPRESS DIALOG.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = 'ZTICKETS'
          i_callback_pf_status_set = '0400'
          i_callback_user_command  = 'USER_COMMAND' -
    > "i cannot call back this eventhough i have the user command form"
          is_layout                = i_layout
          it_fieldcat              = i_fieldcat
          i_save                   = 'A'
         it_events                = i_events
        TABLES
          t_outtab                 = i_mtrp.
      IF sy-subrc <> 0.
      ENDIF.
    really appreciate if someone can help
    thanks

  • Event on F4 click in classic dialog programming

    Hi Experts,
    I'd like to ask if there is an event that triggers upon clicking the dropdown in classic dialog or ALV grid. I've been researching for a while and I can't seem to know if it is possible and how it can be done. The scenario is that I should populate a table control with 3 dynamic dropdown fields which are related to each other.
    COLUMN1      COLUMN2        COLUMN3
    item1-drop1    item1-drop2     item1-drop3
    item2-drop1    item2-drop2     item2-drop3
    The dropdown list under  COLUMN2 depends on what was selected in COLUMN1, and the dropdown list of COLUMN3 depends on what was selected in COLUMN2. The dropdown list should be unique for every record since the value of COLUMN1 will also vary.
    I tried to use the FunctionCode but it only triggers after the value has been selected from the dropdown list. This will only suffice if the records are edited 1 at a time, but that is not the requirement. The user should be able to select from the correct drop from any record simultaneously.
    If this is not possible with the classic dialog programming, is this doable in ALV grid?
    Thanks in advance.
    Regards,
    Dexter

    HI,
    Please check the below thread
    populate drop down menu based on entry in another field
    You need to make minor modifications to adapt it for Table control
    Cheerz
    Ramchander Roa.K

  • Hi experts,    dialog program   no solution from forum

    hi all
    i would like to know if there any program other than alv or oops, where icon are used ( means how to bring functionality of icons) for example, sum, subtotal, filter, xxl, spreadsheet, word procesing doc, etc.
    i have developed dialog program in which i have above icons and now i want to have fuctionality of the above icons when they are clicked,( try to understand i want code to run fuctionality in dialogue prog and not how to display icons ).
    thanx
    rocky

    Hi,
    have a look to transactions LIBS BIBS
    Fred

  • Hi all   dialog program   experts no solution coming

    hi all
    i would like to know if there any program where coding for below icon is available (not in alv or oops), where icon are used ( means how to bring functionality of icons) for example, sum, subtotal, filter, xxl, spreadsheet, word procesing doc, etc.
    i have developed dialog program in which i have above icons and now i want to have fuctionality of the above icons when they are clicked,( try to understand i want code to run fuctionality of icons in dialogue prog and not how to display icons ).
    thanx
    rocky

    hi all
    i would like to know if there any program where coding for below icon is available (not in alv or oops), where icon are used ( means how to bring functionality of icons) for example, sum, subtotal, filter, xxl, spreadsheet, word procesing doc, etc.
    i have developed dialog program in which i have above icons and now i want to have fuctionality of the above icons when they are clicked,( try to understand i want code to run fuctionality of icons in dialogue prog and not how to display icons ).
    thanx
    rocky

  • Hi all   dialog program

    hi all
    i would like to know if there any program other than alv or oops, where icon are used for example, sum, subtotal, filter, xxl, spreadsheet, word procesing doc, etc.
    i have to use these icons in my dialog program.
    my other question is how to achieve sum and subtotal in dialog program. in my program i have created table control and in that for some fields i need to show total and subtal, pl guide on this urgently.
    thanx
    rocky

    Hi,
    Concerning the icons you can always execute transaction ICON to see the list of existing iconsin SAP
    To display an icon either use you have sevarl ways to do this:
    WRITE: '@OV@' TO L_STRING.
    WRITE:  ICON_OKAY AS ICON
    Regards

  • What is difference between report programming and dialog programming?

    hi,
    what is difference between report programming and dialog programming? plz provide some example code
    bye

    ABAP programming
    Basically reports are used to read database and represent the results in lists.
    Reports are collections of processing blocks that the system calls depending on events.
    We can use reports to evaluate data from database tables.
    Reports are stand alone programs and controlled by events.
    A report itself never creates events
    steps in report:
    Processing the selection screen
    Reading the database
    Evaluating the data and creating lists
    Outputting a list.
    1st u write simple logics, after that u can enhance the code as step by step.
    http://venus.imp.mx/hilario/Libros/TeachYrslfAbap4/index.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/802cfc454211d189710000e8322d00/frameset.htm
    http://www.sapdev.co.uk/reporting/reportinghome.htm
    Dialog Programming
    Structure of a Dialog Program
    A dialog program consists of the following basic components:
    Screens (dynpros)
    Each dialog in an SAP system is controlled by dynpros. A dynpro (DYnamic PROgram) consists of a screen and its flow logic and controls exactly one dialog step. The flow logic determines which processing takes place before displaying the screen (PBO-Process Before Output) and after receiving the entries the user made on the screen (PAI-Process After Input).
    The screen layout fixed in the Screen Painter determines the positions of input/output fields, text fields, and graphical elements such as radio buttons and checkboxes. In addition, the Menu Painter allows to store menus, icons, pushbuttons, and function keys in one or more GUI statuses. Dynpros and GUI statuses refer to the ABAP/4 program that control the sequence of the dynpros and GUI statuses at runtime.
    ABAP/4 module pool
    Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules. The flow logic of a dynpro contains calls of modules from the corresponding module pool. Interactive modules called at the PBO event are used to prepare the screen template in accordance to the context, for example by setting field contents or by suppressing fields from the display that are not needed. Interactive modules called at the PAI event are used to check the user input and to trigger appropriate dialog steps, such as the update task.
    All dynpros to be called from within one transaction refer to a common module pool. The dynpros of a module pool are numbered. By default, the system stores for each dynpro the dynpro to be displayed next. This dynpro sequence or chain can be linear as well as cyclic. From within a dynpro chain, you can even call another dynpro chain and, after processing it, return to the original chain.
    Check this link for basics.
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    Check this link for Dialog Programming/Table Control
    http://www.planetsap.com/Tips_and_Tricks.htm#dialog
    Check this SAP Help for Dialog Program doc.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    Check this SAP Help link for Subscreens.
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbabfe35c111d1829f0000e829fbfe/content.htm
    Check this link for subscreen demo program.
    http://abapcode.blogspot.com/2007/05/demo-program-to-create-subscreen-in.html
    Also check this link too.
    http://abapcode.blogspot.com/2007/06/dialog-programming-faq.html
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/frameset.htm
    http://sap.mis.cmich.edu/sap-abap/abap09/sld004.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/52/670c17439b11d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/52/670c17439b11d1896f0000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9ccf35c111d1829f0000e829fbfe/frameset.htm
    http://abapprogramming.blogspot.com/

  • Dialog programming, data being washed out in TAB Control

    Hi,
         i am working on dialog programming , in which i am using Table Control  for user input (data is not coming from database table) . everything is going well till assignment of data to internal table but when
    control goes to PBO by any means like pressing ENTER etc. then data being washed out.
    PROCESS BEFORE OUTPUT.
      MODULE TC_CONTROL.
      LOOP AT it_data
             INTO wa_data
             WITH CONTROL tc_control
             CURSOR tc_control-current_line.
        MODULE tc_control_get_lines.
      ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP AT IT_DATA.
        CHAIN.
          FIELD WA_DATA-FREPS_N.
          FIELD wa_data-TOEPS_N.
          FIELD wa_data-PRCH_A.
          FIELD wa_data-SRVC_AMT .
          FIELD wa_data-ACCNT_C.
          FIELD wa_data-AMT_D.
          FIELD wa_data-NARR_X.
          FIELD wa_data-CRPRD_N.
          MODULE tc_control_modify ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
    *Abap program
    MODULE TC_CONTROL OUTPUT.
    DESCRIBE TABLE it_data LINES tc_control-lines.
    ENDMODULE.                 " TC_CONTROL  OUTPUT
    CONTROLS: TC_CONTROL TYPE TABLEVIEW USING SCREEN 1000,
              TC_CONTROL1 TYPE TABLEVIEW USING SCREEN 1000.
    DATA:     G_TC_CONTROLS_LINES  LIKE SY-LOOPC,
              G_TC_CONTROLS_LINES1  LIKE SY-LOOPC.
    *&      Module  tc_control_get_lines  OUTPUT
          text
    MODULE tc_control_get_lines OUTPUT.
    g_tc_controls_lines = sy-loopc.
    move-corresponding it_data to wa_data.
    ENDMODULE.                 " tc_control_get_lines  OUTPUT
    MODULE tc_control_modify INPUT.
    move-corresponding wa_data to it_data.
    MODIFY it_data
        FROM wa_data
        INDEX tc_control-current_line.
    append it_data.
    clear it_data.
    ENDMODULE.                 " tc_control_modify  INPUT
    Please suggest me any clue.
    Thanks in advance
    vijay dwivedi

    Hi ,
    I have understood the problem.
    In your ABAP code replace all the occurrrences of wa_data  with the structurename.
    Use the TABLES keyword to declare the structure .That structure will be same as
    reference table of the table control .
    Here the structure is SPFLI.
    Check the bellow code , it will resolve the issue.
    ABAP code - -
    program  zsdn.
    tables spfli.  " Declare the structure
    data : it_data like table of spfli with header line,
    *wa_data TYPE spfli,  " commented
    w_i type i.
    *CONTROLS TC_CONTROL TYPE TABLEVIEW USING SCREEN 100.
    controls: tc_control type tableview using screen 1000,
    tc_control1 type tableview using screen 1000.
    data: g_tc_controls_lines like sy-loopc,
    g_tc_controls_lines1 like sy-loopc.
    module tc_control output.
      describe table it_data lines tc_control-lines.
    endmodule. " TC_CONTROL OUTPUT
    module tc_control_get_lines output.
      g_tc_controls_lines = sy-loopc.
      move-corresponding it_data to spfli.
    endmodule. " tc_control_get_lines OUTPUT
    module tc_control_modify input.
      move-corresponding spfli to it_data.
      modify it_data
      from spfli
      index tc_control-current_line.
      append it_data.
      clear it_data.
    endmodule. " tc_control_modify INPUT
    module status_0100 output.
      set pf-status 'STAT'.
    *  SET TITLEBAR 'xxx'.
    endmodule.                 " STATUS_0100  OUTPUT
    module user_command_0100 input.
      case sy-ucomm.
        when 'BACK' or 'EXIT' or 'CANCEL'.
          leave to screen 0.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Module  POPLATE_TABLE  OUTPUT
    *       text
    module poplate_table output.
      if it_data is initial.
        select * from spfli into table it_data.
      endif.
    endmodule.                 " POPLATE_TABLE  OUTPUT
    Screen code (Scr no 1000) - -
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE poplate_table.
      MODULE tc_control.
      LOOP AT it_data WITH CONTROL tc_control CURSOR w_i.
        MODULE tc_control_get_lines.
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_0100.
      LOOP AT it_data.
        MODULE tc_control_modify ON CHAIN-REQUEST.
    *    ENDCHAIN.
      ENDLOOP.
    Regards
    Pinaki

Maybe you are looking for

  • Is there any way to get FileUpload.PosetedFile.Inputstream property as string?

    Hello, In my project i have used asp.net Fileupload control which works fine on my local machine. but when run that project on server i am not able to load the xls file. so i have used "Fileupload1.PostedFile.InputStream" property which returns as a

  • GIF and sticky page size

    I have scanned (from HP N6310) a paper to a .TIF image. Original is A4 and resolution, as set in scanning software 300dpi. Photoshop (CS5) reports (for the .TIF fiile) pixel dimension as 2574*3540 pixels, page size as 21.8 * 29.9 cm and resolution as

  • LabVIEW Mac prompting me for dll's in conditional disable structure

    I'm using LabVIEW 2014 Mac and I have several conditional disable structures which call user32.dll but only in the Default case whereas they do nothing in the TARGET_TYPE=Mac case.  When loading my source code in LV Mac I get prompted to find "user32

  • A STORED PROCEDURE PERFORMES SLOWER WHEN EXECUTED IN HMTLDB THE IN SQLPLUS

    We executed a stored procedure in HTMLDB. At the beginning and the end of this stored procedure a timestamp inserted in a logtable. First we executed the procedure in HTMLDB's SQL workshop (version 2.0.0.00.49 for MacOSX) under the owners schema . Ex

  • Need Resource On APEX Charts

    I am new to APEX. I have v 3.2 on 10.2.0.4 database. I need to create some charts off of a reporting screen that I have. I am finding it very hard to find some documentation on how to do this. Can somone point me in the right direction?