on 04-03-2008 11:39 PM
Folks,
I'm new to Adobe. But I'm learning
Here's my issue. I'm going to use an Adobe Interactive form for the users to enter the Vendor details. This will be called in a GP workflow.
There are certain fields in the form like Country, State etc which should be populated as a dropdown list in the Adobe form so that the user can select one of them. The values for these fields should come from SAP country master tables.
I understand that this can be done using Data connection etc. But can anyone give me a clear step by step approach for the same or how can it be done?
Cheers,
Sam
Hi,
Step 1: Create a Simple Type in the dictionary.
Step 2: Create a attribute "Country" in the context of type Simple Type created in step 1.
Step 3: Import BAPI RFC_READ_TABLE in WD Application.
Step 4: Write the following code in the init method:
Rfc_Read_Table_Input rfcread = new Rfc_Read_Table_Input();
rfcread.setQuery_Table("T005T");
wdContext.nodeRfc_Read_Table_Input().bind(rfcread);
try {
wdContext
.currentRfc_Read_Table_InputElement()
.modelObject()
.execute();
} catch (WDDynamicRFCExecuteException e) {
// TODO Auto-generated catch block
wdComponentAPI.getMessageManager().reportWarning(
"error in exec" + e.getMessage());
}
// wdContext.nodeData().getDataElementAt(i)
int size = wdContext.nodeData().size();
// wdComponentAPI.getMessageManager().reportWarning("Size " + size);
IWDAttributeInfo countryinfo =
wdContext.nodeEmployee().getNodeInfo().getAttribute("CountryNew");
ISimpleTypeModifiable Country = countryinfo.getModifiableSimpleType();
IModifiableSimpleValueSet countryValueSet =
Country.getSVServices().getModifiableSimpleValueSet();
try {
String country, countrytxt;
for (int i = 0; i < size; i++) {
String text = wdContext.nodeData().getDataElementAt(i).getWa();
if (text.length() > 87) {
if (text.substring(3, 4).equals("E")) {
// wdComponentAPI.getMessageManager().reportSuccess("Length "text.length() " Country "+ text.substring(37,87));
country = text.substring(4, 7);
countrytxt = text.substring(37, 87);
countryValueSet.put(country, countrytxt);
}
}
}
} catch (Exception e) {
wdComponentAPI.getMessageManager().reportSuccess(
"error" + e.getMessage());
}
Hope this helps you.
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.