Skip to Content

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

Write fields from two tables in one line??

Hi friends,

I want to write some fields from bkpf and bseg in one line...

My report should like something like this:

****some text*****

*for first document******* bkpf-bldat kunnr bseg-belnr bseg-gsber bseg-wrbtr

*for second document*** bkpf-bldat kunnr bseg-belnr bseg-gsber bseg-wrbtr

*for third document****** bkpf-bldat kunnr bseg-belnr bseg-gsber bseg-wrbtr




What should I change in order to get this form in report output?? Can I put these fields in some table so that it looks like excel table??Could you please check out the code below?

loop at it_bkpf into wa_bkpf.

loop at it_bseg into wa_bseg.

write: wa_bseg-gsber, wa_bseg-belnr, wa_bseg-wrbtr.


write: wa_bkpf-bldat.

read table it_bsid with key bukrs = wa_bkpf-bukrs

belnr = wa_bkpf-belnr

gjahr = wa_bkpf-gjahr

cpudt = wa_bkpf-cpudt.

if sy-subrc = 0.

write: it_bsid-kunnr.





Former Member

Helpful Answer

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