‎2007 Jan 22 9:38 AM
Hi All...
I would like to fetch VBPA-KUNNR based on VBPA-PARVW = 'SH'.
Then i need to move VBPA-KUNNR to KOMKCV-ZZKUNNR.
Is it possible for me to write the SELECT statement without using INTO clause..???
If YES, how to write the code,...??????
Regards
Pavan
‎2007 Jan 22 9:57 AM
Hi,
I if konw vbpa-vbeln and vbpa-posnr then based on vbpa-parvw u can get vbpa-kunnr with out INOT clause...
here your can use select single statement to get the required data.
select single kunnr into gv_kunnr
from vbpa
where vbeln = vbeln
and posnr = posnr
and parvw = parvw.
if sy-subrc = 0.
komkcv-zzkunnr = gv_kunnr.
endif.
Regards,
Satya.
‎2007 Jan 22 9:41 AM
Hello Pavan,
If u want to use select without into clause then u need to create the workarea for the table using tables statament. Try like this.
TABLES: MARA.
Select single * from mara where matnr = 'ABACD'.
If useful reward.
Vasanth
‎2007 Jan 22 9:42 AM
‎2007 Jan 22 9:43 AM
SELECT kunnr from
vbpa
INTO v_kunnr
WHERE parvw = 'SH'.
IF sy-subrc = 0.
KOMKCV-ZZKUNNR = v_kunnr.
Pass the other values and
UPDATE TABLE KOMKCV. (check syntax)
ENDIF.Any way u have to use INTO either a variable or internal table o workarea.
Hope this helps you.
‎2007 Jan 22 9:51 AM
select * from VBPA where PARVW = 'SH'.
<b>so data gets selected into header of VBPA</b>.
komkcv-zzkunnr = vbpa-kunnr.
update table komkcv where zzkunnr = vbpa-kunnr.
endselect.
Award Points....
‎2007 Jan 22 9:57 AM
Hi,
I if konw vbpa-vbeln and vbpa-posnr then based on vbpa-parvw u can get vbpa-kunnr with out INOT clause...
here your can use select single statement to get the required data.
select single kunnr into gv_kunnr
from vbpa
where vbeln = vbeln
and posnr = posnr
and parvw = parvw.
if sy-subrc = 0.
komkcv-zzkunnr = gv_kunnr.
endif.
Regards,
Satya.