Skip to Content
avatar image
Former Member

Dynamic Action Date Manupilation

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 09, 2007 at 12:53 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 07, 2007 at 07:31 PM

    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,

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 08, 2007 at 01:59 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.