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

Set Dunning Lock

Former Member
0 Likes
1,548

Hi All

I have a requirement for setting a lock for dunning on contract for 1 day with a lock reason of 'X'. Can somebody guide me on this...

Thanks in advance

Jai

Hi All

I have a requirement for setting a lock for dunning on contract for 1 day with a lock reason of 'X'. Can somebody guide me on this...

Thanks in advance

Jai

4 REPLIES 4
Read only

Former Member
0 Likes
1,211

use Sm01 Transaction to lock F150 Transaction.

Reward Points if it is helpful

Thanks

Seshu

Read only

Clemenss
Active Contributor
0 Likes
1,211

Hi Jaideep,

you mention a "contract" - so this my be contract accounting.

If so, the lock reason X must be configured in customizing. You can set (and delete) the lock manually in contract master data, as I remember in payment section.

The result can be checked in DB table DFKKLOCKS.Do this to get all parameters you need for function calls.

In program, use FUNCTION 'FKK_S_LOCK_GET_FOR_GPART_VKONT' to read the locksfor the PROID and LOTYP as seen in DFKKLOCKS. Then use FUNCTION 'FKK_S_LOCK_CREATE' to set the lock with fdate = sy-datum and tdate = sy-datum + 1.

You may use this form to create the lock object LOOBJ1:

<pre>

----


  • Form LOCKS_LOOBJ1_CREATE

----


FORM locks_loobj1_create USING p_vkont LIKE fkkvkp-vkont

p_gpart LIKE fkkvkp-gpart

CHANGING p_loobj1 LIKE dfkklocks-loobj1.

p_loobj1+0(12) = p_vkont.

p_loobj1+12(10) = p_gpart.

ENDFORM. " LOCKS_LOOBJ1_CREATE

</pre>

Good luck!

Regards,

Clemens

Read only

Former Member
0 Likes
1,211

Hi Li

Thanks for wonderful guidance... I was searching for it for last 1 hour and also found the same what u have just explained above and even implemented it. The only difference is that that i have not read the old locks for the CA in my Report.

Is that necessary?? I mean i have not used that logic, should i??

Thanks and Regards

Jai

Read only

Clemenss
Active Contributor
0 Likes
1,211

Hi Jaideep,

reading the existing locks can be used to make sure that the lock you want to set does not yet exist.

We use it for some more complex logic like "do not delete lock of type A" if a lock of type B exists.

Regards,

Clemens