cancel
Showing results for 
Search instead for 
Did you mean: 

Extra space is getting reflected in R/3 for data coming from XI

Former Member
0 Kudos

Hi All,

i am sending ASN details from ICH to R/3....mapping is done between despatcheddeliverynotification -> ZBAPI.

The problem is extra space is getting added to the fields at front and as such the data is getting misplaced.

Is there any way to avoid this space..i tried changing the data type in my bapi from char to xmlstring but it does allow as it's rfc enabled.

Kindly help on this

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member189441
Active Participant
0 Kudos

Hi,

trim() function can only removes white space from both ends of the string.But here in your case getting special characters.

you can raplace these special charecters with space(" ") and then pass this new string to trim function.

Markup/Result


   Ex:String a = "##abcdef#";

String new=a.replace('#',' ');  
 //you will get "  abcdef " (with white spaces)
String final=new.trim();  
//you will get string with out space "abcdef"
 

Edited by: murali krishna on Sep 5, 2008 8:24 AM

Former Member
0 Kudos

it's just not junk values i am getting 0's appended at the last

I will be clear now

1) in ich the data is

asn number smi_asn00001701

po number 450001750

2) in r/3 in my bapi i am getting it as

asn number ###smi_asn00001701####

po number 4500017500000[]#[]

i tried re-desinging the entire scenario with no progress

is it tht sum cache or xml data not getting refreshed??

hemant_chahal
Contributor
0 Kudos

If your changes are not taking effect. See if in IR ->Environment->Cache Notifications there are red indicators or not,.

If you have red indications on the notifications " Repeat the cache update for the instance".

Former Member
0 Kudos

nopes evrything is in green color only

santhosh_kumarv
Active Contributor
0 Kudos

>>The problem is extra space is getting added to the fields at front and as such the data is getting misplaced.

The extra spaces that is before and after the field can be removed in mapping using the standard Text function trim.

Thanks

SaNv...

Former Member
0 Kudos

i am still the space :(....also junk values are coming for sum fields like []## i am not able to remove either the space or the junk values..i mapped my fields with the TRIM function