SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Restricting number of prints per day, parallel mode

Former Member
0 Kudos
309

Hi,

I have a certain requirement of restricting the number of prints of a certain correspondence for each day.

I have resorted to providing the expected print date in the LAUFD field of the print request in DFKKCOH and when printing, use this filter to decide if it is to be printed on the given day. This part is fine.

My problem arises when I am creating the print requests using FKK_WRITE_CORR through a multi-threaded program. Say suppose the number of allowable prints for each day is 50K, the LAUFD of the requests get populated with the date till the count of such entries reaches the limit and then is to move onto the next day. However, being a parallel process, each thread checks individually if the limit is reached for the day in DFKKCOH. So now, if i actually can accomodate just one more print request for the day in DFKKCOH, all threads think they can push in their entry and i end up crossing the limit.

Can you please suggest how to get over this trick?

Is there a way i can make the process have a kind of 'read lock' on the DFKKCOH entries count? Or may be create all the entries through the parallel process keeping LAUFD blank and then have a continued process of filling in the date picking on the ones just created?

Thanks in advance for any replies,

Arindam.

1 ACCEPTED SOLUTION

former_member587072
Participant
0 Kudos
220

Hey Arindam ..   Sounds like you try to restrict the entries to DFKKCOH to 50,000 instead of only printing 50,000 and stopping. 

One thing that comes to mind is to continue resticting to 50,000 (and allowing a few extra in).   Then in the application form setup a global parameter to count the entries successfully print (so, set the count in the end exit).    Then in the during exit of the main form level, you could check the count and if over 50,000 issue a mac_print_cancel which will error the form.    Those few extra that errored will be candidates to print the next day.  

Joe

View solution in original post

2 REPLIES 2

former_member587072
Participant
0 Kudos
221

Hey Arindam ..   Sounds like you try to restrict the entries to DFKKCOH to 50,000 instead of only printing 50,000 and stopping. 

One thing that comes to mind is to continue resticting to 50,000 (and allowing a few extra in).   Then in the application form setup a global parameter to count the entries successfully print (so, set the count in the end exit).    Then in the during exit of the main form level, you could check the count and if over 50,000 issue a mac_print_cancel which will error the form.    Those few extra that errored will be candidates to print the next day.  

Joe

0 Kudos
220

Thanks Joe for your thoughts.

Agree, that is one way of restricting the number of prints for a day.

However my other restriction of printing my lot within the SLA period may be breached in this case.

I suppose in that case, when creating the print requests, I may allow in at max <number of job threads> - 1 extra entries for each print day when processing in parallel. A corresponding adjustment to the restriction value of 50K may be required.

Regards,

Arindam.