Skip to Content
avatar image
Former Member

Run multiple logics simultaneously

Hi all,

I want to run 3 different script logics in parallel. Then if they are succeeded I want to run 1 more script logic. Like a BW process chain. Actually I created a BW process chain calling those logics but although the steps are arranged to run in parallel , they are waiting for each other to be completed.see the picture please .

ZBPC_LOGIC1 is not running unless ZBPC_LOGIC2 is completed.Although they are arrenged as parallel steps.

Is there a parameter to allow them to run at the same time. Actually I searched for runlogic_ph keyword but as far as I see it is running the same logic for different scopes at the same time.But my requierement is to run different logics at the same time.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 18, 2017 at 02:07 PM

    Proposal:

    1. Implement RUNLOGIC_PH badi

    2. In dimension SOURCE_CUBE create some property like PROPID

    3. For ID=SALES_REV_COST set PROPID=SALES_REV_COST; ID=OPEX set PROPID=OPEX

    4. Run Initial script with RUNLOGIC_BH badi with:

    ...
    DIMENSION SOURCE_CUBE=SALES_REV_COST,OPEX
    CHANGED SOURCE_CUBE
    ...

    5. In the calling script use something like:

    *SELECT(%ACTIVE_VERSION%,"[ID]",VERSION,"[ACTIVE_BUDGET]='A'")
    *SELECT(%SALES%,ID,SOURCE_CUBE,ID=%SOURCE_CUBE_SET% and PROPID=SALES_REV_COST)
    *SELECT(%OPEX%,ID,SOURCE_CUBE,ID=%SOURCE_CUBE_SET% and PROPID=OPEX)

    *FOR %S%=%SALES% //if member is SALES_REV_COST
    *XDIM_MEMBERSET LEDGER = STATUTORY,DUMMY_LEDGER
    *XDIM_MEMBERSET VERSION=%ACTIVE_VERSION%
    *XDIM_MEMBERSET SOURCE_CUBE = SALES_REV_COST
    *START_BADI ZTELECOM_FIN_TABLE_04
    READ=ON
    WRITE=ON
    *END_BADI
    *NEXT


    *FOR %O%=%OPEX% //if member is OPEX
    *XDIM_MEMBERSET LEDGER = STATUTORY,DUMMY_LEDGER
    *XDIM_MEMBERSET VERSION=%ACTIVE_VERSION%
    *XDIM_MEMBERSET SOURCE_CUBE = OPEX
    *START_BADI ZTELECOM_FIN_TABLE_02
    READ=ON
    WRITE=ON
    *END_BADI
    *NEXT

    Will run in parallel!

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 18, 2017 at 12:24 PM

    "run different logics at the same time" - are you sure that the scopes of different logics do not overlap each other?

    Can you show the scripts?

    P.S Also the chain looks strange...

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 18, 2017 at 01:45 PM

    Hi Vadim,

    The code in the badis are too long and complex if you want to analyze the code, I can send.Actually it is the very natural way of calling an abap badi in a script logic.which is the equivalent of start badi-end badi syntax. I am writing with that syntax below.

    For your second comment,yes you are right. badi 1 and badi 2 which are desired to be run in parallel are differentiated with the dimension source cube.badi 1 is reading the members SALES_REV_COST and badi 2 reads the members OPEX.So scopes are not intersecting.So the data appended are...

    *SELECT(%ACTIVE_VERSION%,"[ID]",VERSION,"[ACTIVE_BUDGET]='A'")

    // Badi 1 starts :>>>>>>

    *XDIM_MEMBERSET LEDGER = STATUTORY,DUMMY_LEDGER
    *XDIM_MEMBERSET VERSION=%ACTIVE_VERSION%

    *XDIM_MEMBERSET SOURCE_CUBE = SALES_REV_COST

    *START_BADI ZTELECOM_FIN_TABLE_04

    READ=ON

    WRITE=ON

    *END_BADI

    // Badi 1 ends<<<<<<<<<<

    //Badi 2 starts>>>>>>>>>

    *XDIM_MEMBERSET LEDGER = STATUTORY,DUMMY_LEDGER
    *XDIM_MEMBERSET VERSION=%ACTIVE_VERSION%

    *XDIM_MEMBERSET SOURCE_CUBE = OPEX
    *START_BADI ZTELECOM_FIN_TABLE_02 //OPEX

    READ=ON

    WRITE=ON

    *END_BADI

    //Badi 2 ends<<<<<<<

    Add comment
    10|10000 characters needed characters exceeded