cancel
Showing results for 
Search instead for 
Did you mean: 

Leading zeros getting truncated for materials in complex tables in SAP IM 3.2

former_member199619
Participant
0 Kudos

We are using SAP IM 3.2.

Materials having leading zeros like "01-Test" & "000H099" are coming as it is in ctparts complex table but those materials are coming like "1-Test" & "H099" in ctmaterialuom and ctmaterialstoragelocation complex tables. Is it a known behaviour?

Is it possible to bring materials without truncating leading zeros in ctmaterialuom and ctmaterialstoragelocation complex tables?


--Shyam

Accepted Solutions (1)

Accepted Solutions (1)

jason_latko
Advisor
Advisor
0 Kudos

Shyam,

I believe this is expected behavior, but I cannot remember why.  You could extend and modify the Java class that handles that complex table to not truncate the leading zeros.

Jason Latko - Senior Product Developer at SAP

agentry_src
Active Contributor

Hi Shyam and Jason,

It is indeed expected behavior.  Many of the BAPIs (think of them as function modules) do not automatically prepend the leading zeroes to virtually any ID including material ID, lot(batch) IDs, Order IDs, etc.  Mostly it is historical in nature.  The prepending always took place in the screens (hidden functionality) of ECC, CRM, SRM, etc. prior to the function modules being called.  This includes FM testing in either BAPI or SE37 screens.

Since presentation of the 18 digit number for material ID is confusing when it was something like "00000000080007043", trimming also took place in the reverse direction so users would only see 80007043 as the material ID.

It is not just in Agentry, that this is an issue.  I worked in SAP MII (Manufacturing Integration and Intelligence) for several years where it was also an issue.  Using Concatenation of "000000000000000000" and Right String function (18) worked for many cases, but not all materials were handled well that way.

Good luck!!

Regards, Mike

SAP Customer Experience Group - CEG

Answers (1)

Answers (1)

SS15
Participant
0 Kudos

Hello Michael,

This old response of yours helped me today 🙂

I had Material coming in the 18-digit format in the response of EWM BAPI however it failed to match with the Material coming without zeros from IDOC (LOIPRO) via Message Listener in MII;

eventually causing mismatch due to zeros and failing the matching criteria in BLS.

I wanted to truncate the leading zeros just for sql query matching criteria.

For Benefit of all -

I tested function stringright(000000000000000123, 18)

Then,I also changed the datatype of the transaction variable to FLOAT from STRING and applied function - stringright(Transaction.MATERIAL,18)