Quantcast
Viewing all articles
Browse latest Browse all 1237

Adobe Form Data Integration into SAP using RFC

Hi All,

 

I have created a Adobe Form, there is a button Called Submit ,On clicking that button  the Adobe form must call a RFC function Module and pass the data from the form to Function Module.

 

I have written the below code for the submit button but it is not working.Please Lemme know if u have any solutions..

 

Below is my code

 

//Submit this form to SAP using web services

  var webService = xfa.resolveNode("xfa.record.WEBSERVICE");

  xfa.host.messageBox ("test 3");

  var response = Net.SOAP.request(

  {

  cURL: webService.value,

  oRequest: {

  "urn:sap-com:document:sap:rfc:functions:ZUPDATETIMESHEET":{

  TIMESHEET: t_time_record,

  HEADTIME:  wa_head

  }

   },

  cContentType: "text/xml"

  });

  xfa.host.messageBox ("test 4");

  var success = response["urn:sap-com:document:sap:rfc:functions:ZUPDATETIMESHEET.Response"]["SUCCESS"];

  var response = response["urn:sap-com:document:sap:rfc:functions:ZUPDATETIMESHEET.Response"]["RESPONSE"];

 

  if (success == "X") {

  xfa.host.messageBox(response, "Response from SAP", 3);

  CONFIRMED.rawValue = "Yes";

  ConfirmedLogo.presence = "visible";

  for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) {

  var oFields = xfa.layout.pageContent(nPageCount, "field");

  var nNodesLength = oFields.length;

  for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) {

  oFields.item(nNodeCount).access = "readOnly";

  if (oFields.item(nNodeCount).border.fill.color.value == "255,0,0")

  oFields.item(nNodeCount).border.fill.color.value = "255,255,255";

  if (oFields.item(nNodeCount).ui.oneOfChild.className == "button") //Hide all buttons

  oFields.item(nNodeCount).presence = "hidden";

  }

  }

 

 

ZUPDATETIMESHEET is my Function Module.

t_time_record  and wa_head are the parameters being passed to the function Module.


Please lemme know if i have to do any settings and configurations also...

I have attached the entire code in the below file...


Thanks in Advance  Image may be NSFW.
Clik here to view.


Viewing all articles
Browse latest Browse all 1237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>