cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion Routine in AMDP for MATERIAL (MATNR)

darshan_shah01
Explorer
0 Kudos

Hi Team,

How can we use 'CONVERSION_EXIT_MATN1_INPUT'  in AMDP, where we need to convert Material No, into internal formant ? we have to avoid loop

darshan_shah01
Explorer
0 Kudos

Solution that I found to be better and used:

I created a new CDS on MARA with this code:

SELECT FROM mara {
key matnr,
LTRIM(matnr, '0') AS Converted_matnr
}.

and used that CDS.

junwu
Active Contributor
0 Kudos
use that sql view in your amdp? if yes, i think it is nonsense.
View Entire Topic
junwu
Active Contributor
0 Kudos
darshan_shah01
Explorer
0 Kudos
We also have materials like 80139T911071 and 231, where the function module output is 000000000000000231 for 231, and 80139T911071 is the same. What should we do in this case?
Sandra_Rossi
Active Contributor

@darshan_shah01Use a function to detect if all characters are digits or not, and define an if/else condition (CASE), see the "SQL Functions" (link below).

EDIT: for information the link given above https://help.sap.com/docs/HANA_SERVICE_CF/7c78579ce9b14a669c1f3295b0d8ca16/20e40bdb75191014bc66f14fa... corresponds to the LPAD function