cancel
Showing results for 
Search instead for 
Did you mean: 

XVBPA[] not getting refreshed in exit MV45AFZZ

0 Kudos

Dear Experts,

I am using subroutine "userexit_pricing_prepare_tkomk" of include "MV45AFZZ" to update a custom field of TKOMK structure. I am taking the value from partner details by passing partner type to table XVBPA.

When i am processing single invoice there are no issues, partner details of only one invoice will be available in XVBPA and when i read with partner type i will get the right partner and it works fine.

When I am processing multiple invoices from VF04 tcode, when exit is called for second invoice it is having data of both first and second invoice and the data is not getting refreshed. If 10th invoice is getting processed, partners of all 10 invoices will be available. So when i read the table with partner type always partner of first invoice will be picked which is causing the issue.

I can try to read using the temporary invoice number like "&00000001" and fix the issue. Just trying to understand the SAP behavior, will XVBPA[] never be refreshed if we are processing multiple invoices?

Also when large number of invoices are processed in background sometimes few invoices are not facing this issue, so just confused on when exactly this subroutine will be called?

Please provide your valuable feedback. Tried searching in SCN but did not find any post on such issue, pardon me if this is a duplicate question.

Thanks in advance.

Regards,

Sathwik


Accepted Solutions (0)

Answers (3)

Answers (3)

ssivareddy
Discoverer
0 Kudos

Hi Satwik i am siva reddy i need ur help

phanikumar_v3
Active Contributor
0 Kudos

You are telling of MV45AFZZ & the sales order exits--But telling Tcodes VF04 used for billing..

Can you please Recheck and confirm.

Phanikumar

0 Kudos

Hi Phanikumar,

My bad, it is RV60AFZZ. I have created a new question for this and will redirect this question to that link. Please let me know your comments. I am using collective billing button in VF04 tcode.

Thanks and Regards,

Sathwik

Florian
Active Contributor
0 Kudos

do not have a system here, but why don't you call the partner get function module . That should return always the actual partners. Cannot 100% sure, but think I also used it that way.

0 Kudos

Hi Florian,

I will try to use this logic, i have one more structure which is having temporary invoice number which can be passed along with the partner type. Just curious that even though the exit gets called one time for each invoice the table is not refreshed. May be it is because it will create all the invoice together at the last, so needs the data. Just wanted to make sure it is not some issue which can be fixed by implementing a SAP Note so that in future i can keep this in mind while coding 🙂

Thanks and Regards,

Sathwik