cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Java scripting is written in "EXIT" event.

Have referred to the link below for java scripting requried:

Former Member
0 Kudos

Hi Soumya,

Can you please share your solution for the same

I am also facing the same problem.

I have 3 fields in Interactive adobe form - Sold to, Ship-to and Contact-to.

Dynamically data is uploaded in the for while downloading from the CRM database.

Now in offline scenarion, when the user selects 1 Sold-to, only corresponding shipto and contact to should be visible, By Default all values for sold to , ship to and contact to are shown.

I have made the complete interface using SFP and not webdynpro, however internal table is passed in Interactive Form.

Soldto Shipto

1 1a

1 1b

2 2a

2 2b

2 2c

Any input for validations or data bindings are welcome.

Please suggest

Thanks & Regards,

Narendra.

vaibhav_tiwari
Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Soumya,

I am not very sure about your requirement.

I guess your requirement is to set the value for a dropdown on any particular event based on the values of some other fields in the form itself. If so try the following javascript in the appropriate event.

If (field1.rawValue == "X"){
     this.parent.DropDownList1.selectedIndex = "2";
}

Let me know if you are looking for something else.

Thanks & Regards,

Sanoosh

Former Member
0 Kudos

Hi Sanoosh,

Thank you for the response.

My requirement is little different.

I need to fill dropdownlist say DDL2 with values which i need to fetch from SAP database table based on the value entered in DDL1 and textfield1. Since my form is an offline form , during execution i will not have the SAP system connected, so was wondering how can i do this in offline interactive adobe form which uses web service (a FM is wrapped within it).

Regards,

Soumya

Former Member
0 Kudos

Ok now it is more clear.

You can call the web service in the change event of DDL1. Pass the values of DDL1 and TextField1 as import parameter to the web service (FM) and get the corresponding DDL2 values from SAP. Bind DDL2 dynamically through javascript.

Let me know in which of these steps you are facing the problem.

Thanks & Regards,

Sanoosh

Former Member
0 Kudos

Hi Sanoosh,

Thanks for your response.

As i am new to offline interactive adobe form as well as web service, i am not sure how to pass parameters to webservice, its execution through java scripting and binding to DDL2. If you can explain that, it will really be helpful.

Regards,

Soumya

Former Member
0 Kudos

Hi Soumya,

Search the forum. You will get many answers. Check the following link as well.

[;

Thanks & Regards,

Sanoosh

Former Member
0 Kudos

Hi Soumya,

well if you look into ADLC help, there is step by step approach to have a webservice.

by doing so you will have the import and export parameters in the form.

just map the these fields to your required fields on the form.

cheers,

Sai