cancel
Showing results for 
Search instead for 
Did you mean: 

File to RFC File Content Problem

former_member187255
Active Contributor
0 Kudos

Hi,

I am working on a File to RFC(Inserting data into ztable) Scenario everything is working fine i can see the success message in SXMB_MONI.When i check the Payload it shows as

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

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

I am sending data as txt with file content conversion.First i am trying with single record.

Ex:

123,test

I even tested with breakpoint in RFC its taking empty values from the input txt.

This is the content conversion i am using at the sender...

<b>questRFC_MT.fieldSeparator: ,

questRFC_MT.endSeparator: 'nl'

questRFC_MT.fieldNames: MATNR,MTART

questRFC_MT.processFieldNames: fromConfiguration</b>

Pls let me know where i am doing wrong....

Appreciate your help...

Chandra.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Chandra,

if your source is like "123,test" as u have told, then the source structure that i would create would be something like...Assuming that "questRFC_MT" is the name of your message type and "MATNR" and "MTART" are the 2 fields.

<questRFC_MT>

-


<Root>

-


<MATNR/>

-


<MTART/>

-


</Root>

</questRFC_MT>

And your content conversion will look like this:

<b>

Content Conversion Parameters</b>

Document Name: questRFC_MT

Document Namespace: "give the namespace"

Recordset Structure: Root,*

Recordset Sequence: Ascending

Key Field Type: String(Case-Sensitive)

<b>Content Conversion</b>

Root.fieldSeparator:,

Root.fieldNames:MATNR,MTART

Root.endSeparator:nl

ignoreRecordsetName:true

Just try this out and let me know if it works...

Also go through these Blogs and link...

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

/people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter

/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

http://help.sap.com/saphelp_erp2005/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

Regards,

Abhy

Message was edited by: Abhy Thomas

former_member206604
Active Contributor
0 Kudos

Hi,

In SXMB_MONI check the payload of the incoming message and the payload after mapping. See if the payload has expected data, if you were not able to solve it please post both the xml.

Thanks,

Prakash

HarshC
Active Participant
0 Kudos

Hi Chandra,

Just a thought, did you put an end of line char in your sample file?

Regards,

Harsh

former_member187255
Active Contributor
0 Kudos

I am still facing the problem ..pls help me..

leo,

Adapter Engine shows Status as Successful.

Abhy,

This is the Structure i am using.....

Message Type:

<b>questRFC_MT

-Root

--MATNR

--MTART</b>

And this is the File Content...

<b>Root.fieldSeparator ,

Root.endSeparator 'nl'

Root.fieldNames MATNR,MTART

Root.processFieldNames fromConfiguration

ignoreRecordsetName true </b>

Prakash,

This the XML which i can see in payload both at source and target...

Source XML in Inbound Message(CENTRAL) payload

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

- <ns:questRFC_MT xmlns:ns="http://quest.com/File2RFC">

- <Root>

<MATNR>990</MATNR>

<MTART>Best</MTART>

</Root>

</ns:questRFC_MT>

This is the Response Payload XML

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

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

Let me know where i am doing wrong....

Thks,

Chandra.

former_member206604
Active Contributor
0 Kudos

Hi Chandra,

I saw you payload so there is nothing worng with your content conversion, you are getting a input message in XML. Then in SXMB_MONI see what happens to the payload after mapping.

1)

If you don't see any payload after the mapping stage then sure the problem is with the mapping. (Mostly you have'nt mapped some root note like message type). Try downloading the XML and import the XML in the "Test" tab of the mapping and check you are getting the target message.

2)

If you do not find any mapping then check if you have given Interface Mapping in the ID (during Interface Determination)

3)

If everything looks fine then check by debuggin the RFC using External break point.

Thanks,

Prakash

Former Member
0 Kudos

Hi Chandra,

Everything seems to be ok....

Can you just try removing this line and trying it..

<b>Root.processFieldNames fromConfiguration</b>

Regards,

Abhy

Former Member
0 Kudos

Chandra,

Check your mapping by taking the inbound payload and test the same in message mapping,test tab.

Regards,

Jai Shankar.

former_member187255
Active Contributor
0 Kudos

Hi Freinds,

Finally i manage to see the data in the RFC.

I am not sure wht was the problem, so i recreated all the Design steps again.

All your valuable inputs helped me alot to move forward.

Points are given to the helpful answer...

I have an other question.....I am sending the data in flat file as

ex:

123,Test

234,Rest

345,Best

Right now system is taking only the first(123,Test) record value in RFC its not reading the rest of values .. does i need to give any looping....

I am using the same File content conversion which i mentioned earlier....

Thks,

Chandra.

former_member187255
Active Contributor
0 Kudos

Friends.....

Help me on this.....

thanks...

moorthy
Active Contributor
0 Kudos

Hi,

Is your RFC structure can hold multiple occurences of the data ? Is your RFC structure has Table data type ?

Or check SXMB_MONI ->Payload after the mapping ... is it contains all the data

you can easily test this with Mapping in the Intgeration Repository by giving input data in the test tab in the mapping. check is it generates mulitple output sturcture as required...

Regards,

Moorthy

Former Member
0 Kudos

Hi Chandra,

Can you just have a look at the occurance of the "Root" tag, it should be "0 to unbounded" and of the other 2 segments should be "0 to 1", this is what i can understand from the requirement you have provided...

Also make a point of what Moorthy as suggested, your RFC should be capable to holding multiple occurances of the data.

Just have a look at the same and let me know....

Regards,

Abhy

/people/mark.finnern/blog/2004/08/10/spread-the-love

Message was edited by: Abhy Thomas

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Chandra,

Can you just send in your Source structure and i can tell you if there is any problem with your content conversion.

Regards,

Abhy

Former Member
0 Kudos

check the adapter status in the Adapter Engine on RWB