cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Analytics Cloud - Advanced Formula copy values

guenay
Participant
0 Kudos
585

Hi friends,

I want to copy values and used following script:

CONFIG.GENERATE_UNBOOKED_DATA = OFF
FOREACH.BOOKED [d/Material_Neu],[d/Production_Plant],[d/Customer_Sold_to]
	DATA([d/DBSCHEMA_COMA] = "COMA042_KS") = RESULTLOOKUP( [d/Material_Neu] = "1051",[d/Production_Plant] = "21")

ENDFOR
For my Account-Element "COMA042_KS" there is no value on the Material, Production Plant, Customer level.

I only have "COMA042_KS" values for Material and Production Plant (Customer is #)

As further information, I do have values on the combination Material and Customer for the Account-Element "COMA122".So my goal is now like this:If Material and Customer has booked values on COMA122

Then copy the value from COMA042_KS based on Material and Production plant to the COMA0421_KS based on Material, Production Plant AND CUSTOMER.

Could someone give an example script on how to do so. I think my script shown above isn't fine...Kind regards,Ismail

Accepted Solutions (0)

Answers (2)

Answers (2)

N1kh1l
Active Contributor

guenay

I have answered a similar question below. Could you see if it helps you. If not please post the screenshot of how the actual records are and how you want them to be.

https://answers.sap.com/questions/13689174/sac-data-action-how-to-copy-values-from-one-row-to.html

Please upvote/Accept if it helps.

Regards

Nikhil

suleirmak
Participant
0 Kudos

Hi İsmail,

I believe you want to achieve below calculation ? If yes, Can you try below code?

	IF RESULTLOOKUP([d/Account] = "COMA122",[d/Production_Plant] = "#") != 0 THEN
DATA([d/Account] = "COMA0421_KS") = RESULTLOOKUP([d/Account] = "COMA042_KS", [d/Customer] = "#")
ENDIF

Thanks

guenay
Participant
0 Kudos

Hi Emine,

thanks for your reply. I will check them and give you an update about the results of this script.

Kind regards,

Ismail

guenay
Participant
0 Kudos

Hi Emine,

I tried your scripts but there happens nothing. Here is the full model as you can see:

IF RESULTLOOKUP([d/DBSCHEMA_COMA] = "COMA122",[d/Production_Plant] = "#") != 0 THEN
		DATA([d/DBSCHEMA_COMA] = "COMA042_KS") = RESULTLOOKUP([d/DBSCHEMA_COMA] = "COMA042_KS", [d/Customer_Sold_to] = "#")
	ENDIF 

Do you have some other ideas to solve this?

Kind regards,

Ismail

suleirmak
Participant
0 Kudos

Hi İsmail,

Inside Data() I see you wrote COMA042_KS but should not it be "COMA0421_KS" ?

Is it a typo in here or in your code?

Thanks