cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic action for infotype 41

Former Member
0 Kudos

hi,

i need to write a dynamic action for infotype 41 where date type 08 needs to default value as P0000-Begda -1(minus 1 day from it0000 begin date).i wrote the below

0000 04 61 P P0000-MASSN='06'

0000 04 62 I COP,0041,,,,

0000 04 63 W P0041-DAR12='08'

0000 04 64 W P0041-DAT12=P0000-BEGDA

0000 04 65 W P0041-VTRAN=’1’

0000 04 66 W P0041-VTRZH=’010’

0000 04 67 W P0041-VTROP=’-‘

but it is not working not deducting -1 (minus 1 day)

pls let me know the reason

thanks & regards

gayathri

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

solved

jesu_ponraj
Participant
0 Kudos

Hi,

whats the resolution? I am also having similar issue...where the fields are not being recoginizex (VTROP, VTRZH, and VTRAN)

Your help is much appreciated.

Thanks!

Edited by: rajhcm on Dec 2, 2009 3:10 AM

Former Member
0 Kudos

I m also facing the same problem

the dynamic action written is as follows

it is not recognising the VTRAN, VTRZH

04 61 P P0000-massn='H1'

04 62 I COP,0041,,,,

04 63 W P0041-DAR01='N0'

04 64 W P0041-DAT01=P0002-BEGDA

04 65 W P0041-VTRAN='55'

04 66 W P0041-VTRZH='013'

04 67 W P0041-VTROP='+'

please share the solution,

thanks in advance

0 Kudos

Hi Friends,

Based on employee DOB entered in IT 0002 - personnel data Infotype, the system should have to calculate the employee's 60th employment retirement end date and ask the user to save in Infotype IT 0041 along with the required sub type. Please send me the code for this.

Regards

Ziya

shailvora
Participant
0 Kudos

I would like to do Dynamic action  - From Date of Birth (IT0002)

This is what I have done. Can you guide me where I am lacking ?

Like your case last three lines are not getting recognized.

0002       06 1 P T001P-MOLGA='24'

0002       06 2 P P0002-GBDAT

0002       06 3 I INS,0041,,,(P0002-BEGDA),(P0002-ENDDA)

0002       06 4 W P0041-DAR01='42'

0002       06 5 W P0041-DAT01=P0002-GBDAT

0002       06 6 W P0041-VTRAN='58'

0002       06 7 W P0041-VTRZH='013'

0002       06 8 W P0041-VTROP='+'

Rgds

jimso101
Active Contributor
0 Kudos

Hi Shail,

Please read thorough the thread and one of the helpful answer has already posted that last three lines is not IT0041, its IT0019. Just read through the F1 help and i suppose you will be able to rectify the issue .

Regards

JIm

Former Member
0 Kudos

Hai..

MASSN is for Action type........ If u want it to be aplicable for all u can leave blank else specify ur action type

Former Member
0 Kudos

Hai...

I think system is unable to know what the 1 is... VTRAN=1..........?? WHAT does 1 signify?/ kindly make sure u give proper units ......

Former Member
0 Kudos

Nothing to do with VTRAN see below:

Creating a date/deadline record

Dynamic actions are normally used for creating date/deadline records.

However, the date of the deadline does not have to match the initializing

date, but can be varied by a certain time interval.

You can add or subtract a number of time units for an outgoing date. The

time units "days" (internal 010), "weeks" (011), "months" (012) and

"years" (0ß13) are supported.

Example: A year after an examination (infotype Internal Medical Service

(0028)), the employee is to undergo a subsequent examination.

You must then call up infotype Monitoring of Date (0019) using the

date/deadline type "follow-up examination" (30).

I INS,0019,30

Assignment of default values:

W P0019-TERMN=P0028-BEGDA

W P0019-VTRAN='1' number

W P0019-VTRZH='013' time unif from table T538T

W P0019-VTROP='' operation '' or '-'

Former Member
0 Kudos

hi ,

i wrote below one after saving IT0000 for it0041

MASSN 04 61 P P0000-MASSN='06'

MASSN 04 62 I COP,0041,,,,

MASSN 04 63 W P0041-DAR12='08'

MASSN 04 64 W P0041-DAT12=P0000-BEGDA

MASSN 04 65 W P0041-VTRAN=’1’

MASSN 04 66 W P0041-VTRZH=’010’

MASSN 04 67 W P0041-VTROP=’-‘

system is not getting below fields in execution

MASSN 04 65 W P0041-VTRAN=’1’

MASSN 04 66 W P0041-VTRZH=’010’

MASSN 04 67 W P0041-VTROP=’-‘

'1' means 1 day,'010=day,'-'=minus(-1 day from it0000 begin date)

my question is why dynamic action is not recognizing above 3 fields?

thanks & regards

gayathri n

Former Member
0 Kudos

take the field massn out, just leave it blank

Former Member
0 Kudos

Hi Gayathri,

Do this instead:

1. Create a small program, as follows:

REPORT ZHR_PY_R0008 .

INCLUDE MPPDAT00.

TYPE-POOLS HRQTA.

TABLES: P0000,

RP50D,

T001P.

----


  • ROUTINE CALLED BY TABLE T588Z

----


FORM CHANGE_DATE.

RP50D-DATE1 = P0000-BEGDA - 1 .

ENDFORM. " CHANGE_DATE

____________________________________________________________________________________________________________________________________

This program will give you the last working day written to RP50D-DATE1

2. Simply enter the following lines into table T588Z:

0000 04 499*- LEAVING ACTION - Populate Infotypes with leave date -*

0000 04 500 P T001P-MOLGA='08'

0000 04 501 P PSPAR-TCLAS='A'

0000 04 502 P PSPAR-MASSN='*'/X (* equals your leaving action types)

0000 04 503 P PSPAR-MASSN='*'/X (* equals your leaving action types)

0000 04 504 F CHANGE_DATE(ZHR_PY_R0008)

0000 04 505 ******** INF.0041 ********

0000 04 506 I COP,0041,,,(P0000-BEGDA),(P0000-ENDDA)/D

0000 04 507 W P0041-DAR07='*' (* equals your date type)

0000 04 508 W P0041-DAT07=RP50D-DATE1

Former Member
0 Kudos

Hi Gayathri,

It would be easier to do it using a subroutine written in ABAP which you can call from the dynamic action. The function code is F. Detiled documentation on calling a subroutine is available in the IMG for dynamic action. I suppose the function code is 'F' and you call a subroutine of a program using the following syntax ZXXXX(ZYYY). You can do the calculation and pass the calculated values per SAP defined data structure. I did not have the details offhand, but the detailed documentation of doing this is available in the IMG node for dynamic action.

All the best.

Sundar

Former Member
0 Kudos

hi,

thanks for ur response.i know about using subroutine option.but my question is SAP standard already provided a solution for this but why that structure is not getting read below fields in dynamic actions.

0000 04 65 W P0041-VTRAN=’1’

0000 04 66 W P0041-VTRZH=’010’

0000 04 67 W P0041-VTROP=’-‘

thanks & regards

gayathri n

Former Member
0 Kudos

Hi Gayathri,

If you really want to go down this route, try calling your dynamic action after IT0000 has been saved eg: process the dynamic action on IT0001 or 0002 etc. I seem to remember some time ago doing this solved a similar problem I had. Not sure this will solve your problem but it's worth a shot.

Alec

Former Member
0 Kudos

Hi,

i am calling this dynamic action after IT0000 saving only.but still it is not identifying below fields

0000 04 65 W P0041-VTRAN=’1’

0000 04 66 W P0041-VTRZH=’010’

0000 04 67 W P0041-VTROP=’-‘

thanks & regards

gayathri n

Former Member
0 Kudos

No I mean process the dynamic action on a different infotype

Not:

0000 04 65 W P0041-VTRAN=’1’

0000 04 66 W P0041-VTRZH=’010’

0000 04 67 W P0041-VTROP=’-‘

Instead:

0002 04 65 W P0041-VTRAN=’1’

0002 04 66 W P0041-VTRZH=’010’

0002 04 67 W P0041-VTROP=’-‘

hope this helps,

Alec