cancel
Showing results for 
Search instead for 
Did you mean: 

Logic for Sales Report

Former Member
0 Kudos

hi all

I am running a report and under that report i am giving billing date and billing number as input and on the basics of that i am fetching the sales document no. Now i want that by giving the same input i want the sales document of order type OR should come as output.How to build this logic and write functional specs.

cheers

shalsa007.........

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

Ask your Abapper to insert this field also in the report

VBAK-AUART

regards

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Shalsa2007,

If Billing date is one of the selection parameters, I would suggest to start with table VBRK

VBRK-FKDAT = Billing Date

VBRK-VBELN = Billing Doc #

You may also include Sales Org, Distribution Channel, Billing Type, to at least shorten the fetch time.

Then to get the Sales Order and Sales Document Type you may need to connect table VBRP and VBRK. After getting the value from VBRP-AUBEL, that's the time you join it to table VBAK. From VBAK you will get the information you need.

VBAK-VBELN = Sales Doc #

VBAK-AUART = Sales Doc Type

You may also want to other info from VBAK like PO Number, Who created the order, the date and time it was created, net value,... etc...

You may also consider using VBFA as what others advised but be careful of the date there as VBFA-ERDAT is not always equal to billing date.

I hope this helps.

Arnel

Former Member
0 Kudos

Hello,

you could use the table VBFA to get the precedding and scceeding document numbers , in that you could specify the order type OR - and the related number that you need to fetch and display in report

Hoep this helps

Thanks

Akasha

reazuddin_md
Active Contributor
0 Kudos

Table:

VBFA_VBELN ( Invoice Document) check VBFA_VBELV with VBFA_VBTYP_V EQ 'C' then

VBFA_VBELV ( Order document) = VBAK_VBELN

VBAK_VBELN with ref to this field you can extract VBAK_AUART

will be helpful, try to consult with the ABAPer for the same