cancel
Showing results for 
Search instead for 
Did you mean: 

Passing table to web service - using javascript

Former Member
0 Kudos

Hi All,

I need to pass table structure to web service using data connection.

I dont know how to accesss the request node and create table and pass data to it.

Request you all to help me to achievev this functionality.

A long needs to split of 50 characters each. Then create a new instance for request node table structure assign the values.

All this needs to be done using CODE i.e javasript

how to do this ???

Regards,

Aditya Deshpande

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

Hello,

I cannot test it at the moment, but what I would try is to:

build up a table (flowed) with a row (repeat subform for each data item), this don´t have to be visible and can be blank. this is what you can bind to your webservice i think.

write a JS/FC code which:

- takes your input field

- cut it into pieces (100 chars)

- for each piece it creates the instance of the row of your WS-bound-table

- this way you can build yourself a table and also you have something to bind to the WS

Hope this can work and thus will help:)) Good luck, Otto

Answers (2)

Answers (2)

OttoGold
Active Contributor
0 Kudos

Of course there is another option, but it will last longer, will need you to work more, read more, debug more, script more...

You can do everythink you need to do to pass the data to the WS yourself. I mean:

- you can script everything about the webservice yourself using FormCalc HTTP

- you can create the whole message to be send yourself, but you will need to adapt your form structure so you won´t have to do many changes after using saveXml (or something like that) method

- you won´t use any WSDL or LCD clicking, everything will be done only through scripting

Problem: It is a long time ago I have programmed such scenario and it was not me alone, I remember that to be very unpleasant experience and we will not be able to "debug your solution on SDN"... Sorry but I have no other ideas, Otto

Former Member
0 Kudos

ok..

Thanks

Aditya Deshpande.

Former Member
0 Kudos

Hi Aditya

I am working on a similar scenario and I am stuck at one of the issues. Please have a look at the following thread and see if you can help me on this:

[|]

Thanks

Deepak

Former Member
0 Kudos

Hi Aditya,

Follow this Thread for passing Table Data to WebService [Return Table empty in Web Service response|]

Also review this thread [Adobe Interactive Forms / Web Services - Connection query|;

Regards

Pradeep Goli

Edited by: Pradeep Goli on Nov 12, 2009 12:53 PM

Former Member
0 Kudos

Hi,

@ Pradeep: I tired but not much help.

I have a adobe form with a text field on screen.

I have a web service with a table structure as input.

How do I set the text in field into the table structure of the web service.

I need to do this using code because I have to split the text in the field before setting it into the web service.

Help urgently!!!

Regards,

Aditya Deshpande

Former Member
0 Kudos

HIi,

Let me explain the scenario once more:

Scenario:

Pdf has two Text edit field and one button. Where the end user would enter the values.

The PDF is integrated with Web service for Offline scneario.

Field 1 is a notification number.

Field 2 is description - unlimited entry into PDF.

Button: is used to execute the web service.

It is done using the blog:

http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417700)ID0394564950DB01118597046218481719End...

Field1 is mapped to corresponding field in web service by IMPORT/EXPORT bindings.

Problem:

Field 2 is a text field. But this data has to be passed to web service as table. The web service has a table structure.

Hence the text in the Field 2 has to be split into 100 characters each and set into table rows.

The Strucutre definition in the data connection is:

- Item

- TDFORMAT

- TDLINE

Since I need to split the text and load.I felt this needs to be done using code ( script ).

I do NOT know how to do it using CODE. Please help ME!!!!!!!!

If there any other way please let me know. I am also not sure which would be best way of doing it.

PLEASE HELP ME!!!

Regards,

Aditya Deshpande.

NoJo
Active Participant
0 Kudos

in the webservice i would use a field type string for the text instead of the text-table.

then convert the string in the backend to the table. there function modules exist doing this.

br

norbert

Former Member
0 Kudos

Hi,

@ Otto: Thanks even I was thinking the same solution. But wanted to confirm. I will try it and get back

@ Norbert: That was part my idea. But client wants it be Infinite length. No text field in RFC was able to give infinite string length.

Just in case you know about Infinite length string in FUnction module.Please let me know.

Thanks and Regards,

Aditya Deshpande

Former Member
0 Kudos

Hi

I have created the PDf form with multiple rows table and mapped to Web service.

But it is passing data which is present only the last row... It is not passing data on the earlier rows...

It hink not creating multiple rows in the WS request node.

Any idea ??????

Regards,

Aditya Deshpande

Former Member
0 Kudos

HI All,

I am able to create multiple rows in WS also...

That was because did not map the properly

first craete table where you can added multiple rows.

Then do following binding

If your strucuture is as follows:

- Item

- TDFORMAT

- TDLINE

Then ITEM has to pappen in Import/export binding at Row level

TDFORMAT and TDLINE has to be mapped at Column level fields

Then execute the web service.

It willpass multiple rows to it ))

Thanks a lot for your help.

Thanks and Regards,

Aditya Deshpande

Former Member
0 Kudos

Hi,

I was wonderig there would performance isuues with this...

Can I get some details on this.

Because if there is performance issues I might have to go as Norbert mentioned...

Thanks,

Aditya