on 06-03-2007 8:49 PM
I'm trying to create a offline interactive Adobe form scenario for customer orders.
In this form, I need to provide a drop-down list field where the user can select the customer. Based on the customer selected, I need to populate customer address data e.g. name, address, phone no etc in this form.
I'm using pure ABAP only to generate this form.
I've following questions:
1. How do I populate the drop down list for customer field?
2. How do I set the name and address fields with values when user selects a customer from the drop down list?
I'm not very familiar with Java script so you will have to give me the code that I can add to the form to make this happen.
Thanks in advance for your help.
Could you please provide me the entire code on how to get the dropdown list.I pls request you to provide me the solution at the earliest.I need to deliver ISR form please.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
to populate the dropdown list you can do it...
1). manually or
2). by code
1). <b>manually</b> go to interactive form->edit
go to Object tab->field tab ->
you must see something like
List Items :
Text + x
click on the green + sign...
it promps you to type. type in the value press enter... and so on...
2) <b>by Code...</b>
//set up contents of a drop down list dynamically...
IWDAttributeInfo countryInfo = wdContext.nodeTravelData().getNodeInfo().
getAttributeInfo().getAttribute("DestinationCountry");
ISimpleTypeModifiable countryType =
countryInfo.getModifiableSimpleType();
IModifiableSimpleValueSet countryValueSet =
countryType.getSVServices().getModifiableSimpleValueSet();
countryValueSet.put("1","Germany");
countryValueSet.put("2","UK");
This will work....
regards,
-amol gupta
Thanks a lot amol.
I am yet to try this code.But i have no idea where i need to write this code.Supposing I need a dropdownlist of company code what should be the code.I which event do i need to write the code.There are number of events in the editor.Should i use any badi apart from this to get the dropdown list
can you please tell me how did you resolve your first issue of getting the customer numbers in the drop down list in ISR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was able to resolve the issue#1.
But, I'm not yet able to resolve issue#2 which is as follows:
When I select a customer no in the dropdown list, I would like to set the value for the following fields: Name, street, phone no, city, state, and Zip.
I used the following JavaScript in the "Change" event of the "Customer" dropdown field but it is not working:
var lKey1= this.rawValue;
ZZ_NAME1.clearItems();
var loNodes = xfa.record.CUSTOMERS.nodes;
var loNodesRow;
lLength = loNodes.length;
for (var i = 0; i < lLength; i++) {
loNodesRow=loNodes.item(i).DATA.nodes;
if (loNodesRow.item(0).value==lKey1)
ZZ_NAME1.rawValue=loNodesRow.item(1).value;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I selected a new value from the "customer no" drop down list, I wanted to automatically change the value of the "Name1" field.
I did this by triggering the "Initialize" event of the "Name1" field from the "Change" event of the "Customer no" field. In the "Initialize" event of the "Name1" field I wrote a script that would take the value from the customer no field and do a look up for Name1 in the internal table that I passed to the form.
Please assign points if you find this tip useful.
Here is how I did it.....
1. You need to pass the list of values to be displayed in drop-down in a internal table.
2. Now you write a javascript code in the "Initialize" event of the field to loop at the internal table values and use the following command to populate the drop down list:
this.addItem(<data from internal table>).
Please assign point if you find this useful.
Hi Atul,
Please explain on the approach you made.
Does the internal table have the key-text pair values?
Please specify exactly the script you wrote.
If the internal table contain only a text. where you able to fetch the selected value for further processing.
for getting points, you may post the answer to the other posted by me regarding the drop downs. As this is a thread opened by you, we wont be able to grant the points :(.
Thanks and Regards,
Anto.
hi chakram,
the problem you are quoting, i also faced the same(lloks like...)
TRY THIS:-
check...
interactive form->properties->mode
now here mode should be = updateDataInPdf*
<b>when u want to generate the form u use mode="updateDataInPdf*"
(i.e. u create the pdf online using interactive form UI element)
when u upload pdf and navigate to the page containing Interactive for UI element
u use mode="usePdf"</b>
hope this helps.
regards,
-amol gupta
Hi,
In WebDynpro I could able to populate values in Dropdown list. Thanks for your tips.
Can you please guide me how to populate values in the interactive adobe form dropdown list.And also is it possible If i select any value from the list,and populate other fields based on this value in interactive form?.
thanks,
John.
I'm using the following code to pupulate the drop down list in the form.
But, in the report pallet I get the error message "Invalid node type: tags".
Any idea what is wrong with this code?
When I generate the form, it says "message limit exceeded".
becasue there are too many errors of the above type.
var loNodes = xfa.record.CUSTOMERS.nodes;
var loNodesRow;
lLength = loNodes.length;
this.clearItems();
for (var i = 0; i < lLength; i++) {
loNodesRow=loNodes.item(i).DATA.nodes;
this.addItem(loNodesRow.item(0).value);
}
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.