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: 

Report prog small help plz

Former Member
0 Kudos

Hi,

This is Ravinder.

Selection Screen

Sales Org: VKORG

Distribution Channel: VTWEG

Division: SPART

Billing Type: FKART

Plant: WERKS

Payment Terms: ZTERM

Sold-to Party: KUNAG

Billing Date: FKDAT

Now Using the above Selection screen inputs, I want to generate the following fields in the output.

Output Screen

Invoice No: VBELN

Invoice Date: FKDAT

Customer Number: KUNNR

Customer Name: NAME1

Material Description: MAKTX

Payment Terms: ZTERM

Net Value: NETWR

Ship-to City: ORT01

Sold-to party: KUNAG

Ship-to party: KUNNR

Tables Used:

Delivery: LIKP, LIPS

Invoice:VBRK, VBRP

Customer: KNA1

Material: MARA

Material Description: MAKT

Now the Problem what I got is....How to link between these tables...ie., what common fields can be used between these tables so that I can use FOR ALL ENTRIES and retrieve the above output fields.

Can anyone please help me out in giving a REPORT program or a pseudo code for the above data.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I think this was already answered. Again, I dont know you want LIKP, and LIPS, if you are not using it in the program. All you need if VBRK, and VBRP

select VBRKVBELN VBRKFKDAT ..... your fields

from ( VBRK

inner join VBRP

on VBRPVBELN = VBRKVBELN

inner join VBPA

on VBPAVBELN = VBRPVBELN

inner join KNA1

on KNA1KUNNR = VBPAKUNNR

inner join MAKT

on MAKTMATNR = VBRPMATNR)

where VBRK~VKORG in S_VKORG

and VBRK~VTWEG in S_VTWEG

and VBRK~FKART in S_FKART

and VBRK~FKDAT in S_FKDAT

and VBPA~PARVW in ('AG', 'WE').

1 REPLY 1

Former Member
0 Kudos

I think this was already answered. Again, I dont know you want LIKP, and LIPS, if you are not using it in the program. All you need if VBRK, and VBRP

select VBRKVBELN VBRKFKDAT ..... your fields

from ( VBRK

inner join VBRP

on VBRPVBELN = VBRKVBELN

inner join VBPA

on VBPAVBELN = VBRPVBELN

inner join KNA1

on KNA1KUNNR = VBPAKUNNR

inner join MAKT

on MAKTMATNR = VBRPMATNR)

where VBRK~VKORG in S_VKORG

and VBRK~VTWEG in S_VTWEG

and VBRK~FKART in S_FKART

and VBRK~FKDAT in S_FKDAT

and VBPA~PARVW in ('AG', 'WE').