cancel
Showing results for 
Search instead for 
Did you mean: 

Load values dynamically into a dropdown list from SAP table

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hello Amit,

Thanks for the reply.

Actually, I'm not using any WD here. In my requirement, I'm only using Adobe forms. So I need to have the drop-down list with all the possible values from a transparent table into the drop-down list of Adobe form. How to go about this?

Cheers,

Sam

Answers (0)