Get value from table control

Hi Guys,
FYI, im having a table control with field Plant and Material. I have defaulted the <b>std search help</b> to field <u>Material</u> at the screen painter. Meaning system will call up the search help for Material once i press F4.
Since the search help for field Material is a collective search help, and there is a <u>Plant</u> field available for Material filtering. Thus i may need to get the Plant's value from of same row of the  table control to Populate into the Material's search help.
I have already tried to create a new module under the LOOP...ENDLOOP at PAI's flow logic. And try to use parameter id to set the value for plant, purpose is to populate it to Material's search help when i click F4 on material field. The problem is the new module that i coded under LOOP...ENDLOOP will never trigger when i click F4. Because there is NO event to trigger my module.
Other than the above, i tried to code it under POV. But it doesn't work as well, because there is more than 1 record under table control and i can not determine the during runtime which row of F4 for material being click.
Please comment on this above on how to solve the problem.
Thanks in advance.

Hi,
      You can call standard collective search help [say for Eg:<b>MAT1</b>] through Process on value-request event and set the paramenter id of Plant field before calling the funtion module <b>'HELP_START'</b>.Then we can get the materials specific to the PLANT in the corresponding row of the TABLE CONTROL.
To get which row of the table control is clicked use <b>Get Cursor Line</b> Statement as i mentioned below.
Flow logic:
PROCESS ON VALUE-REQUEST.
FIELD x_marc-matnr MODULE mat_shelp.
Module definition:
MODULE mat_shelp INPUT.
  DATA:v_help_info LIKE help_info,n TYPE i,
   it_dyselect LIKE TABLE OF dselc WITH HEADER LINE,
    it_dyvaltab LIKE TABLE OF dval WITH HEADER LINE.
  REFRESH it_dyselect.
  it_dyselect-fldname = 'MANDT'.
  it_dyselect-dyfldname = 'SY-MANDT'.
  APPEND it_dyselect.
  it_dyselect-fldname = 'MATNR'.
  it_dyselect-dyfldname = 'X_MARC-MATNR'.
  APPEND it_dyselect.
  v_help_info-call     =     'M'.
  v_help_info-object     =     'F'.
  v_help_info-program     =      sy-repid.    "'ZVIG_MOD_TABLE_CONTROL_1'.
  v_help_info-dynpro     =     sy-dynnr.    "'9001'.
v_help_info-tabname     =      'MARC'.
  v_help_info-fieldname = 'MATNR'.
  v_help_info-fieldtype     =  'CHAR'.
  v_help_info-keyword   =   'MATNR'.
  v_help_info-fieldlng = 18.
  v_help_info-fldvalue = ''.
  v_help_info-mcobj = 'MAT1'.
  v_help_info-spras = 'E'.
  v_help_info-menufunct = 'HC'.
  v_help_info-title =     'SAP'.
  v_help_info-dynprofld = 'X_MARC-MATNR'.     <b>----
> Give ur screen field name</b>
  v_help_info-tcode     =      sy-tcode.       "'ZTC1'.
  v_help_info-pfkey     =      'MEN'.
  v_help_info-docuid     =     'FE'.
  v_help_info-pov     =     'N'.
v_help_info-curow     =   '2'.
v_help_info-cucol     =  '1'.
  v_help_info-dynpprog = sy-repid.       " ZVIG_MOD_TABLE_CONTROL_1
  v_help_info-stepl     =   '1'.
  v_help_info-selectart = 'A'.
  GET CURSOR LINE n.
  READ TABLE it_marc INTO x_marc INDEX n.
  SET PARAMETER ID 'WRK' FIELD  X_MARC-WERKS .
  CALL FUNCTION 'HELP_START'
    EXPORTING
      help_infos         = v_help_info
    TABLES
      dynpselect         = it_dyselect
      dynpvaluetab       = it_dyvaltab           .
ENDMODULE.                 " mat_shelp  INPUT

Similar Messages

  • Deleting the values from table control

    HI,
    I need to remove the selected line from the Table control on my screen.
    The point is that the Internal table does not have any records,.
    for example in the Customer Create screen,
    while entering the bank details we will enter it in a tbale contraol.
    but the records doesnt exist in the database. but the record gets deleted from the table control only if we press delete button.
    please guide me.
    please note : I want to delete the record from Table Control on the screen and I dont have any corresponding database records..
    regards

    Hi..
    The solution to your problem - deleting values from table control.
    Here: it_wizard is the internal table which is holding the value of table control.
             wa_wizard is the work are of the internal table it_wizard.
             it_delete is the internal table which holds the deleted record of table control.
             wa_delete is the work area of the internal table it_delete
    Also here the field ZSEL is the character field which is used to select the entire record in the table control.
    LOOP AT it_wizard into wa_wizard WHERE zsel = 'X'.
           MOVE-CORRESPONDING wa_wizard TO wa_delete.
           APPEND wa_delete TO it_delete.
           delete table it_wizard from wa_wizard.
    DELETE  FROM zfin_goods WHERE ZFG = WA_delete-ZFG.
    ENDLOOP
    if sy-subrc eq 0.
    Message 'Delete Successful' type 'S'.
    endif.
    The above code will delete the record from both the table control.internal table and the database table.
    I think this will help you to great extent.
    Ward regards,
    Bhuvaneswari
    Edited by: BHUVANESWARI THIRUNAVUKKARASU on Jan 7, 2009 10:39 AM

  • Retrieving values from table control using DYNP_VALUES_READ

    Hi all,
    I am trying to retrieve the values from the table control using the FM DYNP_VALUES_READ. I have a situation where user enter values in table control in T.code FB60 in Withholding tab for validation purpose. There i'll have to check based on some entries maintained in SET.
    I am unable to get the values when i scroll to the next page in the table control. FM raising an exception invalid_dynprofield.
    Expecting reply...

    You have to populate the dynpfields internal table before calling the function,
    data: repid like sy-repid.
    dynpfields-fieldname = 'PNAME'.
    append dynpfields.
    repid = sy-repid.
    call function 'DYNP_VALUES_READ'
    exporting
    dyname = repid
    dynumb = sy-dynnr
    tables
    dynpfields = dynpfields
    exceptions
    others.
    read table dynpfields index 1.
    pname = dynpfields-fieldvalue.
    Now you will have the field value in pname
    Hope this helps
    Vinodh Balakrishnan

  • How to read the field value from Table Control

    Hello Experts,
    I am creating my first Table Control Screen. Basically I have to create a screen (102) with a table control which has 2 fields: A_QTY, B_QTY and 2 Buttons: SAVE, EXIT.
    When Clicked on 'SAVE' the data (MATNR) from a previous screen (101)  and the data (A_QTY, B_QTY) from the new screen (102) should be saved into a Z-table.
    Internal table t_data has 3 fields.
    MATNR
    A_QTY
    B_QTY.
    Table Control TC_RACK was declared like this:
    controls tc_rack type tableview using screen 0102.
    I/0 Fields:
    A_QTY type ZQTY.
    B_QTY type ZQTY.
    The screen Flow Logic:
    process before output.
    module status_0102.
      loop at t_data into w_data with control tc_rack.
      endloop.
    process after input.
      module exit_0102 at exit-command.
      loop at tc_rack.
      endloop.
    module user_command_0102.
    module status_0102output.
      set pf-status 'STATUS_102'.
      set titlebar 'TITLE_102'.
      describe table t_rack lines tc_rack-lines.
    endmodule.                 "status_0102 output
    process after input.
    module user_command_0615 input.
    case ok_code.
       when 'SAVE_RK'.
       when others.
    endcase.
    endmodule.                 "user_command_0102 input
    Now for eg, when the users enter values for A_QTY and B_QTY like this:
    A_QTY     B_QTY
    1000         2000
    3000         4000
    How can I read these values and pass them to T_DATA so that I can save it into Z-table?
    I greatly appreciate your help.
    I've gone through some previously posted threads and could not understand because my knowledge in this area is preliminary.
    Thanks a lot.
    Could you please let me know
    Edited by: dev a on Jan 13, 2010 2:46 PM

    Hi dev a
    You should use
      DATA: lv_name(30) TYPE c.
      FIELD-SYMBOLS: <QTY> type ZQTY.
    GET CURSOR FIELD lv_name.   "Get the field name in table control
    check sy-subrc = 0.
    assign  (lv_name) to <QTY>.  "Here you get the value in <QTY>
    check sy-subrc = 0.
    Also use <your table control>-current_line to get the table index uo're currently on.
    Hint: Do not use GET CURSOR LINE if you want to get table index since this gives you the line relative to dialog screen
    Good luck
    Dean Q.
    Edited by: Dean Q on Jan 13, 2010 11:11 PM

  • Get value from Table/Recordset Cell into a JSP variable

    Can anyone please help with this ?...
    I need to get a cell value from a selected row of a table into a variable to pass to a java bean.
    1 - The dynamic table is populated by a recordset named "rs" and has a submit button for each row .
    2 - The user clicks on the corresponding button to select the row.
    3 - The recordset retrieved the ID for that row in the query, but does not display it in the table.
    I have tried :
    <% String ID = rs.getString("bookid");%>
    <% Library.bookConfirm(ID);%>
    But this fails saying that it "cannot resolve variable rs..."
    Yet the recordset populates correctly and its name is "rs"
    Is there another way to do this perhaps ?... ie: put the id in a column of the table and get the cell value ?...
    What would be the syntax to get the ID cell value of that selected row on the button click ?...
    Your feed back would be greatly appreciated.
    Thank you.

    Create a new rs
    ResultSet rs1 = statement.executeQuery(query);
    and use getstring to access the individual cell.

  • Get value from table column

    Hi,
    I am new to OAF, I am trying to get the value from the table in order to make validation. I have the following PG:
    SearchResultsTableRN
    itemRow
    DetailsCell
    DetailsTableLayout
    ShortDescRow
    ShortDescCell
    ShortDesc
    LongDescRow
    LongDescCell
    LongDesc
    AttributesRow
    AttributesCell
    AttributesTableLayout
    Attributes1Row
    Attribute11Cell
    ect...
    Can anyone help me please in how to go into the table --> row --> column to retrieve the value from a specific column?
    If their is a document or example that can help I will appreciate it. Since I tried searching in devguide and didn't find any results.
    Note: I am extending the controller and reached till the following code:
    public void processFormRequest(OAPageContext oapageContext, OAWebBean webBean){
    super.processFormRequest(oapageContext, webBean);
    String event = oapageContext.getParameter("ShortDescRow");
    OATableBean advtable = (OATableBean)webBean.findChildRecursive("SearchResultsTableRN");
    OARowBean rowtbl = (OARowBean)advtable.findChildRecursive("DetailsCell");
    String message = "test:"+event+"|"+advtable+"|"+"|"+"|"+"|";
    throw new OAException(message, OAException.INFORMATION);
    Thanks and Regards
    Patrick

    Patrick,
    My first advice would be go through OAF guide and do tutorial examples, for such basic details.
    If ur talking about tablelayout region
    u can use pageContext.getParameter(<Item id of UIX bean whose value u want>);
    If you are talking about table
    You can Iterate through the VO based on primary key ...on which the table is based, and retrive the corresponding Vo attribute value.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Getting data from table control to the report program.

    Hi,
    I created a table control using report program and i am trying to enter data in the table control which i want to update in the DB table. How can i get the data entered in table control to the report program, so that i can update the DB table.
    Please help me finding out which variable will hold the data entered in table control(dynamically).

    hi,
    in your table control you give some name to that table control say it_cntrl.
    this only serves as the internal table to process the table control data.
    like u can write like this.
    loop at it_cntrl into wa_cntrl.   "wa_cntrl is work area of type it_cntrl table type
    .........        "do your functining
    end loop.
    any clarification get in touch
    thnks

  • Internal table not getting modified from Table Control

    Hi Guys,
    I am developing a <b>Module Pool </b>Program where I am inserting data directly in table control of the main screen.
    In the flow logic of the Table control I have written :
    PROCESS BEFORE OUTPUT.
      LOOP AT itab WITH CONTROL tc1 CURSOR tc1-current_line.
        MODULE read_data.
      ENDLOOP.
    MODULE status_0100.
    PROCESS AFTER INPUT.
      LOOP AT itab.
        MODULE mod_data.
      ENDLOOP.
    MODULE user_command_0100.
    Module mod_data input.
    MODIFY itab INDEX tc1-current_line.
    Endmodule.   
    At modify, when I am debugging it's showing sy-subrc = 4 (Entry not appending in Int Table though it is there in the header line). But, if I use append itab, it's working (Problem is that while inserting 2nd record a copy of first record is also appending which I don't want).
    Please let me know what's wrong in Modify statement or what is solution for inserting records of tablecontrol in internal table.
    TIA,
    Nitin

    Hi Nitin,
    use the following code wor module.
    Module mod_data input.
    READ ITAB INDEX TC1-CURRENT_LINE.
    IF SY-SUBRC = 0.
           MODIFY itab INDEX tc1-current_line.
    ELSE.
           APPEND ITAB.
    ENDIF.
    Endmodule.

  • Getting values From Table in method execute??

    Hi,
    I'm using JDEV 10.1.2 and UIX, i have a table with a singleSelection component.
    I'm trying to send the values of the selected row to an action, in the primaryClientAction property of the submitButton i'm adding an action parameter with the key value = CveConcept and the Value &{bindings.SrvCConceptosView1.CveConcepto}, in the execute method i'm getting the parameters using request.getParameter("CveConcepto"). The problem is that it seems that the value is saved in cache or something like that because when i select a diferent row, the value of the last row is sended, only by clicking two times the submitButton the correct selected parameter is sended.
    Am i doing this the correct way?
    Is there a different way to send table values to the execute method from a submitButton?
    I hope some one can help.
    Thank you.

    Wouldn't a more direct approach like so help out ? :-
    Once you have the table with the single selection component enabled. Within the execute method of your managed bean ( or any other method you refer to in the action tag ) , get hold of the view Object and simply doing a getCurrentRow , would get hold of the row with all the required attribute details.....
    Or am i understanding your requirement differently ?
    Cheers
    K

  • Get value from table attribute.

    Hello,
    I'm trying to get the value of an attribute from a table in my page. Shouldn't the expression be as such: "#{bindings.TestfilesView11.collectionModel.Filename.inputValue}"?
    This didn't work. I thought maybe it's because the row is selected, so the expression should point to that row. So i tried "rowIterator", "currentRow" instead, and still nothing worked.
    Thanks,
    Mohamed

    >
    Can i do this for the button while viewing a table and not a form?
    Without the use of a bean (with expression builder)...
    >
    Yes, you can do it,
    If the button is inside the table, you can use this EL
    #{row.bindings.AttributeName.inputValue eq null}If the button is outside the table, then go to the page definition, click the add binding and select attributeValues and then select the data source and the desired attribute. then you can use this attribute in EL like #{bindings.AttributeName.inputValue eq null}.

  • Get value from table record and set Disabled property...

    Hi! I have table in my JSPX page. I search for records and then press on one of the records with right click, see: http://my.jetscreenshot.com/2677/20120203-fas1-30kb
    I set disabled property like this of my commandMenuItem:
    #{row.GenResGrupa != 'true'}But as You can see from my picture above, the disabled property do not work. Where I am wrong with my code:
    <af:commandMenuItem text="#{sampleBundle.pases}"
                                                  id="commandMenuItem1"
                                                  action="adfMenu_pasesDati"
                                                  actionListener="#{bindings.setCurrentRowWithKeyValue.execute}"
                                                  disabled="#{row.GenResGrupa != 'true'}"/> Please correct me! If You need some other information, please let me know.
    Best regards, Debuger!

    Dear fedor! Popup is in facet contextMenu. contentDelivery="lazyUncached" for my popup:
    <af:popup id="p1" contentDelivery="lazyUncached">
                            <af:menu text="menu 1" id="menu1">
                              <af:commandMenuItem text="#{sampleBundle.pases}"
                                                  id="commandMenuItem1"
                                                  action="adfMenu_pasesDati"
                                                  actionListener="#{bindings.setCurrentRowWithKeyValue.execute}"
                                                  disabled="#{row.bindings.GenResGrupa.inputValue != 'true'}"/>
                            </af:menu>
                          </af:popup>In my pageDef I have this code:
    <bindings>
        <tree IterBinding="LVAIMeklesanaIterator" id="LVAIMeklesana">
          <nodeDefinition DefName="kokaugi.model.view.LVAIMeklesana"
                          Name="LVAIMeklesana0">
            <AttrNames>
              <Item Value="Accename"/>
              <Item Value="LvaiKolekcijaPk"/>
              <Item Value="Accenumb"/>
              <Item Value="AvsGrupa"/>
              <Item Value="Cropname"/>
              <Item Value="EkspGrupa"/>
              <Item Value="GenResGrupa"/>
              <Item Value="Genus"/>
              <Item Value="Species"/>
              <Item Value="Sinonims"/>
            </AttrNames>
          </nodeDefinition>
        </tree>
        <action IterBinding="LVAIKolekcijaDatiIterator"
                id="setCurrentRowWithKeyValue"
                InstanceName="KokaugiModuleDataControl.LVAIKolekcijaDati"
                DataControl="KokaugiModuleDataControl" RequiresUpdateModel="false"
                Action="setCurrentRowWithKeyValue">
          <NamedData NDName="rowKey" NDValue="#{row.LvaiKolekcijaPk}"
                     NDType="java.lang.String"/>
        </action>
      </bindings>And disabled property is like this:
    disabled="#{row.bindings.GenResGrupa.inputValue != 'true'}"But it is still do not working. I am wrong somewhere? Maybe the only way to correct my problem is like Hohn said?
    Best regards, Debuger!

  • POPUP FM to get values from a table control?

    I know about the FM POPUP_GET_VALUES to get one or more values from a popup dialog box.  I would like to find a similar FM that allows getting values from a table control or something that allows entry of multiple lines of values.  Is there such a thing, or do I need to write my own?

    it depends on what values you want to enter, better write your own to have a control on the function.

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • How to get values from a table(in jsp) for validation using javascript.

    hi,
    this is praveen,pls tell me the procedure to get values from a table(in jsp) for validation using javascript.
    thank you in advance.

    Yes i did try the same ..
    BEGIN
    select PROD_tYPE into :P185_OFF_CITY from
    magcrm_setup where atype = 'CITY' ;
    :p185_OFF_CITY := 'XXX';
    insert into mtest values ('inside foolter');
    END;
    When i checked the mtest table it shos me the row inserted...
    inside foolter .. Now this means everything did get execute properly
    But still the vallue of off_city is null or emtpy...
    i check the filed and still its empty..
    while mtest had those records..seems like some process is cleaining the values...but cant see such process...
    a bit confused..here..I tried on Load after footer...
    tried chaning the squence number of process ..but still it doesnt help
    some how the session variables gets changed...and it is changed to empty
    Edited by: pauljohny on Jan 3, 2012 2:01 AM
    Edited by: pauljohny on Jan 3, 2012 2:03 AM

  • Remove vertical scroll bar from table control

    hi,
    i had used table control in my application. i want remove vertical scroll bar from table control.
    At initial time in table control there is no vertical scroll bar. In my table control lines are dependent on internal table which i was used to fill it.
    i was used these code for to set table control lines.
    DESCRIBE TABLE IT_RISK_ZINRISEXC LINES EXC_LINE.
    TC_RISK_EX-LINES =   EXC_LINE .
    Initially there is no data in internal table so there is no vertical scroll bar. After getting value i am filling internal table. and there is scroll bar in my table control. but i does not want that.
    i was not selected RESIZING-VERTICAL OR -HORIZONTAL.

    Hi,
    From Scroll Bars in Table Control
    You can remove the scroll bar in the table control by switching off horizontal and vertical scrolling in the properties of the table control. The properties can be accessed from the screen painter by double clicking on the table control. Regarding the page up and page down functions, I believe you add those buttons in the screen layout and code for them. You can use the standard function code for the page up and page down functions.
    or
    You can get rid of the vertical scroll bars by not setting table control lines. This way the user can only see the visible lines of the table control. As for the horizontal scrollbar, just make sure that your table control doesn't contain too many fields.
    Regards,
    Raj.

Maybe you are looking for