‎2007 May 16 12:27 AM
hi
i need to get this field. here is what i have written but i am not getting it.
SELECT *
FROM vbrk
INNER JOIN vbrp ON vbrkvbeln = vbrpvbeln
INNER JOIN kna1 ON vbrkkunag = kna1kunnr
INTO corresponding fields of TABLE itab
where
vbrkvbeln in p_vbeln and vbrkkunag in p_kunag and vbrpmatnr in p_matnr and vbrpaugru_auft in p_augru and vbrk~fkdat in P_fkdat .
loop at itab.
select kdmat into itab1-kdmat
from vbap
where vbeln = itab-vbeln .
endselect.
endloop.
***************************************************
there is no value showing up in itab.
is there some special approach for this ?
‎2007 May 16 12:28 AM
Hi,
Make sure there is data in the table VBRK, VBRP for the corresponding input..
Make sure you are testing this in the right client..
Thanks,
Naren
‎2007 May 16 12:28 AM
Hi,
Make sure there is data in the table VBRK, VBRP for the corresponding input..
Make sure you are testing this in the right client..
Thanks,
Naren
‎2007 May 16 2:45 AM
Try this:
Data: Begin of it_kdmat occurs 0,
vbeln like vbap-vbeln,
kdmat like vbap-kdmat,
End of it_kdmat.
Data: lv_index like sy-tabix.
If not itab[] is initial.
select vbeln kdmat
into table it_kdmat
for all entries in itab
where vbeln = itab=vbeln.
Endif.
Loop at itab.
lv_index = sy=tabix.
clear it_kdmat.
read table it_kdmat with key vbeln = itab-vbeln.
If sy-subrc eq 0.
itab-kdmat = it_kdmat-kdmat.
Modify itab index lv_index.
Endif.
Endloop.
Thanks,
SKJ
‎2007 May 16 3:56 AM
See the below code :
SELECT *
FROM vbrk
INNER JOIN vbrp ON vbrkvbeln = vbrpvbeln
INNER JOIN kna1 ON vbrkkunag = kna1kunnr
INTO corresponding fields of TABLE itab
where
vbrkvbeln in p_vbeln and vbrkkunag in p_kunag and vbrpmatnr in p_matnr and vbrpaugru_auft in p_augru and vbrk~fkdat in P_fkdat .
loop at itab.
select kdmat into itab1-kdmat
from vbap
where vbeln = <b>itab-aubel</b> .
endselect.
endloop.
If you want to get KDMAT(Custoemr material # ) then you need validate on vbrp-aubel(This is sales order #) and Item number
Reward Points if it is useful
Thanks
Seshu
‎2007 May 16 4:56 AM
hi
good
debug the program and check the detail condition that you have written for join statement and what value all the fields are carrying after giving the join statement.
thanks
mrutyun^