on 09-26-2008 9:27 AM
Hi all i am really hoping someone can point me in the right direction, or where i check the setting etc.....
We have a copy control routine set (see code below) in all our systems, but for some reason in DEV we are able to create three single invoices for three single deliveries. But in our QA client we get 2 bills and the split seems to be by material.
I can see no difference with config or even the routine we are using.... any suggestions what else i can check?
This is set at "Data:VBRK/VBRP level (also if this is changed to SAP standard 003 makes no difference)
The code : -
DATA: BEGIN OF ZUK,
MODUL(3) VALUE '003',
VTWEG LIKE VBAK-VTWEG,
SPART LIKE VBAK-SPART,
VGBEL LIKE VBRP-VGBEL,
MATNR LIKE VBAP-MATNR, "Billing Interface Changes
END OF ZUK.
ZUK-VTWEG = VBAK-VTWEG.
ZUK-SPART = VBAK-SPART.
ZUK-MATNR = VBAP-MATNR. "Billing Interface Changes
IF KURGV-PERFK = SPACE.
ZUK-VGBEL = VBRP-VGBEL.
ENDIF.
VBRK-ZUKRI = ZUK.
CLEAR VBRP-WAVWR.
IF LIKP-LFART EQ 'ZOIL'.
MOVE LIKP-LIFEX TO VBRP-AUGRU_AUFT.
ENDIF.
*} INSERT
ENDFORM.
Edited by: Steve Cane on Sep 26, 2008 10:44 AM
.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Steve
You said that for three deliveries, you get two invoices. Does it mean that all the materials listed in three deliveries are covered in two invoices ??
Anyway, I have compared the routine details what you have given with standard 003.
In standard, it says
DATA: BEGIN OF ZUK,
MODUL(3) VALUE '003',
VTWEG LIKE VBAK-VTWEG,
SPART LIKE VBAK-SPART,
VGBEL LIKE VBRP-VGBEL,
END OF ZUK.
ZUK-VTWEG = VBAK-VTWEG.
ZUK-SPART = VBAK-SPART.
IF KURGV-PERFK = SPACE.
ZUK-VGBEL = VBRP-VGBEL.
ENDIF.
VBRK-ZUKRI = ZUK.
ENDFORM.
whereas, you have given
VGBEL LIKE VBRP-VGBEL,
MATNR LIKE VBAP-MATNR, "Billing Interface Changes
END OF ZUK.
Can you please let me know for what purpose, you have included this one.
thanks
G. Lakshmipathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have given comments along side the code .. pls check if the logic makes sense and system behavior is right.
(Please Note that ZUK controls the Split and it has material in it)
DATA: BEGIN OF ZUK, -
MODUL(3) VALUE '003',
VTWEG LIKE VBAK-VTWEG,
SPART LIKE VBAK-SPART,
VGBEL LIKE VBRP-VGBEL,
MATNR LIKE VBAP-MATNR, "Billing Interface Changes -
(Material is part of the key - along with Dist Channel and Div)
END OF ZUK.
ZUK-VTWEG = VBAK-VTWEG. - (Copies Dist Channel to ZUK)
ZUK-SPART = VBAK-SPART. - (Copies Division to ZUK)
ZUK-MATNR = VBAP-MATNR. "Billing Interface Changes - (Copies Material to ZUK)
IF KURGV-PERFK = SPACE. -
ZUK-VGBEL = VBRP-VGBEL.
Invoice dates is Nil in the Customer Master and it is True then Delivery Number gets copies to ZUK
ENDIF.
VBRK-ZUKRI = ZUK.
It copies the above combination - Dist Channel + Div + Material into Combination Criteria so Material becomes the Split part automatically
CLEAR VBRP-WAVWR.
IF LIKP-LFART EQ 'ZOIL'. - (This is True for the Delivery Type - ZOIL in your project so it will work for thius delv type only and not for any other delv type)
MOVE LIKP-LIFEX TO VBRP-AUGRU_AUFT.
ENDIF.
*} INSERT
ENDFORM.
So if we analyse material is a part of combination criteria so system behaves right. Try to similate same scenarion which u did in QTY in DEV. If it is still not working check whether the routine got generated in QTY correctly sometimes we need to regenerate and activate a routine in QTY if it is another server.
Rewards points if i have made sence to think right
Regards
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i will give you an example of what is happening : -
we have the following :-
Delivery 1 with material A
Delivery 2 with material A
Delivery 3 with material B
When we run VF04 in DEV i get the following results : -
Bill 1 material A
Bill 2 material A
Bill 3 material B
So the splitting is all ok.
In QA we get the following results : -
Bill 1 material A (twice)
Bill 2 material B
So somewhere it is not do the split althought the same routine is applied in both systems.
Edited by: Steve Cane on Sep 26, 2008 11:29 AM
Hi,
The system behavior in QTY is right since it combines data from delv to bill based on material but in DEV it is not happening.
so Mat A combined to one bill and Mat B to another.
Check the field
KURGV - PERFK and c if it is not space and gets value in DEv and if it is psace if QTY.
Regards
Krishna
Sorry i am missing the point here what is QTY are you referring to QA?
What is happening in DEV is what i am wanting to happen, 1 delivery 1 invoice. i do not want the the materials grouped together, i want a 1 for 1.
In QA I want the same to happen, but I am not sure why when we are using the same routines it is not doing the same, the problem is also which system is correct?
Based n the code can you give me a simpl examplf what you think / feel it should be doing???
Regards
Steve
Edited by: Steve Cane on Sep 26, 2008 11:55 AM
Hi,
As a last attempt ... i tried to understand the Code for system behavior, let me put it as below and if u can analyse it -
if u see the code the system actually takes the Key - "Dist Channel + DIvision + Material" to Combine and create a bill.
So it searches in Delivery - Key as above (i.e Dist Channel + Div + Material) - which ever key is same - it combines else it splits.
Maybe this is what code says.
I would suggest something but i know it is very difficult but debugging can give a clue, i know debugging standard is very time taking and painful.
Regards
Krishna
User | Count |
---|---|
94 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.