cancel
Showing results for 
Search instead for 
Did you mean: 

*RUNLOGIC_PH Calling script from another model

Former Member
0 Kudos

Hi Guys

We have BPC 10 NW

We need to call a script from Volumes model into BOM_TEST model, So, we are trying to use RUNLOGIC_PH as below. The models have different dimension


SOURCE Model Dimensions: Volumes 

AUDITTRAIL

CATEGORY

CUSTOMER

ENTITY

MARKET

MODEL_TYPE

PLANT

PRODUCT

RPTCURRENCY

SHIP_TO_PARTY

TIME

UOM

V_ACCOUNT

Destination Model:Bom_Test

AUDITTRAIL

CATEGORY

COST_CENTRE

ENTITY

MAT2

MATERIAL_COMP

PLANT

PROD2

RPTCURRENCY

SEMI2

TIME

WORK_CENTRE

V_ACCOUNT

Below is my script:

*START_BADI RUNLOGIC_PH

QUERY = OFF

WRITE = ON

LOGIC = TRANS_FED_TO_BOM.LGF

APPSET = AEL

APP = Volumes

//common dimensions

DIMENSION AUDITTRAIL = BAS(AuditTotal)

DIMENSION CATEGORY = LVIEW

DIMENSION ENTITY = %ENTITY_SET%

DIMENSION TIME = %TIME_SET%

DIMENSION PLANT= <ALL>

DIMENSION RPTCURRENCY = <ALL>

DIMENSION V_ACCOOUNT = <ALL>

DIMENSION PRODUCT= <ALL>

//dimensions in souce which doesn't exists in destination

DIMENSION CUSTOMER = <none>

DIMENSION MARKET = <none>

DIMENSION MODEL_TYPE = <none>

DIMENSION PRODUCT= <none>

DIMENSION SHIP_TO_PARTY = <none>

DIMENSION UOM = <none>

*END_BAD

I am getting below error when I run DM package

LOG BEGIN TIME:2016-06-30 08:06:46

FILE:\ROOT\WEBFOLDERS\AEL\ADMINAPP\BOM_TEST\PULL_VOLUMES.LGF

USER:MOJAKIT

APPSET:AEL

APPLICATION:BOM_TEST

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:AUDITTRAIL WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:COST_CENTRE WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:MAT2 WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:MATERIAL_COMP WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:PLANT WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:PROD2 WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:SEMI2 WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:V_ACCOUNT WILL QUERY ON ALL BASE MEMBERS.

[WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:WORK_CENTRE WILL QUERY ON ALL BASE MEMBERS.

EXECUTION BADI:RUNLOGIC_PH

QUERY: OFF

WRITE: ON

Dimension(s) V_ACCOOUNT not found in Application Volumes of Application Set AEL.

Dimension(s) COST_CENTRE not found in Application Volumes of Application Set AEL.

Dimension(s) MAT2 not found in Application Volumes of Application Set AEL.

Dimension(s) MATERIAL_COMP not found in Application Volumes of Application Set AEL.

Dimension(s) PROD2 not found in Application Volumes of Application Set AEL.

Dimension(s) SEMI2 not found in Application Volumes of Application Set AEL.

Dimension(s) WORK_CENTRE not found in Application Volumes of Application Set AEL.

Error in RUNLOGIC call.

BADI EXECUTION TIME IN TOTAL :0.00 ms.

SCRIPT RUNNING TIME IN TOTAL:1.00 s.

LOG END TIME:2016-06-30 08:06:47

File path: \ROOT\WEBFOLDERS\AEL\BOM_TEST\PRIVATEPUBLICATIONS\MOJAKIT\tempfiles\20160630080646\PULL_VOLUMES.LOG

Please help me if I am doing anything wrong

Regards

Sathish

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Kudos

Please read once again the documentation for RUNLOGIC_PH

All dimensions missing in the model has to be set as NONE!

Vadim

Former Member
0 Kudos

I have made all the dimensions missing in target model to <none>

//COMMON DIMENSIONS IN SOURCE AND TARGET MODEL

DIMENSION AUDITTRAIL = BAS(AuditTotal)

DIMENSION CATEGORY = LVIEW

DIMENSION ENTITY = %ENTITY_SET%

DIMENSION PLANT= <ALL>

DIMENSION RPTCURRENCY = <ALL>

DIMENSION TIME = %TIME_SET%

DIMENSION V_ACCOOUNT = <ALL>

//DIMENSION NOT IN DESTINATION

DIMENSION CUSTOMER = <none>

DIMENSION MARKET = <none>

DIMENSION MODEL_TYPE = <none>

DIMENSION PRODUCT = <none>

DIMENSION SHIP_TO_PARTY = <none>

DIMENSION UOM = <none>

former_member186338
Active Contributor
0 Kudos

You are running main script in BOM_TEST

When calling script in Volume you have to set as none the dimensions of BOM_TEST that are missing in Volumes!

And in the log you have a clear message:

"Dimension(s) V_ACCOOUNT not found in Application Volumes of Application Set AEL.

Dimension(s) COST_CENTRE not found in Application Volumes of Application Set AEL.

Dimension(s) MAT2 not found in Application Volumes of Application Set AEL.

Dimension(s) MATERIAL_COMP not found in Application Volumes of Application Set AEL.

Dimension(s) PROD2 not found in Application Volumes of Application Set AEL.

Dimension(s) SEMI2 not found in Application Volumes of Application Set AEL.

Dimension(s) WORK_CENTRE not found in Application Volumes of Application Set AEL."

former_member186338
Active Contributor
0 Kudos

Please, show also the script:

PULL_VOLUMES.LGF

Former Member
0 Kudos

thanks for your reply Vadim

I do made dimensions which are not present in volumes to <none>,

PLEASE SEE BELOW CODE

*START_BADI RUNLOGIC_PH

QUERY = OFF

WRITE = ON

LOGIC = TRANS_FED_TO_BOM.LGF

APPSET = AEL

APP = Volumes

//COMMON DIMENSIONS IN SOURCE AND TARGET MODEL

DIMENSION AUDITTRAIL = BAS(AuditTotal)

DIMENSION CATEGORY = LVIEW

DIMENSION ENTITY = %ENTITY_SET%

DIMENSION PLANT= <ALL>

DIMENSION RPTCURRENCY = <ALL>

DIMENSION TIME = %TIME_SET%

//DIMENSION NOT IN DESTINATION MODEL (BOM_TEST)

DIMENSION CUSTOMER = <none>

DIMENSION MARKET = <none>

DIMENSION MODEL_TYPE = <none>

DIMENSION PRODUCT = <none>

DIMENSION SHIP_TO_PARTY = <none>

DIMENSION UOM = <none>

//DIMENSION NOT IN SOURCE MODEL (VOLUMES)

DIMENSION COSTCENTRE = <none>

DIMENSION MAT2 = <none>

DIMENSION MATERIAL_COMP = <none>

DIMENSION PROD2 = <none>

DIMENSION SEMI2 = <none>

DIMENSION WORK_CENTRE = <none>

*END_BADI

former_member186338
Active Contributor
0 Kudos

In terms of RUNLOGIC_PH you have current model: BOM_TEST and the model with the script you want to call: VOLUMES!

No source and target!!!

And you have to set not none for dimensions in VOLUMES missing in BOM_TEST.

Former Member
0 Kudos

Below is the script which I am trying to pull from volumes cube (source) to BOM_Test (Destination).

*XDIM_MEMBERSET AUDITTRAIL = BAS(AuditTotal)

*XDIM_MEMBERSET CATEGORY = %CATEGORY_SET%

*XDIM_MEMBERSET CUSTOMER = <ALL>

*XDIM_MEMBERSET ENTITY = %ENTITY_SET%

*XDIM_MEMBERSET MARKET = <ALL>

*XDIM_MEMBERSET MODEL_TYPE = <ALL>

*XDIM_MEMBERSET PLANT = <ALL>

*XDIM_MEMBERSET PRODUCT = <ALL>

*XDIM_MEMBERSET RPTCURRENCY = LC

*XDIM_MEMBERSET SHIP_TO_PARTY = <ALL>

*XDIM_MEMBERSET TIME = %TIME_SET%

*XDIM_MEMBERSET V_ACCOUNT = QUANTITY

*XDIM_MEMBERSET UOM = <ALL>

*XDIM_MEMBERSET MEASURES = PERIODIC

*DESTINATION_APP = BOM_TEST

*RENAME_DIM PRODUCT = SEMI2

*SKIP_DIM = CUSTOMER,MARKET,MODEL_TYPE,SHIP_TO_PARTY,UOM

*ADD_DIM MAT2 = DEF_MAT, PROD2 = DEF_PROD, MATERIAL_COMP = GLOBALMATCOMP, WORK_CENTRE = Not_Assigned, COST_CENTRE=None

*WHEN V_ACCOUNT

*IS QUANTITY

*REC(FACTOR = 1,V_ACCOUNT=BILLEDQUANTITY,AUDITTRAIL=VOL_Upload)

*ENDWHEN

I am running Pull_Volumes.lgf from Bom_Test model.

former_member186338
Active Contributor
0 Kudos

The correct script will be:

*START_BADI RUNLOGIC_PH

QUERY = OFF

WRITE = ON

LOGIC = TRANS_FED_TO_BOM.LGF

APPSET = AEL

APP = Volumes

//COMMON DIMENSIONS IN CURRENT AND CALLING MODEL

DIMENSION AUDITTRAIL = BAS(AuditTotal)

DIMENSION CATEGORY = LVIEW

DIMENSION ENTITY = %ENTITY_SET%

DIMENSION PLANT= <ALL>

DIMENSION RPTCURRENCY = <ALL>

DIMENSION TIME = %TIME_SET%

DIMENSION V_ACCOUNT = <ALL>

//DIMENSION NOT IN CURRENT MODEL (BOM_TEST) but in VOLUMES

DIMENSION CUSTOMER = <ALL> //or some specific!

DIMENSION MARKET = <ALL>

DIMENSION MODEL_TYPE = <ALL>

DIMENSION PRODUCT = <ALL>

DIMENSION SHIP_TO_PARTY = <ALL>

DIMENSION UOM = <ALL>

//DIMENSION NOT IN CALLING SCRIPT MODEL (VOLUMES)

DIMENSION COSTCENTRE = <none>

DIMENSION MAT2 = <none>

DIMENSION MATERIAL_COMP = <none>

DIMENSION PROD2 = <none>

DIMENSION SEMI2 = <none>

DIMENSION WORK_CENTRE = <none>

*END_BADI

0 Kudos

Hi Vadim,

I am trying  to call logic from  RUNLOGIC_PH from different application.
*XDIM_MEMBERSET TIME = %TIME_SET%
*START_BADI RUNLOGIC_PH
QUERY = OFF
WRITE = ON
LOGIC = CONSO_DATA.LGF
APPSET = XXXX
APP = XXXXX
VALIDATION = OFF
*END_BADI

I am getting below error 

EXECUTION BADI:RUNLOGIC_PH
QUERY: OFF
WRITE: ON
Parameter DIMENSION not specified. ALL values used.
Dimension ACCOUNT2 not specified and doesn't exist in current context.
Error in RUNLOGIC call.
BADI EXECUTION TIME IN TOTAL :0.00 ms.
SCRIPT RUNNING TIME IN TOTAL:1.00 s.

This is logic which i am calling LOGIC = CONSO_DATA.LGF


*XDIM_MEMBERSET AUDITTRAIL = BASE_INPUT
*XDIM_MEMBERSET  CATEGORY = ACTUAL,ACTUAL_NEW
*XDIM_MEMBERSET  ENTITY = 1100
*XDIM_MEMBERSET INTERCO = I_NONE,BAS(TOTAL_INTERCO)
*XDIM_MEMBERSET RPTCURRENCY = LC
*XDIM_MEMBERSET TIME = %TIME_SET%
*SELECT(%ACCPNL%,ID,ACCOUNT2,INCST_FLAG = X AND RETRACTION = X)
*SELECT(%ACCBAL%,ID,ACCOUNT2,BAL_FLAG = X AND RETRACTION = X)
*XDIM_MEMBERSET ACCOUNT2 = %ACCBAL% ,%ACCPNL%

*DESTINATION_APP = CONSOLIDATION
*ADD_DIM FLOW = CL_05, INTERPC = IPP_NONE,SCOPE = G_NONE
*ADD_DIM  PROFITCENTER = BREAKUP:PF, ACCOUNT = ACCOUNT2:GROUP_ID
*SKIP_DIM = BREAKUP , ACCOUNT2


*WHEN ENTITY
*IS 1100
*WHEN SEGMENT
*IS <> SOCPA_TOTAL_REPORT
 *REC(EXPRESSION = %VALUE%)
*ELSE
 *REC(EXPRESSION = %VALUE%,SEGMENT = SNONE)
*ENDWHEN
*ENDWHEN

Can some one help me out..

Thanks,
former_member186338
Active Contributor
0 Kudos

kamansingh

Please open a new question and provide full info in line with: https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/

I will not answer here!

Former Member
0 Kudos

Hi Sathish,

How's AEL going?

whats in the TRANS_FED_TO_BOM.LGF?

I would suggest using ABAP

Andy

former_member186338
Active Contributor
0 Kudos

Like abap here:

Former Member
0 Kudos

TRANS_FED_TO_BOM.LGF logic transports volumes to bom test cube.


we are using ABAP for other calculations

Former Member
0 Kudos

lol he is def not an ABAPer in that post

Former Member
0 Kudos

yes, what I mean is you need to paste the code in that LGF here.