03-16-2007 3:31 PM
i m new to sap
i want a sample report to display
sales order details for the combination of company code
and sales organization plz include table names and fields used.
its urgent
03-16-2007 3:33 PM
Hi,
Welcome to SDN )
You have to use the following tables
VBAK - Sales document header
VBAP - Sales document line item
Filter the sales organization and the company code using the field VBAK-VKORG & VBAK-BUKRS_VF.
Thanks,
Naren
03-16-2007 3:35 PM
hi,
check the Tables VBAK & VBAP.
Sales Org.: vbak-vkorg
Compay code: vbak-bukrs_vf.
regards,
priya.
03-16-2007 6:12 PM
Hi Mallika,
Please go through the following simple code.
DATA: IT_VBAK LIKE VBAK OCCURS 0 WITH HEADER LINE.
DATA: IT_VBAP LIKE VBAP OCCURS 0 WITH HEADER LINE.
PARAMETERS: SORG LIKE VBAK-VKORG,
CCODE LIKE VBAK-BUKRS_VF.
SELECT * FROM VBAK INTO TABLE IT_VBAK UP TO 100 ROWS
WHERE
VKORG = SORG AND
BUKRS_VF = CCODE.
SELECT * FROM VBAP INTO TABLE IT_VBAP UP TO 100 ROWS
FOR ALL ENTRIES IN IT_VBAK
WHERE
VBELN = IT_VBAK-VBELN.
LOOP AT IT_VBAP.
WRITE: / IT_VBAP-VBELN, IT_VBAP-ERNAM, IT_VBAP-POSNR.
ENDLOOP.
regards,
raja sekhar.
03-17-2007 4:22 AM