cancel
Showing results for 
Search instead for 
Did you mean: 

How to send leading spaces in E1BPPAREX-VALUEPART

markbernabe
Active Participant
0 Kudos

Hi experts,

Basically, in our SAP CPI iFlow, we need to map custom fields in the source structure into the custom fields in the IDOC segment E1BPPAREX.

As you know, the fields VALUEPART1...VALUEPART4 are based on fixed length format. Our problem is, the custom fields that we need to populate are in VALUEPART2. So we've sent 240 whitespaces to VALUEPART1 and it's working fine. Now, the field in VALUEPART2 that we need to populate is in the middle. For example, our VALUEPART2 structure is as follows:

  • ID CHAR 4
  • NAME CHAR 4
  • SALESORG CHAR 4
  • DISTR_CHAN 2

Our source only sends the Sales Organization and the Distribution Channel which we need to map to SALESORG and DISTR_CHAN fields respectively.So in our message mapping for VALUEPART2, we send 8 whitespaces followed by the SalesOrg and DistriChan values like below:

  • STRUCTURE = BAPE_VBAK
  • VALUEPART2 = " US0102"

However, the IDoc in ERP doesn't seem to recognize the leading zeroes and what happens is, the 'US01' gets assigned to the ID while '02' is sent to the NAME.

Has anyone encountered a similar issue? What is the best way to send whitespaces in the message mapping or to populate fields in the middle of VALUEPART?

TIA!

View Entire Topic
markbernabe
Active Participant
0 Kudos

Hi all,

The solution is to implement the correction instructions, or import the relevant Support Package in SAP Note 1535033 - ALE: XML inbound processing deletes leading blanks (https://me.sap.com/notes/1535033).