How to edit a particular row in the table ctrl when a push button is clickd

Hi Experts,
How to edit a particular row (except the Primary keys) after selecting it in the TABLE CONTROL when a
push button is clicked in the table control.
For Eg. If you have a push button say "Modify", the particular row what we select in the table control should be in a
editable mode after clicking "Modify" Push button.
Please help me out.
Thanks in advance.

Hey Ram,
Thanks a ton.
Its working fine...sorry for the late reply.
The reason behind the delay is because i had modified my code as per your logic it worked fine but the thing is that the whole column was in editable mode but not a single row.
For E.g  If i want to edit a particular row, first i select the row and then  click on "Modify" button. After i click on the button, the whole column gets in a editable mode including the one which i intentionally selected.
Here, the solution is that you have to set a flag in PBO so that once it is done with PBO then it need not come back again after we click on "Modify" button.
And one more query is that after you modify a particular row in the table control ( When it is in editable mode) and click on the "Save" button, it is not getting updated to database.
To update the database, we need to select the row once again after modifying it and click on the "Save" button.
Here, database is updating only when it is selected again. If it is not selected, it is not getting updated.
If you have any alternative solution, then please help me out.( I hope i am clear with the question.)
Thanks,
Ananth.

Similar Messages

  • Editing a particular row in a table - Web Dynpro Abap

    Hi all,
    My scenario is, I have to fetch contract details from EKPO table when I enter the Purchase Document Number and press SUBMIT button on my interactive form. The details will be displayed in a table.
        This part is working fine.
    Then, out of the displayed rows in that table, I have to click one of the rows. This particular row should appear as a separate row below the existing table. Here I will edit certain fields and update the database.
    My question is, How to display that particular row below the existing table which I select. The table will dynamically increase the row size depending on the records.

    Hi Surya,
    You can use the index property to display the selected row data.
    Suppose your form structure is like:
    BodyPage
       TBL_EKPO
           DATA
               EBELN
               EBELP
               LOEKZ
        SF_SELECTED_ROW_DISPLAY
            EBELN
            EBELP
            LOEKZ
    Then, in any of the field's exit event you can write:
    BodyPage.SF_SELECTED_ROW_DISPLAY. EBELN.rawValue = xfa.resolveNode( " BodyPage.TBL_EKPO.DATA["+ this.parent.index +"].EBELN").rawValue;
    Hope this helps.
    Amit

  • How to delete a particular row in ALV table

    Hi,
    How to delete a particular row in ALV table based on some condition(by checking value for one of the columns in a row)
    Thanks
    Bala Duvvuri

    Hello Bala,
    Can you please be a bit more clear as to how you intend to delete the rows from your ALV? By the way deleting rows from an ALV is no different from deleting rows from a normal table. Suppose you have enabled selection property in ALV & then select multiple rows and click up on a button to delete the rows then below would be the coding: (Also keep in mind that you would have to maintain the Selection property of the context node that you are binding to your ALV to 0..n)
    data : lr_table_settings  TYPE REF TO if_salv_wd_table_settings,
                 lr_config          TYPE REF TO cl_salv_wd_config_table.
      lr_table_settings  ?= lr_config.
    ** Setting the ALV selection to multiple selection with no lead selection
      lr_table_settings->set_selection_mode( value = cl_wd_table=>e_selection_mode-multi_no_lead ).
    Next delete the selected rows in the action triggered by the button:
    METHOD onactiondelete_rows .
      DATA:  wd_node TYPE REF TO if_wd_context_node,
             lt_node1 TYPE ig_componentcontroller=>elements_node,
             wa_temp  TYPE REF TO if_wd_context_element,
             lt_temp  TYPE wdr_context_element_set,
             row_number TYPE i VALUE 0.
      wd_node = wd_context->get_child_node( name = 'NODE' ).
      CALL METHOD wd_node->get_selected_elements
        RECEIVING
          set = lt_temp.
      LOOP AT lt_temp INTO wa_temp.
        wd_node->remove_element( EXPORTING element = wa_temp ).
      ENDLOOP.
      CALL METHOD wd_node->get_static_attributes_table
        EXPORTING
          from  = 1
          to    = 2147483647
        IMPORTING
          table = lt_node1.
      wd_node->bind_table( new_items = lt_node1 ).
    ENDMETHOD.
    If in case this isn't your requirement please do let me know so that I can try come up with another analysis.
    Regards,
    Uday

  • Exaprom PDF: how may cells span multiple rows in the table body?

    I'm using Exaprom PDF but I have a case I just can't get to work.
    I would like to generate a table where a cell spans on an entire row in the table body, the table should result as:
    |__|__|__|__|
    |__|__|__|__|
    |___________|
    |__|__|__|__|
    Dear Jean-Marc,
    could you post an example how to span a cell on an entire row in the table body with the function "Append Customized Table.vi."
    For the example, please use the 2009 version.
    Thanks,
    Asper
    This post refers to the Exaprom PDF report generation toolkit:
    https://decibel.ni.com/content/docs/DOC-10952
    Solved!
    Go to Solution.

    Maybe this.
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp
    Attachments:
    Test Table Merge LV2009.vi ‏113 KB

  • How to identify one specific row in the table STPO?

    Hi!
    How can I identify one specific row in the table STOP? As an input for my ABAP function I have MatNr, Plant, Alternative, BomUsage and Bom Position (0010, 0020...). With these values I can ask the table MAST to get the STLNR. But how can I get all needed values to specify an entry in the table STPO then?
    Thanks,
    Konrad

    Here is a actual working code that we used here.
    *-- get the bom details
      li_mast-mandt = sy-mandt.
      li_mast-matnr = material.
      li_mast-werks = '6000'.
      li_mast-stlan = '1'.
      call function 'GET_MAST'
           exporting
                all             = 'X'
                no_buffer       = 'X'
                set             = 'X'
           tables
                wa              = li_mast
           exceptions
                call_invalid    = 1
                end_of_table    = 2
                get_without_set = 3
                key_incomplete  = 4
                key_invalid     = 5
                no_record_found = 6
                others          = 7.
      if sy-subrc <> 0.
        clear: kdf_material,
               kdf_material_desc.
        exit.
      endif.
      loop at li_mast.
    *-- get the valid headers
        move-corresponding li_mast to li_stko.
        li_stko-stlty = 'M'.
        call function 'GET_STKO'
             exporting
                  all             = 'X'
                  datub           = l_valid_date
                  datuv           = l_valid_date
                  del             = ' '
                  no_buffer       = 'X'
                  set             = 'X'
                  valid           = 'X'
             tables
                  wa              = li_stko
             exceptions
                  call_invalid    = 1
                  end_of_table    = 2
                  get_without_set = 3
                  key_incomplete  = 4
                  key_invalid     = 5
                  no_record_found = 6
                  others          = 7.
        if sy-subrc <> 0.
          continue.
        endif.
        loop at li_stko.
          move-corresponding li_stko to li_stpo.
          call function 'GET_STPO'
           exporting
             all                    = 'X'
             alter                  = li_stko-stlal
             datub                  = l_valid_date
             datuv                  = l_valid_date
             no_buffer              = 'X'
             set                    = 'X'
             valid                  = 'X'
    *        VIEWNAME               =
           tables
             add_wa                 = li_cszalt
             wa                     = li_stpo
           exceptions
             call_invalid           = 1
             end_of_table           = 2
             get_without_set        = 3
             key_incomplete         = 4
             key_invalid            = 5
             no_record_found        = 6
             viewname_invalid       = 7
             others                 = 8.
          if sy-subrc <> 0.
            continue.
          else.
            exit.
          endif.
        endloop.
        if not li_stpo[] is initial.
          exit.
        endif.
      endloop.

  • How make Invisible a particular Cell in the TAble Control.

    Dear Freinds,
           I have requirement where in on a particular conditon i have to close one of the fields in the TAble contorl . That is i have to make it as invisible ....iam able only to make only display (greyed out) only iam not able to make invisible.
    Please could any one let me know how can we make invisible a particular field.
    regards
    divya.

    Hi,
    Try this it works,
    LOOP AT tc_release_ord-cols INTO wa_cols.   "tc_release_ord-----> table control
          CASE wa_cols-screen-name.
            WHEN 'ZRELEASE_ORDER-SPOTS1'.
              IF spots1 = ' '.                                            > use your condition here
                wa_cols-invisible = 'X'.                           > set property to invisible
                MODIFY tc_release_ord-cols FROM wa_cols.  >modify table control
              ENDIF.
            WHEN 'ZRELEASE_ORDER-SPOTS2'.
              IF spots2 = ' '.
                wa_cols-invisible = 'X'.
                MODIFY tc_release_ord-cols FROM wa_cols.
              ENDIF.
            WHEN 'ZRELEASE_ORDER-SPOTS3'.
              IF spots3 = ' '.
                wa_cols-invisible = 'X'.
                MODIFY tc_release_ord-cols FROM wa_cols.
              ENDIF.
    endcase.
    Endloop.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • How to EDIT a particular Row in ALV using normal function module Reuse_alv_grid_display

    Hi experts..
    i got one requirement like i need to edit some rows particularly in alv....
    Edit in alv output....is it possible to get  that .....using normal function module with out using oops concept...
    could any one pls help me...

    Hi Pendurti ,
    If you want a particular field to be editable , simply define the fieldcatalog as
    wa_fieldcatalog-edit          = 'X'.
    wa_fieldcatalog-input         = 'X'.
    for that field.
    and
    Now when you use FM ' Reuse alv grid display '
    define USER_COMMAND
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = v_repid
          i_callback_pf_status_set = 'SET_PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND'
          it_fieldcat              = int_fieldcatalog
          is_layout                = wa_layout
        TABLES
          t_outtab                 = t_disp.
    and now in form USER_COMMAND ; code as per following
    FORM user_command  USING r_ucomm LIKE sy-ucomm
                                rs_selfield TYPE slis_selfield.
         DATA ref1 TYPE REF TO cl_gui_alv_grid.
         CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
           IMPORTING
             e_grid = ref1.
         CALL METHOD ref1->check_changed_data.
    endform.
    Regards,
    Yogendra Bhaskar

  • How to highlight a single row in the Table components

    Hi,
    I am trying to do the following :
    1) Select a staff member's name from a dropdown list
    2) click on dropdown.name and show all the projects the member is working in a Table1
    3) when clicked on the project in Table1, show all team members of selected project in Table2.
    I would like to highlight the original staff member's name in Table2. Any ideas how I should go about doing it ? I tried the setSelected() method, but this selects all rows.
    TIA

    Winston has a blog on that topic:
    http://blogs.sun.com/roller/page/winston?entry=setting_table_column_style
    Lark

  • How to make a particular cell of the table font different?

    hi friends,
    i have a table. i wanted the (only)last row data to be displayed in the bold font.
    is it possible?
    help needed urgently
    regards,
    Deepa Raghuraman

    class BoldTableCellRenderer extends DefaultTableCellRenderer {
      public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected,boolean hasFocus,int row,int column) {
        Component c = super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
        if (row == table.getRowCount() -1) {
          Font f = UIManager.getFont("Table.font");
          c.setFont(new Font(f.getFontName(),Font.BOLD,f.getSize()));
        } else {
          c.setFont(UIManager.getFont("Table.font");
        return c;
    }and then set this Renderer as your table renderer by
    table.setDefaultRenderer(Object.class,new BoldTableCellRenderer());Its untested and may have syntax errors (I haven't compiled it), but I hope it gives you an idea.

  • Locking a particular row in a table control

    Hi All,
    I have module pool program in which table control is used. I would like to know whether it is possible to lock a particular row in the table so that another person will not be able to edit it until the first user completes his work. It should be only for that particular record which is being currently edited in the table.

    Hi,
      Yes you can lock particular row in a table control..
      In the flow logic..
    PROCESS BEFORE OUTPUT.
      LOOP AT itab INTO wa WITH CONTROL tc.
         MODULE disable_row.
      ENDLOOP.
      MODULE disable_row.
    * call the Enqueue function module..If the
        IF sy-subrc NE 0.
          LOOP AT screen.
               SCREEN-INPUT = 0.    " Disable for input
               MODIFY SCREEN.
          ENDLOOP.
       ENDIF.
      ENDMODULE.
    Thanks
    Naren

  • Problems with Click a row in the Table

    Dear All,
    I am new to Java GUI. I got some problems with clicking the row in a table.
    My table allows the user to delete some rows fromt the table. When the user click a row or some rows in my table, the delete button should be enabled. It does work in most of the time. But sometimes, even the row being hight lighted, the button is still not enabled.
    Do you have any idea for what can cause this problem?
    What I did is :
    1. add a mouse listener to the table
    _userTable.addMouseListener(new java.awt.event.MouseAdapter()
    public void mouseClicked(MouseEvent e)
    userList_mouseClicked(e);
    2. then, if the row being selected is > 0, I will enable my delete button.
    Can anybody help?
    Thanks!

    Dear All,
    I am getting problems with single selection in a table. Although I have set the selection model to single, if I select a row int the table and then depress Ctrl/Shift multiple rows are selected.
    The code for set single selection is :
    ListSelectionModel seleModel = myTable.getSelectionModel();
    seleModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    Any idea about this? Is this a bug in JAVA?
    Thanks!

  • How to display particular ROW of a table control in display/change mode

    Hi,
    Can we make particular ROW in a table control display mode or editable mode depending upon the conditions?.
    Any inputs..
    Rgds,
    Lakshmiraj

    Hi,
    Yes it is possible. check the follwoing code for help.
    *&  Include           Z101954_ASSIGNMENT1I01
    *&      Module  VALIDATE_SALES_ORG  INPUT
          text
    MODULE validate_sales_org INPUT.
    SELECT SINGLE zvkorg FROM vbak INTO zvbak-zvkorg
    *WHERE zvbeln = zbookhdr-zvbeln.
    IF sy-subrc <> 0.
       MESSAGE 'INVALID AIRLINE ID INPUT' TYPE 'I'.
       CALL SCREEN 1000.
    ENDIF.
    ENDMODULE.                 " VALIDATE_SALES_ORG  INPUT
    *&      Module  USER_COMMAND_1001  INPUT
          text
    MODULE user_command_1001 INPUT.
      var3 = 1.
      IF sy-ucomm <> 'SAVE'.
        PERFORM material_check.
        IF sy-subrc <> 0.
          MESSAGE 'ENTER THE CORRECT MATERIAL NUMBER' TYPE 'I'.
        ELSE.
          SELECT SINGLE zmaktx zmeins zwaerk zstprs FROM zmara
            INTO CORRESPONDING FIELDS OF it_salesitems
             WHERE zmatnr = it_salesitems-zmatnr.
          SELECT SINGLE zwerks zlgort FROM zorg
            INTO CORRESPONDING FIELDS OF it_salesitems
            WHERE zvkorg = wa_salesorder-zvkorg
             AND zvtweg = wa_salesorder-zvtweg
             AND zspart = wa_salesorder-zspart.
          it_salesitems-znetwr = it_salesitems-zstprs * it_salesitems-zbrgew.
         MODIFY it_salesitems FROM it_salesitems  INDEX sy-tabix.
          MOVE-CORRESPONDING it_salesitems TO temp_salesitems.
          APPEND temp_salesitems.
          REFRESH it_salesitems.
        ENDIF.
      ENDIF.
    LOOP AT temp_salesitems.
      if it_salesitems-pick = 'X'.
               LOOP AT SCREEN.
             IF screen-name EQ 'DETAIL'.
               screen-input = 1.
               MODIFY SCREEN.
             ENDIF.
           ENDLOOP.
           endif.
           endloop.
      CASE sy-ucomm.
        WHEN 'SAVE'.
          PERFORM check_ship_to_party.
          IF sy-subrc <> 0.
            MESSAGE 'ENTER THE CORRECT SHIP TO PARTY ' TYPE 'I'.
          ELSE.
            PERFORM check_payer.
            IF sy-subrc <> 0.
              MESSAGE 'ENTER THE CORRECT PAYER' TYPE 'I'.
            ELSE.
              PERFORM check_bill_to_party.
              IF sy-subrc <> 0.
                MESSAGE 'ENTER THE CORRECT BILL TO PARTY' TYPE 'I'.
              ELSE.
                wa_salesorder-zernam = sy-uname.
                MOVE-CORRESPONDING wa_salesorder TO zvbak.
                MODIFY zvbak.
                LOOP AT it_salesitems.
                  it_salesitems-zvbeln = wa_salesorder-zvbeln.
                  MOVE-CORRESPONDING it_salesitems TO zvbap.
                  MODIFY zvbap.
                ENDLOOP.
                IF sy-subrc = 0.
                  MESSAGE 'THE DATA IS SAVED SUCCESSFULLY' TYPE 'I'.
                  CLEAR wa_salesorder.
                  REFRESH it_salesitems.
                  REFRESH temp_salesitems.
                  IF sy-tcode = 'ZVA01'.
                    CALL SCREEN '1000'.
                  ELSE.
                    CALL SCREEN '1003'.
                  ENDIF.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        WHEN 'DETAIL'.
          CALL SCREEN '1002'.
        WHEN 'BACK'.
          IF sy-tcode = 'ZVA03'.
            CLEAR wa_salesorder.
            CALL SCREEN '1003'.
          ELSE.
            PERFORM pop_up.
          ENDIF.
        WHEN 'EXIT'.
          IF sy-tcode = 'ZVA03'.
            LEAVE PROGRAM.
          ELSE.
            PERFORM pop_up.
          ENDIF.
        WHEN 'CANCEL'.
          IF sy-tcode = 'ZVA03'.
            CLEAR wa_salesorder.
            CALL SCREEN '1003'.
          ELSE.
            PERFORM pop_up.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_1001  INPUT
    *&      Module  input_help_sold_to_party  INPUT
          text
    MODULE input_help_sold_to_party INPUT.
      SELECT zkunag FROM zvbak INTO CORRESPONDING FIELDS OF TABLE
        itab.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          retfield               = 'ZKUNAG'
      PVALKEY                = ' '
         dynpprog               = sy-cprog
         dynpnr                 = '1000'
         dynprofield            = 'ZKUNAG'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
         value_org              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
        TABLES
          value_tab              = itab
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " input_help_sold_to_party  INPUT
    *&      Form  pop_up
          text
    -->  p1        text
    <--  p2        text
    FORM pop_up .
      CALL FUNCTION 'POPUP_TO_CONFIRM'
        EXPORTING
      TITLEBAR                    = ' '
      DIAGNOSE_OBJECT             = ' '
          text_question               = 'DO YOU WANT TO SAVE THE ORDER?'
         text_button_1               = 'YES'(001)
         icon_button_1               = ' '
         text_button_2               = 'No'(002)
         icon_button_2               = ' '
         default_button              = '1'
         display_cancel_button       = 'X'
         userdefined_f1_help         = ' '
      START_COLUMN                = 25
      START_ROW                   = 6
      POPUP_TYPE                  =
      IV_QUICKINFO_BUTTON_1       = ' '
      IV_QUICKINFO_BUTTON_2       = ' '
    IMPORTING
         answer                      = ans
    TABLES
      PARAMETER                   =
    EXCEPTIONS
      TEXT_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.
      CASE ans.
        WHEN '001'.
          PERFORM check_ship_to_party.
          IF sy-subrc <> 0.
            MESSAGE 'ENTER THE CORRECT SHIP TO PARTY ' TYPE 'I'.
          ELSE.
            PERFORM check_payer.
            IF sy-subrc <> 0.
              MESSAGE 'ENTER THE CORRECT PAYER' TYPE 'I'.
            ELSE.
              PERFORM check_bill_to_party.
              IF sy-subrc <> 0.
                MESSAGE 'ENTER THE CORRECT BILL TO PARTY' TYPE 'I'.
              ELSE.
                wa_salesorder-zernam = sy-uname.
                MOVE-CORRESPONDING wa_salesorder TO zvbak.
                MODIFY zvbak_101954.
                temp_salesitems-zvbeln = wa_salesorder-zvbeln.
                MOVE-CORRESPONDING temp_salesitems TO zvbap.
                MODIFY zvbap.
                IF sy-subrc = 0.
                  MESSAGE 'THE DATA IS SAVED SUCCESSFULLY' TYPE 'I'.
                  CLEAR wa_salesorder.
                  REFRESH it_salesitems.
                  REFRESH temp_salesitems.
                  IF sy-ucomm = 'EXIT'.
                    LEAVE PROGRAM.
                  ENDIF.
                  IF sy-tcode = 'ZVA01'.
                    CALL SCREEN '1000'.
                  ELSE.
                    CALL SCREEN '1003'.
                  ENDIF.
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        WHEN '002'.
          IF sy-tcode = 'ZVA01'.
            CLEAR wa_salesorder.
            REFRESH it_salesitems.
            REFRESH temp_salesitems.
            CALL SCREEN '1000'.
          ELSE.
            CLEAR wa_salesorder.
            REFRESH it_salesitems.
            REFRESH temp_salesitems.
            CALL SCREEN '1003'.
            CLEAR ans.
          ENDIF.
      ENDCASE.
    ENDFORM.                    " pop_up
    *&      Module  USER_COMMAND_1002  INPUT
          text
    MODULE user_command_1002 INPUT.
    IF sy-datar = 'X'.
       PERFORM material_check.
       IF sy-subrc <> 0.
         MESSAGE 'ENTER THE CORRECT MATERIAL' TYPE 'I'.
       ELSE.
         SELECT SINGLE zmaktx zmeins zwaerk zstprs FROM zmara_101954
         INTO CORRESPONDING FIELDS OF wa_salesitems
           WHERE zmatnr = wa_salesitems-zmatnr.
         wa_salesitems-znetwr =  wa_salesitems-zstprs * wa_salesitems-zbrgew.
       ENDIF.
       var = 1.
    ENDIF.
      IF sy-ucomm = 'BACK'.
        LOOP AT temp_salesitems.
          MODIFY temp_salesitems FROM wa_salesitems .
        ENDLOOP.
        it_salesitems-pick = ' '.
        CALL SCREEN '1001'.
      ENDIF.
    ENDMODULE.                 " USER_COMMAND_1002  INPUT
    *&      Module  USER_COMMAND_1000  INPUT
          text
    MODULE user_command_1000 INPUT.
      CASE sy-ucomm.
        WHEN 'NEXT'.
          SELECT * FROM zt001k_101954 INTO CORRESPONDING FIELDS OF
            temp_salesorder WHERE
            zvkorg = wa_salesorder-zvkorg AND
            zvtweg = wa_salesorder-zvtweg AND
            zspart = wa_salesorder-zspart.
          ENDSELECT.
          IF sy-subrc = 0.
            CALL SCREEN '1001'.
          ELSE.
            MESSAGE 'Invalid Data Entered' TYPE 'I'.
            CALL SCREEN '1000'.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_1000  INPUT
    *&      Module  USER_COMMAND_1003  INPUT
          text
    MODULE user_command_1003 INPUT.
      IF sy-ucomm = 'NEXT'.
       IF sy-datar = ' '.
         MESSAGE 'ENTER PURCHASE ORDER NUMBER' TYPE 'I'.
         CALL SCREEN 1000.
        IF NOT wa_salesorder-zvbeln CO '0123456789'.
          MESSAGE 'PURCHASE ORDER NUMBER IS NOT IN THE EXPECTED FORMAT' TYPE 'I'.
          CALL SCREEN '1003'.
        ENDIF.
        var3 = 0.
        CALL SCREEN '1001'.
      ENDIF.
    ENDMODULE.                 " USER_COMMAND_1003  INPUT
    *&      Module  input_help_sales_order  INPUT
          text
    MODULE input_help_sales_order INPUT.
      SELECT zvbeln FROM zvbak_101954 INTO CORRESPONDING FIELDS OF TABLE
      itab1.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          retfield               = 'ZVBELN'
      PVALKEY                = ' '
         dynpprog               = sy-cprog
         dynpnr                 = '1003'
         dynprofield            = 'ZVBELN'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
         value_org              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
        TABLES
          value_tab              = itab1
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " input_help_sales_order  INPUT
    *&      Module  back_command  INPUT
          text
    module back_command input.
    *if sy-ucomm = 'SAVE' OR 'BACK' OR 'DETAIL' OR 'EXIT' OR 'CANCEL'.
    *endif.
    endmodule.                 " back_command  INPUT
    Regards
    Rajesh Kumar

  • How to add A single row at the middle of the table in a Webi report

    Hi,
         I created a Webi report using Universe(Created universe using bex query).Now i have a requirement to display a row at the middle of a report. Can you please tell me ,how to add a sigle row at the middle of a Webi report.
                                                    Thanks in advance
    Regards
    Monika

    Hi Monika,
    It is not really possible to add a row (I assume you mean of unrelated data) to the middle of a table in a report. You can add a new table with a single row between two tables. For instance you could add a new one row table, or even single cells which are positioned relatively between two tables. Possibly a block on top of another. But this gets tricky.
    Can you explain in more detail what you are trying to do?
    Thanks

  • How to set fire action event for particular rows in a table

    HI All,
    I have a requirement in which I want to set fire action event for particular rows in a table based on some condition.
    The table has columns like fullname,employee id etc.
    So i want to set fire action event for particulars rows only which will saisfy some condition.

    Atanu,
    Your approach(setting fire action for few rows) seems not possible. Better to go ahead with workaround.
    Do you want this functionality in processRequest(while page loading) or processFromRequest(on some event) method ? Give more explanation regd. your requirement ?
    In either case loop through the rows and when your condition is met write the action to be performed in controller.
    Regards,
    Anand

  • How to Update Particular row in a table from OAF page

    Hi Can anyone please help me on the following requirement:
    In my oaf page i am displaying table values(supplier site details from base tables) with update and delete icons . When i click on update button a new page opens in which we used to update the values and click on apply button which again comes back to the original page.
    So when i click on apply button on update page i have to first search for the site in the site table whether it exists or not, if not exists i have to create a new row and save the data, if site exists in the table i have to update the row of a table for that particular site. I have written code for this but unable to achive the requirement, it is not updating the existing row of the table. And i am doing all this on the Temp tables.
    So now when i save, previous transaction is also updating along with the current transaction. That means when i m trying to save 2nd transaction values , 1st transactions values are getting updated with the 2nd transaction values(2 rows are getting updated)
    Can anyone help me with the code used for updating the current row of the table. Please correct me if i m doing anyting wrong in code.
    following is the current code i m using and which is failing :
    Controller Code
    if(pcontactaction.equals("createECdetailsEvent")) {
    String currentSiteName=pageContext.getParameter("SiteName");
    System.out.println("Selected Site Name is : " + currentSiteName);
    Serializable x[]={reqNum,suppId,currentSiteName,pnotifMethod,pfaxNum};
    System.out.println("Invoking AM Method.........");
    am.invokeMethod("initCreateECDetails",x);
    System.out.println("initCreateECDetails Method Executed. ");
    //am.invokeMethod("save");
    localOAApplicationModule.getTransaction().commit();
    pageContext.setForwardURL(
    "OA.jsp?page=/oracle/apps/floaf/flpos/supregister/webui/ECDetailsPG"
    , null //not needed as we are retaining menu context
    ,OAWebBeanConstants.KEEP_MENU_CONTEXT
    , null //not needed as we are retaining menu context
    ,null // no parameters are needed
    ,true //retain AM
    ,OAWebBeanConstants.ADD_BREAD_CRUMB_NO
    ,OAWebBeanConstants.IGNORE_MESSAGES);
    AM Code
    public void initUpdateECDetails(String request_number,String supplier_id,String site_name,String site_id,String notification_method,String fax_number)
    OADBTransaction localOADBTransaction = getOADBTransaction();
    String siteToUpdate;
    siteToUpdate=site_name;
    String siteidToUpdate;
    siteidToUpdate=site_id;
    System.out.println("Site Name to Update or Create is : " + siteToUpdate);
    System.out.println("Site Id to Update or Create is : " + siteidToUpdate);
    System.out.println("Inside Update EC Details MEthod.");
    OAViewObject suppSiteDetVO = getFLPOSSuppSiteDetailsVO1();
    FLPOSSuppSiteDetailsVORowImpl sro=null;
    String existingWhereClause = suppSiteDetVO.getWhereClause();
    suppSiteDetVO.setWhereClause(null);
    suppSiteDetVO.setWhereClauseParams(null);
    suppSiteDetVO.setWhereClause("SUPPLIER_ID = :1 AND REQUEST_NUMBER = :2 AND SITE_ID = :3 ");
    suppSiteDetVO.setWhereClauseParam(0, supplier_id);
    suppSiteDetVO.setWhereClauseParam(1, request_number);
    suppSiteDetVO.setWhereClauseParam(2, site_id);
    suppSiteDetVO.executeQuery();
    suppSiteDetVO.setWhereClauseParams(null);
    suppSiteDetVO.setWhereClause(existingWhereClause);
    int rowcount = suppSiteDetVO.getRowCount();
    System.out.println("Fetched Rows : " + rowcount);
    if (rowcount == 0) {
    Row row = suppSiteDetVO.createRow();
    System.out.println("Row is : " +row);
    suppSiteDetVO.insertRow(row);
    String siteId = getOADBTransaction().getSequenceValue("FLPOS_SITE_ID_SEQ").toString();
    System.out.println("New Site ID : " + siteId);
    row.setNewRowState(Row.STATUS_INITIALIZED);
    row.setAttribute("RequestNumber", request_number);
    row.setAttribute("SupplierId", supplier_id);
    row.setAttribute("SiteName", site_name);
    row.setAttribute("SiteId", siteId);
    row.setAttribute("FaxNo",fax_number);
    row.setAttribute("NotificationMethod",notification_method);
    System.out.println("New Row Created for Supplier Site.");
    System.out.println("Data Saved to table.");
    else{
    System.out.println("Inside Else Block ");
    try {
    System.out.println("Inside Try Block ");
    Row[] row = suppSiteDetVO.getAllRowsInRange();
    for (int i = 0; i < rowcount; i++) {
    sro = (FLPOSSuppSiteDetailsVORowImpl)row;
    String psiteName=sro.getSiteName();
    Number psiteid=sro.getSiteId();
    System.out.println(" p Site Name is : " +psiteName);
    System.out.println(" p site id is " +psiteid);
    if(psiteid.equals(siteidToUpdate) ) {
    sro.setAttribute("FaxNo",fax_number);
    sro.setAttribute("NotificationMethod",notification_method);
    //getOADBTransaction().commit();
    break;
    catch (Exception e) {
    System.out.println("Exception in update : " + e);
    }

    Please answer following:
    1. Are you using EO based VOs or ReadOnly VO?
    2. What is your VO Query for the search and update?
    3. Why have you based your logic on site_name; you should have used site_id?
    4.Are you getting correct site name in handling createECdetailsEvent event in CO?
    5. In case of update are you getting correct values on the Update Site Details?
    6. On coming back from Update page to Supplier Site Search page, do you see old values of the site or the new values in the results table?
    Please share the screenshot if possible.
    -Prince
    [email protected]
    http://princekapoor82.blogspot.com

Maybe you are looking for