Writing a query using tables VBRK & VBRP. Require VBRP-VGBEL in the query. VBRP-VGBEL is always the same on all line items. I just want the report to show 1 line. I have tried different coding but still get multiple lines. I think my issues is I need some coding around the VBRP-POSNR.
Not sure what I am missing. If VBRK-VBELN eq VBRP-VBELN then return one line.
Data: ls_vbrp like standard table of vbrp with header line.
Select VBELN into corresponding fields of table ls_vbrp from vbrp
where vbeln eq vbrk-vbeln.
sort ls_vbrp by vbeln descending.
delete adjacent duplicates from ls_vbrp comparing vbeln.
I've tried including vgbel and only using vgbel. I've tried up to 1 rows. I have tried adding VBRP-VGBEL as an additional field instead of using the table and the field appears blank.
Any assistance would be greatly appreciated.
Pamela