Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

selecting program number(kunnr) from vbpa table

Former Member
0 Kudos
601

Hi,

I have a requirement where i have to select program number(kunnr) from vbpa table

based on vbeln and parvw fields.I can use 'FOR ALL ENTRIES IN vbak table for vbeln field.But parvw field is not present in vbak table .Where can i get parvw field to select the program number(kunnr) from vbpa table?

Regards,

Hema

2 REPLIES 2

Former Member
0 Kudos
250

<b>I guess you want Bill to party address

KUNRE is field from VBPA table Where PARVW = ‘RE’

Rewards if Helpful....</b>

harimanjesh_an
Active Participant
0 Kudos
250

hi hema,

PARVW is present in VBFA (Sales Document: Partner ).

So do like this,

SELECT avbeln bparvw FROM vbak as a JOIN vbfa as b ON avbeln = bvbeln INTO TABLE t_vbak WHERE bparvw IN s_parvw AND avbeln IN s_vbeln.

Then,

SELECT vbeln kunnr FROM vbap INTO TABLE t_vbap FOR ALL ENTRIES IN t_vbak where vbeln = t_vbak-vbeln.

<b>Note:

where s_parvw and s_vbeln are SELECT-OPTIONS</b>

Reward me if useful.........

Harimanjesh AN

Message was edited by:

Harimanjesh AN