on 10-19-2007 11:42 AM
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
solved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
Hai..
MASSN is for Action type........ If u want it to be aplicable for all u can leave blank else specify ur action type
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ......
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 '-'
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.