10-21-2008 8:09 AM
my select statement is like this:
SELECT * FROM Mseg
INTO TABLE it_mseg
WHERE mblnr = itab-mblnr
and matnr = s_mate.
loop at it_mseg.
it_item-matnr = it_mseg-matnr.
it_item-dmbtr = it_mseg-dmbtr.
it_item-mblnr = it_mseg-mblnr.
it_item-bwart = it_mseg-bwart.
it_item-budat = itab-budat.
it_item-erfmg = it_mseg-erfmg.
it_item-rate = it_item-dmbtr / it_item-erfmg.
append it_item.
endloop.
while debugging it is showing sy-subrc is 4 and not retrieving data...
pls help me
10-21-2008 8:12 AM
Hi,
Is s_mate is select-option then change code as follows. Does the itab has contents, if yes then check below code:
SELECT * FROM Mseg
INTO TABLE it_mseg
for all entries in itab
WHERE mblnr = itab-mblnr
and matnr in s_mate.
if itab is just a workarea kind then,
SELECT * FROM Mseg
INTO TABLE it_mseg
WHERE mblnr = itab-mblnr
and matnr in s_mate.
Thanks & Regards,
Navneeth K.
10-21-2008 8:21 AM
Hi Rajkamal,
In debugging check value of itab-mblnr
and s_mate .
check S_MATE value and declaration type of S_MATE.
Regards,
Rajitha.
10-21-2008 8:24 AM
>
> my select statement is like this:
>
> SELECT * FROM Mseg
> INTO TABLE it_mseg
> WHERE mblnr = itab-mblnr
> and matnr = s_mate.
>
Mseg is looking at only one value if your table(itab) is with header line.
either use For all entries in selcct query else use select single * in a loop at itab.
Better use for all entries.