Skip to Content
0

BPC NW10 _ script - condition

Nov 28, 2016 at 04:04 PM

49

avatar image

Hello,

I want to use a script to create a new record with a condition

IF flow dimension (value=F00) = account dimension with the property (value=F00), Else record a new record

See the example in the file attached


*SELECT(%DIM_FLOW%,IS,FLOW,F00)

*SELECT(%PROPERTY_FLOW%,ID,ACCOUNT,FLOW=F00)

IFF((%DIM_FLOW%=%PROPERTY_FLOW%,REC(),"")

I try the create the following script , but I have a error message for the ligne 3

capture.png

capture.png (3.8 kB)
10 |10000 characters needed characters left characters exceeded

You have another open question waiting for information from you side!

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

3 Answers

Vadim Kalinin Nov 28, 2016 at 04:14 PM
0

Sorry, but looks like you have not read some absolutely basic documents about script logic including help...

The syntax is incorrect and the requirements are not clear.

"I want to use a script to create a new record with a condition" - what do you mean by new record???

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

Start with the script scope, the explain the calculation logic!

Show 1 Share
10 |10000 characters needed characters left characters exceeded

P.S. Please read this document: https://archive.sap.com/documents/docs/DOC-4259

Only info about COMMIT is incorrect in this document and some recent changes are not reflected.

0
bastien wissler Nov 28, 2016 at 05:25 PM
0

I read the documents but no example with the 'function' IFF

the source record : account : 15100 (line1 )

the target record (new records) : account 15200 (line2)

Share
10 |10000 characters needed characters left characters exceeded
Vadim Kalinin Nov 28, 2016 at 05:52 PM
0

There is no statement "IFF" in script logic at all.

In MDX expressions IIF statement can be used, but it can compare only values (not property texts):

http://help.sap.com/saphelp_bopacnw101/helpdata/en/4c/2c4ae497df1ca9e10000000a42189e/content.htm?frameset=/en/4c/2cb463f3f65ed7e10000000a42189e/frameset.htm¤t_toc=/en/82/f51cf12cfc48c58975b9b5e6fba9aa/plain.htm&node_id=195

Also SELECT's in you code are useless for your requirements.

Please start again with requirements:

I have data like... in the scope... (some sample table).

I want to perform calculations on this data using the following logic...

I want to store the calculation result in ...

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

Share
10 |10000 characters needed characters left characters exceeded