cancel
Showing results for 
Search instead for 
Did you mean: 

CIF - Mismatch between max material code length in R/3 and APO

Former Member
0 Kudos

Hi All,

The max material code length in R/3 is 18 while in APO it is 40. My material code is numeric and has leading zeroes. While running a BAPI, I am getting an error because the length of material code is different in R/3 and APO. I need to CIF the material code from R/3 to APO. The table MATMAP is not getting the proper material code from R/3 after CIFing. How can we overcome the problem?

Thanks in advance

Ehsan Ahmed

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ehsan,

In the /SAPAPO/MATMAP table, you have 2 fields. EXT_MATNR which is expected to be exactly same as R/3 data e.g. 18 chars: 000000000000000001.

In the field matnr, if you have material number numeric you will get a 40 chars string as 0000000000000000000000000000000000000001.

There shall not be any issue unless you have coded any CIF user exits for material/product transfer.

rgds,

SB.

Former Member
0 Kudos

Hi SB,

We have numeric material number and in the field matnr, we are not getting get a 40 chars string as 0000000000000000000000000000000000000001, rather an 18 char string as 000000000000000001. We are CIFing the numeric material number from R/3 to APO and we have not used any user exits. Since it is not 40 chars, we are having a problem while running a BAPI.

Regards

Ehsan Ahmed

Former Member
0 Kudos

Hi,

Use Conv_exit_alpha_input to convert 18 digit material to 40 digit code filling it with leading zeros.

It should solve your issue, if u have understood it correctly.

Regards,

PRavin Mukkawar

TCS-Gandhiangar

Former Member
0 Kudos

In the IMG (transaction SPRO) for your SCM system check the following:

IMG Guide -> APO -> Master Data -> Product -> Specify Output Format of Product Number

There is a tick box "Leading Zeroes" if this is checked it will display the leading zeroes (as it sounds like your system is doing). This is the internal number as explained above.

The box needs to be unchecked.

Former Member
0 Kudos

Ehsan,

Ian tells it partially right, but the Leading zeros setting is only for display purpose, & the "Lexicographical" check box is for the storage purpose. As you need to store data with zeros, do UNCHECK that.

rgds,

SB

Answers (1)

Answers (1)

Former Member
0 Kudos

I assume you are making your own Interface Development into SCM-APO and not using the Standard SCM-APO PlugIn called from SAP R/3.

Yes in APO the Material Number is 40 Characters. If you are calling a BAPI directly in APO ... you must convert the Numeric Material Code in R/3 to 40 Characters by filling with Leading Zeroes before they come into table /sapapo/matkey. Text Material Codes should not be a Problem. The other APO Tables only use the Material GUID that is generated for the material in table /sapapo/matkey to reference the material.

Regards,

Ambrish Mathur