Skip to Content
-3
Jun 14, 2020 at 08:56 AM

CONCATENATE : Material with later "C"

129 Views

Hi ABAP Experts,

I have a requirement to CONCATENATE '0MATERIAL' transformation .

I have Material code starting number & character, where I have starting number I need to Add " C " in front of the code.

Eg: Material Code i have length 8, 12345678. I need the result like this C12345678.

I rote the below code, it is giving the result like this C00000000012345678 .

for business , it is very difficult to enter in selection screen.

How to get the result like this " C12345678 "

IF SOURCE_FIELDS-MATERIAL CO '0123456789'.
CONCATENATE 'C' SOURCE_FIELDS-MATERIAL+1(17) INTO RESULT.
ELSE.
RESULT = SOURCE_FIELDS-MATERIAL.
ENDIF.

Regards,

Jameel