cancel
Showing results for 
Search instead for 
Did you mean: 

Fields Lengths (Mapping)

Former Member
0 Kudos

Hi,

My cenario is: POS calls RFC enabled function module from SAP trough EAI.

So a function module Z* is called. When this function is Tested in SAP with transaction SE37 everything seems to be fine. There are one table returned and all the data is in correct fields.

But, when this function is called trough EAI data is misaligned accordingly to difference of field lengths. For example ITEMS_OUT (used in my FM) table fields DOC_NUMBER in xml has 20 characters in function module 10, and so on.

Do you have any idea? Where should be the problem? In mapping or should be a function module problem?

Example:

In xml file i get this:

HEADERS_OUT>

- <item>

<DOC_NUMBER>00000007030040000000</DOC_NUMBER>

<SOLD_TO>Test client Sales</SOLD_TO>

<NAME1 />

<NET_VAL_HD>0.000000000</NET_VAL_HD>

<TAX_AMOUNT>0.000000000</TAX_AMOUNT>

<BR_VAL_HD>0.000000000</BR_VAL_HD>

<_FILLER />

<CURRENCY />

</item>

</HEADERS_OUT>

Regarding the DOC_NUMBER for example. In my RFC i have '0000000703', SOLD_TO = 0040000000; NAME1 = Test client Sales, and in xml is totally misaligned.

Thanks

BR

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

I think there is only 1 solution

1) you will have to edit the XML structure so as to ristrich the field lengths to that needed by FM . As SAP will simply truncate the value if the length of the field is more than the required.

The changes can be made in SAP FM also if the altered length is valid as per the SAP data type for that certain field.

hope this helps

Regards

Nikhil

Former Member
0 Kudos

Hi,

Plz check the structure , what you are using and the RFC strcture, i mean the gtting value from a field , the length should be equal to your structure field.

And if you are using the receiver side is content conversion then try to use Filedfixed lengths.

Regards

Chilla..