Purpose
Some customers have requirement to add new selection criteria field in VF04(SDBILLDL) or VF06(RV60SBAT). In standard system selection criteria fields are hard-coded.
So to fulfill this requirement, only a modification is possible.
Steps:
1, VF04(VF06) selects data from billing due index table VKDFS. So if you want to add new selection fields, you need to add this new fields in VKDFS table first. I take sales office(VKBUR) as an
example. When you add with an append the new field(s) on table VKDFS, please take care about the customer name space ZZ*. In this case, ZZVKBUR.
2, You need to fill VKDFS-ZZVKBUR in LV05IF0V. Here is a sample code for your reference:
**********************************************************
* for Orders FORM USEREXIT_VKDFS_SORTKRI_SALES.
VKDFS-ZZVKBUR = LVBAK-VKBUR.
ENDFORM.
* for Deliveries FORM USEREXIT_VKDFS_SORTKRI_DEL.
VKDFS-ZZVKBUR = LLIKP-VKBUR.
ENDFORM.
***********************************************************
3, When you create a new sales order or delivery, you will see new field VKDFS-ZZVKBUR is now available.
4, You can copy report RV60SBAT(or SDBILLDL) in customer name space.
I copied report RV60SBAT to create new report ZRV60SBAT.
Don't forget to define this new field in the report.
5, Add this new field as selection criteria in the following logic:
6, Change field name in the follow path:
SE38->ZRV60SBAT->Text elements->selection texts
7, When I run report ZRV60SBAT, it works perfectly.
1 Comment
Ajay Thakur
I have same kind of requirement to add Sales office VKBUR but in SDBILLDL.
The issue is that the Enhancment Sections are also COpied into ZSDBILLDL program and I am unable to add the input criteria S_VKBUR.
Please suggest the way forward.