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.

Accepted Solutions (0)

Answers (4)

Answers (4)

junwu
Active Contributor
0 Kudos

1.why bother go to cds?

you have ltrim in amdp

2.you should never even look at the sql view. you should never consider its existence. in future, there is no sql view for cds.

darshan_shah01
Explorer
0 Kudos
that the point I can reuse that same CDS all time
junwu
Active Contributor
0 Kudos
don't know what you are talking, here we are discussing amdp right?
darshan_shah01
Explorer
0 Kudos

@junwu  How ? if it is can u let me know best solution

ANKA
Explorer
0 Kudos




We cant directly use the Function Module in AMDP.

But we can try like this below

SELECT LPAD ('end', 15, '12345') "lpad" FROM DUMMY;
SELECT LPAD ('end', 2, '12345') "lpad" FROM DUMMY;
 
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?

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