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

MVAL along with IF statement

former_member210696
Active Contributor
0 Kudos
269

Hi All,

I have a requirement wherein I need to populate BPC accounts from BW key figures and based on a condition from another BW infoobject.

BW infoobject to be checked - 0MATERIAL

BW Key figures to be used - OTHREV, REV1 and REV2.

BPC Dimensions

Product -> Mapped with 0MATERIAL

Account -> Mapped to key figures. BPC dim members (Other_Revenue, Revenue1, Revenue2)

Logic ->

If 0Material is blank, then product should be Dummy and only Other_Revenue should be populated from OTHREV

Else product is populated from 0Material, and Revenue1 and Revenue2  to be populated from REV1 and REV2 respectively.

I started with something like below -

Product=*IF(0MATERIAL= *STR() then *NEWCOL(Dummy_Product) ; 0MATERIAL)

Account=*MVAL(REV1|*Newcol(Revenue1)||REV1|*Newcol(Revenue2)||OTHREV|*Newcol(Other_Revenue))

But the problem with above statement is that though the mapping is correct, but it always will populate all three revenues irrespective of whether 0material is blank or non-blank

Thanks in advance.

Regards,

Ashish

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You could concatenate 0MATERIAL with the map you are doing in the account dimension, then you can try a conversion file to *skip the lines where 0material is empty.

Account=*MVAL(REV1|0MATERIAL+*Newcol(Revenue1) ...

conversion file:

Revenue1 | *skip --> means 0material is empty, not save Rev1

Revenue2 | *skip --> means 0material is empty, not save Rev2

Other_Revenue | Other_Revenue --> means 0material is empty, only save Other Revenue

*Revenue1 | Revenue1 --> means 0material is not empty, save Rev1

*Revenue2 | Revenue2 --> means 0material is not empty, save Rev2

*Other_Revenue | *skip --> means 0material is not empty, not save Other_Revenue

Something like that should work.

Regards,

CarlosE

former_member186338
Active Contributor
0 Kudos

From the general logic IF(0MATERIAL... has to be also included in the Account line, but I am not sure that it's possible to combine IF and MVAL in the same line. Please try...

Vadim

former_member186338
Active Contributor
0 Kudos

Alternative - you can clear not required data with some script after upload

Or you can upload data in 2 steps - first for empty 0MATERIAL, then for not empty...

former_member210696
Active Contributor
0 Kudos

Hi Vadim,

Tried your suggestion and it gave below error..

Source type \CLASS=CL_UJD_EXP_MVAL is not compatible, for the purposes of assignment, with target type \CLASS=CL_UJD_LINE_EXPRESSION

model: Planning. Package status: ERROR

former_member210696
Active Contributor
0 Kudos

Both the alternative have additional efforts -

1. Script logic, will also need a package link.

2. Will need 2 separate transformations/selection files. Correct me if I got it wrong?

Valid suggestions both but I was hoping if it ws possible in single transformation?

Regards,

Ashish

former_member186338
Active Contributor
0 Kudos

I suspect it

former_member186338
Active Contributor
0 Kudos

2 - yes, 2 separate transformation files.

But you can try to create a custom chain with 2 loads...

former_member210696
Active Contributor
0 Kudos

And that's the reason I didn't try it at first and wanted to hear from people who might have come across similar situation. But I guess, scn BPC forum is all about Vadim

former_member186338
Active Contributor
0 Kudos

It's always better to try yourself - even in case of 1% of probability