cancel
Showing results for 
Search instead for 
Did you mean: 

Submit button how does it work in noninteractive forms

Former Member
0 Kudos

Hi ,

I read the below part in one of the articles on interactive forms . can anyone explain how this is done ....

.................

An interactive form can, in standalone, make a call to some web service. And as you may know, in the NetWeaver versions of SAP systems, every remote-enabled function module can be exposed as a web service!

The web service call logic is embedded in the Interactive Form you sent to your customer. When he clicks on 'Submit';, the web service is called, and your SAP backend is updated. Great!

....................

As per my understanding a RFC FM is created and it is configured in the SFP transaction.. is it correct ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Abhilash,

1) Yes, it must be your server. It is the URL of a WSDL for your function module. You can read more on the page 4 "Access SAP Business Functions (ABAP) via Web Services" https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/06adbf03-0a01-0010-f386-d8e45561...

2) For example, you can send this string to adobe form by interface of this form. So in Data View window in LiveCycle Designer, there will be a node with this string, for example named WSDL. Then you can read this by javaScript:

var oURL = xfa.resolveNode("xfa.record.WSDL").value;

Regards

Michal

Former Member
0 Kudos

Hi Michal ,

I am not able to open this link .. it hangs while downloading.. can you send me this PDF .. I am in urgent need for this or send me another link

Regards

Abhilash

Former Member
0 Kudos

abhilashstanly@yahoo.com

Former Member
0 Kudos

Hi Michal ,

I got the file .. Thanks a lot ,, The below code you had send for gettig the XML will this have the enire form data or any particular fields only ( nodes you have is is it the node in the form designer)

if you want to get a string with xml data in an adobe form,

you can use javaScript:

function GetData() {

var myDataNode = null;

var xml = "";

try {

myDataNode = xfa.resolveNode("$data.nodes.item(0)");

xml = myDataNode.saveXML();

} catch (ex) {}

return xml;

}

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Abhilash,

exactly, it give you only data from the first Data Connection (window Data View in LiveCycle designer). But you have only one Data Connection there. So it give you entire form data.

Regards

Michal

Former Member
0 Kudos

Hi Abhilash,

how create web service in WAS you can read in "Access SAP Business Functions (ABAP) via Web Services" https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/06adbf03-0a01-0010-f386-d8e45561...

Here is an example. Move code bellow to click event of a regular button (Control Type = Regular). In this example I use my function module ZHRABAM_ECHO_STRING which can be called as a web service.

[code]callWebService();

function callWebService() {

var lXmlData=GetData();

try{

SOAP.wireDump = false;

var oURL = "http://server:8005/sap/bc/soap/wsdl11?services=ZHRABAM_ECHO_STRING&sap-client=100";

var service = SOAP.connect(oURL);

if(typeof service != "object") {

xfa.host.messageBox("Error calling the Web Service.");

return;

}

if (service.ZHRABAM_ECHO_STRING == "undefined") {

xfa.host.messageBox("Error calling the Web Service.");

return;

}

var lResult = service.ZHRABAM_ECHO_STRING();

if( lResult != null){

xfa.host.messageBox("Result: "+lResult);

} else {

xfa.host.messageBox("Result is null.");

}

} catch (e) {app.alert(e.message);}

}

function GetData() {

var myDataNode = null;

var xml = "";

try {

myDataNode = xfa.resolveNode("$data.nodes.item(0)");

xml = myDataNode.saveXML();

} catch (ex) {}

return xml;

}[/code]

*****

[code]FUNCTION ZHRABAM_ECHO_STRING.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(IV_TEXT) TYPE STRING

*" EXPORTING

*" VALUE(EV_TEXT) TYPE STRING

*"----


ev_text = iv_text.

ENDFUNCTION.[/code]

Michal

Former Member
0 Kudos

Hi ,

Thanks a lot Michal .. 2 small questions .

The URL you have mentioned .

http://server:8005/sap/bc/soap/wsdl11?services=ZHRABAM_ECHO_STRING&sap-client=100.

1) server:8005 : this should be my server id or is it contant ...I mean as I configure it here in my system I should give my Server ip details ?

2) how can we make this string dynamic as I move it QA and Prod ?

Regards

Abhilash

Former Member
0 Kudos

Hi Michal ,

http://<server>:<port>/( the other details given by you which will have the FM name >

I hope this is genral format for the Ip crt me if I am wrong ..

now how can I know the IP details or how to config it ..

Regards

Abhilash

Former Member
0 Kudos

Hi Michal ,

http://<server>:<port>/( the other details given by you which will have the FM name >

I hope this is genral format for the Ip crt me if I am wrong ..

now how can I know the IP details or how to config it ..

Regards

Abhilash

Former Member
0 Kudos

Hi Abhilash,

I assume you have a web service (for example created in WAS from a function module). This web service has a parameter of type string (importing parameter of your function module). Your adobe form will call this web service and will fill importing parameter with a string (string with xml data). How get a string with xml data in an adobe form I wrote you.

Regards

Michal

Former Member
0 Kudos

Hi Michal ,

Thanks for driving me close .. I have one more doubt ..

can you tell me I have set up that the XML data to be generated and in the server side I have the FM ( WAS) .

Where do I say this is the FM to be invovked when I click on the submit button .. or how does this work . how is the link set up .. what all I need to be done for setting up the RFC destination

Regards

Abhilash

Former Member
0 Kudos

Hi Abhilash,

if you want to get a string with xml data in an adobe form, you can use javaScript:

[code]function GetData() {

var myDataNode = null;

var xml = "";

try {

myDataNode = xfa.resolveNode("$data.nodes.item(0)");

xml = myDataNode.saveXML();

} catch (ex) {}

return xml;

}[/code]

Then you can send this string with xml data by a web service.

Michal

Former Member
0 Kudos

Hi Michal ,

Thanks for your reponse ..

As per my undersatnding now once the XML data is generated it willl be stored in WDSL file and it can be read by the ABAP code to udate the database ..is it crt ?

pls let me know incase it is wrong ...

Regards

Abhilash

Former Member
0 Kudos

Hi,

you can call web services from adobe form:

1. In DataView you can create a DataConnection to WebService: rightClick, New Data Connection, WSDL File (more in Adobe LiveCycle Designer Help).

2. SOAP object. Page 193 in http://www.adobe.com/devnet/acrobat/pdfs/js_developer_guide.pdf

Michal

Former Member
0 Kudos

Hi Michal ,

1) WSDL data connection : I read the documentation . As per my understanding you need to create the connection ane the Webservice ( RFC FM created ) will communicate with the File ...is this corect ? if crt then how will the FM write out to the file

Regards

Abhilash

Former Member
0 Kudos

Hi (again),

Not correct. SFP is the form builder for print forms.

In this blog, I speak about offline standalone possibilities of the interactive forms, which can make calls to web services. These calls have to be present in the form.

Regards,

Francois

Former Member
0 Kudos

Hi Francois ,

Thanks for the quick reply ..

can you explain the last sentence for in the below post in detail

These calls have to be present in the form.

did you mean to say I have to configure the URL and then read the data ..

If that is the case what is URL you need to send the data in XML format and were is ths XML file stored...

Regards

Abhilash