Application Development and Automation 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: 
Read only

Valuation class for material locked while COMMIT statement

Former Member
0 Likes
422

Hi Experts,

We have a requirement where we are processing Billing Output type using RSNAST00. The Output type calls our custom FM which inturn posts the Invoice(MIRO) and FI document (FB01) for the same billing docs using BAPI's. The cutom FM is using Commit statements which put locks on certain dictionary objects. So, when the next Output type having same materials is processed ( means invoice is posted for same materials), we get an error saying 'Valuation class locked for this Material group' and the Output type goes in error and no invoice is posted. we have tried using Commit and Wait, Wait statements , but nothing worked out. Please help. TIA.

2 REPLIES 2
Read only

Former Member
0 Likes
358

Hello Maninder,

Did you try to execute same program in debug. That is, First execute custom FM in debug mode and wait till it returns back and then execute posting inovice and see if it is going through. I think this is issue with the wait time for one to release lock and second to accquire. if in case of debug it works then may be you can put some explicit wait using wait syntax.

Thanks,

-Anand.

Read only

0 Likes
358

Hi Anand,

Thanks for such a quick reply. We have use an explicit wait with different time values. But still the problem persists and we are not able to decide on what time value. Also, since we are running background jobs to process output types, its a performance issue. Please provide some more indepth solution.

Regards,

Maninder