Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Please verify the errors below.

former_member770121
Participant
0 Likes
1,109

how we can remove the right leading zero ??????

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = IT_FMIT1-RFIPEX

IMPORTING

OUTPUT = IT_FMIT1-RFIPEX.

i also use this function module but give debug error u can tell please there should be variable or internal table with field???

1 ACCEPTED SOLUTION
Read only

Dominik_Tylczynski
SAP Champion
SAP Champion
0 Likes
1,048

Hello aya12

The function interface is:

FUNCTION CONVERSION_EXIT_ALPHA_OUTPUT.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(INPUT) TYPE  CLIKE
*"  EXPORTING
*"     VALUE(OUTPUT) TYPE  CLIKE
*"----------------------------------------------------------------------

IT_FMIT1-RFIPEX needs to be a character like field. See SAP Help on Generic ABAP Types for the details of CLIKE type.

Best regards

Dominik Tylczynski

5 REPLIES 5
Read only

vipinsaraika
Participant
0 Likes
1,048

Hi Haya,

This function module helps to remove the left leading zeros if any, also it is always suggested to use the variable in this like any ABAP field.

Conversion exit ALPHA, internal->external

Regards,

Vipin

Read only

Dominik_Tylczynski
SAP Champion
SAP Champion
0 Likes
1,049

Hello aya12

The function interface is:

FUNCTION CONVERSION_EXIT_ALPHA_OUTPUT.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(INPUT) TYPE  CLIKE
*"  EXPORTING
*"     VALUE(OUTPUT) TYPE  CLIKE
*"----------------------------------------------------------------------

IT_FMIT1-RFIPEX needs to be a character like field. See SAP Help on Generic ABAP Types for the details of CLIKE type.

Best regards

Dominik Tylczynski

Read only

FredericGirod
Active Contributor
0 Likes
1,048

something like that should work

get length of field
do length times
offset = lenght - sy-index.
if field+offset(1) eq 0.
field = field+0(offset)
else.
exit.
endif.
enddo.
Read only

FredericGirod
Active Contributor
0 Likes
1,048
offset = lenght - 1.
Read only

Sandra_Rossi
Active Contributor
0 Likes
1,048

No problem for me:

DATA it_fmit1 TYPE fmit.
it_fmit1-rfipex = '000000000000000000000150'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
  EXPORTING
    input  = it_fmit1-rfipex
  IMPORTING
    output = it_fmit1-rfipex.
ASSERT it_fmit1-rfipex = '150'.