cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Action Date Manupilation

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Thank you! Finaly it worked when I used a sub routine call.

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

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,

Former Member
0 Kudos

Thanks. I will try it out.