0% found this document useful (0 votes)
272 views

Inner Join

This document contains an ABAP report that selects data from tables VBFa, VBRP and stores it in a internal table. The data selected includes sales order, invoice number, position number, material number and image number. The data is filtered based on the selection options provided for sales order and invoice type being a delivery. The selected data is then looped and output with underlines between each record.

Uploaded by

Cedric
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
272 views

Inner Join

This document contains an ABAP report that selects data from tables VBFa, VBRP and stores it in a internal table. The data selected includes sales order, invoice number, position number, material number and image number. The data is filtered based on the selection options provided for sales order and invoice type being a delivery. The selected data is then looped and output with underlines between each record.

Uploaded by

Cedric
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

REPORT zpgm_14_05. TABLES vbfa. TABLES vbak. TABLES vbrp. DATA s_order TYPE vbeln_va.

SELECT-OPTIONS s_ord FOR s_order. TYPES: BEGIN OF t_data, vbelv TYPE vbfa-vbelv, vbeln TYPE vbfa-vbeln, posnr TYPE vbrp-posnr, matnr TYPE vbrp-matnr, fkimg TYPE vbrp-fkimg, END OF t_data. DATA i_data TYPE STANDARD TABLE OF t_data. DATA s_data TYPE t_data. *WRITE:/ * ' ','Sales order', * ' ','Invoice number',' '. SELECT j~vbelv j~vbeln s~posnr s~matnr s~fkimg INTO CORRESPONDING FIELDS OF TABLE i_data FROM ( vbfa AS j INNER JOIN vbrp AS s ON j~vbeln = s~vbeln ) WHERE j~vbelv IN s_ord AND vbtyp_v = 'C'. "vbfa WHERE "vbelv IN s_ord "AND vbtyp_n = 'M' AND vbtyp_v = 'C' inn. FORMAT COLOR 2. LOOP AT i_data INTO s_data. ULINE at 0(77). WRITE :/ ' ', s_data-vbelv, ' ', s_data-vbeln, ' ', s_data-posnr, ' ', s_data-matnr, ' ', s_data-fkimg,' '. ENDLOOP. ULINE at 0(77).

You might also like