Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Report prog small help plz

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.

Former Member
Former Member replied

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').

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question