‎2007 Aug 23 9:03 AM
hi i am using a code as below and i want to eliminat all leading sapce before lfimg in lips table data
and final entry is
wa_final-quan = it_lfimg-lfimg.
WHERE IT_LFIMB IS TAKING DATA FROM LFIMG TABLE
AND WA_FINAL-QUAN IS TAKING TYPE LIPS-LFIMG (QUANTITY FIELD)
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = wa_final-quan
IMPORTING
OUTPUT = wa_final-quan.
BUT THE OUTPUT IS NOT BEING CONVERTED AS DESIREDS
AS INPUT LFIMG IS 10 WITH SOME SPACE BEFORE IT
IT SHOULD ELIMINATE SAPCE BUT THE FUNCTION MODULE IS NOT DOING SO NOT DELTING SPACES..BEFORE 10
but when i do like this
wa_final-quan = wa_final-quan+ it_lfimg-lfimg.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = wa_final-quan
IMPORTING
OUTPUT = wa_final-quan.
the spaces are deleted
can anyone explain it
regards
Arora
‎2007 Aug 23 9:06 AM
hi Arora,
to eliminate leading spaces use:
SHIFT wa_final-quan LEFT DELETING LEADING space.
hope this helps
ec
‎2007 Aug 23 9:09 AM
Hi ,
'CONVERSION_EXIT_ALPHA_OUTPUT' is used for deleting leading zeroes but not spaces,
To delete leading spaces use CONDENSE..
CONDENSE wa_final-quan no-gaps.
OR
SHIFT wa_final-quan LEFT DELETING LEADING SPACES.
‎2007 Aug 23 9:21 AM
hi All
My purpose is solved i want to know the differecne in above code i pasted...
like why is it soo when i do
wa_final-unitquan = wa_final-unitquan + it_lfimg-lfimg.
then call function module
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = wa_final-unitquan
IMPORTING
OUTPUT = wa_final-unitquan.
THE RESULD IT OK THE LEADING ZEROS ARE DELETED OR SPACES WHATEVER
BUT IF I JUST DO
wa_final-unitquan = it_lfimg-lfimg
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = wa_final-unitquan
IMPORTING
OUTPUT = wa_final-unitquan.
THE LEADING SPACES OR ZEROS ARE NOT DELETED PLS EXPLAIN THE REASONG FOR THIS
I HAVE GOT THE SOLUTION ALREADY THE FIRST CODE IT WORKING
AND fyi THE FIELD IS LFIMG FROM LIPS QUANTITY FIELD
REGARDS
ARORA
‎2007 Aug 23 9:29 AM
Hi Arora
CONDENSE wa_final-quan no-gaps. is for removing the spaces ...
'CONVERSION_EXIT_ALPHA_OUTPUT' is removing the leading zeros ....
reward points to all helpful answers
kiran.M
‎2007 Aug 24 3:52 AM
hi all
again i say i am not asking for solution i am just asking for difference beteween teh tow above code and why it is behaving lke this eloborateion thats all
solution already i got
can anyone explain on my last query..
regards
ARora