Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Sep 04, 2008 at 02:04 PM

    >>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...

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Sep 05, 2008 at 06:23 AM

    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

    Add comment
    10|10000 characters needed characters exceeded