07-03-2007 10:59 AM
Hi ABAPers,
I have a problem regarding the checking of my number range...this is the sample
itab i created :
DATA : it_nriv TYPE RANGE OF NRFROM WITH HEADER LINE.
under load-program , i declare this.
LOAD-OF-PROGRAM.
it_nriv-sign = 'I'.
it_nriv-option = 'CP'.
it_nriv-low = '0100000000'.
it_nriv-high = '0299999999'.
APPEND it_nriv.
the checking value is <in>-kunnr = 100000056.
so i declare this to my program
LOOP AT it_data ASSIGNING <in>.
IF <in>-kunnr(10) IN it_nriv
AND it_nriv IS NOT INITIAL.
PERFORM insert_data.
ELSE.
PERFORM insert_norange.
ENDIF.
the main problem is , everytime i pass a value for example <in>-kunnr = 100000056.
it will pass or go to perform insert_data...but unfortunately...it always goes to perform insert_norange..
What should be the problem to this syntax?
Kindly Help Me.....
Thanks in advance
aVaDuDz
07-03-2007 11:09 AM
hi,
for select-options we have 4 parameters in that for option we have to use poerators [relational ] like BT, IN, LIKE, EQ, NE,...........
so change t_nriv-option = 'CP'. to t_nriv-option = 'BT' or any other valid relational operator .
if useful reward some points.
with regards,
Suresh.A
07-03-2007 11:02 AM
i think the problem is
it_nriv-sign = 'I'.
it_nriv-option = 'BT'. "instead of CP use BT
it_nriv-low = '0100000000'.
it_nriv-high = '0299999999'.
APPEND it_nriv.
regards
shiba dutta
07-03-2007 11:04 AM
Hi
something wrong with the condition
IF <in>-kunnr(10) IN it_nriv
AND it_nriv IS NOT INITIAL.
just check
Change the line
it_nriv-option = 'CP'.
to
it_nriv-option = 'BT'.
and see
Since you have given CP it is not getting populated and its always going to the second condition
PERFORM insert_norange.
Reward points for useful Answers
Regards
Anji
07-03-2007 11:09 AM
hello Anji ,
thanks for your reply...i think the main problem is the value i pass in the program is
100000056 which is compared to 0100000000 ...now..how can i put 0 before 100000056
since the maximum length is 10 and 100000056 has only nine value..compared to 0100000000..please help
Thanks in advance
aVaDuDz
07-03-2007 11:09 AM
hi,
for select-options we have 4 parameters in that for option we have to use poerators [relational ] like BT, IN, LIKE, EQ, NE,...........
so change t_nriv-option = 'CP'. to t_nriv-option = 'BT' or any other valid relational operator .
if useful reward some points.
with regards,
Suresh.A
07-03-2007 11:12 AM
Hi Suresh.A
Thanks so much for your reply...by the way..what is the meaning of BT ?IN? and so forth...sorry...im just a beginner in ABAP..
Thanks so much
aVaDuDz
07-03-2007 11:13 AM
use fm CONVERSION_EXIT_ALPHA_INPUT to get the leading zeros.
regards
shiba dutta
07-03-2007 11:18 AM