2011 Jun 02 9:22 AM
hi folks..
do we have any replacement in terms of codes for the fuction CONVERSION_EXIT_ALPHA_INPUT SAP Function module.. i know the use of this fuction module as it converts data in numeric format to character format which is only accpetable in SAP.. cant we do it manualy using the abap codes.. or else it is the only option to do so????
2011 Jun 02 9:31 AM
Hi
Manually you could use the code as below
DATA: lv_lifnr TYPE lifnr VALUE '0000000945'.
SHIFT lv_lifnr LEFT DELETING LEADING 0.
has the same effect as the function CONVERSION_EXIT_ALPHA_INPUT but i would suggest using the function.
regards
Isaac Prince
2011 Jun 02 9:45 AM
thanks for your reply..
but the code seems to be like converting character format "00000951" to numeric format as "951".. you have asked to delete the leading zeroes nd shift to the left side.. i think i have got it right... so please revert me back on this...
2011 Jun 02 9:46 AM
Hi Ram,
I guess Isaac got a little confused, anyways try the below code, forgot to add...just curious to know the reason behind your post...any specific reason why you want to avoid the FMs.
DATA: l_vbeln TYPE vbeln VALUE '12345',
l_overlay TYPE vbeln VALUE '0000000000'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = l_vbeln
IMPORTING
OUTPUT = l_vbeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = l_vbeln
IMPORTING
OUTPUT = l_vbeln.
* Code to replace Conversion exit alpha input
SHIFT l_vbeln RIGHT DELETING TRAILING space.
OVERLAY l_vbeln WITH l_overlay.
* Code to replace Conversion exit alpha output
SHIFT l_vbeln LEFT DELETING LEADING '0'.
IF sy-subrc EQ 0.
ENDIF.
Regards,
Chen
Edited by: Chen K V on Jun 2, 2011 2:17 PM
Edited by: Chen K V on Jun 2, 2011 2:18 PM
2011 Jun 02 9:56 AM
thanks chen for your kind reply..
now its clear.. i thought i can do this way.. but im new to abap and had little confusion with the code.. im an abap resource but got into data migration project .. yesterday we had a training session on LSMW... we have used this fuction.but one of my collegue said that this fuction is changed by an abaper to some other code format without using any function..i just got curious to know the another way.. thats why i have posted it here.. :). .thanks for spending your valuable time in answering me ...
2011 Jun 02 2:30 PM
Hi
Now im totaly confussed o_0..
Anyway wellcome to ABAP Kumar.
Prince Isaac
2011 Jun 02 10:00 AM
Hi,
You can try this,
I know it is not a smart solution, but i can think only this...
data: w_text_1(100) VALUE '123LOKESH37647TAREY'.
REPLACE ALL OCCURRENCES OF '0' IN w_text_1 WITH ' '.
REPLACE ALL OCCURRENCES OF '1' IN w_text_1 WITH ' '.
REPLACE ALL OCCURRENCES OF '2' IN w_text_1 WITH ' '.
REPLACE ALL OCCURRENCES OF '3' IN w_text_1 WITH ' '.
REPLACE ALL OCCURRENCES OF '4' IN w_text_1 WITH ' '.
REPLACE ALL OCCURRENCES OF '5' IN w_text_1 WITH ' '.
REPLACE ALL OCCURRENCES OF '6' IN w_text_1 WITH ' '.
REPLACE ALL OCCURRENCES OF '7' IN w_text_1 WITH ' '.
REPLACE ALL OCCURRENCES OF '8' IN w_text_1 WITH ' '.
REPLACE ALL OCCURRENCES OF '9' IN w_text_1 WITH ' '.
Edited by: Lokesh Tarey on Jun 2, 2011 11:01 AM