cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with call to BAPI when the data contains spaces

Former Member
0 Kudos

Hi everyone,

I've a table in R3 that has 2 fields which is consulted via BAPI from XI. The Bapi call run correctly while the data don't contain spaces preffixed but when for example the data is ' A31' the BAPI call doesn't return nothing.

The table structure is:

CODE DESCRIPTION

values:

' A31' 'Desc A'

'A30' 'Desc B'

When I call the bapi with A30 value the Bapi return me Desc B, but when I try it with the value ' A31' the Bapi doesn't return any value.

Could anyone help me?

Thanks in advance

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Rodrigo,

Yes, I can see the space in the monitoring ( using view source code), because the moni remove the space.

I don't have any idea of the reasson of this error.

Thanks to all for your help.

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

ok, the moni remove the space, thats right, but if you can see the space in source code, it says that you are receiving the data, copy the source message and do a tes mapping and see whats happend.

as you said, you receive the message, you should can do the response mapping.

Thanks you

Rodrigo

Former Member
0 Kudos

Rodrigo,

From SE37 the BAPI returns the value, but from XI no.

I think that must be problem between XI and R3

Any idea more?

Thanks

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

can you see the value with space in MONI?

rodrigoalejandro_pertierr
Active Contributor
0 Kudos

if you wat to know if bapi really doesnt retunr any value go to se37 and test it with same parameters you send from PI. if it doesnt retunr any,edit the line and delete de space in table

Thanks

Rodrigo

Former Member
0 Kudos

The problem isn't the trim, because the bapi call must contain the spaces.

Any idea?

Thanks

Former Member
0 Kudos

>>The problem isn't the trim, because the bapi call must contain the spaces.

Are you able to get expected results while testing the BAPI with data containing spaces?

I have seen some cases where you get correct results when you test the RFC in SE 37, but the same data when passed from XI does not get the desired results. It was coz. when testing the RFC in R/3 some user exits are called and the data fets populated in the correct way. Check this.

Regards,

Jaishankar

Former Member
0 Kudos

Jose,

In the mapping use the standard function "trim" to remove the spaces and map it to the target field.

Regards,

Jaishankar