Help in getting Proper Record

Hi thnks in advance.

I am Using SAP 4.6 and i am clling my service which is routing my idocs send from sap system.

Steps I fallowed:

1.I created Routing roule to listen my sap server.
2.I created a Service which mentioned in my routing rule.
3. called DocumentToRecord and add a xml Schema for DEBMAS01 which created as record in pipline out and maped to bundlenode of service out.
4. called RecordToDocument nothing i done here ?
5. called a java service code below :

writeToFile:
try{
//The java service will have the following lines of code:
IDataCursor pipelineCursor = pipeline.getCursor();
pipelineCursor.first(“xmldata”);
String xmlContents = (String)pipelineCursor.getValue();
//the xmlContents varaible will have the FTPed XML data. You could store this in a file as per your need.
File outputFile = new File(“c:/CmXml.xml”);
outputFile.createNewFile();
FileWriter outfile = new FileWriter(outputFile);
outfile.write(xmlContents);
outfile.close();
}catch(Exception ex){System.out.println(ex);}

  1. Run BD12 in SAP and send Customer Master with records.
  2. I can see in transaction as confirmed the idoc and executed and commited.
  3. I saw my file generated from xmlString show blank without any records.

Please let me know where are my mistakes very urgent.
<?xml>
<debmas01>
<idoc>
<edi_dc40>
<tabnam></tabnam>
<direct></direct>
<idoctyp></idoctyp>
<sndpor></sndpor>
<sndprt></sndprt>
<sndprn></sndprn>
<rcvpor></rcvpor>
<rcvprn></rcvprn>
</edi_dc40>
<e1kna1m>
</e1kna1m>
</idoc>
</debmas01>

with regard
satya

Hi, Satya.

If your BoundNode is not mapping as expected, there is a nesting issue you should debug for. Here are some steps to take that may help you.

  1. In the documentToRecord step, go to the Service Out variable and select BoundNode. []Click the “Insert” icon (4th from the left on the Pipeline tab) and insert a Record. []Name the Record as the XML document root node Map the BoundNode’s subnode that you created to the Pipeline Out variable BoundNode. Make this map explicit (i.e. draw the line). You can map it directly to your target SAP RFC/BAPI Record in the Pipeline Out, if you want.

If my hunch is correct, this will fix your “does not map” issue.

If you need a better description of how to perform these tasks, be sure to ask.

Thanks.

Hi Green,

I tried with your suggestion .

  1. called documentToRecord and in BoundNode of servie in I inserted DEBMAS01 record and mapped to pipeline out boundnode.
  2. called RecordToDocuemnt and set all the values in service in.
  3. called StringToDocument
  4. amd My java Progream as said earlier.

I am getting the below problem please urgent…
06/07/2003 03:37:55 AM State changed to: Created
06/07/2003 03:37:55 AM ALE:InboundProcess Execute CB7DFF740A203EE0EF1F0354
06/07/2003 03:37:56 AM State changed to: Created
06/07/2003 03:37:56 AM Gateway Manager <-- 'ALE (R/3 IDOC)
06/07/2003 03:37:56 AM Invoked flow wm.PartnerMgr.flows.ALETST800.BUSCON:DEBMAS
06/07/2003 03:37:57 AM Error in invoking the service Aspentech:mapCustomerMaster on the server (local)
06/07/2003 03:37:58 AM State changed to: Rolled back
06/07/2003 03:37:58 AM [B2BSERV.0062.9001] Service record argument in RecordToDocument is null
06/07/2003 03:37:58 AM State changed to: Rolled back
06/07/2003 03:37:59 AM com.wm.app.b2b.server.ServiceException: [B2BSERV.0062.9001] Service record argument in RecordToDocument is null
06/07/2003 03:38:00 AM State changed to: Rolled back