How to get current row data in table control

Hi , expert ,
   I am professional in oracle ,  but  now I am a new guy in SAP ABAP .
I  have a question in UI
How to get current row data and click pushbutton  in table control  to open next screen ?
I want to get the current data and open next screen to carry out detail detail .
Thansk for all your suggestion .

GET CURSOR LINE SY-CUROW .
  READ TABLE internal_table index SY-CUROW.

Similar Messages

  • How to get current row value from table when press the submit button

    Hi,
    I want to get the current row value of SuccessionPlanId which is one of the column in a advanced table.
    I created one button (created using personalization, action fired thru CO)in the table as column, so each row having one button, if i press the first row's button means then i want to fetch the first row's SuccessionPlanId and if it is 3rd means then i want to get the value of third row's value.
    How to do it in controller extension?
    Please reply soon, its urgent.
    Thanks in advance,
    SAN

    Pratap,
    Yes, I tried with 'delete' button which is seeded one.
    For this, our code using row reference is working too fine. it throws exact SuccessionPlanId value of corresponding row.
    I created MessageStyledText, but here i need to give text value right, then only it 'll appear in the page.
    Instead i created one image and fired explicitly from the controller processRequest method.
    But the same problem remains..
    here my code:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean){
    super.processRequest(pageContext, webBean);
    OAButtonBean oabb = (OAButtonBean)webBean.findChildRecursive("XXSubmit");
    FireAction action = new FireAction("XXSubmit");
    oabb.setAttributeValue(UIConstants.PRIMARY_CLIENT_ACTION_ATTR, action);
    OAImageBean oaib=(OAImageBean)webBean.findChildRecursive("XXSubmitImage");
    oaib.setFireActionForSubmit("XXSubmitImage", null, null, true);
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean){
    if("XXSubmitImage".equals(pageContext.getParameter("event"))){
    String succIdI="";
    String rowRefI = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    if(rowRefI != null && !("".equalsIgnoreCase(rowRefI ))){
    PerSuccPlanSearchVORowImpl rowI = (PerSuccPlanSearchVORowImpl)oaam.findRowByRef(rowRefI);
    if(rowI != null)
    succIdI=rowI.getAttribute("SuccessionPlanId").toString();
    }else{
    throw new OAException("Row is null");
    throw new OAException(succIdI, OAException.INFORMATION);
    }else{
    super.processFormRequest(pageContext, webBean);
    If i run the page using this controller, it throws exception without any value, because for 'succIdI' i initialized without any string.
    Can you please suggest me how to solve?

  • How to get current row of Advanced table with no submit

    I have an advanced table with an 'Add another button'. When an empty row is created by clicking this button, LOV is used on the first column to populate other fields of the row. The rows of the table carry a button called "Add dependencies" whose functionality is to take the user to a different table to add rows to a different VO. This button is just a button and not a submitButton. I am passing the row's primary key as part of the URI as Vo attribute FdTaskId={@FdTaskId}
    The button works perfectly fine for database fetched rows (rows already present in the database), but, for the rows created using 'Add Another button', though LOV populates all fields including the primary key, the URI parameter passes null to the next page. That means, the VO attribute is not set. This works fine only when a 'submit' happens in the first page. For example, if I click Add another row again, then the previously inserted row passes the primary key fine as part of {@FdTaskId}.
    Could you please help me how I can resolve this issue?
    Thanks,
    Datta

    I am doing exactly that. My issues is that, VO attribute is passed correct for the table rows which are fetched from the database. For the table rows which got created through 'Add Another button', the VO attribute passed through URI as {@FdTaskId} is returning null. The VO attribute sets only when a form submit happens. For example, after adding a row through 'Add another row' button, click the same button again to add one more row and now go back to previously added row and now you can see that its VO attribute is set ({@FdTaskId} carries value )

  • How to get current row from advanced table

    Hi,
    I have the following code to pick the value of columnA from one of the columns of an advanced table:
    OAViewObject vo = (OAViewObject)am.findViewObject("AAALineVO2");
    if (vo != null)
    OARow vorow = (OARow)vo.getCurrentRow();
    String ColA = (String)vorow.getAttribute("ColumnA");
    String message = ColA; //to throw message so i can verify the value of ColumnA
    throw new OAException(message, OAException.INFORMATION);
    }It's picking up the first value of ColumnA of the first record correctly, however when I add a new row, it's not picking up the value of columnA anymore.
    What am I doing wrong?
    Thanks in advance,
    N

    Try with this:
    import oracle.apps.fnd.lookups.server.LookupCodeVORowImpl;
    public void aaa (String row)
        LookupCodeVORowImpl laborcreateeovorowimpl = (LookupCodeVORowImpl)findRowByRef(row);
    }Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to get Current row of ViewObject in the DoDML methode

    Hi all
    I have two ViewObject EmplyesView and DeptView
    How to get Current row of ViewObject DeptView in the DoDML methode of EmplyesView

    OK, we can play this game on and on...
    I'll ask for a use case (http://en.wikipedia.org/wiki/Use_case) and you don't give any info we don't already know. After an other 10 posts we probably know what you real problem is and can give you the advice which you could have gotten in the fist place.
    So please take some time and describe the problem as if you would ask your mother for help. Tell us how the data model is build and how the VO are related. Is there any input from an user involved? Which information from the other view do you need? How do you get to the doDML method? Is there a button in the ui involved?
    Timo

  • How to get selected row data of an ADF table in HashMap?

    Hi,
    Can anyone please tell me how to selected row data of an ADF table in HashMap like :
    Object obj = pageTable.getSelectedRowData();
    JUCtrlHierNodeBinding rowData = (JUCtrlHierNodeBinding)obj;
    Now in above code I want the convert rowData in HashMap.
    Can anyone please tell me how to do that? Its urgent.
    Thanks,
    Vik

    Vik,
    No need to ask the same question 3 times...
    In [url http://forums.oracle.com/forums/message.jspa?messageID=4590586]this post, Nick showed you how to get the Row.
    If it were so urgent, you could have done a little reading of the javadocs to come up with code like this (not tested, up to you to do that)
    HashMap m = new HashMap();
    Row r = get it like Nick showed you to;
    Object values[]=r.getAttributeValues();
    String names[]=r.getAttributeNames();
    for (int i=0; i<r.getAttributeCount(); i++)
    m.put(names, values[i]);

  • How to get  current row(Based on Radio button check)  submit button Click

    Hi i hava Query Region Search(Based On Auto Customization Criteria).
    For Showing Results iam Using Table Region.
    Using Radio button How we get the row reference value using Submit button Click.
    Please Help on this .
    Thanks & Regards
    San

    Hi san ,
    Try this
    if ("EventID".equals(pageContext.getParameter(EVENT_PARAM)))
    String rowRef = pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
    OARow row = (OARow)am.findRowByRef(rowRef);
    VORowImpl lineRow = (YourVORowImpl)findRowByRef(rowRef); // Replace your vo name .
    Please refer this link , Let me know if its not clear .
    Single Selection in table Region in OAF .
    Keerthi

  • How to get Current Row values in Af:ForEach

    Hi,
    We have a requirement to conditionally Display/Hide CommandLink item in af:forEach Loop.
    <af:forEach items="#{bindings.RegionalAreaPVO.rangeSet}" var="parent">
    <af:spacer height="10" id="s1"/>
    <af:commandLink inlineStyle="font-weight:bold;" text="#{parent.ItemName}" partialSubmit="true" actionListener="#{backingBeanScope.RegionalAreaBean.launchTaskflow}" id="cl1" rendered="*#{backingBeanScope.XXWFCRegionalAreaBean.modelEligibleflag eq true}*">
    <af:setActionListener from="#{parent.Code}" to="#{parentNode}"/>
    </af:commandLink>
    </af:forEach>
    I have added a Cutom Managed Bean Class and Returning boolean value to Control Render property which is working. But now i want to add business Logic based on 'parent.ItemName' or 'parentNode' Values in the bean method to return proper Boolean value.
    But i am unable to get the Current Iteration values in the bean method.
    I am using below EL expressions to get the values. But no luck.
    String nameel = (String)ADFUtil.evaluateEL("#{bindings.parent.ItemName}");
    String codeel = (String)ADFUtil.evaluateEL("#{parent.Code}");
    String nodeEl = (String)ADFUtil.evaluateEL("#{parentNode}");
    Also, i have tried getting the Row object like below but i am getting the First row details always. My intention is to get Current row values and use them for Business logic.
    ViewRowImpl row =
    (ViewRowImpl)ADFUtil.evaluateEL("#{bindings." + VoName +
    "Iterator.currentRow}");
    String code = (String)row.getAttribute("Code");
    Any help is highly appreciated.
    Thanks
    Kaja

    Hi Sascha,
    I have tried that. But in my case the functional logic behind the Rendering is based on more complex logic. Hence i am trying to add a method to return a boolean in Render property of the Link.
    But the real problem for me is, in the Managed bean method i am not finding a way to get the Current Iteration index. If i can get the Current iteration index, i can get the Corresponding Component ID of Command link (In the forEach Loop Component Id's are getting generated Dynamically based on Iteration Index), i can use that and add additional logic and derive true/false to return.
    Any inputs?
    Thanks
    Kaja

  • 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 get checked rows data from a table?

    Hai
    For displaying a check box in my table in jspx page,I created a transient Attribute , sel and select type as Boolean.Then When i drag and drop the viewObject in to my jspx page.The table cantain id,Name,Designation,Salary,sel
    Then i deleted the binding in the sel column,and drop a Select Boolean checkBox in to that column.Then in the property inspector i bind the value as #{row.sel} for checkbox..
    In my table suppose there are 5 rows..I checked only 3 of them.When i pressed a button,the corresponding id 's should be fetched from the checked rows in the table and i want to show some more details corresponding to that id 's in to another table in the jspx page.I am using jdev 11

    Hi,
    So if I get you correct this time, you do not want to select the rows by clicking on the table row but rather by selecting the checkbox you created. Correct? Sorry, the earlier confusion is due to me "thinking in Trinidad". Anyway, you can then set the table's rowSelection as None, since you won't be selecting the row that way. Try the code below.
    public String doSomething() {
        List<Row> rows = getAllRows(getTable1());
        for (Row row : rows) {
            if ((Boolean)row.getAttribute("sel")) {   // Check if it's true which (should) indicate the checkbox as being selected
                System.out.println(row.getAttribute("id"));   // Your selected id based on the checkbox you selected.
    public List<Row> getAllRows(RichTable table) {
        List<Row> rowList = new ArrayList<Row>();
        Row row = null;
        FacesCtrlHierNodeBinding rwData = null;
        int total = table.getRowCount();
        for (int i = 0; i < total; i++)  {
            rwData = (FacesCtrlHierNodeBinding)table.getRowData(i);
            if (rwData != null) {
                row = rwData.getRow();
                rowList.add(row);
        return rowList;
    }Some points to take note. The getAllRows method loops through the whole VO. So if you have 10,000 rows, it loops 10,000 times. If you are dealing with large records and/or want to optimize the code, you'll need to loop through the "displayed rows" only. For that, you'll need to tweak the code.
    Regards,
    Chan Kelwin

  • In badi ME_PROCESS_PO_CUST how to get preivious row value from table ctrl?

    hi Friends,
    I am Using ME_PROCESS_PO_CUST badi for validation in Purchase oreder (ME21N),
    For that I implementaed PROCESS_ITEM method which fires during each row now i want to add another validation in same implimentation for that i need privious row's value so how to get that value ?
    following is my current validation code. 
    method IF_EX_ME_PROCESS_PO_CUST~PROCESS_ITEM.
      DATA:ls_poitem TYPE mepoitem.
      DATA:ls_poheader TYPE MEPOHEADER.
      DATA:lm_poheader TYPE ref to IF_PURCHASE_ORDER_MM.
      DATA:w_mara TYPE mara.
      DATA:IT_ZMMTBL039 TYPE STANDARD TABLE OF ZMMTBL039 ,
           WA_ZMMTBL039 TYPE ZMMTBL039 .
      DATA:ls_poitem1 TYPE mepoitem.
      DATA:V_KUNNR1 TYPE KNA1-KUNNR.
      DATA:V_KUNNR2 TYPE KNA1-KUNNR.
      ls_poitem = im_item->get_data( ).
      lm_poheader = im_item->GET_HEADER( ).
      ls_poheader = lm_poheader->GET_DATA( ).
      CLEAR: WA_ZMMTBL039,w_mara.
      REFRESH:IT_ZMMTBL039[] .
      SELECT *
        INTO  TABLE  IT_ZMMTBL039
        FROM ZMMTBL039
       WHERE bsart EQ ls_poheader-bsart.
      IF sy-subrc EQ 0.
        CLEAR: WA_ZMMTBL039,w_mara.
        SELECT SINGLE *
          INTO w_mara
          FROM mara
         WHERE matnr EQ ls_poitem-MATNR.
        IF SY-SUBRC EQ 0.
          READ TABLE IT_ZMMTBL039 INTO WA_ZMMTBL039 WITH KEY  bsart = ls_poheader-bsart
                                                              mtart = w_mara-mtart
                                                              spart = w_mara-spart.

    Hello
    If you had searched the SDN forums you would have found plenty of answers to your question.
    Following is some sample coding:
    method IF_EX_ME_PROCESS_PO_CUST~POST.
    DATA:
        ls_header TYPE mepoheader,
      lt_items   TYPE purchase_order_items,
      ls_item   TYPE purchase_order_item,
      ls_item TYPE mepoitem.
      ls_header = im_header->get_data( ).
      lt_items = im_header->get_items( ).
      LOOP AT items INTO ls_item.
        ls_item = line_item-item->getdata( ).
        " process item data...
      ENDLOOP.
    ENDMETHOD.
    Regards,
      Uwe
    PS: Do not use such kind of pseudonyms instead of your real name. Because my impression is that a nobody (in term of ABAP development competence) tries to claim to be a somebody who fills his knowledge gaps via SDN. Using pseudonyms significantly decreases your changes to get any answers at the SDN forums.

  • Pass current row data from table and pass it to a method in AM

    Hi All,
    I have a table with row selection enabled. Also for each row I have a select image which on selection should pass the data from one of the columns of the current row selected to a method in AM.
    Can anybody let me know on "How on selection of the image in any row, can I pass the column data to the method in AM?".
    Thanks,
    Vijay

    Hi,
    the most easiest and straight forward approach is
    - Ckick the "Binding" tab at the bottom of the Visual Editor
    - In the Bindings section click teh green plus icon and choose Generic Bindings | Attribute Value
    - point the iterator selection to the iterator used by the table
    - choose the column's attribute name from the list of attributes
    - Create a method on the ApplicatioNModule IMPL class (should take single argument)
    - expose it as a client interfaces so it shows in the Data Controls panel
    - In the "Binding" tab, create a method binding for this exposed method
    - point the method binding argument to #{bindings.column-attribute-name.inptValue}
    So whenever you need to pass the value on to the AM, you just call the method binding
    OperationBinding oper = (OperationBinding) bindings.get("name of method");
    oper.execute();
    Frank

  • How to get Current Row information

    Hi,
    Actually i have an lov item and when user enters some value in the lov and just tabs out the process request method on the lov region is fired. Now the lov item is in a advance table and table has lets say 5 rows.
    Now the user enters some invalid value in lov item of say 3 row and tabs out of the lov. As a result the lov popup gets enabled and process request at the lov region is called.
    Now my requirement is in the process request of lov region i want to get hold of the current row of view object.
    I have attached a controller at the lov region and i have put system.out.println at process request method.
    The control is going there, now when i grab the VO and do getCurrentRow() it doesn't return anything.
    Actually i know that we can capture the tab out event using pageContext.islovevent but it gets fired only for valid values in lov input. for invalid values process request is called at the lov region.
    Kindly put some light on it.
    Thanks,
    Gaurav Sharma

    Actually, when the user tabs out of the lov then if there's a valid value in lov then lovValidate event is fired and lov is not popped up. But for invalid values lovvalidate event is not getting fired but control goes to the process request of lov region.
    My requirement is that i have two lovs in an advance table region . one for Country and one for State.
    Now i want that as the user enters some value in State lov and tabs out then as the lov gets popped up then it should pick up the value in Country LOV and based on that Country it should display the results for the current row as there may be multiple rows on advance table.
    Now there are two things, when user clicks on lov torch on state then lov prepare event is fired and then i am able to grab the the country for the current row using row reference.
    But when user enters some invalid value in state lov and tabs out then no event is fired, rather than this process request is called at the lov region . Now how can i capture the value in Country lov of current row.
    Thanks,
    Gaurav
    Edited by: [email protected] on May 21, 2009 4:59 AM

  • How to get Current Row in POV of a screen

    hi ,
    On F4 of a field in a screen in POV, i need to fetch some details based on some other fields in the same row. How can i get the row number??
    Thanks

    Hi Radhika,
    Try this way. Let me know if you get any doubt .
    *  MODULE f4_on_tablecontrol OUTPUT
    MODULE f4_on_tablecontrol OUTPUT.
      DATA: BEGIN OF it_marc OCCURS 0,
              matnr TYPE marc-matnr,
              werks TYPE marc-werks,
            END OF it_marc.
      DATA:it_dynpread TYPE TABLE OF dynpread,
           wa_dynpread LIKE LINE OF it_dynpread.
      DATA: it_return_tab TYPE ddshretval OCCURS 0,
            wa_return LIKE LINE OF it_return_tab.
      wa_dynpread-fieldname = 'ITAB-WERKS'.
      wa_dynpread-stepl     = tabc-current_line. "Where TABC is table control name.
      APPEND wa_dynpread TO it_dynpread.
      CLEAR  wa_dynpread.
      "DYNP_VALUES_READ read screen
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = sy-repid
          dynumb     = sy-dynnr
        TABLES
          dynpfields = it_dynpread.
      READ TABLE it_dynpread INTO wa_dynpread INDEX 1.
      p_werks = wa_dynpread-fieldvalue.
      IF it_marc[] IS INITIAL.
        SELECT * FROM marc INTO CORRESPONDING FIELDS OF TABLE it_marc WHERE werks = p_werks.
      ENDIF.
      "F4 help F4IF_INT_TABLE_VALUE_REQUEST
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'MATNR'
          dynpprog    = sy-repid
          dynpnr      = sy-dynnr
          dynprofield = 'ITAB-MATNR'
          value_org   = 'S'
        TABLES
          value_tab   = it_marc
          return_tab  = it_return_tab.
      IF sy-subrc EQ 0.
        READ TABLE it_return_tab INTO wa_return INDEX 1.
        IF sy-subrc EQ 0.
          p_matnr = wa_return-fieldval.
        ENDIF.
      ENDIF.
    ENDMODULE.                    "f4_on_tablecontrol OUTPUT
    Thanks
    Venkat.O

  • How to get current row using submit button ?

    Hello Friends ,
    Is there any way i can capture the value of current row by submit button ?
    Here is my requirement , i have seeded OAF screen and it has table region one of the column has radio button , the existing
    functionality is when ever the radio button is selected and click on submit button ( submit button attached on top of the table region )
    other oaf page is getting opened .
    Now i wish to restrict the navigation based on some condition , but i don't know how to get the current row using submit button .
    Note : there is no Fire Action event for radio button column ? I dont' know how orale is selecting a specific row
    Any suggestion please ?
    Regards ,
    Vamsi

    Thanks sushant for your response ,
    Well i have tried your approch , i am not getting values for current row .
    if (pageContext.getParameter("paApply") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject localOAViewObject1 = (OAViewObject)am.findViewObject("ProjectDatesVO");
    if(localOAViewObject1!=null) {
    Row DateVoROw = localOAViewObject1.first();
    RowSetIterator iterator = localOAViewObject1.createRowSetIterator("iterator");
    iterator.setRangeStart(0);
    iterator.setRangeSize(localOAViewObject1.getRowCount());
    for(int i=0; i<iterator.getRowCount(); i++)
    DateVoROw=iterator.getRowAtRangeIndex(i);
    String vacancyValue= DateVoROw .getAttribute("vacancyname).toString();
    Could you please let me know where i am going wrong
    Thanks again ,
    Vamsi

Maybe you are looking for