cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP BPC script logic ignoring account type

Former Member
0 Kudos
261

Hi Experts.

I have written a default script logic. I am loading data from flat file and executing script logic for the load. this script logic should consider account type and then create record in database. But it is not behaving that way.

flat file record:

account     time           category        amount

A100          2015.01   ACTUAL        100

dimension : Account

account       acct_type

A100          EXP

A200          INC

script logic:

*when account

*is A100

*rec(factor  = 1, account  = A200)

*endwhen

this script is generating record 100 instead of -100 in database.  but script works correctly for input template.

Please help.

regards,

Sonali

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

Hi Sonali,

For sign logic please read my article:

Section: "SIGN and ACCTYPE in EXPRESSION calculations" at the end - see comments about DM package.

In your sample for DM package:

100 EXP will be copied to 100 INC without sign change.

On the report 100 INC will be shown as -100 due to measure formula.

Result - you can't use the same script for data load with EXP->INC accounts

Vadim

former_member186338
Active Contributor
0 Kudos

P.S. Solution - use routine badi referenced in the transformation file if you want to have working default.lgf for input template.

P.P.S. But why do you need to copy data from EXP to INC? EXP->EXP or INC->INC will work correctly!

P.P.P.S Is an old bug or feature

Former Member
0 Kudos

Hi Vadim,

Thanks for your reply.  But this script is working for Input template. Does script behave differently when called via input template and Import file package?

regards,

Sonali

former_member186338
Active Contributor
0 Kudos

Sorry, if you read my article you will see that the "script behave differently when called via input template and DM package" Any DM package including import file!

Former Member
0 Kudos

Hi Vadim,

Thanks a lot. really nice article.

former_member186338
Active Contributor
0 Kudos

If everything is clear - then close the discussion