05-07-2007 1:35 PM
hi
i m having problem in query please help me
here data is not coming
SELECT HBKID FROM PAYR INTO CORRESPONDING FIELDS OF TABLE INT_PAYR WHERE
ZBUKR = P_BUKRS
AND UBHKT IN (P_OHKONT).
loop at int_payr.
OUT_HBKID = int_payr-W_hbkid .
MODIFY INT_PAYR.
endloop.
give me advice.
thanks .
05-07-2007 1:49 PM
This example will help you ...
data: begin of i_mara occurs 0,
matnr like mara-matnr,
maktx like makt-maktx,
end of i_mara.
data: wa_maktx type maktx.
select matnr into table i_mara from mara where matnr =
'000000000000000001'.
select maktx into wa_maktx from makt
for all entries in i_mara where matnr = i_mara-matnr.
endselect.
loop at i_mara.
i_mara-maktx = wa_maktx.
modify i_mara transporting maktx .
endloop.
Regards,
Jayant
Please award if helpful
05-07-2007 1:38 PM
Hi
SELECT HBKID FROM PAYR INTO CORRESPONDING FIELDS OF TABLE INT_PAYR WHERE
ZBUKR = P_BUKRS
AND UBHKT <b>IN (P_OHKONT).</b> Is p_ohkont a parameter or select option. If it is a parameter instead of 'IN' give '=' and also remove the braces.
Regards
Haritha.
05-07-2007 1:40 PM
use....
Modify int_patr transporting w_hbkid index sy-tabix..
will work fine..
Regards,
Jyant
05-07-2007 1:41 PM
Hi
What's your problem?
Where data is not coming?
What is P_OHKONT? is it Ranges or select-options field?
SELECT HBKID FROM PAYR INTO CORRESPONDING FIELDS OF TABLE INT_PAYR WHERE
ZBUKR = P_BUKRS
AND UBHKT IN <b>P_OHKONT</b>.
This is wrong below?
What you are doing.
You got the field value HBKID into INT_PAYR internal table. Where you have to modify this.
Something wrong in the below code. check it.
<b>loop at int_payr.
OUT_HBKID = int_payr-W_hbkid .
MODIFY INT_PAYR.
endloop.</b>
Reward points if useful
Regards
Anji
05-07-2007 1:41 PM
Hi,
If P_OHKONT is a parameter
SELECT HBKID FROM PAYR INTO CORRESPONDING FIELDS OF TABLE INT_PAYR WHERE
ZBUKR = P_BUKRS
AND UBHKT = P_OHKONT.
If P_OHKONT is a Select-options then
SELECT HBKID FROM PAYR INTO CORRESPONDING FIELDS OF TABLE INT_PAYR WHERE
ZBUKR = P_BUKRS
AND UBHKT in P_OHKONT.
Regards
Sudheer
05-07-2007 1:42 PM
Hi,
I think P_OHKONT is delared as parameter but refered in selection screen as select options.
Try to evalueate contains of P_OHKONT before running select stmt trhrough debugging...
ur loop statement seems to be incorrect: what are u doing here, nothing and modifying int_payr table.
05-07-2007 1:49 PM
This example will help you ...
data: begin of i_mara occurs 0,
matnr like mara-matnr,
maktx like makt-maktx,
end of i_mara.
data: wa_maktx type maktx.
select matnr into table i_mara from mara where matnr =
'000000000000000001'.
select maktx into wa_maktx from makt
for all entries in i_mara where matnr = i_mara-matnr.
endselect.
loop at i_mara.
i_mara-maktx = wa_maktx.
modify i_mara transporting maktx .
endloop.
Regards,
Jayant
Please award if helpful