Fill DDL based on other field values in offline interactive adobe form

Hi,
I have a requirement where in i need to fill the values for a dropdown list  based on 3 other field values in offline adobe interactive forms which uses web service to interact with SAP.
Note: I read many blogs and posts in SDN , but couldn get much info ab the same, so posting a new thread.
Thank you.
Regards,
Soumya

Hi Soumya,
It is possible but a little bit tough and will make your form heavier.
The solution is advisable only when there is not very much data required for the drop down(May be not more than 500 values as it will create performance issue).
You can create a hidden table on the form contaning data for all the combinations. Depending on the selection of another 3 fields you can write the code to select only those values from this hidden table which are applicable to that selection. These values you can add to the drop down list removing the previous values.
Only you have to do is on calculate or vlaidate event of target DDL you have to write your code.
Pseudocode:
1. Clear your DDL using deleteItem() method.
2. Loop at your hidden table.
3. Inside the loop check for applicable entries depending on selection in other 3 fields.
4. Select the appropriate vlaues
5. Add using additem method().
Refer formCalc or JavaScript help for the appropriate code.
Hope this will be helpfull.
Regards,
Vaibhav

Similar Messages

  • Text Field value display twice in Adobe Form.

    Hi Experts,
    I want to display a text field value twice in a ADOBE FORM but it only display at first occurance of the text field.
    Please suggest me possible solution.
    Regards,
    Abdul

    Why don't you have two different text fields in the interface and bind them separately at the two different places in the form. In the driver program you can control the value being passed to be same for both the fields.
    Regards
    Ranganath

  • Value Help in Interactive Adobe Form in Web Dynpro

    I have to provide a value help for certain Fields in Interactive Adobe Form using Web Dynpro ABAP. I have managed to get the Value Help Popup for the fields using Java Script in Adobe, but the problem is that whenever I select the Value from the Value Help, the selected value in not getting populated in the field....
       Please let me know the solution in case any one of you come across such kind of requirement.

    Priyanka:
    Can you let me know the steps on how to provide value help in interactive forms?
    Thanks
    Vijai

  • Text field data in the Interactive adobe form to long text

    Hi Expert,
    I have a text field(allow multiple line) in the interactive adobe form which has been binded to table type(char132) field of the context element.
    Now I want the save text field data as a long text using SAVE_TEXT.
    When I enter some value in the text field and trigger SUBMIT event then it is going to dump.
    I am unable to trace out what is wrong, since control is not reaching to INIT method of the view.
    please help.
    Regards,
    Rajesh.

    Hi,
    what is in ST22 for this problem?
    Regards Jiri

  • 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

  • Search help for a field in table control based on another field value

    Hi,
    I want to attach the Search help for a field in table control based on another field value.
    Please help me asap.
    Will be highly rewarded

    HI,..
      Check these links
    search help in table control
    Re: How to create Search Help for a field in Table control !!
    How to create Search Help for a field in Table control !!
    F4 Help In Table Control
    Control table F4 help
    Problem in F4 help in screen field
    check this code
    DATA: BEGIN OF it_value4 OCCURS 0,
             TEXTCODE  LIKE  ZXX-TEXTCODE,
             TEXTDESC  LIKE  ZXX-TEXTDESC,
           END OF it_value4.
      progname = sy-repid.
      dynnum   = sy-dynnr.
             SELECT TEXTCODE TEXTDESC
               FROM  xxxx
               INTO CORRESPONDING FIELDS OF TABLE<b> it_value4</b>
              WHERE  LOSS_CODE =<b> IT_VALUE1 .</b>
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'TEXTCODE'
          dynpprog    = progname
          dynpnr      = dynnum
          dynprofield = 'ITVALUE-TEXTCODE'  "-->UR  4 th filed value in screen
          value_org   = 'S'
        TABLES
          value_tab   = it_value4.
    endmodule.
    Message was edited by:
            veereshbabu ponnada

  • Automatically populate fields in jsp documents based on other fields

    hello guys. I have a jsp document
    that has the following
    <af:inputText value="#{bindings.SourceDocumentId.inputValue}"
    label="#{bindings.SourceDocumentId.label}"
    required="#{bindings.SourceDocumentId.mandatory}"
    columns="#{bindings.SourceDocumentId.displayWidth}"
    binding="#{backing_transactions_editTransactions.docId}"
    id="docId">
    <af:validator binding="#{bindings.SourceDocumentId.validator}"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.SourceDocumentId.format}"/>
    </af:inputText>
    <af:inputText value="#{bindings.DocumentName.inputValue}"
    label="#{bindings.DocumentName.label}"
    required="#{bindings.DocumentName.mandatory}"
    columns="#{bindings.DocumentName.displayWidth}"
    binding="#{backing_transactions_editTransactions.docName}"
    id="docName">
    <af:validator binding="#{bindings.DocumentName.validator}"/>
    </af:inputText>
    And I have created the generated the backing beans automatically.
    public class EditTransactions {
    private CoreInputText docId;
    private CoreInputText docName;
    public CoreInputText getDocId() {
    return docId;
    public void setDocName(CoreInputText inputText7) {
    this.docName = inputText7;
    public CoreInputText getDocName() {
    return docName;
    I have a method in appmodule that has this
    public String getDocName(Number docId)
    {String docName;
    return docName
    on the document Id field I have to input a certain docId after I input the docId I have to populate automatically the docName based on the doc Id being given.
    question
    1. how can I set the document name automatically w/out submitting the page ?
    2. how can I use my backing bean to set the docName using the method in my AppModule.?
    Can anyone help me regarding this one.
    Thank in advance
    alvin.

A: automatically populate fields in jsp documents based on other fields

here is what you need to do:
1. Change the definitions for your fields as following
<af:inputText value="#{bindings.SourceDocumentId.inputValue}"
                        label="#{bindings.SourceDocumentId.label}"
                        required="#{bindings.SourceDocumentId.mandatory}"
                        columns="#{bindings.SourceDocumentId.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docId}"
                        id="docId" valueChangeListener="#{backing_transactions_editTransactions.docIdChange}"
autoSubmit="true">
            <af:validator binding="#{bindings.SourceDocumentId.validator}"/>
            <f:convertNumber groupingUsed="false"
                             pattern="#{bindings.SourceDocumentId.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.DocumentName.inputValue}"
                        label="#{bindings.DocumentName.label}"
                        required="#{bindings.DocumentName.mandatory}"
                        columns="#{bindings.DocumentName.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docName}"
                        id="docName"
partialTriggers="docId">
            <af:validator binding="#{bindings.DocumentName.validator}"/>
          </af:inputText>2. add the followig method to your backing bean:
  public void docIdChange(ValueChangeEvent valueChangeEvent) {
    getDocName().setValue((String)getDocId().getValue() + "suffix");
  }Run your form and enter the value into docId field, then press tab to go to the next field - docName will be populated

here is what you need to do:
1. Change the definitions for your fields as following
<af:inputText value="#{bindings.SourceDocumentId.inputValue}"
                        label="#{bindings.SourceDocumentId.label}"
                        required="#{bindings.SourceDocumentId.mandatory}"
                        columns="#{bindings.SourceDocumentId.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docId}"
                        id="docId" valueChangeListener="#{backing_transactions_editTransactions.docIdChange}"
autoSubmit="true">
            <af:validator binding="#{bindings.SourceDocumentId.validator}"/>
            <f:convertNumber groupingUsed="false"
                             pattern="#{bindings.SourceDocumentId.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.DocumentName.inputValue}"
                        label="#{bindings.DocumentName.label}"
                        required="#{bindings.DocumentName.mandatory}"
                        columns="#{bindings.DocumentName.displayWidth}"
                        binding="#{backing_transactions_editTransactions.docName}"
                        id="docName"
partialTriggers="docId">
            <af:validator binding="#{bindings.DocumentName.validator}"/>
          </af:inputText>2. add the followig method to your backing bean:
  public void docIdChange(ValueChangeEvent valueChangeEvent) {
    getDocName().setValue((String)getDocId().getValue() + "suffix");
  }Run your form and enter the value into docId field, then press tab to go to the next field - docName will be populated

  • Table Control: make a field editable or not based on another field value

    HI All,
    How to make a column field input enabled or disabled based on another field value in a Table Control.
    Here's the scenario:
    I have a table control with two columns, KTOKK and LIFNR. Now for certain KTOKK, the LIFNR field should be editable and for certain KTOKK it should not be editable.
    Eg.,  KTOKK = 0001 =>  LIFNR field is not editable.
            KTOKK = ZKTO => LIFNR field is editable.
    But these fields are in a table control.
    Please advice.
    Thanks in advance,
    RK.

    Hi RK,
    Go through the below link..
    how to make special field editable or diseditable in table control?
    the code mentioned in the link.. just add ur conditions in the module....
    Best Regards,
    Brijesh

  • Change field value in a table, based on another field value in the same row (for each added row)

    Please Help, I want to change field value in a table, based on another field value in the same row (for each added row)
    I am using this code :
    <HTML>
    <HEAD>
    <SCRIPT>
    function addRow(tableID) {
    var table = document.getElementById(tableID);
    var rowCount = table.rows.length;
    var row = table.insertRow(rowCount);
    var colCount = table.rows[0].cells.length;
    for(var i=0; i<colCount; i++ ) {
    var newcell = row.insertCell(i);
    newcell.innerHTML = table.rows[1].cells[i].innerHTML;
    switch(newcell.childNodes[0].type) {
    case "text":
    newcell.childNodes[0].value = "";
    break;
    case "checkbox":
    newcell.childNodes[0].checked = false;
    break;
    case "select-one":
    newcell.childNodes[0].selectedIndex = 0;
    break;}}}
    function deleteRow(tableID) {
    try {var table = document.getElementById(tableID);
    var rowCount = table.rows.length;
    for(var i=0; i<rowCount; i++) {
    var row = table.rows[i];
    var chkbox = row.cells[0].childNodes[0];
    if(null != chkbox && true == chkbox.checked) {
    if(rowCount <= 2) {
    alert("Cannot delete all the rows.");
    break;}
    table.deleteRow(i);
    rowCount--;
    i--;}}}catch(e) {alert(e);}}
    </SCRIPT>
    </HEAD>
    <BODY>
    <INPUT type="button" value="Add Row" onClick="addRow('dataTable')" />
    <INPUT type="button" value="Delete Row" onClick="deleteRow('dataTable')" />
    <TABLE id="dataTable" width="350px" border="1">
    <TR>
    <TD width="32"></TD>
    <TD width="119" align="center"><strong>Activity</strong></TD>
    <TD width="177" align="center"><strong>Cost</strong></TD>
    </TR>
    <TR>
    <TD><INPUT type="checkbox" name="chk"/></TD>
    <TD>
    <select name="s1" id="s1">
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    </select>
    </TD>
    <TD><input type="text" name="txt1" id="txt1"></TD>
    </TR>
    </TABLE>
    </BODY>
    </HTML>

    Hi,
    Let me make sure u r working with table control.
    First u have to create a event(VALIDATE) to do the validation.
    Inside the event,
    1. First get the current index where user has pointed the curson
    2. Once u get the index read the internal table with index value.
    3. Now u can compare the col1 and col2 values and populate the error message.
    1. DATA : lo_elt TYPE REF TO if_wd_context_element,
                   l_index type i.
    lo_elt = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
         CALL METHOD LO_ELT->GET_INDEX( RECEIVING  MY_INDEX = l_index.
    above code should be written inside the event.
    Thanks,

  • Validating Input fields in Interactive Adobe Forms with Webdynpro ABAP

    Dear Friends,
    Am new to Interactive Adobe forms with Webdynpro Abap,
    My scenario is, I have few Input fields, i need to handle the Messages when am not entering values in any of the Input Field,
    and raise the message when i click on Save Button.
    I have tried with setting the field as Required in Form itself, but i can't set the Field as Mandatory.
    I don't know how to do, Please give some needed points, as well needed some Script/Formcalc code.
    Thanks,
    Pradeep.

    Hi Pradeep,
    You can validate the fields by using javascript/formcalc logic in onclick event of button.
    Please refer the below links
    Adobe Form -How to make an Input Field Mandatory
    Validate Intercive Adobe Form
    Hope it helps you.
    Regards,
    Rama

  • How to download interactive adobe form with filled data

    Hi Experts,
    i have created a module pool program that is showing interactive adobe form, i created a button 'SAVE' to download the interactive adobe form to the presentation server.
    but the problem is that i am unable to save the interactive adobe form with filled data. Please provide me the code how to download interactive adobe form with filled data.
    Please provide me valuable information to clear the issue.
    Thank you,
    B. Raghu Prasad.

    Hi Raghu,
    is this adobe form in web dynpro ? if so, I suggest to go to [Web Dynpro |Web Dynpro ABAP; forum to get more advice because it seems to be more specific topic.
    Regards,
    Vincent

  • Require field be filled out when other field values change

    I tried to search on something I need to do but couldn't come up with a combination of words to find much.
    I have a situation where, when certain field values on a form are changed, I need a comment field filled in. So if one of the designated field values change and the comment field is NOT filled in, I would like some kind of message indicating that the comment field must be filled in when that field is changed. This would preferably happen when the 'Update' button is pushed on the form. And this would need to happen before the data is submitted.
    This seems to be somewhere between a validation and a Dynamic Action. I'm not sure how to go about creating what I need. Any help would be greatly appreciated! Hopefully I have described the scenario well enough.
    Thanks!
    John

    This did the trick! I created the hidden item, then created a dynamic action that would set the value of the hidden item to 1 if the field changed (action = 'change'). Then I created a validation on my 'comments' field to check if it was NOT NULL when the 'Apply Changes' button was pushed, with a condition of the hidden item = 1.
    One thing extra - I had to set the dynamic action so that it did NOT fire on page load. Otherwise it would set the hidden item to 1 when the page loaded after clicking the "Apply Changes' button.
    So, thanks!
    One other question - I have a lot fields on this form. All of them have this requirement except for a few buttons. Is there any way to list the fields NOT to look for a change. In other words, in the Dynamic Action section, in the WHEN section, is there a way to designate items NOT to look for a change?
    Thanks for the help!
    John

  • CRM 7.0 WebUI:  Second field searchhelp based on first field value

    Hi,
    I created an all-custom search/result component, all other things are working correctly, except one - on result list, when in change mode, the second field should have a dropdown list which is filled based on the first field value, user can pick one.  I searched this forum and SAP docs, so far I haven't found a solution.  Has anyone done this?  or have you seen any SAP standard screens having this kind of function?
    Thanks.
    Steven
    Edited by: Steven Lee on Apr 23, 2010 11:11 AM
    Edited by: Steven Lee on Apr 23, 2010 11:11 AM

    Hi Steven,
    1. Declare a Global Drop Down table as an attribute in your implementation class.
    2. Create an Event when you select a drop down value for the first field.
    3. In this event handler, build the global drop down table.
    4. In the get_v method of your second field, fill the returning parameter of dropdown values from the values in your global dropdown table you just filled in the Event Handler method.
    I have used this successfully. I hope it works for you too.
    Please let me know if you have questions.
    Thanks
    Vishal

  • CRM 7.0 WebUI:  Dropdown for second field is based on first field value

    Hi,
    I created an all-custom search/result component, now having one challenge - requirement is - on result list, when in change mode, the second field should have a dropdown list which is filled based on the first field value, where user can pick one.  I searched this forum and SAP docs, so far I haven't found a solution. Has anyone done this? or have you seen any SAP standard screens having this kind of function?
    Thanks.
    Steven

    Hi Steven,
    You will rarely see a result list component in change mode.
    Anyhow, to fulfill your requirement, you have to trigger a round trip for the first field when a value is selected.
    You can do this by specifying a dummy event in GET_P method.
    The GET_V method of the second field will trigger for this round trip and you can trigger the values.
    Regards,
    Masood Imrani S.

  • How do I use switch and case statements to fill more than one other field?

    Hi all,
    I'm new to the community.
    I'm trying to make an existing form more user friendly for my coworkers. I want to use a switch and case approach in a drop-down list field so that the selection fills two seperate other fields with different info related to the selection.
    I can already do this with one field, but if I add a second target field under an existing case the text doesn't appear there when I make the selection from the dropdown.
    Basically, I'm asking if I can do this:
    switch 
    (sNewSel){
       case "1": // Selection 1    Row2.Field1
    = "text for field 1";
        Row1.Field2 = "text for field 2"; 
        break;
    etc.
    It works if the "row1.field2" option isn't there, but not when it is present.
    Any takers?

    I'm not sure if I will be able to send you the form. There may be too much to redact.
    Would this last bit of code in the cell affect anything?
    if 
    (bEnableTextField)
    {Row2.Field1.access
    = "open"; // enable field
    Row2.Field1.caption.font.fill.color.value= "0,0,0"; // set caption to black
    That is, do I also need to repeat the same thing for the second target cell (Row1.Field2)?
    What would be possible hang ups that would prevent it from working correctly?
    Dave
    By the way, I'm not sure if my other attachment posted. I am trying again.

  • Maybe you are looking for