cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Conversion Routine in AMDP for MATERIAL (MATNR)

darshan_shah01
Explorer

Accepted Solutions (0)

Answers (4)

Answers (4)

junwu
SAP Champion
SAP Champion
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
SAP Champion
SAP Champion
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
SAP Champion
SAP Champion
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