on 10-07-2007 7:52 PM
I am trying to write a dynamic action which will input in Date type 01 of IT 0041 according to the formula;
Date in IT0041 = Action start date - 1 day
04 11 P P0000-MASSN='1T'
04 12 I COP,0041,,(P0000-BEGDA),(P0000-ENDDA)/D
04 13 W P0041-DAT08=(P0000-BEGDA)-1
My major issue is I am not able to decrease the <u><b>action date by 1</b></u>
Answer would be suitably rewarded.
Thanks.
Hello
Try out
04 13 W P0041-DAT08=(P0000-BEGDA - 1).
if this doesnt work then you can call a subroutine (create a subroutine in a zprog) in that get date from IT-0000 saubstract 1 from it & assign it to RP50D-DATE1 then
04 13 W P0041-DAT08=RP50D-DATE1
(declare tables : rp50d in the zprog.)
this wil definitely work.
reward points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijay,
Please try the following:
04 11 P P0000-MASSN='1T'
04 12 I INS,0041,,,(P0000-BEGDA),(P0000-ENDDA)/D
04 13 W P0041-DAR01='U1'
04 14 W P0041-DAT01=P0000-BEGDA
04 15 W P0041-VTRAN='1'
04 16 W P0041-VTRZH='010'
04 17 W P0041-VTROP='-'
Hope it helps.
-Akshay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried your code but it is not working. My understanding:
Do P0041-VTRAN='1'
P0041-VTRZH='010'
P0041-VTROP='-'
Means three variables containing values assigned by us, and these will be used to reduce the date
P0000-BEGDA by one day.
My doubt how do we make sure that values P0041-VTRAN.. are correctly being used and they are reducing the date.
Thanks for your help.
Hi,
Are you trying this during a hiring action?
You may try this if you want:
04 10 P P0000-MASSN='01'
04 11 P T001P-MOLGA='10'
04 12 I INS,0041,,(P0000-BEGDA),(P0000-ENDDA)/D
04 13 W P0041-DAR01='01'
04 14 W P0041-DAT01=(P0000-BEGDA)-1
Let me know if this helped.
Reward points if helpful,
Thank You,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
12 | |
11 | |
6 | |
6 | |
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.