Application Development and Automation 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: 
Read only

code needed

Former Member
0 Likes
384

GET BILLTO_PARTNER customer number for the document (reading VBPA where VBELN = document number VBDKR-VBELN and partner PARVW = ‘RE’ / ‘BP’)

Read table KNA1 to get field KNA1-KATR6 where KUNNR equals Billto partner, and fields VBDKR-VKORG, VBDKR-VTWEG, VBDKR-SPART,

Store first character of field KNA1-KATR6 in a work field e.g. W_ KATR6.

2 REPLIES 2
Read only

Former Member
0 Likes
341

Can you please elaborate this more?

Read only

Former Member
0 Likes
341

HI Ali

Hope the below code gives you some idea on addressing the same:

tables: vbpa, kna1.
types: begin of t_partn,
         vbeln like vbpa-vbeln,
         kunnr like vbpa-kunnr,
         katr6 like kna1-katr6,
       end of t_partn.
data: it_partn type standard table of t_partn.
data: w_katr6 like kna1-katr6.

select vbpa~vbeln vbpa~kunnr kna1~katr6
       into table it_partn
       from vbpa
       inner join kna1
       on vbpa~kunnr = kna1~kunnr
       where vbpa~vbeln = VBKDR-VBELN
       and   vbpa~parvw = 'RE'
       and   vbpa~posnr = '000000'.

Kind Regards

Eswar