cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI mapping problem - JCO exception

Former Member
0 Kudos

Hi everyone,

I imported a BAPI into XI and the request has the fields as data type string. But in R3, one of the parameter is a NUMC 8 character. In mapping, when I pass the actual data, it gives me this error,

error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not convert request from XML to RFC:com.sap.mw.jco.JCO$ConversionException: (122) JCO_ERROR_CONVERSION: Integer 'Abcd900' has to many digits at field

What should be done so that XI sends this data as numeric to BAPI???

Please suggest ...

Accepted Solutions (0)

Answers (3)

Answers (3)

STALANKI
Active Contributor
0 Kudos

Are you trying to send 'Abcd700'..??NUMC can only take digits..!!

Try also wether the value of the field = the length of the field.

I donot think you need to parse in mapping programm as per my knowledge.

Let me know if it works for you.

Pass 456 in the fieild and let me know if it doesnot work.

sam_raju
Contributor
0 Kudos

Hi Thilothamma,

The NUMC field will normally have leading zeros in R/3. Try to use "FormatNumber" standard function in your message mapping and see if that helps.

Source>foramtnumber>Target

Rgds,

Sam Raju

Former Member
0 Kudos

I am getting a different exception if I use format number. Why does BAPI get imported as string for all fields? If the format in R3 is integer, in XI Target field (field in BAPI) should also be imported as integer right?? My problem is from XI to R3, target field to R3 - how to send integer values??

moorthy
Active Contributor
0 Kudos

Hi,

Did u try with User Defined function in the Mapping ?

If not pls try it.

Regards,

Moorthy

former_member187339
Active Contributor
0 Kudos

Hi Thilothama,

>><i>Why does BAPI get imported as string for all fields? If the format in R3 is integer, in XI Target field (field in BAPI) should also be imported as integer right??</i>

If the format in R3 is integer then in XI it will be <b>xsd:integer</b>

If the format in R3 is string then in XI it will be <b>xsd:string</b>

If the format in R3 is date then in XI it will be <b>xsd:date</b>

If the format in R3 is <b>NUMC</b> then in XI it will be <b>xsd:string</b>

As NUMC is generally used for character string that may only contain digits.

I think if you send integer value thru this field then it will be incorporated as String in XI. You have to convert them into integer in your Message Mapping.

Regards

Suraj

moorthy
Active Contributor
0 Kudos

Hi,

Anyway data coming out from XI will be with XML tags.

Currently data facets are not working in XI. Write user Defined function and send the data as an Integer in the Mapping itself.

Write Java User defined function-

Integer A = Integer.parseInt(str);

Hope this helps..

Regards,

Moorthy