cancel
Showing results for 
Search instead for 
Did you mean: 

File-to-RFC Scenario Table Param are empty

Former Member
0 Kudos

Hello,

I create a file adapter to rfc adapter scenario. Thereto I implemented a RFC in SAP which has only a table param. Furthemore I mapped the XML-File, that will be read by the File Adapter sender, to the SAP RFC Table structure. However the scenario works in PI, that mean the xml file will be read by the file adapter and will be send to the RFC Adapter receiver which makes a rfc call to the SAP destination. However my rfc function in the SAP destination will be called, but the table param is empty. Hereto I call the statement in my rfc function:

if MORDERNOTIFY is not initial . I do not know what the reason is that the table param is empty? I also checked in the runtime workbench of the PI system and there is no error in the communication channels, the message will be send correctly, here is also an example message of the table structure:

<?xml version="1.0" encoding="UTF-8" ?>

- <ns1:Z_RFB_ORDERCONFIRM xmlns:ns1="urn:sap-com:document:sap:rfc:functions">

- <MORDERNOTIFY>

- <item>

<ZMELDUNGSTYP>ARU</ZMELDUNGSTYP>

<ZPARTNER>HUP</ZPARTNER>

<ZMELDUNGSNR>1</ZMELDUNGSNR>

<ZMELDUNGSDATUM>20080822</ZMELDUNGSDATUM>

<ZAUFTRAGSNR>5079440</ZAUFTRAGSNR>

<ZKONTAKT>Test</ZKONTAKT>

<ZWAGNNR>1211</ZWAGNNR>

<ZAUFTRAGSSTUFE>GP.1</ZAUFTRAGSSTUFE>

<ZSTATUS>1</ZSTATUS>

<ZABFAHRTSORT>Zug</ZABFAHRTSORT>

<ZBESTIMMUNGSORT>Bonn</ZBESTIMMUNGSORT>

<ZBEREITDATUM>20080822</ZBEREITDATUM>

<ZSCHADENSCODE>232</ZSCHADENSCODE>

<ZEINGRIFFSFRAGE>1</ZEINGRIFFSFRAGE>

<ZSMI>2</ZSMI>

<ZGEPLEINGANG>20080822</ZGEPLEINGANG>

<ZAUFTRAGSSTATUS>1</ZAUFTRAGSSTATUS>

<ZGEPLENDE>20080822</ZGEPLENDE>

<ZBEMERKUNGEN>Tes</ZBEMERKUNGEN>

</item>

</MORDERNOTIFY>

</ns1:Z_RFB_ORDERCONFIRM>

The SXMB_MONI also shows that everything is ok. I assume that there is a problem by mapping RFC-XML to binary RFC. I do not know what the reason is why the table above is empty sended to my system.

Kind regards,

Erkan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try to map this way,

Source --> MapwithDefault -->Target

Thanks,

Boopathi

Former Member
0 Kudos

Hello Boopathi,

I have the newest SAP PI System, and where should I do this in the Interface-Mapping or, because in the interface mapping there is no options.

Kind regards,

Erkan

Former Member
0 Kudos

Hi Erkan,

Do u mean that u pass import paramters from the Source Interface which is created by Sender File Adapter.

My Undestanding is that : U pass the import parameters but u cannot see the table.

Hope u mapped the import parmaters and then put a External break point to u r FM and see the table would be filled to u r target system.

reply back for more clarity.

rgds

srini

Former Member
0 Kudos

Hello srini,

yes, I pass the import paramters from the Source Interface which is created by Sender File Adapter. This is a xml file and then I map this to the table structure of the RFC function module. How can I set a external break point to my function module, because I only check if the table is not initial and this provides false?

Thanks in advance to answering my question.

Kind regards,

Erkan

Former Member
0 Kudos

Hi ,

As such you can set breakpoint in RFC and test the whole scenerio in XI. Here you need to do part wise debugging , first see that XI is getting correct data which you are sending further to R3.

Now in SPROXY Transaction you go to the class level and then set a breakpoint,just run the class not the whole interface, I mean copy the data from SXMB_MONI which is nothing but input to R3, and then check your code at R3 side.

Thanks

Sudharshan

Former Member
0 Kudos

Hi ,

open the u r Funtional Module in Se37

And click on the Source Tab.

On the top menu : near "Patterns" u can see two kinds of Break point.

Break point with a Head on it is external break point

click on it , it wud be valid for 2 hrs.

hope u have kept u r file in test mode , once u r Adapter picks file u can see u reach u r external brk point.

Note: Donot make this break piont to be long time , because u can see Some JCO connection error in u r RWB , which is normal )

Test and lemme know

rgds

srini

Former Member
0 Kudos

Hello Sudharshan,

my problem is that my R/3 System (target) and the PI (source) sytem are in differnet locations. I cannot call in the target R/3 System he SPROXY transaction. If I test the RFC module via SE37 and I fill the table manually, then its work, but not in that way if I try to test it via PI System . Is it possible that R/3 will not work with table param?

Kind regards,

Erkan

Former Member
0 Kudos

Hello srini,

I set an external break point in my function module, but this will not be called.

How can I start the file adapter in test mode?

Or what you mean with hope u have kept u r file in test mode?

Thanks in advance for answering my question.

Kind regards,

Erkan

Former Member
0 Kudos

Hello srini,

ok, the external break point works. Then I check the Table Variable MORDERNOTIFY which is a value type and the value: Structure: flat & not charlike. If I check the status, then I see 1 line in the table, with the values from the xml-file. But If I want to get a value from the table column MORDERNOTIFY-XML1, then it is empty. Do you know what the reason is?

Kind regards,

Erkan

Former Member
0 Kudos

Hi,

One thing i donot understand

u have passed u r import parameters to u r RFC. Those parameter in the form of XML would be seen in the SXMB_MONI

rest using the Table value for further process has to be coded in u r source code of u r RFC.

If u want that table parameters back to u r File Server , use the Synchronous communication which maps back the Table parameters , and use Receiver File Adapter to get back in File format.

hope this serves

srini