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: 

Invoice Consolidation do not work

Former Member
0 Kudos

Hello Gurus,

We have a requirement to group orders according to the following fields:

*Order Types (ZPI,ZPIF,ZPCN,ZPDN,ZPEX,ZPR)

the same partner functions

customer

sales area

presales date (vbkd-bstdk)

delivery route (same ZJ partner function)

reference number (vbak-xblnr)

Here's the config in VTFA

header:

source ZPI

target ZPI

copying requirements: 002

I go to ITEM there are 3 items in the table

ZPDN Proximity Debit Note

ZPIF Proximity Issue Free

ZPIN Proximity Issue

Now under item category ZPIN

copying requirements: 002

Data VBRK/VBRP: 904

I put my changes under a custom routine RV60C904. I managed to filled up ZUKRI with correct fields.

I test documents with basically the same fields and Order type ZPI and it works (I'm not sure, there's a case it's not working and it split because of partner data).

I ted documents with other order types and when I debug it's not passing thru RV60C904.

For example the config for ZPR order type is

header:

source: ZPR

target: ZPR

copying requirements: 001

Item

Item cat

ZPCN Proximity Credit Not

ZPRF Proximity Ret Free

ZPRN Proximity Returns

for ZPRN:

copying requirement 002

data vbrk/vbrp 002 FV60C002

For the contents of FV60C002

split criteria

DATA: BEGIN OF ZUK,

MODUL(3) VALUE '001',

VTWEG LIKE VBAK-VTWEG,

SPART LIKE VBAK-SPART,

END OF ZUK.

ZUK-SPART = VBAK-SPART.

ZUK-VTWEG = VBAK-VTWEG.

VBRK-ZUKRI = ZUK.

When I try to run VF04, 2 invoices were created with different partner data

Fld Name $000000001 $000000002

Customer Number 1 1000000042 1000000043

Address 0000052929 0000052930

And it doesn't pass thru RV60C904.

It seems that it's only passing thru when order type is ZPI. Nevertheless, for test in ZPI order type, sometimes the invoice were grouped, sometimes it's splits. I checked ZUKRI and the values are the same. I'm not sure there is something going on after RV60C904

Questions:

1. Can you please give me an idea what the purpose of items in VTFA? what are the use of the 3 items listed (ZPDN, ZPIF, ZPIN)?

2. It seems that even on ZPI, even if ZUKRI is the same the grouping sometimes does not work.

3. Does it mean I need to touch every routine/item category for each order types mentioned above?

4. For other order types like ZPR, it's not passing thru my routine. How can I come up with the solution without modifying every routine and item category for each order types?

5. How complicated is this kind of requirement?

Any help is highly appreciated.

1 ACCEPTED SOLUTION

brad_bohn
Active Contributor
0 Kudos

You can find the issue with the failure to combine by debugging directly from your data transfer routine. Shortly after the call, there is an internal table read that compares all values calculated for VBRK, not just the ZUKRI value. Most likely, the issue is with some other field, typically REGIO or some other partner related field.

If your routine isn't triggered, then it isn't configured for the doc types and/or item categories in question. You need to review your copy control config carefully. I'll just say that the simpler you make the copy control setup the better, i.e., group similar item categories under the same requirements and data transfer routines.

1 REPLY 1

brad_bohn
Active Contributor
0 Kudos

You can find the issue with the failure to combine by debugging directly from your data transfer routine. Shortly after the call, there is an internal table read that compares all values calculated for VBRK, not just the ZUKRI value. Most likely, the issue is with some other field, typically REGIO or some other partner related field.

If your routine isn't triggered, then it isn't configured for the doc types and/or item categories in question. You need to review your copy control config carefully. I'll just say that the simpler you make the copy control setup the better, i.e., group similar item categories under the same requirements and data transfer routines.