Need to capture edited values ALV

Hi All,
Iam working with OOALV and I need to capture the edited values of ALV.
Here Iam successful by capturing edited values in first time.
i.e, Execute the program edit on row then Save I able to capture the row in PAI and I save it in dbtab and again come to alv screen and now I will edit some other row . But, this time Iam unable to capture the edited row.
Here I used check_changed_data method to capture..
Pls help me in this regard.....
Thanks,

>
> i.e, Execute the program edit on row then Save I able to capture the row in PAI and I save it in dbtab and again come to alv screen and now I will edit some other row . But, this time Iam unable to capture the edited row.
>
> Here I used check_changed_data method to capture..
are you using REFRESH_DISPLAY method.
in the data_changed after the population.
And where you are calling that method
if it is in PAI , in the beginning then that would be fine. You need to use the REFRESH_DISPLAY after the update and you need to call the FLUSH method

Similar Messages

  • How to capture the value selected in the drop down box

    Hi all,
    I am populating values in  drop down box by using FM vrm_set_values in module pool.
    like below
    01  ABC
    02 ACB
    03 BCA
    04 CAB
    in module pool drop down box element name is RQGM-VALUE.
    Problem is what ever the value is select in the drop down box from above element RQGM-VALUE is not filling any value.
    i need to capture the value selected in the drop down box and pass it to another variable.

    Hi,
    Refer this standard code. Your issue will be resolve.
    REPORT demo_dynpro_dropdown_listbox.
    TYPE-POOLS vrm.
    DATA: name  TYPE vrm_id,
          list  TYPE vrm_values,
          value LIKE LINE OF list.
    DATA: wa_spfli TYPE spfli,
          ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    TABLES demof4help.
    name = 'DEMOF4HELP-CONNID'.
    CALL SCREEN 100.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE init_listbox OUTPUT.
      CLEAR demof4help-connid.
      SELECT  connid cityfrom cityto deptime
        FROM  spfli
        INTO  CORRESPONDING FIELDS OF wa_spfli
       WHERE  carrid = demof4help-carrier2.
        value-key  = wa_spfli-connid.
        WRITE wa_spfli-deptime TO value-text USING EDIT MASK '__:__:__'.
        CONCATENATE value-text
                    wa_spfli-cityfrom
                    wa_spfli-cityto
                    INTO value-text SEPARATED BY space.
        APPEND value TO list.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id     = name
                values = list.
    ENDMODULE.
    MODULE user_command_100.
      save_ok = ok_code.
      CLEAR ok_code.
      IF save_ok = 'CARRIER' AND NOT demof4help-carrier2 IS INITIAL.
        LEAVE TO SCREEN 200.
      ELSE.
        SET SCREEN 100.
      ENDIF.
    ENDMODULE.
    MODULE user_command_200.
      save_ok = ok_code.
      CLEAR ok_code.
      IF save_ok = 'SELECTED'.
        MESSAGE i888(sabapdocu) WITH text-001 demof4help-carrier2
                                            demof4help-connid.
      ENDIF.
    ENDMODULE.

  • Capture the value of a business object

    I need to capture the value of an atribute to pas it over to a method. how can i do that?

    Hi,
    Please elaborate on your query. Describe the scenario and workflow if possible.
    You may refer to Please ***Read*** or at least skim through before posting new questions that'll help you in posting a forum question.
    Thanks
    Subhodeep

  • Capture livecache values in planning area level.

    Hi Experts,
                     We have got a typical requirement, where we need to capture livecache values for safetystock(SAFTY) KEYFIGURE maintained for a particular product, location and planning area.
    we are using function module  BAPI_PBSRVAPS_GETDETAIL2 to retrieve the required results. Every thing is working fine but to retrieve the required value , we have to pass mandatory parameters (planning book ,data view and Selection ID as mentioned below) into the BAPI.
    Issue:-  This will work for interactive planning  for a particular planning book, data view and selection ID but not for "Mass processing".  We have searched and tested different BAPIs but could not get the required one.
    So, would like to know if there is any class method or bapi or normal functional module where we can pass planning area, product and location to capture livecache values for safetystock(SAFTY) KEYFIGURE maintained based on Macro.

    Krishna,
    I think it doesnt make a difference, The Keyfigure values are not Planning book or Dataview specific, they are only planning area specific. So if there is a value in one Planning book/dataview the same value will be seen in any planning book or dataview within the same planning area. Also, it is not mandatory to use the selection id. Instead you can use the it_selection internal table under the tables parameter of the BAPI.
    Hope this helps.
    Thanks & Regards
    Mani Suresh

  • SET_TABLE_FOR_DISPLAY - Edited value from dynamic internal table need to be captured

    Hi all,
    I have created  2 tabstrip screns which contain ALV GRID DISPLAY  in a container with dynamic internal table and editable columns .I want to capture the edited value from this ALV GRID display.I have used SET_TABLE_FOR_DISPLAY  and for this dynamc internal table is passed which is Field symbol and editable columns have to be captured for further updation into another ztable.
    When i used check_changed_data  i am getting dump as field symbol not assigned.
    Below is the code :  How can i get edited column value from below code
    call method alv_list->set_table_for_first_display
        exporting
                is_layout                     = gs_layout
        changing
          it_outtab                     = <fs_dynamic_table>
          it_fieldcatalog               = it_fieldcat[]
        exceptions
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          others                        = 4.
      if sy-subrc <> 0.
    * Implement suitable error handling here
      endif.
    Kindly help me to solve this.
    With Thanks,
    Dina.

    please provide more info about the dump to try to help you
    as max said, it could be because the field symbol is not global and if its global maybe you are not refering well to the column
    i assume that you are using "ASSIGN COMPONENT comp OF STRUCTURE struc TO <fs>" to capture the value changed
    validate always the sy-subrc after the assignment.
    but the check changed data have parameters that have the old and new values
    please provide more info...
    Regards

  • ALV edit not capturing new value

    Hi
    In my alv i have made one field as editable..when i edit the field and click save button the control comes to below code. 
    CALL METHOD gro_grid->get_selected_rows
        IMPORTING
          et_index_rows = gwa_selected_rows.
    *Through the index capturing the values of selected rows
      LOOP AT gwa_selected_rows INTO gv_selected_rows.
        READ TABLE git_data INTO gwa_data INDEX gv_selected_rows-index.
    here git_data is the internal table given to alv grid...i nthe above read stmt..gwa_data gives the value in field as old one..its not capturing the new value..how to solve this ..pls help

    Hi,
    Use event data_changed.
    When 'SAVE' is pressed, call check_changed_data( ) which will trigger event data_changed.
    Inside handler method copy the modified cells to table.
    *PAI
    When 'SAVE'.
    g_o_grid->check_changed_data( ).  " It triggers event 'data_changed'.
    LOOP AT g_t_modcells INTO g_r_modcells.   " Loop at modified cells table
    READ TABLE git_data INTO gwa_data INDEX g_r_modcells-row_id .      " <---- Ur code
    ENDLOOP.
    clear: g_t_modcells[],g_t_modcell[].
    *Declare data for handler method.
    Data:  g_t_modcells type lvc_t_modi,
              g_t_modcell type lvc_t_modi.
    *Declare handler method for event 'data_changed'.
    METHODS: data_changed FOR EVENT data_changed OF cl_gui_alv_grid IMPORTING er_data_changed.
    *Handler method implementation
      METHOD data_changed.
        IF er_data_changed->mt_good_cells[] IS NOT INITIAL.
          g_t_modcell[] = er_data_changed->mt_good_cells[].
          APPEND LINES OF g_t_modcell TO g_t_modcells.  " Modified cells are copied to table g_t_modcells[]
        ENDIF.
      ENDMETHOD.
    Thanks,

  • Unable to capture data in an editable dynamic ALV.

    Hi ,
    I have created a dynamic editable ALV whose displayed structure can be changed at runtime based on the selection in a drop down list value selector.
    Im trying to capture the values entered in the ALV into an internal table before the user changes the structure of the ALV to a different structure.
    In the ON_SELECT event handler of the drop down list box , im rasing a data_check event to capture the ALV data.
    The problem is that the control is not entering the event handler for the data_check event.
    If i raise the data_check event in my save event handler or any other event handler , it works fine.
    Can someone please suggest a solution.
    Regards,
    Newton.

    Hi ,
    I have figured out that the problem is local to my machine , because the code works fine on other machines.
    I guess my internet explorer has some bug.
    Regards,
    Newton.

  • Editing values within Dynamic ALV

    Hello All,
    I am currently working on dynamic ALV and want the columns to be editible.
    I have gone through the tutorial
    Link : [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783]
    and have created a dynamic Context and a corresponding ALV LIST display. Everything is fine except that i want to be able to edit values within the list and i want this to get populated back into the context.
    I have gone through the tutorial.
    Link : [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1]
    But i couldn't relate that with the tutorial for dynamic ALV.
    Please help.
    Best Regards,
    Mz

    Hello Lekha,
    I am sorry to say that  the code which you have provided is not working.
    Maybe i am doing something wrong.
    This is the entire code below.
    data lo_interfacecontroller type ref to iwci_salv_wd_table .
    data lo_cmp_usage type ref to if_wd_component_usage.
    data : L_VIEW_CONTROLLER_API type ref to IF_WD_VIEW_CONTROLLER.
    lo_cmp_usage =   wd_this->wd_cpuse_alv( ).
    if lo_cmp_usage->has_active_component( ) is initial.
      lo_cmp_usage->create_component( ).
    endif.
    lo_interfacecontroller =   wd_this->wd_cpifc_alv( ).
      lo_interfacecontroller->set_data(
    *   only_if_new_descr =                 " wdy_boolean
        "r_node_data =
        dyn_node                    " ref to if_wd_context_node
    DATA:
       lo_value type ref to cl_salv_wd_config_table,
         lr_column      TYPE REF TO cl_salv_wd_column,            " Table fo rcolumn ref
         ls_columns     TYPE salv_wd_s_column_ref,                " Structure for column ref
        lt_columns     TYPE salv_wd_t_column_ref,                " Structure for column ref
       lr_input       TYPE REF TO cl_salv_wd_uie_input_field.
    lo_value = lo_interfacecontroller->get_model( ).
    * Get the column ref
      CALL METHOD lo_value->if_salv_wd_column_settings~get_columns
        RECEIVING
          value = lt_columns.
      LOOP AT lt_columns INTO ls_columns.
        lr_column = ls_columns-r_column.
    case ls_columns-id.
    when 'JAN2007'.
            CREATE OBJECT lr_input
              EXPORTING
                value_fieldname = ls_columns-id.
            CALL METHOD lr_column->set_cell_editor
              EXPORTING
                value = lr_input.
    *     Set the read only attribute
            lr_input->set_read_only_fieldname( value = 'FALSE' ).
    endcase.
    endloop.
    L_VIEW_CONTROLLER_API = WD_THIS->WD_GET_API( ).
    L_VIEW_CONTROLLER_API->PREPARE_DYNAMIC_NAVIGATION(
    source_window_name = 'WINDOW1'
    source_vusage_name = 'MAIN_USAGE_0'
    source_plug_name = 'TO_V1'
    target_component_name = 'SALV_WD_TABLE'
    target_component_usage = 'ALV'
    target_view_name = 'TABLE'
    target_plug_name = 'DEFAULT'
    target_embedding_position = 'MAIN/VIEW_CONTAINER'
    WD_THIS->FIRE_TO_V1_PLG( ).
    The part which is entered as per your instructions are given between the asterisk lines.
    Sorry if there are any silly mistakes on my part.
    I have one small doubt regarding the value to be passed for the method lr_input->set_read_only_fieldname. This is a string value. I think that this could be the cause of the error. When i checked the class interface, CL_SALV_WD_UIE_INPUT_FIELD i found that the method set_read_only_fieldname is calling another attribute if_salv_wd_c_table_evt_editor=>set_read_only_fieldname.
    Hope this was useful
    Best Regards,
    Mz

  • How to save ALV data into DB after Editing values in WDA

    Hi All,
    I have created a WD application with and able to successfully make columns editable in ALV. But I failed when trying to save the edited data in database.
    I use ON_CELL_ACTION event but its not working as of now. I go through few blocks but ultimately i got confused. Please guide me in correct way.

    Hi Sanjib,
    ON_DATA_CHECK  event is triggered every time when you change the data in table
    For this event, you have to implement an Event Handler method in which the logic is written.
    There is already a thread where this question has been answered:
    ALV Edit how to save changes to DB??
    I would suggest that you search more on scn before starting a discussion
    Regards,
    Ashvin

  • Make rows as non editable in ALV

    Hi Experts,
    I have a standard ALV table where records are fetched from backend table. Here I have a field Approved as check box.
    My requirement is I need to make all the rows as non editable, if the Approved checkbox is checked. How can I achieve this.
    I went through the below discussion, but still am not clear of how to achieve it.
    How to set some rows in ALV to be editable or some non editable.
    I know to set a field as non editable in WD, but don't know how to set some specific rows as non editable in alv.
    Please help me.
    With Regards,
    Ramakrishnan M

    Hi,
    Create an Attribute in the Context say READ_ONLY of type wdy_boolean and bind the read only of cell editor to that attribute using set_read_only_fieldname( ) method. Then set the value of attribute READ_ONLY to abap_true/abap_false based on check box value.
    check this wiki for reference: How to edit conditionally row of a ALV table in Web Dynpro for ABAP - Web Dynpro ABAP - SCN Wiki
    Hope this helps u,
    Regards,
    Kiran

  • I need to print logo in alv grid

    I need to print logo in alv grid .As of now its getting displayed but it cannot be printed .Kindly tell me wether there is any option to print it .Eitjer using ALV or Object oriented ALV.Please reply soon

    Hi Deepti,
    Refer the code below.
    report  sy-repid.
    type-pools : slis.
    *ALV Formatting tables /structures
    data: gt_fieldcat type slis_t_fieldcat_alv.
    data: gt_events type slis_t_event.
    data: gs_layout type slis_layout_alv.
    data: gt_page   type slis_t_listheader.
    data: gs_page type slis_listheader.
    data: v_repid like sy-repid.
    *ALV Formatting work area
    data: w_fieldcat type slis_fieldcat_alv.
    data: w_events type slis_alv_event.
    data: gt_bsid type table of bsid with header line.
    initialization.
      perform build_events.
      perform build_page_header.
    start-of-selection.
    *perform build_comment.     "top_of_page - in initialization at present
      select * from bsid into table gt_bsid up to 10 rows.
    *perform populate_for_fm using '1' '3' 'BUKRS' '8' 'GT_BSID' 'Whee'.
    *USING = Row, Column, Field name, display length, table name, heading
    *OR
      perform build_fieldcat.
      gs_layout-zebra = 'X'.
    *top of page event does not work without I_callback_program
      v_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program                = v_repid
          i_structure_name                  = 'BSID'
       i_background_id                   = 'ALV_BACKGROUND'
          i_grid_title                      = 'This is the grid title'
      I_GRID_SETTINGS                   =
          is_layout                         = gs_layout
          it_fieldcat                       = gt_fieldcat[]
          it_events                         = gt_events[]
        tables
          t_outtab                          = gt_bsid.
    Form..............:  populate_for_fm
    Description.......:  Populates fields for function module used in ALV
    form populate_for_fm using    p_row
                                        p_col
                                        p_fieldname
                                        p_len
                                        p_table
                                        p_desc.
      w_fieldcat-row_pos = p_row.          "Row Position
      w_fieldcat-col_pos = p_col.          "Column Position
      w_fieldcat-fieldname = p_fieldname.  "Field name
      w_fieldcat-outputlen = p_len.        "Column Lenth
      w_fieldcat-tabname = p_table.        "Table name
      w_fieldcat-reptext_ddic = p_desc.    "Field Description
      w_fieldcat-input = '1'.
      append w_fieldcat to gt_fieldcat.
      clear w_fieldcat.
    endform.                    " populate_for_fm
    *&      Form  build_events
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
           exporting
                i_list_type = 0
           importing
                et_events   = gt_events.
      read table gt_events with key name =  slis_ev_user_command
                               into ls_event.
      if sy-subrc = 0.
        move slis_ev_user_command to ls_event-form.
        append ls_event to gt_events.
      endif.
      read table gt_events with key name =  slis_ev_top_of_page
                               into ls_event.
      if sy-subrc = 0.
        move slis_ev_top_of_page to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " build_events
    *&      Form  USER_COMMAND
    When user command is called it uses 2 parameters. The itab
    passed to the ALV is in whatever order it currently is on screen.
    Therefore, you can read table itab index rs_selfield-tabindex to get
    all data from the table. You can also check r_ucomm and code
    accordingly.
    form user_command using  r_ucomm      like sy-ucomm
                             rs_selfield type slis_selfield.
      read table gt_bsid index rs_selfield-tabindex.
    error checking etc.
      set parameter id 'KUN' field gt_bsid-kunnr.
      call transaction 'XD03' and skip first screen.
    endform.
    *&      Form  top_of_page
    Your own company logo can go here if it has been saved (OAOR)
    If the logo is larger than the size of the headings in gt_page,
    the window will not show full logo and will have a scroll bar. Thus,
    it is a good idea to have a standard ALV header if you are going to
    use logos in your top of page.
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
                it_list_commentary = gt_page
                i_logo             = 'ENJOYSAP_LOGO'.
    endform.
    *&      Form  build_fieldcat
    *Many and varied fields are available here. Have a look at documentation
    *for FM REUSE_ALV_LIST_DISPLAY and REUSE_ALV_FIELDCATALOG_MERGE
    form build_fieldcat.
      w_fieldcat-fieldname = 'BUDAT'.
      w_fieldcat-seltext_m = 'Dte pst'.
      w_fieldcat-ddictxt(1) = 'M'.
    Can change the position of fields if you do not want them in order
    of the DDIC or itab
    w_fieldcat-row_pos = '1'.
    w_fieldcat-col_pos = '10'.
      append w_fieldcat to gt_fieldcat.
      clear w_fieldcat.
    endform.                    " build_fieldcat
    *&      Form  build_page_header
          gt_page is used in top of page (ALV subroutine - NOT event)
          *H = Header, S = Selection, A = Action
    form build_page_header.
    For Headers, Key is not printed and is irrelevant. Will not cause
    a syntax error, but is not used.
      gs_page-typ = 'H'.
      gs_page-info = 'Header 1'.
      append gs_page to gt_page.
      gs_page-typ = 'H'.
      gs_page-info = 'Header 2'.
      append gs_page to gt_page.
    For Selections, the Key is printed (bold). It can be anything up to 20
    bytes. It gets printed in order of code here, not by key value.
      gs_page-typ = 'S'.
      gs_page-key = 'And the winner is:'.
      gs_page-info = 'Selection 1'.
      append gs_page to gt_page.
      gs_page-typ = 'S'.
      gs_page-key = 'Runner up:'.
      gs_page-info = 'Selection 2'.
      append gs_page to gt_page.
    For Action, Key is also irrelevant.
      gs_page-typ = 'A'.
      gs_page-info = 'Action goes here'.
      append gs_page to gt_page.
    endform.                    " build_page_header
    Settings for the Logo :
    01) GOTO - OAOR (Business Document Navigator)
    02) Give Class Name - PICTURES
    Class Type - OT
    Object type - whatever you want to call your area EG: OURCOMP.... then Execute
    03) Top left will say PICTURES. Bottom left will have multi tab. Select Create and double-click on Screen.
    04) Select your image from the appropriate directory.
    05) Give the image an appropriate name (not Screen)
    06) It will tell you document stored successfully.
    07) You can now find your logo under the heading OURCOMP in top left window.
    08) You can reference the logo in things like FM REUSE_ALV_COMMENTARY_WRITE or any other area which may reference these things. EG: I_LOGO = 'OURCOMP'. You can preview image by double-clicking it.
    <b>Please reward points if it helps.</b>
    Regards,
    Amit Mishra
    Message was edited by: Amit Mishra

  • MWA: Issue while capturing the values entered, before displaying the LOV

    I have created a LOV in Mobile Web Application using PL/SQL procedure.
    I'm not able to get the values entered by the user before displaying the List of values.
    I need the values entered to pass it to the query.
    There might be a seeded event or method to capture these values.
    Any help would be appreciated.
    Thanks,

    Before invoking Input task, I have created a transformation to initailize the payload elements, so that in the UI these field elements will be become editable.
    I have an ADF table which is used to insert account details elements which is initialized in the transformation with namespace.You can simple use a ADF form to do this. Create ADF editable input fields in a panelFormLayout and wehn user enters values and clicks ona button .. pass those values to BPM payload.
    See - http://andrejusb.blogspot.com/2010/10/initializing-oracle-bpm-11g-process.html

  • Urgent:capture group values in variables

    Hi,
    I am new to BI publisher, need some help to solve my issue.
    i need to grab group value in variables.
    i have a code like this
    <?for-each-group:contact;./contactname?>
    for example that above code will give 5 contact names. i have to capture 1st contact in one variable. Second contaname in second variable.. etc.
    Thanks,
    lax

    Not concatenation,
    i have for each group statement with contact name
    it is displaying data like this
    Name1
    Name2
    Name3
    now i want to get that values in my each variable. for example variable1 should have Name1 value. variable2 have Name2 value. Variable3 have Name3.
    so that in some other pages i have to query some records based on above variable values.
    Thanks,
    lax
    Edited by: user7498756 on Aug 23, 2012 12:23 PM

  • Editable Hierarchical ALV

    There is a requirement from client that
    They want to see an hierarchical ALV. This ALV needs to be editable in the line item level for the balnk lines. On click of a button, a pop window will appear in which if if they enter say 5 and the customer code then 5 blank lines should be appended at the customer's line item level where the user can enter values. Is this possible. Will the inserted/ appended lines get refreshed on the ALV. For eg:
    represent the blank lines)
    Header--> Customer Code Customer Name
    011101 XYZ
    Item--> Material Quantity Unit Amount
    14589 125.00 KG 145.50
    12569 45.00 KG 100.00
    15899 105.00 KG 120.50
    PLZ Help!

    Hi,
    I've done similar thing. Here is the code for my method for handling double click.
    METHOD handle_node_double_click.
        CALL METHOD sender->get_outtab_line
          EXPORTING
            i_node_key     = node_key
          IMPORTING
            e_outtab_line  = gs_idoc_s
          EXCEPTIONS
            node_not_found = 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.
    * Get data
    * <code for changing value>
          CALL METHOD sender->change_node
            EXPORTING
              i_node_key     = node_key
              i_outtab_line  = gs_idoc_s
            EXCEPTIONS
              node_not_found = 1
              OTHERS         = 2.
          READ TABLE gt_idoc_s WITH KEY pos = gs_idoc_s-pos
            TRANSPORTING NO FIELDS.
          MODIFY gt_idoc_s FROM gs_idoc_s
            INDEX sy-tabix TRANSPORTING value_low value_high.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          CALL METHOD tree1->frontend_update.
        ENDIF.
      ENDMETHOD.                    "handle_node_double_click
    The important methods are get_outtab_line. change_node and frontend_update.

  • How to Edit in ALV?

    Hi Experts,
    I am working on a BAPI for creating Requsition where i am taking one ref PR and then modifying required details and then creating a new PR.
    Everything is working fine but before creating the new PR i want to display that data in the form of alv grid and where i can edit the values and save then a new PR will be created as per modification on alv.
    check the sample code wht i hv done....
    SELECT * FROM EBAN INTO CORRESPONDING FIELDS OF TABLE IT_EBAN WHERE
    BANFN EQ S_BANFN.
    LOOP AT IT_EBAN.
    ENDLOOP.
    LOOP AT IT_EBAN.
    T_REQUISITION_ITEMS-DOC_TYPE = 'ZSD'.
    MOVE IT_EBAN-BNFPO TO T_REQUISITION_ITEMS-PREQ_ITEM.
    MOVE IT_EBAN-ERNAM TO T_REQUISITION_ITEMS-CREATED_BY.
    MOVE IT_EBAN-AFNAM TO T_REQUISITION_ITEMS-PREQ_NAME.
    MOVE IT_EBAN-BADAT TO T_REQUISITION_ITEMS-PREQ_DATE.
    MOVE IT_EBAN-TXZ01 TO T_REQUISITION_ITEMS-SHORT_TEXT.
    MOVE IT_EBAN-MATNR TO T_REQUISITION_ITEMS-MATERIAL.
    MOVE IT_EBAN-EMATN TO T_REQUISITION_ITEMS-PUR_MAT.
    T_REQUISITION_ITEMS-PLANT = '4000'.
    T_REQUISITION_ITEMS-STORE_LOC = 'YRD1'.
    T_REQUISITION_ITEMS-PUR_GROUP = 'JSD'.
    MOVE IT_EBAN-MATKL TO T_REQUISITION_ITEMS-MAT_GRP.
    MOVE IT_EBAN-MENGE TO T_REQUISITION_ITEMS-QUANTITY.
    MOVE IT_EBAN-MEINS TO T_REQUISITION_ITEMS-UNIT.
    T_REQUISITION_ITEMS-DELIV_DATE = '20080618'.
    APPEND T_REQUISITION_ITEMS.
    CALL FUNCTION 'BAPI_REQUISITION_CREATE'
    EXPORTING
    SKIP_ITEMS_WITH_ERROR =
    IMPORTING
    NUMBER = E_NUMBER
    TABLES
    REQUISITION_ITEMS = T_REQUISITION_ITEMS
    *REQUISITION_ACCOUNT_ASSIGNMENT = T_REQ_ACCOUNT_ASSIGNMENT
    REQUISITION_ITEM_TEXT =
    REQUISITION_LIMITS =
    REQUISITION_CONTRACT_LIMITS =
    REQUISITION_SERVICES =
    REQUISITION_SRV_ACCASS_VALUES =
    RETURN = T_RETURN
    REQUISITION_SERVICES_TEXT =
    EXTENSIONIN =
    REQUISITION_ADDRDELIVERY =
    ENDLOOP.
    IF NOT E_NUMBER IS INITIAL .
    WRITE:/ 'REQ NO:' , E_NUMBER , 'CREATED'.
    ELSE.
    LOOP AT T_RETURN.
    WRITE T_RETURN-MESSAGE.
    ENDLOOP.
    ENDIF.
    what i want is before calling BAPI_REQUISITION_CREATE  i need to display it_eban as alv and then where i can edit the values and save and that values will move to T_REQUISITION_ITEMS table. no need of hard cording Plant and purch. grop and storage location details. I know how to display the ALV grid just tell me how to edit in ALV and when i cllick save it shold move to BAPI_REQUISITION_CREATE.
    its an urgent...
    <b>points will be rewarded for useful answers</b>
    Regards,
    sunil kairam.

    Check this editable alv report...
    REPORT zjay_edit_alv.
    * TYPE-POOLS *
    TYPE-POOLS: slis.
    * INTERNAL TABLES/WORK AREAS/VARIABLES
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
    i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
    w_field TYPE slis_fieldcat_alv,
    p_table LIKE dd02l-tabname,
    dy_table TYPE REF TO data,
    dy_tab TYPE REF TO data,
    dy_line TYPE REF TO data.
    * FIELD-SYMBOLS *
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
    <dyn_wa> TYPE ANY,
    <dyn_field> TYPE ANY,
    <dyn_tab_temp> TYPE STANDARD TABLE.
    * SELECTION SCREEN *
    PARAMETERS: tabname(30) TYPE c DEFAULT 'MARA',
    lines(5) TYPE n DEFAULT 7.
    * START-OF-SELECTION *
    START-OF-SELECTION.
    * Storing table name
    p_table = tabname.
    * Create internal table dynamically with the stucture of table name
    * entered in the selection screen
    CREATE DATA dy_table TYPE STANDARD TABLE OF (p_table).
    ASSIGN dy_table->* TO <dyn_table>.
    IF sy-subrc <> 0.
    MESSAGE i000(z_zzz_ca_messages) WITH ' No table found'.
    LEAVE TO LIST-PROCESSING.
    ENDIF.
    * Create workarea for the table
    CREATE DATA dy_line LIKE LINE OF <dyn_table>.
    ASSIGN dy_line->* TO <dyn_wa>.
    * Create another temp. table
    CREATE DATA dy_tab TYPE STANDARD TABLE OF (p_table).
    ASSIGN dy_tab->* TO <dyn_tab_temp>.
    SORT i_fieldcat BY col_pos.
    * Select data from table
    SELECT * FROM (p_table)
    INTO TABLE <dyn_table>
    UP TO lines ROWS.
    REFRESH <dyn_tab_temp>.
    * Display report
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_structure_name = p_table
    i_callback_user_command = 'USER_COMMAND'
    i_callback_pf_status_set = 'SET_PF_STATUS'
    TABLES
    t_outtab = <dyn_table>
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    ENDIF.
    *& Form SET_PF_STATUS
    * Setting custom PF-Status
    * -->RT_EXTAB Excluding table
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'ZSTANDARD'. "copy it from SALV func group standard
    ENDFORM. "SET_PF_STATUS
    *& Form user_command
    * Handling custom function codes
    * -->R_UCOMM Function code value
    * -->RS_SELFIELD Info. of cursor position in ALV
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    * Local data declaration
    DATA: li_tab TYPE REF TO data,
    l_line TYPE REF TO data.
    * Local field-symbols
    FIELD-SYMBOLS:<l_tab> TYPE table,
    <l_wa> TYPE ANY.
    * Create table
    CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
    ASSIGN li_tab->* TO <l_tab>.
    * Create workarea
    CREATE DATA l_line LIKE LINE OF <l_tab>.
    ASSIGN l_line->* TO <l_wa>.
    CASE r_ucomm.
    * When a record is selected
    WHEN '&IC1'.
    * Read the selected record
    READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
    rs_selfield-tabindex.
    IF sy-subrc = 0.
    * Store the record in an internal table
    APPEND <dyn_wa> TO <l_tab>.
    * Fetch the field catalog info
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = sy-repid
    i_structure_name = p_table
    CHANGING
    ct_fieldcat = i_fieldcat
    EXCEPTIONS
    inconsistent_interface = 1
    program_error = 2
    OTHERS = 3.
    IF sy-subrc = 0.
    * Make all the fields input enabled except key fields
    w_field-input = 'X'.
    MODIFY i_fieldcat FROM w_field TRANSPORTING input
    WHERE key IS INITIAL.
    ENDIF.
    * Display the record for editing purpose
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_structure_name = p_table
    it_fieldcat = i_fieldcat
    i_screen_start_column = 10
    i_screen_start_line = 15
    i_screen_end_column = 200
    i_screen_end_line = 20
    TABLES
    t_outtab = <l_tab>
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc = 0.
    * Read the modified data
    READ TABLE <l_tab> INDEX 1 INTO <l_wa>.
    * If the record is changed then track its index no.
    * and populate it in an internal table for future
    * action
    IF sy-subrc = 0 AND <dyn_wa> <> <l_wa>.
    <dyn_wa> = <l_wa>.
    i_index = rs_selfield-tabindex.
    APPEND i_index.
    ENDIF.
    ENDIF.
    ENDIF.
    * When save button is pressed
    WHEN 'SAVE'.
    * Sort the index table
    SORT i_index.
    * Delete all duplicate records
    DELETE ADJACENT DUPLICATES FROM i_index.
    LOOP AT i_index.
    * Find out the changes in the internal table
    * and populate these changes in another internal table
    READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX i_index.
    IF sy-subrc = 0.
    APPEND <dyn_wa> TO <dyn_tab_temp>.
    ENDIF.
    ENDLOOP.
    * Lock the table
    CALL FUNCTION 'ENQUEUE_E_TABLE'
    EXPORTING
    mode_rstable = 'E'
    tabname = p_table
    EXCEPTIONS
    foreign_lock = 1
    system_failure = 2
    OTHERS = 3.
    IF sy-subrc = 0.
    * Modify the database table with these changes
    MODIFY (p_table) FROM TABLE <dyn_tab_temp>.
    REFRESH <dyn_tab_temp>.
    * Unlock the table
    CALL FUNCTION 'DEQUEUE_E_TABLE'
    EXPORTING
    mode_rstable = 'E'
    tabname = p_table.
    ENDIF.
    ENDCASE.
    rs_selfield-refresh = 'X'.
    ENDFORM. "user_command

Maybe you are looking for

  • Is it possible to add the HTTP_server to existing SOA/oc4j installation

    Hi, I'm new to application Server 10.1.3.4 and have inherited a SOA implementation with 2 iAS homes. The original is running an oc4j group underlying SOA. Subsequently they decided to use the "Rules Author" which requires the http server. So, my pred

  • External VGA connection for N80

    Hi, I need an external vga connection for my N80 to make presentations using a projector. Any ideas, Nokia or 3rd party products are all welcome. Thx, ML.

  • Good graphics for black and white books?

    Can anyone suggest a website where I can get good compostion ideas for black and white work, layouts for books? Actually I'm working on a book on house designs so would like to get ideas for visual layouts for the same, captions, blow-ups etc.The boo

  • Nokia n95 crashes while upgrading the software

    When I was trying to install new software using nsu to my nokia n95. I noticed that the phone goes off and the nokia logo appeared (the light is off). In a minute, the PC I was using told me that the phone has been disconnected. So, it asks me to tur

  • PDF, contact sheet layout

    When creating a PDF and setting the layout to have 1 column and 1 row I get a dialogue box "create gallery" and the message is "resize is undefined".  With that I am unable to save the PDF.  Any other arrangement 2x2, 4x5 etc the PDF will be complete