Online Tutorials & Training Materials | STechies.com
Register Login

How to Run the Process Chain First 8 Working Days

|| || 7

How to Run the Process Chain First 8 Working Days
Stechies

Hi,

My requirement is

How to run the process chain first 8 working days of every month.

Can anyone recommend how to fulfill this requirement?
And where I have to write in process chains?

Thank you


You can view more tutorials about SAP BW


Comments

  • 05 Feb 2014 7:30 am Best Answer

    Suppose we need to run a Process chain first 8 days of every month.....
    In this case..........Create a Factory Calendar using Tcode SCAL.......there declare first 8 days  as Working days and rest all as Holidays.
    Right click on the Start Process >> Display variant >> Change Selections >> Click on Date/Time tab >> Click on the Restriction tab (F6) >> there maintain the Calendar id and Select Do not Execute on Sundays or Holid.........>> Then Check and Transfer........... Then in the Scheduled start field give the date when the Chain is going to run for the first time............
    Then the Process chain will only run as per the above requirement.

  • 06 Jun 2014 9:50 am Helpful Answer

    Hi,

    You can use Decision Between Multiple Alternatives.

    Command 

    1.If - WORKINGDAY_MONTH( Current Date, 'Factory Calendary day', '' ) < 9-Chain will trigger first 8 workign days of factory calendar

     2.Else-If it's greater than 8th woking day chain will not trigger.

     

    Regards

    Bhargavi

  • 05 Feb 2014 5:53 am

    Hi,

    I have two options for you.

    Please try the below two things at the starting of your Process chain after the Start Variant,

    1) Decision between Multiple alternatives:

    See, if you have any formuala / Condition where you can use like, if First 8 WDs - then true (1) else False (2).

    In this case, if it can recognize the first 8 days then it will pass through 1st option, else it will go through 2nd option and get finished.

    2) ABAP Program / ABAP Program with Status:

    Write an ABAP code, which will read System date/month/year. When the Program recognizes the first 8 days of month, then it will run further. Else, keep a dummy step which ends if condition is not true.

    Hope this helps.

    Let me know if you are looking for more info.

    Thanks

  • amit butola
    06 Feb 2014 11:07 am

    Thank you very much.

    Can you send how to write the code in Decision Between Multiple Alternatives?

    Even I don't know ABAP coding.

    If you feel free send to me ABAP Code also. And where I have to write the ABAP Code.

    Once again thank you very much.

    Thank you

  • 06 Feb 2014 11:07 am

    Can you set up a Factory Calendar and then run the Process Chain Daily with a Restriction on this new Factory Calendar. We have done this to run a process chain on a specific user nominated day each period, and also to exclude running a process chain on a user defined date. I'm sure it should work on a range of dates somehow.

  • amit butola
    06 Feb 2014 11:08 am

    How to write formula in DBMA.

  • 07 Feb 2014 5:38 am

    Please try if the below code works.

    Since I have not tried myself, I don't know if it works.

    Also, one more thing that you can try is to go for an Event triggered process chain.

    Create an EVENT in sm64.
    Create one chain with Start variant & an ABAP code step below Variant, and call EVENT as per the below condition.

    Place this EVENT in your whatever chain which has to run first 8 days of a month.


    data: lv_day type int1.

    lv_day = sy-datum+6(2).

    move sy-datum+6(2) to lv_Day.

    if lv_day lt 9.

    CALL "whichever event you want".

    endif.

    You can take suggestion from any ABAPer of your team for this.

    Also, as our experts said in the above posts, please try those if you think this is too complicated.

    Thanks.