Show us how you are filling the ranges.
Regards,
Rich Heilman
I don't think there is any problem at all.
The records which have the cost elements (R_SETLEAF )between the range you have mentioned, does not have any one of those 50 single values you have given in R_OROBJNR_IN_COUNT.
<b>REmember the AND Condition wil only give the over lapped records.</b>
Anyways, check for your self in se11/se16.
Regards,
Ravi
Hi kripa,
Fill range table R_OROBJNR_IN_COUNT
with only 1 or 2 entries for testing purpose
with record that matches your selection criteria
by looking into table COSS.
Also fill the range as
r_objnr-sign = 'I'.
r_objnr-option = 'BT'.
Regards,
Amole
Hey people....
This is my code .....
*********************************
LOOP AT R_OROBJNR_IN.
IF R_OROBJNR_IN-OPTION = 'EQ'.
R_OROBJNR_IN_TEMP-SIGN = R_OROBJNR_IN-SIGN.
R_OROBJNR_IN_TEMP-OPTION = R_OROBJNR_IN-OPTION.
R_OROBJNR_IN_TEMP-LOW = R_OROBJNR_IN-LOW.
APPEND R_OROBJNR_IN_TEMP.
CLEAR R_OROBJNR_IN_TEMP.
ELSEIF R_OROBJNR_IN-OPTION = 'BT'.
L_LOW_VALUE = R_OROBJNR_IN-LOW.
WHILE L_LOW_VALUE LE R_OROBJNR_IN-HIGH .
R_OROBJNR_IN_TEMP-SIGN = R_OROBJNR_IN-SIGN.
R_OROBJNR_IN_TEMP-OPTION = 'EQ'.
R_OROBJNR_IN_TEMP-LOW = L_LOW_VALUE.
APPEND R_OROBJNR_IN_TEMP.
CLEAR R_OROBJNR_IN_TEMP.
L_LOW_VALUE = L_LOW_VALUE + 1.
ENDWHILE.
ENDIF.
ENDLOOP.
REFRESH : R_OROBJNR_IN_COUNT.
CLEAR : R_OROBJNR_IN_COUNT.
LOOP AT R_OROBJNR_IN_TEMP.
R_OROBJNR_IN_COUNT = R_OROBJNR_IN_TEMP.
APPEND R_OROBJNR_IN_COUNT.
ADD 1 TO COUNTER.
IF COUNTER > MAX_COUNTER.
kripa
SELECT OBJNR KSTAR WOG001 WOG002 WOG003 WOG004 WOG005 WOG006
WOG007 WOG008 WOG009 WOG010 WOG011 WOG012
FROM COSS APPENDING TABLE T_COSS
WHERE LEDNR = X_LEDNR
AND OBJNR IN R_OROBJNR_IN_COUNT " -low
AND GJAHR = P_FYEAR
AND WRTTP = X_WRTTP
AND KSTAR IN R_SETLEAF.
kripa
MOVE 0 TO COUNTER.
REFRESH R_OROBJNR_IN_COUNT.
CLEAR R_OROBJNR_IN_COUNT.
ENDIF.
ENDLOOP.
*********************************
In R_SETLEAF .... i have values like this
************************
1 I EQ 950000 950000
2 I EQ 551046 551046
3 I EQ 551500 551500
4 I EQ 551400 551400
5 I EQ 551071 551071
6 I EQ 551040 551040
7 I EQ 551086 551086
8 I BT 551000 551030
9 I EQ 551045 551045
*************************
The costs of the 8th record is not picked up in the report .....
Am i clear ???
Cheers,
R.Kripa.
if you select distinct fields, don't forget the addition 'INTO CORRESPONDING FIELDS OF'... Your statement may result in garbage.
The way you select 'OBJNR IN R_OROBJNR' and 'KSTAR IN R_SETLEAF' will return only records fullfilling both conditions.
Either use SELECT FROM SELECT or ommit one of the ranges and after selection delete itab where not in <ommmitted range>.
Regards,
Clemens
Add comment