Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

sales order

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

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

Former Member
0 Kudos

hi,

check the Tables VBAK & VBAP.

Sales Org.: vbak-vkorg

Compay code: vbak-bukrs_vf.

regards,

priya.

Former Member
0 Kudos

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.

Former Member
0 Kudos

thnks for helping to getb the answer