cancel
Showing results for 
Search instead for 
Did you mean: 

XVBPA[] not getting refreshed in exit RV60AFZZ

0 Kudos

Dear Experts,

I am using subroutine "userexit_pricing_prepare_tkomk" of include "RV60AFZZ" 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 using collective billing button, 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

DoanManhQuynh
Active Contributor
0 Kudos

I saw there is subroutine XVBPA_SELECT called to get partner using partner function, do you mean that you using that subroutine but still not get correct partner? its collective then it could be more than 1 record, and i think all records will have the number = "&00000001"...or it will increase? sorry i dont have the system to check. maybe you should debug more, after the exit what would it do and find the other enhancement point.

Accepted Solutions (0)

Answers (0)