cancel
Showing results for 
Search instead for 
Did you mean: 

Error loading fields in file to RFC (bapi) scenario

Former Member
0 Kudos

Hi,

I'm developing and testing a file to RFC interface

In message monitor all is processed successfully and payload in Technical Routing it's like:

- <IT_TAB>

- <item>

<WERKS>0001</WERKS>

<FECHA>20080129</FECHA>

<HORA>131250</HORA>

<FILENAME>filename</FILENAME>

<MATNR>000000000000000015</MATNR>

<SPEME>00000000.000</SPEME>

<LABST>00000432.000</LABST>

</item>

- <item>

... </item>

I've create a function in R3 which imput table has the same fields (werks, fecha, hora, filename, matnr, speme, labst)

However, when i try to process data, this function seems to load fields incorrectly:

werks = 0

fecha = 00000000

hora = 000000

filename = 0150001

matnr = filename

..

Why?

Carme

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I've deleted all implementation in I.Repository and I created again and problem seems to be solved.

I've deleted imported RFC, Interface mapping and Message mapping. Amd I've imported RFC again and re-created IM and MM.

I haven't had any change in R3 function.

And now it's working fine.

Carme.

Former Member
0 Kudos

check your mapping, whether you have mapped file structure to RFC request only.

You can also test scenario in ID, Tools--->Test configuration

Former Member
0 Kudos

Hello,

I have the same problem. The problem solved when I changed the fields type in RFC function to STRING.

Elad

Former Member
0 Kudos

Hi, Elad,

...and thanks for your response.

I have more scenarios like this with character and decimal types also and i never have had this problem.

However, I've changed all fields to char and tryed again. And my problem is not solved. R3 function doesn't load fields correctly.

Sure you haven't change another thing to solve this problem?

Carme.

Former Member
0 Kudos

Hi,

Please verify your payload and test with Message mapping test tab.

Look if your getting the same output.

Also refresh the RFc with re-importing anf refreshing the whole cache.

Probably the changes you did in RFC FM in R/3 will not be getting reflect properly.

Also check if your getting the file data as per the specified lengths.

After comming to R/3 the preceding zeros will be omiited by system internally

In R/3 either you have to process manually by coding to append those zeros

Refresh the Cache in SXI_CACHE and then test it again

Even keeping external breakpoint in R/3 to debug will help you to analyse

Thanks

Swarup

Edited by: Swarup Sawant on Jan 29, 2008 2:58 PM

Former Member
0 Kudos

Hi Carme !

1) check that the imported RFC definition in XI is the current one and matches with the one of SAP R3.

2) check that you mapped the file message type to the imported RFC request message type object

3) check that the mappings are ok. Test mapping works ok?

4) try to use a file adapter instead of an RFC adapter in the receiver channel to have the content of the input file written on a file in the file system to check if the data is coming in the right format out from XI.

5) try your RFC manually in R3 and see if it works ok.

6) compare the data types of the parameters between the RFC that does not work and one that it does, to see if there is something strange

Regards,

Matias.

ps:please award points if helpful

Former Member
0 Kudos

Hi, Swarup

As Mugdha also propose, I have test scenario with ID Tool and all it's right.

Payload in XI is coherent with RFC input structure (see my first message in this post).

Cache it's ok and I've tryed several times to re-import RFC object from R3 . But it didn't work.

Carme,

Former Member
0 Kudos

make your RFC a normal function module for time being and then try to run it..

check if it meets expected out

I guess you are simply trying to insert a record into table through this RFC

Former Member
0 Kudos

I've executed the RFC function directly in R3 and it works fine.

There is any way to debug and set a breakpoint in this function when XI has called it ?

Carme

Former Member
0 Kudos

Hi Carme !

Just to check....in your RFC receiver comm channel are you using the same SAP client that use to import the RFC to XI repository?

You can write the content of the table to a file just upon receiving it from inside your RFC to debug it. I don't know any other method.

You stated in your first post that the "filename" field was misplaced, is it like that? matnr=filename

Regards,

Matias.

Former Member
0 Kudos

Hi, Matias

Sure it's recommended to check all possibilities and i have do it.

RFC client parameter is according with RFC function.

And also I modified this function to save firstly the content of the input table to a file. That's why I find the cause of the problem.

And the problem it's that fields was misplaced... it seems to be moved inside the structure.

Thanks, in advance

Carme

Former Member
0 Kudos

Hi Carme !

Do all your other existing scenarios with RFC receiver work ok? have you checked the RFC destination on transaction SM59?

Have you double checked that your "writing file" procedure is error free? have you ever tried a File Adapter receiver instead of a RFC adapter receiver to have the output written to a file instead of sending it to ECC ? just to check what is going on.. I assume also your mapping test are ok and all objects are activated.

Regards,

Matias.