cancel
Showing results for 
Search instead for 
Did you mean: 

Returning table structures using web services in interactive forms

scott_stefanich
Active Participant
0 Kudos

I created a web service for BAPI_PRODORD_GET_DETAIL and used it as a data connection in an offline interactive form. I am able to successfully execute the data connection, send request parameters, and return response structures, but have not been able to successfully return response tables.

I've been using the SAP Press book "SAP Interactive Forms by Adobe" which has a chapter on using WSDL data connections in offline scenarios via web services. One of the authors, Juergen Hauser, also has an excellent blog [Using Web Services with SAP Interactive Forms by Adobe- Overview & Tips|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/8735] [original link is broken] [original link is broken] [original link is broken];. Here are the steps I have taken,

- Create a form interface import parameter. The parameter table type has the same line type as the returned table response structure.

- Added the table import parameter to the context of the form.

- Created a WSDL data connection in the data view of the form.

- Created a button for calling the web service by dragging the LiveCycle Designer generated data connection button from the data view to the form layout. I set the button's control type as "Execute" and selected "Re-merge Form Data" on the Execute tab of the Object palette.

- Created a table for the data. I have tried creating the table in a few ways:

1. Dragging the table from the data view data connection response (creates subforms with table/body roles in hierarchy)

2. Dragging the table from the data view data connection response and converted to table via the menu, Table -> Convert to Table

3. Creating the table in the hierarchy by manually creating a table object

In defining the table in the hierarchy, I have proceeded with the following,

- Table: No default binding, import/export binding to the data connection response table

- Item: Default binding to the data context DATA[], import/export binding to the data connection response item[]

- Item fields: Default binding to the data context DATA->field, import/export binding to the data connection item->field

Then, I save the form locally as both interactive and dynamic with usage rights (The SAP Press book describes a very useful program for doing so). Executing the data connection returns the return message structure but not the table. Placing a breakpoint in the BAPI shows the table is populated.

I am using LiveCycle Designer 8.1.2 and Adobe Reader 9.3.0.

Does anyone have any ideas or suggestions on where I am going wrong?

Thank you,

--- Scott

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Hello, I guess this will help you:

Retrieve table data from WebService

/people/rudy.clement2/blog/2010/03/10/how-to-use-the-postexecute-event-in-sap-interactive-forms-to-retrieve-a-table-from-a-webservice

Regards Otto

scott_stefanich
Active Participant
0 Kudos

Hello Otto,

The blog you linked is an excellent one. It details and explains using scripting to capture web service table data which would otherwise be deleted upon a data re-merge. I am trying to determine why the standard method of binding repeated web service data isn't populating. Based on my Adobe journey so far, I am guessing there is a good chance of user error on my part such as a wrong or incomplete setting.

Here is how I am looking at the two approaches ( <---that's a disclaimer)

Standard method of binding repeated data:

- No scripting

- Useful for retrieving table data (well, "similarly described" data) from a single web service data connection

- Data is wiped out following re-merge

Scripting to capture web service data:

- Requires scripting

- Offers the ability to capture retrieved data from one web service data connection and have it available for another web service data connection

Thank you,

--- Scott

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

Both mentioned options look reasonable for me. I cannot see a question mark? Good luck, Otto