04-03-2009 6:14 AM
hi experts
i have an issue to be solved out..... I want to fill the field with 0's in front for the value
ie for eg 1456 of 10 digit value ,,,,,,,,means when it goes inside the field it should take it as 0000001456
i dont want to add any number of zerops particularly,,,its should just adjust to the value entered
previously the requirment was such that it was asked in parameters so declared as
pr_locco(10) TYPE n OBLIGATORY.
now,,, parameter is changed as select option so dont know how to pack and unpack the value
can you pls help me out....
Thanks in advance
Rachel
04-03-2009 6:41 AM
This is my select query befor which i have added the FM
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = so_locco
IMPORTING
OUTPUT = so_locco
SELECT akunnr aname1 alocco bbukrs a~ktokd
FROM kna1 AS a INNER JOIN knb1 AS b ON akunnr = bkunnr
INTO CORRESPONDING FIELDS OF TABLE it_kna1
WHERE locco in so_locco.
can you tell me this is how i should give my input in FM or ????
Thanks for response
04-03-2009 6:15 AM
Use FM:
CONVERSION_EXIT_ALPHA_INPUT - This converts number to a string filled with zeroes
CONVERSION_EXIT_ALPHA_OUTPUT - This converts number with zeroes into an integer
04-03-2009 6:19 AM
Plz SEARCH in SCN before posting you will get so many posts
with this fm.
CONVERSION_EXIT_ALPHA_INPUT
04-03-2009 6:23 AM
04-03-2009 6:24 AM
04-03-2009 6:34 AM
Hi,
Try this.
data: g_vbeln TYPE vbeln_vl.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = g_vbeln
IMPORTING
output = g_vbeln.
Edited by: ShaliniSinha on Apr 3, 2009 7:34 AM
04-03-2009 6:41 AM
04-03-2009 6:41 AM
This is my select query befor which i have added the FM
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = so_locco
IMPORTING
OUTPUT = so_locco
SELECT akunnr aname1 alocco bbukrs a~ktokd
FROM kna1 AS a INNER JOIN knb1 AS b ON akunnr = bkunnr
INTO CORRESPONDING FIELDS OF TABLE it_kna1
WHERE locco in so_locco.
can you tell me this is how i should give my input in FM or ????
Thanks for response
04-03-2009 6:49 AM
hi,
try this..
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = so_locco-low
IMPORTING
OUTPUT = so_locco-low
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = so_locco-high
IMPORTING
OUTPUT = so_locco-high
and then write ur query.
SELECT akunnr aname1 alocco bbukrs a~ktokd
FROM kna1 AS a INNER JOIN knb1 AS b ON akunnr = bkunnr
INTO CORRESPONDING FIELDS OF TABLE it_kna1
WHERE locco in so_locco.
04-03-2009 6:52 AM
data: w_num(10) type n.
Select-options : so_locco for w_num.
Just check these codes this will padd zeros in the front for select options.
Regards,
Gurpreet
04-03-2009 6:53 AM
hi
thanks i tried this way too but zero's is not getting appended ...
04-03-2009 6:59 AM
04-03-2009 7:00 AM
hi,
just check ur datatypes for so_loc..
or u can take to another varible
like
move so_loc-low to var1.
move so_loc-high to var2.
then write this parameter into export.
orelse vice a versa.