cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Action

Former Member
0 Kudos

Hi,

My Requirement is when delete family member in IT0021, then auto delete the respective absence quota in IT2006.

Eg.

I have below records

IT0021

11.01.2010 -31.12.9999 u2013 Child 1

11.01.2010 -31.12.9999 u2013 Child 2

11.01.2011 -31.12.9999 u2013 Child 3

IT2006

11.01.2010 -31.12.9999 u2013 Abs. Quota 33

11.01.2010 -31.12.9999 u2013 Abs. Quota 33

11.01.2011 -31.12.9999 u2013 Abs. Quota 33

Iu2019ve added the dynamic actions as below.

0021 2 08 32 P T001P-MOABW='01'

0021 2 08 33 P P0021-KDSVH='01'

0021 2 08 34 I DEL,2006,33/D,,(P0021-BEGDA),

For the above setting, I got the result as below.

When I delete IT0021 for record of 11.01.2011 -31.12.9999 u2013 Child 3, it will delete all 3 records of IT2006 of below.

11.01.2010 -31.12.9999 u2013 Abs. Quota 33

11.01.2010 -31.12.9999 u2013 Abs. Quota 33

11.01.2011 -31.12.9999 u2013 Abs. Quota 33

This is wrong. I just want to delete 1 record only according to the start date.

Anything goes wrong with my dynamic action?

I did try below coding too. It also having the same result as above.

0021 2 08 32 P T001P-MOABW='01'

0021 2 08 33 P P0021-KDSVH='01'

0021 2 08 34 I DEL,2006,33/D

0021 2 08 35 W P2006-BEGDA=P0021-BEGDA

Pls help. Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Susan,

You may try writing a routine.

Please check the WIKI page below :

http://wiki.sdn.sap.com/wiki/display/ERPHCM/HowtoCreateaDynamic+action

Regards,

Dilek

Former Member
0 Kudos

I read the link given, mostly it's use to get and return a value. Is it can call a routine to delete the specific IT2006 record? If yes, is it configure Dynamic Action with calling a routine to delete IT2006 record better or create the logic to delete IT2006 record in User Exit/BAdI? I just would like to know which is the best practice. Thanks.

Former Member
0 Kudos

If you have a custom ABAP program that contains code to be executed when certain Dynamic Actions occur then you can add a new FORM to take care of this task.

former_member201275
Active Contributor
0 Kudos

That doesn't make any sense at all.

What is the link between infotype 0021 and 2006? How do you know which absence quota links to which 0021 record?

Former Member
0 Kudos

When there's a child record created in IT0021, then compassionate leave-child absence quota is created in IT0021. This can be done in Dynamic Action. Therefore, I want the same logic for deletion. Can it be delete one child record in IT0021, then delete absence quota of compassionate leave-child in IT2006 based on start date, end date of IT0021 and specific absence quota type. However, if there's more than 1 record with same start date, end date and absence quota type, can it be delete 1 record only?

Former Member
0 Kudos

Dynamic action is for quota type 33 and in 2006 all three record is 33 quota type that is why it is deleting all record.

Former Member
0 Kudos

I did specify the start date and end date, why is it still delete the IT2006 record which is not same start date with IT0021 record that I delete? I delete IT0021, subtype 2, start date: 11.01.2010, end date: 31.12.9999, it suppose to delete only IT2006 record, subtype 33, start date: 11.01.2010, end date: 31.12.9999, but why IT2006 record, subtype 33, start date: 11.01.2011, end date: 31.12.9999 is also deleted?

Can anyone help to answer my doubts? Thanks.