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

SAP BPC 10.1 transformation file -Nested If statement

chandrakanthk01
Explorer
0 Likes
1,094

Hi Friends,

I need some help in transformation file writing Nested If statement. Below is the requirement:

FAREA=*If (ZBPC_CCN = *str() [& ACCTYPE property in BPC for ACCOUNT dimension is NOT equal to EXP] then ZBPC_AREA; [if ZBPC_CCN is NOT blank (has a value) & ACCTYPE property in BPC for ACCOUNT dimension IS equal to EXP then] ZBPC_AREA+ZBPC_CCN)

We tried writing the above requirement like below:

FAREA=*If ((ZBPC_CCN = *str() & ACCOUNT.ACCTYPE <> EXP) then ZBPC_AREA;*If (ZBPC_CCN <> *str() & ACCOUNT.ACCTYPE = EXP) then ZBPC_AREA+ZBPC_CCN))

It is not getting validated.

Can some body help us writing the correct statement please.

Accepted Solutions (0)

Answers (4)

Answers (4)

chandrakanthk01
Explorer
0 Likes

My client has withdrawn the request as the requirement is not clear with him.. Thanks, Vadim.

former_member186338
Active Contributor
0 Likes

It's always better to get absolutely clear requirements with all possible cases described 🙂

chandrakanthk01
Explorer
0 Likes

Thanks Vadim... highly appreciate your prompt response. Glad to have see you as an SME in BPC area and looking to get more help from you.

former_member186338
Active Contributor
0 Likes

Can you provide info for the question asked in my latest comment?

chandrakanthk01
Explorer
0 Likes

Thanks for replying, Vadim..

Here is my full requirement:

Original line:

FAREA=*If (ZBPC_CCN = *str() then ZBPC_AREA;ZBPC_AREA+ZBPC_CCN)

#1 Option for enhancement:

FAREA=*If (ZBPC_CCN = *str() [& ACCTYPE property in BPC for ACCOUNT dimension is NOT equal to EXP] then ZBPC_AREA; [if ZBPC_CCN is NOT blank (has a value) & ACCTYPE property in BPC for ACCOUNT dimension IS equal to EXP then] ZBPC_AREA+ZBPC_CCN)

Or the above condition can also be replaced with the below requirement

#2 Option for enhancement

FAREA=*If (ZBPC_CCN = *str() & ZBPC_ACCT falls in the range of NOT equal to 5* to 8* then ZBPC_AREA; [if ZBPC_CCN is NOT blank (has a value) & ZBPC_ACCT falls in the range of 5* to 8* then] ZBPC_AREA+ZBPC_CCN)

Thanks,

former_member186338
Active Contributor
0 Likes

I have already told you that option one is not supported!

"You can't reference ACCTYPE property of BPC ACCOUNT - transformation file have no idea about BPC properties!"

former_member186338
Active Contributor
0 Likes

Second option is not clear:

ZBPC_CCN = *str() & ZBPC_ACCT falls in the range of NOT equal to 5* to 8* then ZBPC_AREA

What do you want to have if ZBPC_CCN = *str() & ZBPC_ACCT falls in the range of 5* to 8* then ZBPC_AREA??

ZBPC_CCN is NOT blank (has a value) & ZBPC_ACCT falls in the range of 5* to 8* then ZBPC_AREA+ZBPC_CCN

What do you want to have if ZBPC_CCN is NOT blank (has a value) & ZBPC_ACCT falls in the range of NOT equal to 5* to 8* then ZBPC_AREA???

You have 4 combinations!

former_member186338
Active Contributor
0 Likes

You can't reference ACCTYPE property of BPC ACCOUNT - transformation file have no idea about BPC properties!

Something can be done in ROUTINE BADI, but you have to clearly explain your requirements with samples!

chandrakanthk01
Explorer
0 Likes

Thanks for replying, Vadim..

Here is my full requirement:

Original line:

FAREA=*If (ZBPC_CCN = *str() then ZBPC_AREA;ZBPC_AREA+ZBPC_CCN)

#1 Option for enhancement:

FAREA=*If (ZBPC_CCN = *str() [& ACCTYPE property in BPC for ACCOUNT dimension is NOT equal to EXP] then ZBPC_AREA; [if ZBPC_CCN is NOT blank (has a value) & ACCTYPE property in BPC for ACCOUNT dimension IS equal to EXP then] ZBPC_AREA+ZBPC_CCN)

Or the above condition can also be replaced with the below requirement

#2 Option for enhancement

FAREA=*If (ZBPC_CCN = *str() & ZBPC_ACCT falls in the range of NOT equal to 5* to 8* then ZBPC_AREA; [if ZBPC_CCN is NOT blank (has a value) & ZBPC_ACCT falls in the range of 5* to 8* then] ZBPC_AREA+ZBPC_CCN)

Thanks,