cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Action on IT0105

Former Member
0 Kudos

Hi,

I need to write dynamic action for following scenario:

Whenever value is maintained in 'System id' field of IT0105, Subtype 9000, then this value should be copied to the 'System Id' field of Subtpy 9001.

For example, If we create Home Phone in IT0105, Subtype 9000, then the same home phone should be copied in Subtype 9001 also. If we delete Home phone in subtype 9000, then automatically home phone in subtype 9001 should also be deleted.

Regards

KP

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi K P,

the easiest way will be calling a sub rountine in the dynamic action.

step 1:

At SM 30 dynamic action table t588z

IT      STy  Field N  FC NO S  Variable function part

0105               00 06 01 F  F_0105(Z_program)

step 2:
now goto se 38 and create a progrma by name Z_program and in that create a
sub routine F_0105.

form f_0105.

write your logic there.

endform.

Step3: Execute the process and check your dynamic action.

thanks,

Asad.

Former Member
0 Kudos

Thanks Asad,

I was thinking whether i can get it don using the dyn action.

Not sure where I am going wrong.

Regards

KP

Former Member
0 Kudos

Hi KP,

as far as i know you can do it using Dynamic action (though i do not know the detials req)

Check what is the time constraint of subtype you have used that is 9000 and CELL.

please share the same.

also i did noty understand the below condition.

***FOR DELETE*****

0105 9000  08 26 P T001P-MOLGA='13'

0105 9000  08 28 P P0105-BEGDA=P0105-BEGDA

0105 9000  08 30 P P0105-ENDDA=P0105-ENDDA

0105 9000  08 32 P P0105-USRID=P0105-USRID

here you are comparing 0105 bega with 0105 begda and so on.. which will be true always and data wil get deleted.


Asad.

Former Member
0 Kudos

Hi Asad,

time contraint is 3 for both subtypes.

Regarding the steps that you underline, I am basically trying to cover for a multiple subtypes scenario for example if we have two records for stype 9000 and two corresponding records for subtype CELL. So if I delete one record of 9000 then how the logic will know which record out of two CELL records should be deleted. Those three steps are for that. But unfortunately they are not working

Former Member
0 Kudos

Hi KP,

i am little confuse as per your condition you are checking if 1 = 1 or A  = A.

0105 9000  08 28 P P0105-BEGDA=P0105-BEGDA

0105 9000  08 30 P P0105-ENDDA=P0105-ENDDA

0105 9000  08 32 P P0105-USRID=P0105-USRID.

Never done this type of check.

kindly share on what condition (Functional requirement)  you want to delete the CELL subty record.

Asad.

Former Member
0 Kudos

Ok the requirement is:

-This action is limited to only one infotype 0105 but two subtype 9000 and CELL

- When subtype 9000 is created, subtype CELL should also be created with the same dates

- When subtype 9000 is changed, CELL shd do the same

- When 9000 is copied, CELL shd also get copied

- When 9000 is deleted, CELL shd also deleted

Basically CELL is a replica of 9000 interms of behaviour

Challenges:

- In case of muliple records of 9000 and CELL , when I delete one record of 9000, it deletes all records of CELL. Ideally it shd delete corresponding record

- If i edit existing record of 9000 using pencil sigh, it deleted records of CELL. Ideally, it should edit record of CELL

Former Member
0 Kudos

Hi KP,

why dont  you make use of FORM (sub routine) for your requirement?

that is much easier to control and debug.

Asad.

Former Member
0 Kudos

Hi K P,

As MR.Vijayakumar said this can be done with the help of User exit or BADi but from the functional point this can be done through the Dynamic action also as shown below in table T588Z ,

Creation:

01050010USRID_LONG062PT001P-MOLGA='40'
01050010USRID_LONG063IINS,0105,0030
01050010USRID_LONG064WP0105-BEGDA=P0105-BEGDA
01050010USRID_LONG065WP0105-ENDDA=P0105-ENDDA
01050010USRID_LONG066WP0105-USRID_LONG=P0105-USRID_LONG

Deletion:

01050010082PT001P-MOLGA='40'
01050010084IDEL,0105,0030,,(P0105-BEGDA),(P0105-ENDDA)/D

The above one is a sample one use this as per your requirement.Hope this solves the issue.

Regards,

Mithun K

Former Member
0 Kudos

Very correct asad and Mithun K..

Former Member
0 Kudos


Hi Mithun,

thanks.

This dynamic action does not work for multiple record. For exaple, if there are two records for 0010 and two for 0030. Then if I delete one record for 0010 then it deletes both records of 0030. Ideally it should delete only one record.

Do you know what this is happening ?

Regards

KP

Former Member
0 Kudos

hi KP

check your logic?

may you paste your code here what you are doing?

this will help us to resolve the issue faster.

Asad.

Former Member
0 Kudos


Ok , here is my code, I have written for change '02', create '04' and delete '08' separately.

What is required is whenever IT0105 subtype 9000 is creted, changed/copied or deleleted, the same should happen with IT0105 subtype CELL. This dynamic action is failing in case of multiple records. It fails in below record for example

01.01.2014     31.12.9999     9000      Test1 (this is text in field P0105- USRID)

01.01.2014     31.12.9999     CELL     Test1

01.01.2015     31.12.9999     9000     Test2

01.01.2015     31.12.9999     CELL     Test2

If I delete first row then it shd ideally only delete second row, but here it wrongly deleges second and fourth row.Same way when I change and value , it does delete other CELL entries also. Can u suggest a way out? below is my code:

***FOR CHANGE/COPY****

0105 9000  02 8 P T001P-MOLGA='40'

0105 9000  02 10 P P0105-BEGDA=P0105-BEGDA

0105 9000  02 12 P P0105-ENDDA=P0105-ENDDA

0105 9000  02 14 P P0105-USRID=P0105-USRID

0105 9000  02 16 I DEL,0105,CELL/S

0105 9000  02 20 P P0105-BEGDA=P0105-BEGDA

0105 9000  02 22 P P0105-ENDDA=P0105-ENDDA

0105 9000  02 24 P P0105-USRID=P0105-USRID

0105 9000  02 28 I COP,0105,CELL/D

0105 9000  02 30 W P0105-BEGDA=P0105-BEGDA

0105 9000  02 32 W P0105-ENDDA=P0105-ENDDA

0105 9000  02 34 W P0105-USRID=P0105-USRID

*** FOR CREATE****

0105 9000  04 2 P T001P-MOLGA='40'

0105 9000  04 3 I INS,0105,CELL/D

0105 9000  04 4 W P0105-BEGDA=P0105-BEGDA

0105 9000  04 5 W P0105-ENDDA=P0105-ENDDA

0105 9000  04 6 W P0105-USRID=P0105-USRID

***FOR DELETE*****

0105 9000  08 26 P T001P-MOLGA='13'

0105 9000  08 28 P P0105-BEGDA=P0105-BEGDA

0105 9000  08 30 P P0105-ENDDA=P0105-ENDDA

0105 9000  08 32 P P0105-USRID=P0105-USRID

0105 9000  08 34 I DEL,0105,CELL,,(P0105-BEGDA),(P0105-ENDDA)/D

Former Member
0 Kudos

Hi KP,

TC of IT0105 is T which means it depends on the TC of SUBTY.

What is the TC  of the subty that  you have used here 9000 and cell.

Asad.

Former Member
0 Kudos

Hi,

This  is done thru USEREXIT...Tell ur technical team to write the logic for that , its very simple thru the EXIT...

EXIT_SAPFP50M_002 or try BADI for the same..

Rgds,

Vijay SR