Populate Value B based on Value A in Web UI

Hi Friends,
I have requirement to populate a field value based on other field value.
I have a view and it consist 2 context nodes.
When User enters the value in field A ( context node A ), we need to populate the field B ( Context node B ). But the main thing is that get property method of field B is triggering before then get property method of B.
Kindly suggest how do we achive this.
Regards,
Narendra Goyal

As mentioned before the DO_PREPARE_OUTPUT is a place that will work.
A little bit more on the background:
Do not code such stuff in the SET_ methods, as they will be called in the order of the data that is send to the server in the request. You noticed now that GET_A was called after GET_B, but it could change any time depending on the placement of fields on the view. Have a look at the DO_HANDLE_DATA for the FORM_FIELDS.
An approach I like to take for more time consuming operations on field change:
Create an event on context node CN1 and register the view controller to react on it. Then in the SET_A fire the event populating the new value as an input parameter.
Now the handler in the view controller can set a global variable containing the passed value.
In the DO_PREPARE_OUTPUT I can simply check if the global variable is set and directly work on it. Then clear it.
It is more work then the method described before, which is really fine and I have used it lots of times. The advantage is that you do less access for fetching the value from the context node every roundtrip.
cheers Carsten

Similar Messages

  • Using JavaScript to auto populate a field based on numeric value of a separate drop down field

    Hello, I am trying to set up a simple, I hope, javascript which will enable to me auto populate one field based on the numberic value of another field using Acrobat Pro XI.
    Essentially I have 2 drop down fields (we'll call them DD1 and DD2).
    DD1 is the sum of 8 preceding drop down values. That sum can be anywhere from 0 - 40. Whatever that sum falls within a range which identifies a rating. The ratings and ranges are below:
    0-8: Non-Performer  
    9-16: Low Performer  
    17-24: Performer  
    25-32: High Performer  
    33-40: Exceptional Performer
    DD2 is where the rating ("non-performer", "low performer", etc.) will be captured. Instead of requiring the user to look at DD1, determine the value, and then identify and input the rating manually, I would like DD2 to auto populate the rating based on the value (sum) in DD1.
    For example, if DD1 shows a value of 27 then DD2 would auto populate "High Performer". So how do I write this code or execute this? In excel I would use an if, then statement. Is there something similar in Acrobat Pro XI.
    Any help is greatly appreciated. Thank you in advance.

    If you use a text field, the custom calculation script could be:
    // Custom calculation script for text field
    (function () {
        var s = getField("DD1").valueAsString;
        // Blank this field if input is blank
        if (!s) {
            event.value = "";
            return;
        // Convert string to number
        var v = +s;
        // Set this field's value based on the input
        if (v <= 40 && v >= 33) {
            event.value = "Exceptional Performer";
            return;
        if (v < 33 && v >= 25) {
            event.value = "High Performer";
            return;
        if (v < 25 && v >= 17) {
            event.value = "Performer";
            return;
        if (v < 17 && v >= 9) {
            event.value = "Low Performer";
            return;
        if (v < 9 && v >= 0) {
            event.value = "Non-Performer";
            return;
        // If none of the above fit, blank this field
        event.value = "";

  • IRecruitment: Populate Values in Offer Details DFF based on Vacancy Grade

    Hello All,
    I have enabled Additional Offer Details DFF while creating Offer for an Applicant of an open vacancy.
    I need to automatically populate values in these DFF fields based on the grade defined in vacancy (also available on offer creation page). I want to populate these fields automatically through using inline query that would be based on the vacancy grade (also shown on offer page).
    How can I build this query as I dont know whether the vacancy/offer grade is available in the create offer profile region or not.
    For Example
    Offer/Vacancy Grade = 4
    DFF Field 1 (Additional Offer Details) = Housing Allowance
    Query should be like this: If Grade is 4 then Housing Allowance = 15000 - Now I want this 15000 value to be automatically populated in the Housing Allowance field when we click on the Create Offer for a respective applicant.
    For your information the grade and housing allowance values relationship is configured in User Tables
    Awaiting your help
    Thanks & Regards,
    Beilal Khan

    Hello Everybody,
    Any thoughts or workarounds on How can I automatically populate (through Default SQL Query - While Defining DFF Segments) Offer Details DFF Fields on Create Offer page. The Default values will be based on Vacancy Grade which is also available on the Offer page, I just need to know how can I get to dynamically know this while I am creating offer.
    This is very critical, i would greatly appreciate your thoughts on this.
    Thanks in Advance,
    Regards,
    Muhammad Beilal

  • Want 2 populate value in 2nd list item based on value selected in 1st list?

    Want 2 populate value in 2nd list item based on value selected in 1st list?

    Gaurav -
    The 3rd list will not populate because nothing has been selected yet in list 2. The value in list 2 is null, so the loop to populate list (3) has nothing to load. Try the following below. This should seed your 2nd list so the 3rd list will populate.
    You will have to declare first_record boolean and first_value to match DESCC.
    first_record := true; -- NEW *****
    Clear_List('BLOCK2.ITEM2');
    FOR CurRec IN (SELECT UNIQUE DESCC DESCC FROM LUTT where LUTT.IDD = :BLOCK2.ITEM1)
    LOOP
    if first_record = true then -- NEW SECTION *****
    first_value := CurRec.DESCC;
    first_record := false;
    end if;
    Add_List_Element('BLOCK2.ITEM2',1,CurRec.DESCC,CurRec.DESCC);
    END LOOP;
    :block2.item2 := first_value; -- NEW *****
    Clear_List('BLOCK2.ITEM3');
    FOR CurRec2 IN (SELECT UNIQUE DESCC DESCC FROM LUTT where LUTT.DESCC = :BLOCK2.ITEM2)
    LOOP
    Add_List_Element('BLOCK2.ITEM3',2,CurRec2.DESCC,CurRec2.DESCC);
    END LOOP;
    My name is Ken, 1990 is when I started using Oracle Forms 3.0, character based in the Unix environments. And you are very welcome.

  • How to Populate Values in Report for Fields

    Hi Experts,
    I have a Report requirement where in I need to Populate values for FROM Period & TO Period based on the user i/p for Quarter variable.
    For Eg;
    Fiscal year : 2009
    Quarter : 3
    Mat     Year         From period    ToPeriod          QTY
      A      2009            07                  09                1
      B      2009            07                  09                22
      C      2009            07                  09                44
    There are no fields FROM Period or TO Period in Cube.I need to populate them in the report directly.
    Please give some inputs to goahead.
    Thanks
    Ravve
    Edited by: ravve king on Jun 4, 2009 4:38 PM
    Edited by: ravve king on Jun 4, 2009 4:39 PM

    You're going to need to create a User Exit in your query. Here's a link to a helpful document on how to do that:
    [Using Customer Exit Variables in BW/BI Reports Part - 1|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f119d9-922d-2c10-88af-8c016638bd90]

  • Auto populate values in the the database table

    Hi All,
    I have a requirement where user enter values in one of the ZTransaction. This will update a Ztable. So the new requirement is to add two new columns in the fields, which is completed. Now this two new fields are supposed to auto populate values based upon the key field .
    The transaction code is defined with Transaction as SM30 and Default values as
    Name of the screen field     value
    Update                               X
    VIEWNAME                      "table name which the values are updated".
    Please let me know how to do this.
    Thank you!!

    Hi Swetha,
    I am unsure of what you are trying to accomplish so I will make a few assumption and perhaps you can find some benefit in it.
    I suppose you are trying to add new fields to a custom (Z) database table.
    If so then use SE11 to add the two new columns.
    After this is complete then rebuild the table maintenance by using the following path: SE11-> Utilities->Table Maintenance Generator.  (Remember to double check the Recording Routine Radio button.)
    If the user needs fields automatically populated then check the following link.  It describes how to use table maintenance events.  I suppose you need to use Event 01 and Event 05.
    http://help.sap.com/saphelp_nw04/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
    Good luck and reward points if helpful,
    AK
    Moderator message -  Asking for points is against the Forum's RoE
    Message was edited by: Suhas Saha

  • Change Value A based on Value B in Web UI in cross component

    Hi Friends,
    I have a requirement to populate value A based on selection of value B in differenet component.
    I have a web ui screen to create a complaint ( Component A ). After saving when I am clicking on follow up button, it will take me to next web ui screen ( Component B ) i.e. service order. Here I have a status field and after its selection when I have save. I also want to change value A of component A field.
    Kindly suggest..how can I achive this.
    Regards,
    Narendra Goyal

    Hi Narendra,
    It depends on what the exact fields are. If you change a value in component A and this change goes to the BOL layer, then this changed value should always be accessible in component B if you use the same BOL object and BOL relation to access the data. And you can always change the value from component B and it should already change in component A. The only thing you need to ensure is to call publish_current( ) method on the node where you change the value or call a BOL code modify( ).
    Regards,
    Shiromani

  • How to populate values in List Box in Adobe form

    Hi,
    How to populate values in List box in adobe forms?
    Thanks
    RB

    if you want to display a fixed values in the dropdown you can use list box ui and can specify values there
    or if u want to display values from the context node of the webdynpro
    1. Drag and drop a Value Help Drop-down List element from the Web Dynpro Library tab to the Body Pages pane.
    2. Drag and drop your node from the Data View tab onto it. This action binds the layout element to the corresponding node.
    with regards
    shanto aloor

  • How to populate values for a new field in target infoprovider

    Hi Experts,
    am new to BI. i would like to know on how to populate values for a new field in the target cube with start rotuine.In my case,  i have a source infoprovider, which has 3 fields and a target infoprovider, which has 5 fields. i need to populate the new 2 fields in start routine. i dont want to populate using Field routine and am using 3.5 version. please assist with code on how to solve this issue.
    Thank you,
    Chitra.
    Edited by: Chitra_BI on Jun 13, 2011 10:23 AM

    Debug the standard code and see where the other fields are getting update. you can use the similar approach and area to code for the new field.
    Regards,
    Lalit Mohan Gupta.

  • How to populate values in to dropdown in table ui element

    Hi,
    according to my scenario  i have atable with five records ...andi have acolumn name DATE and  it contains 5 dropdowns with some values i.e dates from jan 1 2008-dec 31 2008.user needs to select only those values which are in dropdown. can u tell me the code to populate values in to dropdown in table UI element.
    Thanks
    Raju

    Hi,
    you can go for two drop downs like DropDown by Key or Drop Down by Index as per requirment.
    Create context Node for the table UI, in that one will be for ur drop down. Create element for the Context node and add thses to the conetxt.
    Code example for DropDownBy Key:-
    ISimpleType simpleType =               wdContext     .nodeProjEstiTable().getNodeInfo()
         .getAttribute("projphasname")               .getModifiableSimpleType();
    IModifiableSimpleValueSet svs1 =
    simpleType.getSVServices().getModifiableSimpleValueSet();
    svs1.clear();
    for (int j = 0; j < projphasname.length; j++) {
         svs1.put(projphasname[j][1], projphasname[j][1]);
    for DropDownBy Index you can work in normal way means try to create element for the respective context attribute.
    Hope this may help you...
    Deepak

  • How to populate value node with values?

    Hi Experts,
    I have created a new view with a vlaue node of table type.
    How can I populate values into the value node?
    Which method will be useful?
    Is there any material for Web UI Programing?
    Please help me in this.
    Thanks,
    Adi.

    Hi Adi
    If ZVal is your value node then,
      DATA: lref_entity    TYPE REF TO cl_bsp_wd_value_node,
            lref_bo_coll   TYPE REF TO if_bol_bo_col,
            lref_data TYPE REF TO <<your ZStructure>>,
             ls_data type <<your ZStructure>>.
    ls_data-<<field1>> = 'XYZ'
    ls_data-<<field2>> = 'XYZ'
         CREATE OBJECT lref_bo_coll TYPE cl_crm_bol_bo_col.
          CREATE DATA lref_data.
          CREATE OBJECT lref_entity
            EXPORTING
              iv_data_ref = lref_data.
          lref_entity->set_properties( ls_data ).
          lref_bo_coll->add( lref_entity ).
          typed_context->ZVal->set_collection( lref_bo_coll ).
    Hope this was helpful.
    Best Regards,
    Lakshminarayana

  • How to populate values into a Listbox on selection screen

    Hi All,
    Please any one let me know how to populate values (for ex.01,02 and 03) in a list box of selection screen..
    Thanks,
    Vijay

    Try this code ...
    REPORT  ZLISTBOX.
    TYPE-POOLS: VRM.
    TABLES SPFLI.
    TABLES SSCRFIELDS.
    DATA flag.
    DATA: NAME TYPE VRM_ID,
    LIST TYPE VRM_VALUES,
    VALUE LIKE LINE OF LIST.
    PARAMETERS PS_PARM LIKE SPFLI-CARRID AS LISTBOX VISIBLE LENGTH 5
    USER-COMMAND fcodex.
    data: i_spfli type spfli occurs 0 with header line.
    PARAMETERS PQ_PARAM LIKE SPFLI-connid AS LISTBOX VISIBLE LENGTH 15
    USER-COMMAND
    fcodey.
    *DS AS CHECKBOX USER-COMMAND FLAG.
    INITIALIZATION.
    NAME = 'PS_PARM'.
    DATA T TYPE I VALUE 0.
    SELECT DISTINCT carrid into corresponding fields of table i_spfli FROM
    SPFLI.
    loop at i_spfli.
    VALUE-KEY = i_spfli-CARRID.
    VALUE-TEXT = i_spfli-CARRID.
    APPEND VALUE TO LIST.
    endloop.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = NAME
    VALUES = LIST.
    AT SELECTION-SCREEN.
    if sy-ucomm eq 'FCODEX'.
    REFRESH LIST.
    CLEAR LIST.
    PQ_PARAM = ' '.
    NAME = 'PQ_PARAM'.
    SELECT * FROM SPFLI WHERE CARRID = PS_PARM.
    VALUE-KEY = SPFLI-connid.
    VALUE-TEXT = SPFLI-connid.
    APPEND VALUE TO LIST.
    ENDSELECT.
    endif.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SY-UCOMM NE 'FCODEX' OR SY-UCOMM NE 'FCODEY'.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = NAME
    VALUES = LIST.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    START-OF-SELECTION.
    clear i_spfli.
    refresh i_spfli.
    select * into table i_spfli from spfli where carrid = ps_parm and connid
    = pq_param.
    loop at i_spfli.
    WRITE: / 'CITY FROM:', I_SPFLI-CITYFROM, 'CITY TO :',I_SPFLI-CITYTO,
    'DEPARTURE TIME :', I_SPFLI-DEPTIME.
    ENDLOOP.

  • To populate values into single field in an internal table

    Hi Friends,
    How we need to populate values into single field in an internal table.
    E.g itab consits of single field ( name)
           i need to assign values to this field name .like
          peter,
          john,
          abrahm,
          daneyal
    Pls tell me i how i need to code for this
    Thanks ,
    Parnith

    Hi,
    Please look at the below code :
    DATA : BEGIN OF itab OCCURS 0 ,
             name(20) TYPE c,
           END OF itab.
    START-OF-SELECTION.
      itab-name = 'Peter'.
      APPEND itab.
      CLEAR itab.
      itab-name = 'John'.
      APPEND itab.
      CLEAR itab.
      itab-name = 'Abrahm'.
      APPEND itab.
      CLEAR itab.
      itab-name = 'Daneyal'.
      APPEND itab.
      CLEAR itab.
      LOOP AT itab.
        WRITE : / itab.
      ENDLOOP.
    Thanks,
    Sriram Ponna.

  • Populate values at selection screen

    Hi All,
    My requirement is:
    There are 2 radio buttons and 2 parameter fields.
    By default, one radio button is selected and the two fields are populated with some values at the selection screen.
    If the other radio button is selected, we need to pass different values to the two parameter fields.
    Can you please suggest me how to populate values at selection screen.
    I have tried populating them using AT SELECTION SCREEN OUTPUT, but didn't work.
    Any pointers are helpful.
    Thanks & Regards
    Gowthami

    Hi Gowthami,
        Try it this way:
    PARAMETERS:
      R1 RADIOBUTTON group rad USER-COMMAND ABC default 'X',
      R2 RADIOBUTTON group rad.
    Parameters:
      char1(10) type c,
      char2(10) type c.
    Initialization.
      char1 = 'radio1'.
      char2 = 'radio1'.
    At Selection-screen output.
      if r2 = 'X'.
    *    loop at screen.
          char1 = 'radio2'.
          char2 = 'radio2'.
    *      modify screen.
    *    endloop.
      elseif r1 = 'X'.
    *    loop at screen.
          char1 = 'radio1'.
          char2 = 'radio1'.
    *      modify screen.
    *    endloop.
      endif.
    With luck,
    Pritam.
    Edited by: Pritam Ghosh on Feb 24, 2009 11:54 AM

  • To populate values in Table

    Hi,
    I need to populate values in a table which i got from the bean...
    i have retrived the values in Class[] and if i populate the table (as in code  below).. i get only the first record..
    i have created a value node (GroupNode) in the view context and iam binding the values to it from my Java Command Bean (CategoryBean)..
    The code is as follows..
    GroupDTO[] groupDTOs = wdContext.currentCategoryBeanElement().modelObject().RetSameCatidObj();
        //   Collection groupList = new ArrayList();
       for(int i=0;i<groupDTOs.length;i++){
         groupList.add(groupDTOs<i>);
         IPrivateDel_sda.IGroupNodeElement ele =  wdContext.createGroupNodeElement();
                        ele.setCategoryid(groupDTOs<i>.getCategoryid());
                        ele.setGroupid(groupDTOs<i>.getGroupid());                              
    wdContext.nodeGroupNode().bind(ele);
    Is there any workaround to solve the issue...
    Thanx.
    Shravan.

    this my code which gives first record in the table
    wdContext.currentCategoryBeanElement().modelObject().setCategoryid(wdContext.currentGroupbeanElement().getCategoryid());
    GroupDTO[] groupDTOs = wdContext.currentCategoryBeanElement().modelObject().RetSameCatidObj();
    for (int j = 0; j < groupDTOs.length; j++)
      IPrivateDel_sda.IGroupNodeElement ele =  wdContext.createGroupNodeElement();
      ele.setCategoryid(groupDTOs[j].getCategoryid());
      ele.setGroupid(groupDTOs[j].getGroupid());                                   
      wdContext.nodeGroupNode().addElement(ele);
    thnxs 4 ur reply
    shravan
    Edited by: Armin Reichert on Jan 19, 2008 12:15 PM

  • How to extend the IDoc ORDERS05 and populate values?

    Hi,
    My requirement is to add few fields to the standard IDoc ORDERS05 and populate values to the newly added fields.
    Please let me know how to extend the standard IDoc ORDERS05.
    Regards,
    Balaji. R

    Hi balaji,
    you can try to google for SAP R/3 IDoc Cookbook for EDI and Interfaces by Axel Angeli et.al.
    Although Axel refers primarily to MATMAS Idoc the technique of extending IDOCs is explained very well.
    Also very good is the search function here on SCN, I just found
    [Some Experience on IDoc Enhancement|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3414900%29ID0711317150DB10743789739220747754End?blog=/pub/wlg/8285]
    Blogs and Wikis here are the best source for general questions like yours, usually of much more value than forum answers
    Regards,
    Clemens

Maybe you are looking for

  • Makepkg: How to include source-bundled 'man pages' in the package?

    I'm trying to create a PKGBUILD for my own Python program. The source code has been packaged using Python's distutils.  Now, AFAICT distutils do not help you in any intelligent way to include a man page, so I just used a MANIFEST template to add the

  • Create custom slider indicator adding 2 digital indicator

    Hello, I have a problem. I have one indicator like capture attached. I want use the reference control to add in report (append control image to report). The problem is it only add the capture of control slider and I would like to do the control custo

  • Trip reimbursement amount = 0

    Hi All,  Facing an issue wherein, when I enter the mileage details for an employee, for TPV: 07-Canada.. The trip reimbursement amount shows as zero.. In stead it shows the amount as an income related expense...  I have checked the customising and it

  • Where do your movies go after they go to final cut?

    I placed a video in final cut and left iMovie and now I lost it.  I really need this video. 

  • BI statistic cube 0TCT_CA1

    Hi, I am using query based on the BI statistic cube 0TCT_CA1 to get the workbook execution times and it is working fine. But I have two queries. 1) some workbook stored in favourites. Is it possible to show them in separate category or have them disp