cancel
Showing results for 
Search instead for 
Did you mean: 

BW Transformation Field Routine Remove leading zero for special Materials

former_member683296
Participant
0 Kudos

Dear Expert,

i am trying to remove leading zero for Special Materials on ABAP Field Routine. Can somebody help me?

Logic :

if "ZMATR" has 0000003********* (6 Zero+Number ) and 0000004********* (6 Zero+Number ),output will be remove leading zero just for those Materials.

Thanks alot

Sandra_Rossi
Active Contributor

Please do not post screenshots of text (like yours or like ABAP code). Just post the text so that people can copy/paste the values instead of re-typing:

INPUT                      OUTPUT
092237232    232332        092237232    232332
018237232    232332        018237232    232332
0000003342342343           3342342343
0000004342342323           4342342323

Accepted Solutions (1)

Accepted Solutions (1)

former_member231709
Active Contributor
0 Kudos

You can use FM CONVERSION_EXIT_ALPHA_OUTPUT for this.

former_member683296
Participant
0 Kudos

thx for your answer.

i tried to code on field-routine. is it correct? How can i use there "if Statement"? should i need it?

DATA : lv_matnr TYPE TYPE c LENGTH 18.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT' EXPORTING input = SOURCE_FIELDS-material IMPORTING OUTPUT = lv_matnr. RESULT = lv_matnr.

thx

Answers (1)

Answers (1)

raymond_giuseppi
Active Contributor
0 Kudos

Why don't you use the same conversion-exit in (0MATERIAL?) Info Object than the field (ZMATR?) in the source system (e.g. ALPHA)