on 02-11-2008 2:32 PM
hi,
i want vbpa- vbeln = vbak-vbeln,
then only again if parvw = ag,
get kunnr from vbpa...
how to write the select statement for getting kunnr field from vbpa.
please help
thanks
subhasis
Hi subhasis,
Although your query is not clear, based on my understanding you have sales document number ( VBELN ) from table VBAK. You want to know Customer number of it from table VBPA where partner function (PARVW) = 'AG'.
Write the following statement:
Select single * from VBPA
into VBPA
where VBELN = VBAK-VBELN
and PARVW = 'AG'.
if sy-subrc = 0.
< Do what ever you want>
endif.
Please reward points if useful.
Rgds,
Harikrishna.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
That's what i have explained. the following query will find kunnr ( in variable gv_kunnr ) if only vbpa-vbeln = vbak-vbeln and vbpa-parvw = 'AG'.
if sy-subrc = 0 means that it has found such value and place in variable gv_kunnr.
data: gv_kunnr like kna1-kunnr.
Select single kunnr
into gv_kunnr
from VBPA
where VBELN = VBAK-VBELN
and PARVW = 'AG'.
if sy-subrc = 0.
< Do what ever you want>
endif.
Please reward if helpful.
rgds,
harikrishna.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.