10-14-2008 4:46 PM
I have declared LV_0UPC_EAN as below
DATA : lv_0upc_ean(18) TYPE c,
I get the value as 054871020964
To select from date base, i am deleting leading zero of 054871020964...using below code:
SHIFT wa_869_input_rec-upc_ean LEFT DELETING LEADING '0'.
( So, wa_869_input_rec-upc_ean will become 54871020964, then used from database select and apply logic... )
Then APPEND wa_869_input_rec TO gt_869_input_rec.
After selecting from data base table, and if everything is successfull.
Then I have again to pass this value back into out put file as 054871020964.
How to do this out of 54871020964 whose size is of 18 chars.
Here I am using 'CONVERSION_EXIT_ALPZE_INPUT' like below
CALL FUNCTION 'CONVERSION_EXIT_ALPZE_INPUT'
EXPORTING
input = p_wa_869_input_rec-upc_ean
IMPORTING
output = lv_0upc_ean.
p_wa_870_output_rec-upc_adidas = lv_0upc_ean.
but it is giving preceeding zeros as 000000054871020964.
how to make this.
Please help me
10-14-2008 5:51 PM
10-14-2008 4:49 PM
Hi Sam,
Try to use the FM
CONVERSION_EXIT_ALPHA_INPUT "-----> Remove Zero from the number
CONVERSION_EXIT_ALPHA_OUTPUT " -----> Add Zero from the number.
Thanks,
Chidanand
10-14-2008 4:50 PM
Hi,
Why dont you duplicate it ? I mean to say store both the variables separately. So when you are doing your selection you can use the one without a zero and when you need to pass this value on to this file you can use the one with a zero.
Regards,
Pramod
10-14-2008 4:52 PM
if the legth of the EAN is fixed (like 12 characters in your example), than why don't you define the variable with 12 characters?
like:
DATA : lv_0upc_ean(12) TYPE c,
if the length can vary, than you have to keep track somehow...
10-14-2008 4:53 PM
>To select from date base, i am deleting leading zero of
> 054871020964...
what is the table and what is the field..?
10-14-2008 5:51 PM
10-14-2008 6:00 PM
the EAN number may be diiferent, it may not be possible to have 12 chars length always.
can i know from you got the data with one extra zero to the ean number.
'05.............' , and why you are expecting a zero before it. can i know the reason..?