cancel
Showing results for 
Search instead for 
Did you mean: 

Generate billing documents based on sales office?

Former Member
0 Kudos

Hi SD Guru's,

In standard transaction (VF04) i can create billing documents based on my sales area. But i have configured my Business Area based on my Sales office. I now want to generate billing documents based on Sales Office as my input field. How can we tackle this situation? Can it be done by standard or would we need a development?

Can i have a detailed step by step process to the solution if any?

Will appreciate your reply.

Thanks & Regards

Ravi

Accepted Solutions (0)

Answers (1)

Answers (1)

Manoj_Mahajan78
Active Contributor
0 Kudos

Ravi,

Do below (example with

sales office and sales group for RV60SBAT) with the help of ABAP-

I can confirm that there is a limitation to the selection criteria (like

salesoffice) in these transactions, because (SD Index: Billing Initiator

(VKDFS)) does not have such field.

A solution for this requirement can look like this (example with

sales office and sales group for RV60SBAT):

add with an append the new field(s) on table VKDFS

(take care about the customer name space ZZ*)

fill the fields ZZVKBUR and ZZVKGRP with userexit LV05IF0V

  • for Orders

FORM USEREXIT_VKDFS_SORTKRI_SALES.

VKDFS-ZZVKBUR = LVBAK-VKBUR.

VKDFS-ZZVKGRP = LVBAK-VKGRP.

ENDFORM.

  • for Deliveries

FORM USEREXIT_VKDFS_SORTKRI_DEL.

VKDFS-ZZVKBUR = LLIKP-VKBUR.

VKDFS-ZZVKGRP = LLIKP-VKGRP.

ENDFORM.

copy the report RV60SBAT in the customer name space and add

the new fields as selection criteria

  • get all customer numbers wich orders to be invoiced

SELECT * FROM VKDFS WHERE FKTYP IN X_FKTYP

AND VKORG = VKOR1

AND FKDAT BETWEEN FKDAT AND FKDAB

AND KUNNR IN X_KUNNR

AND FKART IN X_FKART

AND LLAND IN X_LLAND

AND VBELN IN X_VBELN

AND SORTKRI IN X_SORTK

> ins and zzvkbur in vkbur

> ins and zzvkgrp in vkgrp .

Reward if this helps..

Regds

MM

Manoj_Mahajan78
Active Contributor
0 Kudos

Ravi,

If required also refer Refer SAP Notes 63523,25206 & 42307 for above solution.

Regds

MM