2008 Feb 15 1:42 PM
Hi,
Plz help me to understand this.
RANGES: r_rangename FOR konv-kposn.
**********
INITIALIZATION.
r_rangename-sign = 'I'
r_rangename-option = 'EQ'.
r_rangename-low = space.
Append r_rangename.
Clear r_rangename.
***************************
SELECT * INTO TABLE itab
FROM konv
WHERE
knumv = '32424234' "Some Value
kposn IN r_rangename
AND stunr IN r_rangename
AND zaehk IN r_rangename.
********************************************
i am not able to understand this ranges concept.
This select query is not getting executed and i am getting a sy-subrc value of 4.
The data is present in the table konv for the given value of knumv.
Please Help !!...
Regards.
2008 Feb 15 1:50 PM
Don't populate anything into the range ..
By default U'll get every thing from the table(if range is initial then
every thing is considered)
Don't populate anything into the range ..
By default U'll get every thing from the table(if range is initial then
every thing is considered)
2008 Feb 15 1:47 PM
r_rangename-low = space.
you're not providing a valid condition number here, so subrc is 4. once you provide valid numbers in the range, your query will return results.
A range is basically the same as a select-option on the selection screen.
Cheers
Thomas
2008 Feb 15 1:50 PM
Don't populate anything into the range ..
By default U'll get every thing from the table(if range is initial then
every thing is considered)
2008 Feb 15 1:56 PM
2008 Feb 15 1:54 PM
Hi,
Ranges are exactly similar to select-options, with no input box on the selection screen. These can be used in select statement in the where condition to get records for multiple values.
In your query, the range has a single record with null value as range-low. so the system finds all records with KPOSN,STUNR,ZAEHK is initial. Because, there are no records in the system, it is not fetching any value, hence setting sy-subrc to 4. Hope this helps, <REMOVED BY MODERATOR>
rgds,
Harikrishna.
Edited by: Alvaro Tejada Galindo on Feb 15, 2008 3:05 PM
2008 Feb 15 1:55 PM
Hi,
you are populating the ranges table in initialization event.
the ranges are declared for kposn field.
In where condition of the select you are equating to stunr, zaehk also.
That is why you are not getting sy-subrc as zero.
write start-of-selection. befor the select statement also.
regards,
kamala.
2008 Feb 15 1:57 PM
If you dont want to pass the value to the ranges just skip.
try this:
r_rangename-sign = 'I'.
r_rangename-option = 'EQ'.
*r_rangename-low = space.
Append r_rangename.
Clear r_rangename.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |