/scripts/ahub.form.attachments.js
0

*Start BADI RUNLOGIC_PH not working in BPC 10.1

Dec 20, 2016 at 06:14 AM

311

avatar image
Former Member

Hi Gersh,

Related version:

SAP BPC 10.1 SP18 .NET3.5

CPMBPC 810 SP09

SAPBW 740 SP14

We used "Start BADI RUNLOGIC_PH" when we do the rolling forecast in our system,but it is not working.here is the detail:Thanks for looking at it.

The logic script in JAAO_PUSH_TO_PLANC:

*START_BADI RUNLOGIC_PH
QUERY = OFF
WRITE = ON
VALIDATION = OFF

DEBUG = OFF
LOGIC = YTD_TO_PER_02.LGF
APPSET = FIN
APP = Planning_Core


DIMENSION AUDITTRAIL = TECH_LOADFI_YTD, TECH_ALLOCA_YTD, TECH_NONSAPINP_YTD, TECH_CALC_YTD, TECH_JOUR_YTD
DIMENSION VERSION = ACT
DIMENSION SCOPE = <NONE>
DIMENSION TCURRENCY = <NONE>
DIMENSION ASSETCLASS = <ALL>
DIMENSION EMPLOYEE = <ALL>
DIMENSION PROJECT = <ALL>
DIMENSION ACCOUNTGRP = %ACCOUNTGRP_SET%
DIMENSION TIME = %TIME_SET%
DIMENSION PROFITCENTER = %PROFITCENTER%

*END_BADI

The logic script in YTD_TO_PER_02.LGF:


*XDIM_MEMBERSET VERSION = ACT
*XDIM_MEMBERSET AUDITTRAIL = TECH_LOADFI_YTD, TECH_ALLOCA_YTD, TECH_NONSAPINP_YTD, TECH_CALC_YTD, TECH_JOUR_YTD
*XDIM_MEMBERSET TIME = %TIME_SET%, TMVL(-1,%TIME_SET%)
*XDIM_MEMBERSET PROFITCENTER = %PROFITCENTER_SET%
*XDIM_MEMBERSET ACCOUNTGRP = %ACCOUNTGRP_SET%
*XDIM_MEMBERSET ASSETCLASS = BAS(ASSETCLASS_ALL)
*XDIM_MEMBERSET COMPANYCODE = BAS(COMPANYCODE_GROUP_ALL)
*XDIM_MEMBERSET COSTCENTER = BAS(COSTCENTER_ALL)
*XDIM_MEMBERSET EMPLOYEE = BAS(EMPLOYEE_ALL)
*XDIM_MEMBERSET FLOW = BAS(FLOW_ALL),BAS(OTHER_SPEC),BAS(ANNUAL_NOTES)
*XDIM_MEMBERSET FUNCTIONALAREA = BAS(FUNCTIONALAREA_ALL)
*XDIM_MEMBERSET INTERCO = BAS(INTERCO_ALL)
*XDIM_MEMBERSET INTERNALORDER = BAS(INTERNALORDER_ALL)
*XDIM_MEMBERSET MATERIAL = BAS(MATERIAL_ALL)
*XDIM_MEMBERSET PRODUCTGROUP = BAS(PRODUCTGROUP_ALL)
*XDIM_MEMBERSET PROJECT = BAS(ALL_PROJECTS)
*XDIM_MEMBERSET RPTCURRENCY =LC

*SELECT(%YEAR_LOOKUP%,"[YEAR]",TIME,"[PERIOD] = 'TOTAL'")

*FOR %YEAR_VAR% = %YEAR_LOOKUP%
*WHEN TIME
*IS %YEAR_VAR%.01
*WHEN AUDITTRAIL
*IS TECH_LOADFI_YTD
*REC(EXPRESSION = %VALUE%, AUDITTRAIL = LOADFI_PER, TIME = %YEAR_VAR%.01)
*REC(EXPRESSION = -%VALUE%, AUDITTRAIL = LOADFI_PER, TIME = %YEAR_VAR%.02)

*ENDWHEN
*ENDWHEN
*NEXT
*COMMIT

Generally,the "YTD_TO_PER_02.LGF" would be called when we run this script logic "JAAO_PUSH_TO_PLANC",but now it failed to invoke the target logic even though the status is succeed.what's more,when we run the YTD_TO_PER_02 separately in Planning_core,it can be run successfully and the result is correct.

10 |10000 characters needed characters left characters exceeded
Former Member

runlogic_ph

0
Former Member
Former Member

Incorrect primary tag....Should be SAP BusinessObjects Planning and Consolidation, version for SAP NetWeaver. Otherwise you wont get answers...:)

0
Former Member
Former Member

I have modified the primary tag,Thank you.

0

Can you please check that your %YEAR_LOOKUP% isn't empty? If it's empty then everything inside FOR/NEXT loop is skipped.

0

It's not empty due to:

*SELECT(%YEAR_LOOKUP%,"[YEAR]",TIME,"[PERIOD] = 'TOTAL'")

But it will contain all years defined in the TIME dimension...

Looks strange for me. That's the reason why I am asking to explain the logic of this script...

0

that selection can still be empty if upper/lower case is wrong.

0
Former Member
Gersh Voldman

Thanks for your reply.But how to check the %YEAR_LOOKUP% is empty or not?and I'm not sure about the "upper/lower case is wrong" mean?

Thank you.

0

I do not think there is an issue with upper/lower case: in TIME dimension (in upper case) you have standard property PERIOD with TOTAL in upper case?

0
Former Member
Vadim Kalinin

Yes,Time dimension has standard property PERIOD with TOTAL(for example,for time 2016.TOTAL,The property PERIOD is maintained as TOTAL).Is it OK?

0
Show more comments

It's possible to do in ABAP debug, but if you are not familiar with ABAP it will be hard to explain.

1. Remove VALIDATION = OFF and DEBUG = OFF - your script is not working yet, we need as much info as we can get.

2. Provide log that you get from UJKT.

3. Try replacing %YEAR_LOOKUP% with some constant just to see if script is being called.

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Vadim Kalinin Dec 20, 2016 at 08:54 AM
0

Sorry, but why do you think it's not working?

Also it's a bad idea to post script text as a screenshot.

Please read:https://blogs.sap.com/2014/01/31/how-to-ask-questions-about-script-logic-issues/

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

I revised the questions.thank you.

0

Please attach the DM log to see that badi call is failed!

0

P.S. Also the script YTD_TO_PER_02.LGF is strange... You have to explain the logic of this script as documented in How-To...

0
Skip to Content