Populating a reqd. selection field based  on other selection field-Reports?

Hi,
I have a selection screen wherein there are several fields which are mandatory.Now it has fields like customer Number(KNA1-KUNNR) for which there is a standard help coming in and customer name(KNA1-NAME1).
My requirement is as soon as user selects a customer no along with customer no customer name field is also populated without performing any action on screen.Now if I write the code as:-
at selection-screen on p_name1.
select single name1 into p_name1
                              from kna1
                              where kunnr = p_kunnr.
There are few problems in this:-
1)It will be executed only when user presses enter or F8 but I dont want that...
2)Also if I perform any action on screen say pressed enter this code will be executed only when i have put in values in all the MANDATORY fields.So will have to put in a dummy value first since its a mandatory field and then this code will be executed which doesn't serve my purpose..
Please suggest a way out..Its really urgent..Have to make an object delivery
Thanks in advance,
Swati

Try  this example, this will also automatically update the NAME1 field when user does F4 help on the customer number.
data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.
parameters: p_kunnr type kna1-kunnr,
            p_name1 type kna1-name1,
            p_kdgrp type knvv-kdgrp.
at selection-screen.
  if not p_kunnr is initial.
    select single name1 into p_name1 from kna1
              where kunnr = p_kunnr.
  endif.
* Now do checks
  if p_kdgrp is initial.
    message e001(00) with 'Customer group is not valid'.
  endif.
at selection-screen on value-request for p_kunnr.
  data: xkna1 type kna1.
  data: xkunnr type kna1-kunnr.
  clear dynfields . refresh dynfields .
  clear return.     refresh return.
  call function 'F4IF_FIELD_VALUE_REQUEST'
       exporting
            tabname           = 'KNA1'
            fieldname         = 'KUNNR'
            dynpprog          = sy-cprog
            dynpnr            = sy-dynnr
            dynprofield       = 'P_KUNNR'
       tables
            return_tab        = return
       exceptions
            field_not_found   = 1
            no_help_for_field = 2
            inconsistent_help = 3
            no_values_found   = 4
            others            = 5.
  read table return with key fieldname = 'P_KUNNR'.
* Add it back to the dynpro.
  dynfields-fieldname = return-retfield.
  dynfields-fieldvalue =  return-fieldval.
  append dynfields.
  call function 'CONVERSION_EXIT_ALPHA_INPUT'
       exporting
            input  = return-fieldval
       importing
            output = xkunnr.
  clear xkna1.
  select single * into xkna1
         from kna1
        where kunnr = xkunnr.
  dynfields-fieldname = 'P_NAME1'.
  dynfields-fieldvalue = xkna1-name1.
  append dynfields.
* Update the dynpro values.
  call function 'DYNP_VALUES_UPDATE'
       exporting
            dyname     = sy-cprog
            dynumb     = sy-dynnr
       tables
            dynpfields = dynfields
       exceptions
            others     = 8.
start-of-selection.
Regards,
RIch Heilman

Similar Messages

  • Auto population of data to fields based on other input field.

    In overview screen, I have one input field "Business Partner" which contain search help.  As soon as business partner selected from dropdown, the other input fields like Name, Address, City, state should automatically populated without hit of 'ENTER' key.
    I verified with method DO_PREPARE_OUTPUT, but it is triggering only by hitting ENTER key. Is there any event or method which will trigger after business partner selected from dropdown? or any other option to achieve to auto populate the fields.
    Please find attached screen.
    Thanks in advance.

    Hi Narayana,
    You can use the get p method for setting up the values without pressing the enter.
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
        WHEN if_bsp_wd_model_setter_getter=>fp_server_event.
          rv_value = 'AI_SELECT'.( you can give here the event name)
        WHEN OTHERS.
      ENDCASE.
    Define event with the same name above( AI_SELECT),
    You can set the value of fields based on the first field value within this event.
    Thanks,
    Dharmakasi.

  • Populate field based on other lookup field in form

    Hello,
    In a list item in Infopath, I have a field which looks up a location. You can select the location in a dropdown list.
    I want to fill another field with the manager name of the selected location. That manager name is a field in the other form also. In a Sharepoint workflow you can do such a thing (look for a specific list item in another list, based on a selected field in
    that list).
    To summarize: if I fill the location field with info from another list, I want to automatically fill another field with the manager of that location - which is also in that other list.

    Hi  mRRRc1,
    For achieving your demand , please take steps in the InfoPath as below:
    Open the list which contains the look up field using InfoPath.
    Create a Data Connections from  SharePoint list:  Click From SharePoint  List  control under tag DATA -> Input your site URL in the Data Connection Wizard page -> Select the original
    list -> Select  Location and Manager field -> Enter a name for this data connection(such as Test) -> Finish.
    Create a Rule for Location look up field :   
    Condition: LocationLookUp  is not blank
    Rule type: Action
    Run these actions: Add “Set a field’s value”
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • In a document library, offering only certain options for fields based on others selected

    Hi, I have a document library, and when someone uploads an item to that library, they are presented with a form to select properties. I have 4 properties I want them to select (really 6, but the first two are Name and Title). The issue is that these 4 properties
    depend on each other in this way:
    1st property: I use a lookup to offer 4 choices, "A" "B" "C" or "D" in a dropdown.
    2nd property: I want to offer the user a choice of 4 items in a dropdown, based on what they chose for the 1st property. (if they chose "A", then offer "1" "2" "3" or "4", if they chose
    "B" offer "5" "6" "7" or "8", etc.)
    3rd property: same thing as above, but now based on what they chose for the 2nd property (if they chose "1", offer "a" "b" "c" or "d", if "5" offer "s" and "t")
    4th property: again based on 3rd property.
    How can I do this? can I write some sort of custom form that can do this?

    What you're trying to do is commonly refererd to as 'Cascading Drop Downs'. These are a common lack in SharePoint.
    There are lots of ways to do that, my favourite to use jQuery or Javascript:
    http://www.sharepointboris.net/js/spcd/

  • Select List based on other select List

    Hi
    I have 2 select lists when a selection is made in one I want the second list to be limited but when nothing is selected in the first list I want the second list to display all. Apolgies if this is really a plsql thing .
    Heres what I have so far
    if :P52_ORGNAME is null
    then
    return 'select unique surname d,id r from com_contact';
    else
    return 'select unique forename||surname d,id r from com_contact where orgname = :P52_ORGNAME order by id';
    end if;
    the else is fine but I cant get the null condition to work.
    :P52_ORGNAME is a select list where show null is yes and there is no NULL value
    thanks in advance
    Kirk

    Hi,
    you can try 2 things.
    1)try putting a null display value and keep null return value as blank. dont put any value in the default value also,and see if this works,
    2)else try putting a null return value(like BLANK) and check for that value in the condition insted of null. i.e
    if :P52_ORGNAME ='BLANK'
    then
    return 'select unique surname d,id r from com_contact';
    else
    return 'select unique forename||surname d,id r from com_contact where orgname = :P52_ORGNAME order by id';
    end if;
    Hope it works..

  • Dynamically enable a field based on a selected table row

    Hi everyone.
    I'm getting really confused right now, please show me the right way. My approach may be, and probably is, wrong since I am self learning this and all I have is an ASP.NET background.
    I have a page with a table in it. I've created a DataControl for a collection I've made and mapped it to the table. I added a column that shows an "edit" button. On it's click, I open a popup that shows the selected row's data. Naviguation controls are also present on the popup.
    This is working fine.
    My problem comes in the popup. Each row has multiples fields. These fields, shown on the popup, need to dynamically be enable/disable. To toggle those field, the only way I can see right now is to have a function that takes into parameter the rowId and the fieldName. Based on those two fields, I can get the necessary information to know if I need to enable or disable the control.
    What I was aiming for, but then again I totally failed, was to have that function called on the "enabled" EL Expression, returning a Boolean.
    Now that this has been said, can someone guide my on how to dynamically enable/disable each field based on the selected row.
    Thanks !

    Above +
    why don't you create a bean method that returns a Boolean ans through EL Expression Builder select the method to this property.
    btw .. on which components are you setting this?
    Also,
    If there is business logic that prohibits to update this object unless that is met.. you can also do it as..
    In EOImpl .. override isAttributeUpdateable(int i) method eg:
    @Override
    public boolean isAttributeUpdateable(int i) {
    if(i == this.ENAME && "KING".equalsIgnoreCase(this.getEname())){
    return true;
    }else
    return super.isAttributeUpdateable(i);
    and then in UI for the component say
    ReadOnly = #{bindings.Ename.updateable}
    Or, In UI
    disable = #{ bindings.Ename.attributeValue == 'KING' & bindings.Mrg.attributeValue == null ? true : false}
    adf does provides many ways to do it ..
    Cheers, Amit

  • Auto populate fields based on dropdown selection

    New to forms and needing some insight
    Is there a way to auto populate a series of fields based on the selection of a dropdown box
    for instance;
    chosing a customer's name from a dropdown box would auto populate the address, city,state zip etc...

    Yes, but not easy and you do not want to have a large number of items.
    Programming List and Combo fields in Acrobat and LiveCycle forms - Part 1 by Thom Parker

  • PM Notification - Hide fields based on other field's value

    Hello experts,
    I am looking for an user exit which allows me to hide some fields based on other field's value.
    For example, I have field 1 and field 2. When I open my notification, if the value of field 2 is 'aaa', field 1 has to be hidden.
    There should be an user exit but I can't find it...
    Thanks for your help!

    Hi everyone,
    Any thoughts? any help is appreciated...
    Thanks

  • How to display F4 values in one field based on other field selection

    Hi All,
    How to hide a UI element (i.e Link to action) highlited for Normal User and display the same to super user.
    Component Name : /SAPSRM/WDC_DODC_SC_GAF_C
    2.Can i know how to display  the entries in supplier field based on Product category selection.
    Right now all the entries are getting displayed in the supplier field.
    I want to display only entries based on Product category.
    Search Help Name : BBP_BUPA_CLL_PARTNER
    Component Name : /SAPSRM/WDC_DODC_SC_I_LIM
    How to enhance the web dynpro component with the filtered values.
    Regards,
    Krish.

    Hi Ashvin,
                 Thanks for the document. In the search help there is a standard FM which is getting executed.
    Can i enhance that FM or should i copy and edit.
    BBP_F4IF_SHLP_EXIT_CLL_PARTNER
    If i creata a Z FM and make changes how to pass that values to my standard Component View UI Element.
    If not then suggest me some alternative.
    Regards,
    Krish

  • Interactive form that auto selects input fields based on initial selection

    i want to create a form that based on initial selections, automatically highlights "required" input fields.
    i.e.  if i create an item on the form called "promotion", when this item is "checked", all the fields that are required will automatically light up, and the person completing the form cannot exit, save, and submit the form until all related fields are filled in.
    is this possible using adobe products?  i have cs5 (with dreamweaver, indesign, etc.)
    can anyone point me toward any documentation that will show me how to do this?

    This forum is for Adobe FormsCentral (formscentral.adobe.com) which is a service that allows you to create, collect and analyze data using an online web form. You should ask general HTML form related questions in the Dreamweaver forums:http://forums.adobe.com/community/dreamweaver/dreamweaver_general
    I'll move your post to that forum so you don't need to retype it. They can help you out...
    Randy

  • Showing/Hiding certain fields based on Radioset selection

    Hello all,
    I'm like to know whether it is possible to Show/Hide certain fields using a RadioSet selection as it is done in Forms in ADF UIX. Kindly go through this post.
    Showing/Hiding certain fields based on Radio Group selection
    kindly help me out on this.
    Thanks & Regards,
    Arun.V

    Hi Arun,
    Here is what I do with my checkboxes, but I think that the radiobutton will do the same:
    <af:selectBooleanCheckbox text="selectBooleanCheckbox 1"
                          label="Label 1"
                          binding="#{backing_page1.selectBooleanCheckbox1}"
                          id="selectBooleanCheckbox1"
                          autoSubmit="true"
                          immediate="true"/>
    <af:inputText label="Label 1" binding="#{backing_page1.inputText1}"
                          id="inputText1"
                          disabled="#{!backing_page1.selectBooleanCheckbox1.selected}"
                          partialTriggers="selectBooleanCheckbox1"
                          value="#{backing_page1.selectBooleanCheckbox1.selected}"/>

  • Sum Fields Based on Dropdown Selection

    I have (1) dropdown field named (CAT) that contains (7) items and repeats in (31) rows.  I also have (3) different decimal fields (REG, TIMEHALF, and DBL) which may or may not contain data, that also repeat in the same (31) rows.  Lastly, I have a separate field (BASEBLDGTL) that is not connected to the table, which I want to use to calculate the (3) different decimal fields base on the selection of the dropdown field.  So basically, I'm looking for the BASEBLDGTL field to add all of the REG, TIMEHALF, and DBL fields together for each row if the first item in the dropdown field is selected.  I also want the BASEBLDGTL field to be able to pickup on possible changes to the selection of the CAT dropdown field.  Any help would be gracefully appreciated as I'm a complete idiot in Java and FormCalc.

    I'll give this a shot, but I'm not entirely sure what you're asking.
    var amounts = xfa.resolveNodes("tblParts.Row1[*]");
    var total = 0;
    for (var i=0; i<amounts.length; i++) if (amounts.item(i).ddSomething == "abc") total += amounts.item(i).ExpenseAmount;
    //go through the table, if the drop down matches what you're looking for, add that amount to the total
    nfExpenseABCTotal.rawValue = total;

  • How to disable field based on the selected value

    Hi everyone,
    I have "employee" table,
    it contains the following field,
    emp_name
    emp_designation
    Category
    YearsHere the "category" is the select list value which has the following values in select list,
    Fresher
    Experienced,
    when the value :Fresher" is selected for "category" then the "Years" field should be disabled.
    I tried the following dynamic action ,
    Name:Disable_year
    sequence:20
    Event:Change     
    Selection Type:Item
    Item(s):Category
    Condition:equal to
    value:Fresher
    Fire When Event Result Is:TRUE
    selection type:P1_YEARBut it doesnt work.
    can anyone give alternate solution?
    Thank you.
    Regards,
    gurujothi

    Name:Disable_year
    sequence:20
    Event:Change     
    Selection Type:Item
    Item(s):Category
    Condition:equal to
    value:FresherTry return value instead of this display value(Fresher) of select list
    Fire When Event Result Is:TRUE
    selection type:P1_YEARIn your above dynamic action, where is the disable action?

  • Update a text field based on a SelectOneChoice field

    Hi,
    I have a set of Create, Confirm and Thankyou screens. These screens are bound to a global view object. The create screen has a SelectOneChoice element which allows the user to pick an employee. When the selection is made, I need to display the employee's department in a read only text field below the dropdown. The Employees list(SelectOneChoice) is associated to the read only view object and this view object also has the employee's department information. Im dont know how to set the department name in the text field and refresh the screen. Any help is appreciated. Thank You.

    Frank, thanks for you time. Please see my answers below.
    Hi,
    can you help me creating a reproducable testcase
    based on the HR schema where we have a Departments
    and Employees tables. To understand your usecase I
    have some questions:
    Im not too familiar with HR Schema.
    >
    First of all however, what is a "global view object",
    and is it safe to assume you are using ADF Business
    Components?
    Its the "Globals View Object" as described in the SRDemo for creating a new Service Request and yes I am using ADF Business Components.
    >
    Which version of Oracle JDeveloper do you use ?
    10.1.3
    >
    The usecase I understand is that you have a
    selectOneChoiceList that whenever you select a new
    name should update a read-only text field with the
    department name. Is this correct ? Or is there more
    in it ?
    Heres the complete description. There are 4 fields on the screen
    1. Program Name (text input field, - required field)
    2. Program Category (SelectOneChoice field - required field)
    3. Employee Name (SelectOneChoice field - required field)
    4. Employee Department (Text output field - based on 3 above)
    What you have described above is working for me now, but everytime I select a value for 3, it does the required fields check and gives a message like "1 & 2 are required and a value must be entered", this validation should only occur when my continue button is clicked.
    >
    The department name should be displayed only (read
    only), or is it also bound to what you call "global
    view"?
    Yes its read only but I need to bind to the Globals view as I need to display it in the confirmation screen.
    >
    Also, just to be sure, is the department name part of
    the VO or is it the departmentId?
    The screen is bound to the Globals View, the selectOneChoice values are displayed from another view(EmployeeList view) which has the department name.
    >
    Frank

  • Deriving 1 Value from 2 Fields Based on Values in Fields

    I have a query that needs to return 1 of my values based on the values from 2 fields from 2 tables. However, the value should only be returned in 1 field and one of the fields should be evaluated first. If this first evaluated field has a certain value ('Y') then the other field is ignored.
    To be more clear, per the normal query below, what I want is to somehow, if possible, combine the case t2.el_contr and case t1.contr_type statements so that one field, say: mbr_contr_type_desc returns a value.
    So that if the value of t2.el_contr is 'Y' then 'SUB CHILD' is returned. It is important that this field should be evaluated first (If the value of it is 'Y' then the other field evaluation can be ignored). If this is not 'Y', then t1.contr_type should be evaluated and the values as listed below also returned to mbr_contr_type_desc.
    I know the following isn't correct, but it might better illustrate what I'm trying to do (the normal query is below this)
    case t2.el_contr
    when 'Y' then 'SUB CHILD'
    case t1.contr_type
    when 'A' then '1 PARTY MALE SUB'
    when 'B' then '1 PARTY FEMALE SUB'
    when 'C' then '2 PARTY MALE SUB'
    when 'D' then '2 PARTY FEMALE SUB'
    when 'F' then 'FAMILY MALE SUB'
    when 'G' then 'FAMILY FEMALE SUB'
    end as mbr_contr_type_desc
    In an Access query I would do the following in a column:
    iif([el_contr]='Y',"SUB CHILD',SWITCH([contr_type]="A","1 PARTY MALE SUB",[contr_type]="B" etc.))
    *NORMAL QUERY*
    select t1.ssn
    t1.type,
    t1.grp_id,
    t1.contr_type,
    t2.el_contr,
    case t2.el_contr
    when 'Y' then 'SUB CHILD'
    end as mbr_contr_type_desc_2,
    case t1.contr_type
    when 'A' then '1 PARTY MALE SUB'
    when 'B' then '1 PARTY FEMALE SUB'
    when 'C' then '2 PARTY MALE SUB'
    when 'D' then '2 PARTY FEMALE SUB'
    when 'F' then 'FAMILY MALE SUB'
    when 'G' then 'FAMILY FEMALE SUB'
    end as mbr_contr_type_desc_1
    from member_elig t1
    inner join grp_master t2 on
    t1.grp_id = t2.grp_id

    Perfect!
    Thanks, didn't know that existed. Still learning my way around pl/sql..
    One other (unrelated) question..when i hit the CTRL+LEFT ARROW* button in my SQL window, it will not tab back. This is really annoying! I have looked through PREFERENCES-EDITOR and can't seem to find any setting that will allow this. Do you know of any way to change this so I can tab backwards/fowards through code in the SQL window?
    Thanks for any suggestions!
    *Or CTRL+RIGHT ARROW for that matter..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Can't Exclude a folder with a "[" in the name

    I am trying to exclude my Gmail imap folder which is named \[Gmail\] it will not stay in the exclude list. I tried to exclude a folder called \[untitled\] and it also will not stay in the list. Anyone else see this problem? Solutions? 10.5.1. Message

  • Avoid static JInternalPane in 1.4.1

    This post is informational. I am not asking for help. We discovered this problem when transitioning from JRE 1.3.1 to 1.4.1. We use the JInternalFrame to create a floating palette of buttons that pump text constructs into one or more special text pan

  • No excise effect with MB01

    Hi All, When we do MB01 or MBST (reverse or cancel material document) the part-1 wont affect. We can not cancel the document in MIGO since the material is quality active and should be available in quality stock for reverse. Please advice wether any n

  • BDoc validation error

    Hi Experts, I am getting the following error in SMW01. State: Red Bdoc State Decsription: BDoc validation error BDoc type: BUPA_MAIN Flow context description: mBDoc validate Sender Site name:OLTP Queue Name: R3AD_CUSTOME. Please help. Regards, Soumya

  • Can't find SystemConfiguration Folder (Time Machine Disk Error)

    I'm attempting to repair my Time Machin backups using apples directions (below) I follow the steps but cannot find the /Library/Preferences/SystemConfiguration/ folder. Any ideas? From the Finder's Go menu go to this location: /Library/Preferences/Sy