ALV Popup to modify row

Hello everyone,
I have an ALV Report (using FM, not OO). Now i need to call a popup that will have some of the fields (non-editable) of the selected row, and other input fields that can modify the referring fields of the row after pressing the 'SAVE' button.
Is there a FM i can use, or the best way is to call a new screen? if so, how can i say that this new screen is a popup ?
    thank you in advance,
         Nuno Santos

You should probably create your own screen.  When creating the screen, make sure to set the attribute on the attributes tab as "Modal Dialog Box", then when calling the screen, using the CALL SCREEN statement, make sure to use the STARTING and ENDING extensions of the statatement.
call screen 100 starting at 1 1
                       ending at 50 50.
Regards,
Rich Heilman

Similar Messages

  • How to track modified rows in ALV list

    I need to keep track of all the rows in the ALV list that the users have modified.  When the user selects SAVE, I need to read the modified rows and save the changes to the database.  I thought I could use mp_mod_rows but I cannot get the syntax and the variable declarations correct. 
    Thanks.
    Sandy

    Hi,
    R u using FM or.............
    If u r using FM look at my example.....
    data: LC_GLAY TYPE LVC_S_GLAY.
    LC_GLAY-EDT_CLL_CB = 'X'.<<<<<------
    gt_layout-zebra = 'X'.
    gt_layout-detail_popup = 'X'.
    gt_layout-colwidth_optimize = 'X'.
    ITAB1[] = ITAB[].<<<<<-----make a copy of ITAB for further comparision.
    call function 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = i_repid
    i_callback_user_command = 'USER_COMMAND1'
    it_fieldcat = header
    is_layout = gt_layout
    i_callback_top_of_page = 'TOP-OF-PAGE1'
    i_grid_title = text-h17
    it_sort = gt_sort[]
    i_default = 'X'
    i_save = 'U'
    is_variant = gt_variant
    it_events = gt_events
    I_GRID_SETTINGS = LC_GLAY<<<<<<------
    TABLES
    t_outtab = itab.
    clear itab.
    Form USER_COMMAND1
    FORM USER_COMMAND1 USING u_ucomm LIKE sy-ucomm
    us_selfield TYPE slis_selfield."#EC CALLED
    case u_ucomm.
    when '&DATA_SAVE'.<<<<<<<<----
    This will come after the data was EDITTED and when SAVE was clicked by user in output scren.
    Here now in the final internal table(ITAB) you can find the data changed in EDIT mode.
    After this you can do manipulation what ever you want.
    Thanks.
    If this helps you reward with points.

  • How to do ALV Popup in a new Function module

    Hi experts,
    This is the Client Requirement.
    " Flow Diagram/Pseudo Code:
    Attach a data flow diagram. Write brief pseudo code in plain English.  Be sure to include all access data plans.
    -     FM interface:
    -     Import: company code/ vendor#.
    -     Export: default_line,  type y4ap_t11
    -     Exception: NO_DATA or CANCELED
    In the FM code, past current z_venddefault code, except for write statements. After internal table is generated, show it in ALV popup. On ALV, add a OK/Cancel button. On OK, ensure that one line is selected (otherwise throw warning), and then fill export structure with that line’s G/L account, cost Center, and internal order# fields. Then close the ALV and end FM. For Cancel, just close the ALV end the FM.
    For an example of how to build such popup ALVs, take a look at FM Y4AP_SELECT_APPROVER.
    Unit Test Plan:
    Just use co.code 3000/vend# 1000 to test this FM."
    here i need to do is there is a simple report program by displaying in list.
    But now i need to do is , i have to put that code in a new function module and there i need to display it in alv grid.
    How to do this can anybody help me.
    It's a urgent i need to submit today to client.
    Thank you
    Basu

    Hi,
    Check this.
    select several rows in alv
    It will be helpful.
    Regards,
    J.Jayanthi

  • Excel - Modify rows without touching other data (have gone thru LV report generation 4 designs)

    File attached....
    Have gone thru FAQs and examples. (And also 4 parts of 'Creating a Report in Microsoft Excel Using the LabVIEW Report Generation Toolkit'. Unfortunately this document is not clear enough for me.)
    Have task of modifying rows of the same excel sheet, number of times without touching data  already present (numbers and strings)
    I have an excel file. (attached)
    A test will be run N number of times.  (N<=17)
    SubTask 1 --> Each time it runs, string data needs to be placed in 'n'th row. (...there are going to be notes in Row 18 and row 19)
    SubTask 2  --> Each time it runs, a 1D array data also will be placed in the same row (but in different cells)
    SubTask 3 --> The number 'n' of the row (where to place the current iteration's data) needs to be determined on fly (by looking at "n-1"st non blank row)
    The same file needs to be used.
    How can above be achieved ?
    thnks
    Sandeep
    Attachments:
    sample excel file.xls ‏14 KB

    See if this board will help.
    http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=2391

  • Download to excel in not coming in alv popup

    Hi All,
    Please have a look at the demo program SALV_DEMO_TABLE_POPUP.  The ALV displayed as a popup don not have button to download the data into a excel sheet/ spread sheet. Can someone please suggest how it can be added to alv toolbar ?
    I  have similar requirement to display alv as popup with that button.
    I dont have any choice to use any other way to create ALV apart from CL_SALV_TABLE class.
    Regards
    Vishal Kapoor

    Hi Vishal,
    I have a same problem like you got. I am not able to get download option in ALV popup though I am using the below code.
    Could you please let me know how you fixed this issue? I mean how you got the download option button in pop up screen? Thanks in advance. Request you please reach out me at [email protected]
    DATA: lo_table      TYPE REF TO cl_salv_table,
                   lo_functions  TYPE REF TO cl_salv_functions_list,
                   lo_columns    TYPE REF TO cl_salv_columns.
             DATA: lt_data TYPE TABLE OF zehs_stderr.
             TRY.
                 cl_salv_table=>factory(
                 IMPORTING
                 r_salv_table = lo_table
                 CHANGING
                 t_table      = it_zehs_stderr ).
               CATCH cx_salv_msg.
             ENDTRY.
             lo_functions = lo_table->get_functions( ).
             lo_functions->set_all( abap_true ).
             lo_columns = lo_table->get_columns( ).
             lo_columns->set_optimize( abap_true ).

  • How to save the modified rows in jspx page usind adf default commit action

    Hi,
    We are displaying some columns of the database table in jspx page. Here we are using adf commit action to save these values to database which is updating all the rows by default. In this page there are some editable columns which the user can miodify. How can we update only these modified rows using default adf commit action. Also we want to update last_updated_date column of that particular row which is modified in the UI from backing bean .
    Can anyone please help us in solving this.
    Thanks in advance

    User,
    A key question - what are you using for the model layer (ADF Business Components, JPA, EJB, etc)?
    How are you determining that a "commit" action is updating rows (even those which haven't changed)?
    If you are using ADF Business Components - have a read in the documentation about history columns - the use case you describe (updating the last_udpdated_date column) is supported "out-of-the-box" for this.
    John

  • How to highlight a modified row in module pool

    hi frnds,
         Is it possible to highlight a row that is modified in a  ztable using module pool...

    I have created a ztable-'zpk_table' from which i take the values  n pass it to an internal table-'itab'...
    i modify these values using a modify screen created in module pool..
    after modifying i want the modified row to be highlighted in the next table control screen...

  • Modify Rows in Cursor

    How can i Modify rows in a Cursor?
    i want to loop through cursor records and update rows on sepcific condition and update one field .and put back in the cursor.
    Suggest Some way to achieve this.

    you can only modify values of rows within the cursor when the values in the cursor are fetched and then looped through.
    Once the fetch is over and you modify some values the values are not permenant. If you open the cursor again then old values will be fetched.
    eg:
    SQL> DECLARE
      2     CURSOR c1
      3     IS
      4        SELECT 1 AS col1, 2 AS col2
      5          FROM DUAL
      6        UNION ALL
      7        SELECT 3 AS col1, 4 AS col2
      8          FROM DUAL;
      9  BEGIN
    10     FOR i IN c1
    11     LOOP
    12        DBMS_OUTPUT.put_line ('col1--->'||i.col1);
    13        i.col1 := 10;
    14        i.col2 := 20;
    15        DBMS_OUTPUT.put_line ('col1--->'||i.col1);
    16        DBMS_OUTPUT.put_line ('col2--->'||i.col2);
    17     END LOOP;
    18  END;
    19  /
    col1--->1
    col1--->10
    col2--->20
    col1--->3
    col1--->10
    col2--->20here col1 value is modified and if you are doing further processing inside the loop for that record then 10 will avaliable and not 1. But if i again open the cursor and loop through 1 will be the value.
    Hope it makes sense...
    Edited by: [email protected] on May 11, 2010 5:29 AM

  • ALV Popup in userexit

    Hi,
    An ALV Grid Popup has to be displayed and the code for this has to be written in the user exit.
    The requirement is such that when a particular button is clicked on the cat3_iscr transaction the ALV Grid popup should appear with still the cat3_iscr screen visible in the background.
    The appearing ALV Popup should contain the features of a standard ALV Grid (standard buttons of a toolbar, …)
    It would be great if you can suggest a solution for this.     
    Thanks,
    Siva

    I have written a generic function module to do just this.
    Here is the code.
    function z_popup_with_alvgrid.
    *"*"Global interface:
    *"  IMPORTING
    *"     REFERENCE(ENDPOS_COL) TYPE  I DEFAULT 90
    *"     REFERENCE(ENDPOS_ROW) TYPE  I DEFAULT 22
    *"     REFERENCE(STARTPOS_COL) TYPE  I DEFAULT 10
    *"     REFERENCE(STARTPOS_ROW) TYPE  I DEFAULT 2
    *"     REFERENCE(TITLE) TYPE  C OPTIONAL
    *"     REFERENCE(FIELDCAT) TYPE  LVC_T_FCAT
    *"  TABLES
    *"      I_ALV
      call screen 0200 starting at startpos_col
                                   startpos_row
                         ending at endpos_col
                                   endpos_row.
    endfunction.
    *      Module  STATUS_0200  OUTPUT
    module status_0200 output.
      set pf-status '0200'.
      set titlebar  '0200' with title.
      data: alv_container  type ref to cl_gui_custom_container.
      data: alv_grid       type ref to cl_gui_alv_grid.
      data: xfieldcat type lvc_t_fcat.
      xfieldcat = fieldcat.
    * Create Controls
      create object:
         alv_container
                 exporting
                       container_name    = 'ALV_CONTAINER',
         alv_grid
                 exporting
                       i_parent          =  alv_container.
    *  Set grid for first display
      call method alv_grid->set_table_for_first_display(
          exporting
               i_structure_name       = 'I_ALV'
          changing
               it_outtab       = i_alv[]
               it_fieldcatalog = xfieldcat[] ).
    endmodule.
    *     Module  USER_COMMAND_0100  INPUT
    module user_command_0200 input.
      case sy-ucomm.
        when 'CONTINUE' or 'CANCEL'.
          set screen 0.
          leave screen.
      endcase.
    endmodule.
    Create the screen 200.  In that screen, put a container and name it ALV_CONTAINER.  As you can see from the interface, you must pass the field catalog and of course the internal table which holds the data.
    Here is an example of the call to the function module.
        call function 'Z_POPUP_WITH_ALVGRID'
          exporting
    *       ENDPOS_COL         = 90
    *       ENDPOS_ROW         = 22
    *       STARTPOS_COL       = 10
    *       STARTPOS_ROW       = 2
            title              = 'This is the title'
            fieldcat           = fieldcat
          tables
            i_alv              = i_alv.
    Regards,
    Rich Heilman

  • APEX don't allow modify rows in columns which are Primary Key ?

    I have tables:
    http://img508.imageshack.us/my.php?image=21269582oe8.jpg
    book(id_book - "Primary Key", title, year); book_author(id_book - "Primary Key", id_author - "Primary Key"); author(id_author - "Primary Key", name)
    I have created a new page -> Form -> Tabular Form for table 'author' because I would like to add new authors, modify and delete. During creating this page I have choosen column 'id_author' as 'primary key column 1' and everything is OK (I can't modify column 'id_author' - this column is autoincrement and I can modify column 'name').
    BUT I have also created a new page -> Form -> Tabular for table 'book_author' because I would like to write numbers as id_book and id_author, modify and delete them (so add relations between tables: book, book_author and author). During creating this page I have choosen column 'id_book' as 'primary key column 1' and 'id_author' as 'primary key column 2'. And on website I can't modify (edit) these fields. And I can't also add new row because I see in each column in new row: (null).
    http://img444.imageshack.us/my.php?image=11324615yk9.jpg
    APEX don't allow modify rows in columns which are Primary Key ? This is stupid....... What can I do ?
    Edited by: user10731158 on 2008-12-20 11:40

    Single-column and non-meaningful so you never want to update them. In the case of your example, you would need to add an ID column to the book_author intersection table. Honestly, I was so blown away (and pleasantly surprised) by the lack of rebuttal and the "thx" that I went ahead and put together an example of how I would define the book_author table:
    create table  book_author
       (id varchar2(32),
        book_id varchar2(32),
         author_id varchar2(32),
         modified_on     date,
         modified_by varchar2(255),
         constraint book_author_pk primary key (id),
         constraint book_auth_book_fk foreign key (book_id) references books(id),
         constraint book_auth_author_fk foreign key (author_id) references authors(id)
    create unique index book_author_uq on book_author (book_id,author_id)
    create or replace trigger  biu_book_author before insert or update on book_author
    for each row
    begin     
         if inserting then
              :new.id := sys_guid();
         end if;
         modified_on := sysdate;
         modified_by := nvl(v('APP_USER'),user);
    end;
    /Good luck,
    Tyler

  • How to identify the modified rows in ALV grid in OO

    Hello All,
    I have strange problem and i don't know how to solve it?
    I have ALV grid and in that ALV grid i have two buttons 'CONT' and 'ALLOC', when the user press 'ALLOC' button i will give a popup to make the user to enter some value.
    After entering the value i will do some calicualtions and i will distribute the amount in the fields of ALV grid and i should update the ALVGRID.
    Normally we can use CALL METHOD ME->REFRESH_TABLE_DISPLAY.( I have already checked by using this method and it worked fine)
    Here is the way my program look like
    ALVTREE1
    ALVTREE2
                 |----
    ALVGRID
    The problem is when i press the other button CONT i am unable to know what values exist in ALVGRID.
    How can i find these distributed amount in ALV?
    I hope i am clear while explaining problem.
    Here is  the required code:
      method handle_user_command.
        data: lt_fields       type table of sval,
              ls_field        type sval,
              ls_fieldcatalog type lvc_s_fcat,
              ls_merkpl       type zvhf_merkpl,
              lv_month(2)     type n ,
              lv_year(4)      type n ,
              lv_spmon        type zvhf_allocation-spmon,
              lv_value        type p.
        field-symbols: <fs> type any,
                       <ls_merkpl> type zvhf_merkpl.
        case  e_ucomm.
          when 'CNT'.
            call method gcl_gui_alv_grid->check_changed_data.
            call method dailogbox_container->set_visible
              exporting
                visible = space.
            call method gcl_gui_alv_tree2->frontend_update.
            call method gcl_gui_alv_tree2->update_calculations.
            clear: gt_merkpl.
          when 'ALCT'.
    Popup to get the values enterd by the user
            ls_field-tabname   = 'DD02V'.
            ls_field-fieldname = 'DDTEXT'.
            append ls_field to lt_fields.
            call function 'POPUP_GET_VALUES'
              exporting
                popup_title     = 'Enter value'
                start_column    = '1'
                start_row       = '1'
              tables
                fields          = lt_fields
              exceptions
                error_in_fields = 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.
            elseif sy-subrc = 0.
              read table lt_fields into ls_field index 1.
              if sy-subrc = 0.
                gv_value = ls_field-value.
    Read the table zvhf_allocation with nodekey  in order to get percentages
                select * from zvhf_allocation into table gt_allocation
                                   where dvkbur = gs_node_info-nodename.
    Read gt_merkpl in order to get existing line in ALV grid
                loop at  gt_merkpl into ls_merkpl.
    *Read FCAT inorder to find the field and move proprtinate value
                  loop at gt_fieldcatlog3 into ls_fieldcatalog.
    *Split is required to match ZVHF_ALLOCATION-SPMON  with screen text and to proprtinate the value
                    split ls_fieldcatalog-scrtext_l at '.' into
                          lv_month lv_year.
                    concatenate lv_year lv_month into lv_spmon.
    Check whether an entry exist or not in ZVHF_allocation
                    read table gt_allocation into gs_allocation
                                              with key spmon = lv_spmon binary search.
    *If an entry exist proprtinate the value as enterd in table
                    if sy-subrc = 0.
                      lv_value  = gv_value * gs_allocation-prozent.
                      lv_value = lv_value / 100.
                      perform assign_value using     ls_fieldcatalog-fieldname lv_value
                                           changing  ls_merkpl.
                      modify gt_merkpl from ls_merkpl.
                    endif.
                  endloop.
                 CALL METHOD gcl_gui_alv_grid->frontend_update.
                  call method gcl_gui_alv_grid->refresh_table_display
                    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.
                endloop.
              endif.
            endif.
        endcase.
      endmethod.                    "handle_user_command
    If you have any further questions please let me know.
    Regards,
    Lisa

    Hello Vijay,
    Thanks for you reply,
    The event data_changed is not working because i called method refresh_table_display. So the event changed will not be raised after i press button CONT
    If i didn't call this method then i can see the value enterd by the user in ALV grid.
    So, do you have an more ideas.
    Regards,
    Lisa

  • ALV - problem to disable row selection (SET_ROW_SELECTABLE)

    Hi,
    I'm using an (non editable) ALV with a supply function to display details to each line.
    I have to buttons "New" and "Modify" to insert a new line or to modify an existing row (in the details).
    This works fine.
    Now what I want to do is, if the user press one of the buttons "New" or "Modify", I want to disable the row selection of the ALV, so the user can't select another row during inserting or editing.
    For this, I've implemented in the WDDOMODIFYVIEW of the view the coding to enable or disable the row selection
    lo_value->if_salv_wd_table_settings~SET_ROW_SELECTABLE( ABAP_TRUE ).
    * or
    lo_value->if_salv_wd_table_settings~SET_ROW_SELECTABLE( ABAP_FALSE ).
    In case of "New" this works fine. The row selection is disabled.
    But not in case of "Modify".
    There is a strange behaviour:
    The row selection is not completely disabled. It looks like you can select rows, but if you select another row, it is automatically jumping to the first row and also the details is updated to the first row.
    The different between "New" and "Modify" is, that in "New", I create a new element in the ALV.
    Than it works correct. If I do the same in "Modify", I have the same correct behavior.
    But of course, I don't want to insert a new row in my "modify" mode.
    So maybe it has something todo with set lead selection?
    Maybe I do something wrong or that is a problem in the abap release. But I can't find anything in OSS.
    Thanks in advance!
    Andreas

    Hi,
    I would like to propose another approach here,
    I assume that ALV is in read only mode.
    1. User select the row and press the "Modify" button. As soon as user press the modify button "disable" the Modify and New button.
    2. Once the user is finish with the changes and press save. Enable the new and modify button.
    3. Without saving if user select anyother row then raise the "Save" confirmation popup with Yes, NO and Cancel button.
    4. If User press the New button then add new row and disable the "New" and "Modify button". Follow the Step 2 and 3 for this case also.
    I hope this will give you some idea.
    Thanks,
    Rahul

  • How to display different icon within WDA alv table base on row data ?

    Hi,
    is that possible to display different icon for every row within ALV table depending on the row data ?
    for instance if the status 'S' display ~Icon/SuccessMessage and 'E' display ~Icon/ErrorMessage ?
    because base on this code below i only can set 1 icon for the whole row data.
    LOOP AT lt_columns ASSIGNING <fs_column>.
        CASE <fs_column>-id.
          WHEN 'ICO'.
            CREATE OBJECT lr_caption.
               lr_caption->set_image_source( value = '~Icon/SuccessMessage').
               <fs_column>-r_column->set_cell_editor( lr_caption ).
        ENDCASE.
      ENDLOOP.
    Thank you in advance.
    Fernand

    Hello,
    Yes it is possible to display different images based on data.
    For that what you can do is create one attribute 'STATUS' of type string in context node which you are mapping to ALV.
    And fill that attribute with the path to image based on your requirement like for status 'S' set the attribute to ~Icon/SuccessMessage and if status is 'E', set it to ~Icon/ErrorMessage at runtime.
    Now in the settings for ALV use the following code:
    * Display icon in column seatsocc
      DATA: lr_column TYPE REF TO cl_salv_wd_column,
            lr_image TYPE REF TO cl_salv_wd_uie_image,
            lv_icon TYPE string.
      lr_column = lv_model->if_salv_wd_column_settings~get_column( 'SEATSOCC' ).
      CREATE OBJECT lr_image.
      lr_image->SET_SOURCE_FIELDNAME( 'STATUS' ).
      lr_column->set_cell_editor( lr_image ).
    in the above code, column 'SEATSOCC' will be displayed as an icon.
    Sample code to fill the attribute 'STATUS'
    LOOP AT lt_flights INTO ls_flight.
        lv_seatsfree = ls_flight-seatsmax - ls_flight-seatsocc.
        IF lv_seatsfree = 0.
          ls_flight-status = 'ICON_RED_LIGHT'.
        ELSEIF lv_seatsfree <= 50.
          ls_flight-status = 'ICON_YELLOW_LIGHT'.
        ELSE.
          ls_flight-status = 'ICON_GREEN_LIGHT'.
        ENDIF.
        MODIFY lt_flights FROM ls_flight.
      ENDLOOP.
    Hope this helps!
    Regards,
    Srilatha
    Edited by: Srilatha M on Jun 25, 2010 12:02 PM

  • ALV grid oo delete rows and update to table

    Hi all
      How can I delete one row and update to the db table?
    thanks

    Hi,
    Refer:-
    The ALV Grid has events data_changed and data_changed_finished. The former method is
    triggered just after the change at an editable field is perceived. Here you can make checks for
    the input. And the second event is triggered after the change is committed.
    You can select the way how the control perceives data changes by using the method
    register_edit_event. You have two choices:
    1. After return key is pressed: To select this way, to the parameter i_event_id pass cl_gui_alv_grid=>mc_evt_enter.
    2. After the field is modified and the cursor is moved to another field: For this, pass cl_gui_alv_grid=>mc_evt_modifies to the same parameter.
    To make events controlling data changes be triggered, you must select either way by
    calling this method. Otherwise, these events will not be triggered.
    To control field data changes, ALV Grid uses an instance of the class
    CL_ALV_CHANGED_DATA_PROTOCOL and passes this via the event data_changed.
    Using methods of this class, you can get and modify cell values and produce error messages.
    Hope this helps you.
    Regards,
    Tarun

  • Need help in alv append in one row

    I need to append in one row in alv and I’m using 'REUSE_ALV_FIELDCATALOG_MERGE'.
    Here’s my code:
    DATA: lv_spras LIKE sy-langu,
            lv_datbi LIKE a005-datbi.
      CLEAR t_final.
      SELECT t~vtext
             a~kschl
             a~kunnr
             k~name1
             a~matnr
             a~knumh
             m~maktx
             m~spras
             a~datab
             a~datbi
            INTO TABLE t_final
            FROM a005 AS a
            INNER JOIN t685t AS t ON akschl EQ tkschl
            INNER JOIN kna1  AS k ON akunnr EQ kkunnr
            INNER JOIN makt AS m ON amatnr EQ mmatnr
                        WHERE  a~vkorg IN s_vkorg
                        AND    a~vtweg IN s_vtweg
                        AND    a~matnr IN s_matnr
                        AND  ( a~kschl EQ p_cond1
                        OR     a~kschl EQ p_cond2
                        OR     a~kschl EQ p_cond3
                        OR     a~kschl EQ p_cond4 )
                        AND    a~kunnr IN s_kunnr
                        AND    a~datab LE sy-datum
                        AND    a~datbi GE sy-datum
                        AND    m~spras EQ sy-langu.
      IF sy-subrc EQ 0.
        DELETE ADJACENT DUPLICATES FROM t_final
           COMPARING kschl.
      ENDIF.
        LOOP AT t_final FROM sy-tabix.
        move-corresponding t_a005 to t_final.
          CASE t_final-kschl.
            WHEN p_cond1.
              t_final1-kschl1 = t_final-kschl.
              t_final1-vtext1 = t_final-vtext.
              t_final1-datab  = t_final-datab.
              t_final1-datbi  = t_final-datbi.
            WHEN p_cond2.
              t_final1-kschl2 = t_final-kschl.
              t_final1-vtext2 = t_final-vtext.
              t_final1-datab2  = t_final-datab.
              t_final1-datbi2  = t_final-datbi.
          Endcase.
            Endloop.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                i_program_name     = l_repid
                i_internal_tabname = 'T_FINAL1'
                i_inclname         = l_repid
                i_bypassing_buffer = 'X'
           CHANGING
                ct_fieldcat        = t_fieldcat[]
           EXCEPTIONS
                OTHERS             = 0.
      LOOP AT t_fieldcat.
        CASE t_fieldcat-fieldname.
      condition 1
          WHEN lc_vtext1.
            IF p_cond1 IS INITIAL.
              t_fieldcat-no_out        = c_x.
            ELSE.
              CONCATENATE text-001 p_cond1 INTO lv_buf
              SEPARATED BY space.
              t_fieldcat-seltext_l    = lv_buf.
              t_fieldcat-seltext_s    = lv_buf.
              t_fieldcat-seltext_m    = lv_buf.
              t_fieldcat-ddictxt      = lc_l.
              t_fieldcat-no_zero      = c_x.
              t_fieldcat-just         = lc_r.
              t_fieldcat-reptext_ddic = lv_buf.
              t_fieldcat-outputlen    = 27.
            ENDIF.
            CLEAR t_fieldcat-key.
            MODIFY t_fieldcat INDEX sy-tabix.
          WHEN lc_kschl1.                              "CONDITION TYPE
            IF p_cond1 IS INITIAL.                    "DESCRIPTION
              t_fieldcat-no_out        = c_x.
            ELSE.
              CONCATENATE text-002 p_cond1 INTO lv_buf
              SEPARATED BY space.
              t_fieldcat-seltext_l    = lv_buf.
              t_fieldcat-seltext_s    = lv_buf.
              t_fieldcat-seltext_m    = lv_buf.
              t_fieldcat-ddictxt      = lc_l.
              t_fieldcat-no_zero      = c_x.
              t_fieldcat-just         = lc_r.
              t_fieldcat-reptext_ddic = lv_buf.
              t_fieldcat-outputlen    = 20.
            ENDIF.
            CLEAR t_fieldcat-key.
            MODIFY t_fieldcat INDEX sy-tabix.
    WHEN lc_vtext2.
            IF p_cond1 IS INITIAL.
              t_fieldcat-no_out        = c_x.
            ELSE.
              CONCATENATE text-001 p_cond2 INTO lv_buf
              SEPARATED BY space.
              t_fieldcat-seltext_l    = lv_buf.
              t_fieldcat-seltext_s    = lv_buf.
              t_fieldcat-seltext_m    = lv_buf.
              t_fieldcat-ddictxt      = lc_l.
              t_fieldcat-no_zero      = c_x.
              t_fieldcat-just         = lc_r.
              t_fieldcat-reptext_ddic = lv_buf.
              t_fieldcat-outputlen    = 27.
            ENDIF.
            CLEAR t_fieldcat-key.
            MODIFY t_fieldcat INDEX sy-tabix.
          WHEN lc_kschl2.
            IF p_cond1 IS INITIAL.
              t_fieldcat-no_out        = c_x.
            ELSE.
              CONCATENATE text-002 p_cond2 INTO lv_buf
              SEPARATED BY space.
              t_fieldcat-seltext_l    = lv_buf.
              t_fieldcat-seltext_s    = lv_buf.
              t_fieldcat-seltext_m    = lv_buf.
              t_fieldcat-ddictxt      = lc_l.
              t_fieldcat-no_zero      = c_x.
              t_fieldcat-just         = lc_r.
              t_fieldcat-reptext_ddic = lv_buf.
              t_fieldcat-outputlen    = 20.
            ENDIF.
            CLEAR t_fieldcat-key.
            MODIFY t_fieldcat INDEX sy-tabix.
    Endcase.
    Endloop.
    The output is:
    VTEXT1               KSCHL1    VTEXT2                       KSCHL2
    Special Discount   |ZDD3     |                                      |     
            |                 |Tender/Special Price|ZR03 
    I want the output:
    VTEXT1               KSCHL1    VTEXT2                       KSCHL2
    Special Discount   |ZDD3     ||Tender/Special Price|ZR03 
    How can I do these.

    DATA: BEGIN OF wa,
            col1(1) TYPE c,
            col2 TYPE i,
          END OF wa.
    DATA itab LIKE TABLE OF wa.
    DO 3 TIMES.
      APPEND INITIAL LINE TO itab.
      wa-col1 = sy-index. wa-col2 = sy-index ** 2.
      APPEND wa TO itab.
    ENDDO.
    LOOP AT itab INTO wa.
      WRITE: / wa-col1, wa-col2.
    ENDLOOP.
    The list output is:
              0
    1         1
              0
    2         4
              0
    3         9

Maybe you are looking for

  • I cant seem to use external video in my swf!

    why wont my video work live but work locally?

  • Displaying of files in Finder takes minutes

    I am using OS X Yosemite 10.10.1 on a MacBook Pro Retina late 2013, 2.6 GHz, 16 GB RAM, 1 TB SSD. Recently I quite frequently am facing the problem, that files, that are being saved from Photoshop (or also from other applications) take many minutes t

  • I want to open a directory only not a file

    Hai have a peace day. I have a question. I'm looking for a dialog box where the user can browse for a directory. All I can find is a dialog box where you can open a file. Is there one to open a directory? If not, how can I solve this so the user can

  • Credit/Debit Memo Request Approval Workflow

    Hi All, I have this requirement of activating a workflow for credit and debit memo requests. It should be that the approvers will be determined by: 1. Amount 2. Order reason code (if error in data entry - CSR manager, if price error - Sales manager,

  • Thank you for guidance on Zen Touch power failure probl

    Hi Just wanted to say thanks for the help i found here when my Zen Touch's power button was lit but nothing was on the screen and it wasn't responding to anything i did! I was literally really freaking out that all my music would be gone and i'd have