Probelm with Commit in Script logic.
Hi Experts,
I am using NW 7.5, SP 05.
I used commit statement in my script logic and executed it, It didn't given any result.
But, I removed the commit statement and executed it again. the code got executed and got the result.
Here is the code
*WHEN KF_DIM
*IS UNIT
*REC(EXPRESSION=%VALUE%*[KF_DIM].[BASEPRICE],KF_DIM=AVERAGEPRICE)
*ENDWHEN
//*COMMIT
Please some body tell me know why this is happening.
Thanks,
Regards
Maheedhar
Hi Maheedhar,
You dont require COMMIT statement as long as the scope remains same.
Is this the entire script? If not, can you please share the whole script?
Similar Messages
-
Hi,
I have a situation where I need to perform two activities...
i) Perform a multiplication operation on the data input by the user - Script Logic A
ii) Send the data at a summary level to another application. - Script Logic B
Both Script logics are in the Default Logic
User opens an input template and makes changes to a few Products (more than 1). I want the script logicA to execute completely (i.e. for all the models) and THEN Script Logic B to execute since Script Logic B summarises the data
It seems like this is not how the system works.. Rather it goes thru Script Logic A and Script LogicB for the 1st Product, then the 2nd Product and so on...
I tried using a commit after Script Logic A / before Script logic B and a few other options but to no avail... Any suggestions ???
The other option is not to put Script Logic B in the Default Logic but to execute it separately... Worse case situation I'll use that option..
thanksHi,
Have you defined the scope of the product for the two logics independently.
Try that by including commit after the first logic. This should work.
*XDIM_MEMBERSET PRODUCT=BAS(ALL)
Script 1
*COMMIT
*XDIM_MEMBERSET PRODUCT=BAS(ALL)
Script 2
*COMMIT
Hope this helps,
Regards,
G.Vijaya Kumar -
SAP BPC 5.1 Script Logic Issue
Hi Guys,
I have a problem with Inventory Days script logic at the moment. Basically what the logic should do is:
1. Copy the required data across to a calculation category (SQL)
2. Calculate the last 12 months Cost of Sales for every entity in the selection for 3 years (MDX)
3. Use the Cost of Sales number and multiply it with the inventory days number (SQL)
The calc works fine for some of my smaller brands (200 - 500 entities), but when i run the logic for my big brand (2000 entities) the last step doesn't calculate correctly. I have done the following to try and fix the problem.
1. Every step has it's own COMMIT
2. I clear the data before writing anything
3. I use XDIM_MAXMEMBERS Entity = 500
Any ideas why the logic is acting like this? I don't know if I am allowed to post my code here, but if it will help i will
Regards,
Andries van den BergHi,
I only sent you the step that is giving me a problem at the moment. I broke the logic up into different packages to check where the problem lies and narrowed it down to this one.
It seems like the code didn't copy across correctly, it is supposed to be when EXTRAP.BRAND "<>" "". I'll just paste the code again, just so that we are all on the same page.
Regarding the FAC2, the client was running the code a lot of times and the WB table was getting huge. So, i started posting the records to the FAC2 table and processing it in the SSIS package. And i did confirm that they are posting there.
I just tried to run the script for half of the entities and it didn't work. I then tried to run is for 25 entities and it worked. Could the *XDIM_MaxMembers Entity = 50 be giving me the problem? This is all i get over and over in the formula log:
RPTCURRENCY,ACCOUNT,CATEGORY,DATASRC,ENTITY,INTCO,TIME,SIGNEDDATA
LC,80500,BUDGET,INPUT,P71559,NON_INTERCO,2010.AUG, 0
The other thing that bugs me is that i have similar script that never gives me issues for the same client.
Regards,
AvdB
//Step 4 -- Calculate the Inventory per month for all the entities selected
*SELECT(%BUDGET_YEAR1%,"[BUDGET_YEAR1]","CATEGORY","[ID]='BUDGET'")
*SELECT(%BUDGET_TIME_SET1%,"[ID]","TIME","[YEAR]=%BUDGET_YEAR1% AND [CALC] = 'N'")
*SELECT(%BUDGET_YEAR2%,"[BUDGET_YEAR2]","CATEGORY","[ID]='BUDGET'")
*SELECT(%BUDGET_TIME_SET2%,"[ID]","TIME","[YEAR]=%BUDGET_YEAR2% AND [CALC] = 'N'")
*SELECT(%BUDGET_YEAR3%,"[BUDGET_YEAR3]","CATEGORY","[ID]='BUDGET'")
*SELECT(%BUDGET_TIME_SET3%,"[ID]","TIME","[YEAR]=%BUDGET_YEAR3% AND [CALC] = 'N'")
*XDIM_Memberset Time = %BUDGET_TIME_SET1%,%BUDGET_TIME_SET2%,%BUDGET_TIME_SET3%
*XDIM_Memberset Category = TOPDOWN, BUDGET
*XDIM_Memberset Entity = %Entity_Set%
*XDIM_MaxMembers Entity = 50
*XDIM_ADDMemberset ENTITY = CLKS,MUS,BS // Add global entities
*XDIM_Memberset ACCOUNT = Last12FSCoS,Last12DispCoS, InventoryFSDays, InventoryDispDays //Add the caculated CoS account from the previous step and the Global Driver for days
*WHEN ENTITY.EXTRAP_BRAND
*IS <> ""
*WHEN CATEGORY
*IS TOPDOWN
*REC(EXPRESSION=(GET(ACCOUNT="Last12FSCoS",CATEGORY="TOPDOWN")*GET(ACCOUNT="InventoryFSDays",ENTITY=ENTITY.EXTRAP_BRAND,CATEGORY="BUDGET")/365)*-1,NOADD,ACCOUNT="80500",CATEGORY="BUDGET")
*REC(EXPRESSION=(GET(ACCOUNT="Last12DispCoS",CATEGORY="TOPDOWN")*GET(ACCOUNT="InventoryDispDays",ENTITY=ENTITY.EXTRAP_BRAND,CATEGORY="BUDGET")/365)*-1,NOADD,ACCOUNT="80510",CATEGORY="BUDGET")
*ENDWHEN
*ENDWHEN
*WRITE_TO_FAC2
*COMMIT -
Script Logic Keyword in BPC NW 7.0
Hi All,
As per the doc in SAP NW 7.0 version the stored procedures will not work and they are to be replaced with some related script logic key word.
I searched for finding the same but i could not. Can any one help me in providing the equivalent script logic keywords for the stored procedures like SPRUNCONVERSION,SPICDATA,etc used in MS version.
Is there any file containing the stored procedures and their equivalent script logic keyword or we need to search for it.
Please Help me in this issue,
Thanks in Advance,
Regards,
G.Vijaya Kumar.Vijay,
Please take a look at the documentation for running business rules in script logic at the help.sap.com site ([link|http://help.sap.com/saphelp_bpc70sp02/helpdata/en/66/ac5f7e0e174c848b0ecffe5a1d7730/frameset.htm]). Every business rule type includes an example of a script logic section that will call the business rules.
You may also want to do a search for information on programming custom script logic BADIs, which are the equivalent of custom stored procedures in the MS version ([one example|https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e04b5d24-085f-2c10-d5a2-c1153a9f9346]).
Thanks,
Ethan
Edited by: Ethan Jewett on Sep 3, 2009 7:27 AM -
Copying the data and ignoring the Script logic
Hi,
I have some data in Actual category for 2010.APR and I would like to COPY the same
(through DM) to Budget category with my default script logic file. When I am trying to
Do the same it is copying the same data into Budget category, ignoring my script logic
Actually it should increase the value.
Can anybody help me in this regard.
Thanks in adv.
Raghu B.S.The problem it is into script logic.
When you insert records you are inserting records with category Budget.
But your default script logic is inserting new recotrds just in case if the input has category Actual.
So you just to do a correction into your script logic to change the statement
*WHEN CATEGORY
*IS "ACTUAL"
with
*WHEN CATEGORY
*IS "BUDGET"
In this way the default script logic will be executed and after the copy you will have also the records generated by script logic.
Regards
Sorin Radulescu
Edited by: Sorin Radulescu on Aug 5, 2010 2:15 PM -
Problem with Script logic logs
Hi Experts,
I am using BPC 7.5M with SQL Server 2008, I am looking into script logic log but found one very strange statement "(More than 300,000 records. Details are not being logged)", Earlier it was not showing this statement and was showing all the entries to be posted, Is there any setting we need to do for having all the entries in the log file.
Status log file showing as of now:
App: HEADCOUNT - Records to be posted are 310875 (calc diff = 0)
(More than 300,000 records. Details are not being logged)
Time to validate records: 100.3 sec.
Post Record Status
Submit count : 100001
Accept count : 100001
Reject count : 0
Post Record Status
Submit count : 200002
Accept count : 200002
Reject count : 0
Post Record Status
Submit count : 300003
Accept count : 300003
Reject count : 0
Post Record Status
Submit count : 310875
Accept count : 310875
Reject count : 0
Posting ok
Time to post records:325.4 sec.
Please Advice
Thanks & Regards,
RohitHi Rohit,
This is not a problem.
If the resultant number of records is more than 300,000, then the records are not logged.
This can be controlled by the UNLIMIT_PRINT_LOG appset parameter. By default, this is set as NO. This will allow only 300k records to be logged.
You can set the above parameter as YES to log all the records for the execution of all logics across the appset in all applications.
Warning:
Of course, it will add slow down the logic execution. Logging the records will always slow down the execution. The system has to open the file and keep writing all the records in the flatfile, which is a slow process. You can increase the speed of your logics by disabling this logging completely by using the CALCULATE_DIFFERENCE statement in your script logic for each commit section. You can reduce the logic execution time by disabling this logging.
Karthik AJ -
Incorrect value with Script Logic
Hello,
From initial value called 2008.ORC we want to calculate for each month the percentage , from child DIASMES.
Now, with the script logic ( I´ll put down later) we have an incorrect value in the column 2008.TOTAL.
In other words, I´m sure I´m wrong with "WHAT" or "WHERE sentence or maybe the operation "FACTOR=USING/TOTAL" fails because the crossing between dimensions it´s incorrect.
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM FABRICA_MAQ WHAT=BAS(FABRICAFF); WHERE=BAS(FABRICAFF); USING=BAS(FABRICAFF);
*DIM PRODUTOS WHAT=BAS(TOTALPROD); WHERE=BAS(TOTALPROD); USING=SP;
*DIM TIME WHAT=2008.ORC;WHERE=BAS(2008.TOTAL); USING=BAS(2008.TOTAL);
*DIM TIPO WHAT=BAS(TOT); WHERE=BAS(TOT); USING=ST;
*DIM VARIAVEIS WHAT=MIXACABADA; WHERE=MIXACABADA; USING=DIASMES;
*DIM DATASRC WHAT=INPUT; WHERE=INPUT; USING=INPUT;
*DIM VERSAO WHAT=BUDGET; WHERE=BUDGET; USING=BUDGET;
*ENDALLOCATION
*COMMIT
The Key is to see in the column 2008.TOTAL ( when we selected "BAS") the value of parent divided into "DIASMES" !
Thanks !!Your factor statment references a TOTAL, but you don't reference the total in your DIM statements. If you look at the debug log carefully, you should notice that there's no calculation of a TOTAL value.
Try something like this. The only reason I move some dimensions from the *RUNALLOCATION up to the *XDIM's is for legibility, since the allocation makes no shifts to these dimensions. The logic should produce the same results, either way.
// These dimensions have no shift of data.
*XDIM_MEMBER VERSAO=BUDGET
*XDIM_MEMBER DATASRC=INPUT
// I'm assuming here that FACRICAFF is the top member of this dimension.
*XDIM_MEMBERSET FABRICA_MAQ = <ALL>
*RUNALLOCATION
*FACTOR = USING/TOTAL
*DIM PRODUTOS WHAT=BAS(TOTALPROD); WHERE=BAS(TOTALPROD); USING=SP; TOTAL=<<<
*DIM TIME WHAT=2008.ORC;WHERE=BAS(2008.TOTAL); USING=BAS(2008.TOTAL); TOTAL=<<<
*DIM TIPO WHAT=BAS(TOT); WHERE=BAS(TOT); USING=ST; TOTAL=<<<
*DIM VARIAVEIS WHAT=MIXACABADA; WHERE=MIXACABADA; USING=DIASMES; TOTAL=<<<
*ENDALLOCATION
*COMMIT -
Package with script logic CANCELLED
Hi everybody,
I am trying to implement a very simple script logic that removes negative values from the Units account.
*XDIM_MEMBERSET C_CATEGORY=%C_CATEGORY_SET%
*XDIM_MEMBERSET TIEMPO=%TIEMPO_SET%
*XDIM_MEMBERSET MERCADO=%MERCADO_SET%
*XDIM_MEMBERSET ORG_VENTAS=%ORG_VENTAS_SET%
*XDIM_MEMBERSET CUSTOMER=BAS(TOTALCUSTOMERS)
*XDIM_MEMBERSET PRODUCT=BAS(00001)
*XDIM_MEMBERSET P_DATASRC=DRIVER
*XDIM_MEMBERSET ACCOUNT_SIM=Unit
*XDIM_MEMBERSET TIPO_CLIENTE=BAS(TOTAL_TOP)
[ACCOUNT_SIM].[#Unit]=IIF(([ACCOUNT_SIM].[Unit])*(-1)<0, 0, [ACCOUNT_SIM].[Unit])
*COMMIT
When I execute it with the Data Manager the result of the package is "Cancelled". I have one large dimension ("Customer" with more than 2000 elements) but there are not too many records in the database now. However, when I restrict the number of elements, the package works fine. It seems like a memory issue, I don't know... We are using SAP BPC NW 7.0 SP5
Any idea out there? Is our logic not 'optimized' for BPC?
Thanks a lot,
Mr. Albert MasHi Albert,
I think you're running into a dimensionality limit. I believe this was fixed in SP06.
In any case, it's easy to fix. Just add
*XDIM_MAXMEMBERS CUSTOMER = 1
after your other *XDIM statements.
You should be able to up this number a fair amount, depending on the number of members in other dimensions. In the script logic evaluation, there is code that multiplies the number of members in your memberset in each dimension and then attempts to assign the result to an INT datatype. I don't remember the size of the INT, but if you look at the short dump in ST22 of the SAP GUI, you'll see the code.
Hopefully that helps.
Ethan -
Hello friends,
I am getting an error with running currency conversion in an app, the error says Invalid dimension "C_Category". Here is the script logic, I dont see C_Category anywhere. For the record, the name of dimension is category.
*RUN_PROGRAM CURR_CONVERSION
CATEGORY = %C_CATEGORY_SET%
GROUP = %GROUPS_SET%
TID_RA = %TIME_SET%
RATEENTITY = GLOBAL
OTHER = [ENTITY=%ENTITY_SET%]//For More than one other scope parameters: OTHER = [ENTITY=%ENTITY_SET%;INTCO=%INTCO_SET%...]
*ENDRUN_PROGRAMHello,
Variable %C_CATEGORY_SET% means set of members selected for Dimension C_CATEGORY. So, if you want to use CATEGORY instead replace it with %CATEGORY_SET%, but if are running Consolidations I think you need C_CATEGORY Dimension.
Regards,
Gersh -
Struggling with Comma for an amount in sap script
Hi Experts
I am strugling with comma for an amount in sap script .
For ex: 1234.56 and i need 1,234.56
I tried system->userprofile->owndata->Default(Tab)->Decima Notation 1,234,567..89(Selected)
and i did use /:Edit Mask Field name but i am not getting comma.
Thanks & Regards
ReddyHello,
In the driver program, assign the amount to a variable of type P and use that variable to display in the script. You will get the commas.
Vikranth -
BPC 7.5 NW SP 4 - ERRORVALIDATION SCRIPT LOGIC WITH PROGRAM CURR_CONVERSION
Hi Gurus
I´m copying script logic for currency conversion for consolidation application, but when I want to validate this code
*RUN_PROGRAM CURR_CONVERSION
*ENDRUN_PROGRAM
the system generate this error "run program error, message number:""
is very strange because when i run without "N" or any other letter, the validation is correct, for example:
**RUN_PROGRAM CURR_CONVE
*ENDRUN_PROGRAM
is sensitive when I write CURR_CONVERSION
do you have any idea what happend with this?
thanks in advanceLucio,
This is not a valid currency conversion call:
*RUN_PROGRAM CURR_CONVERSION
*ENDRUN_PROGRAM
You need to provide the necessary argument parameters. I assume that it is validating "correctly" when you remove letters because it can't find the program and just assumes that it will show up at runtime. These other permutations won't work either.
Please search the forum and take a look at help.sap.com for examples of currency conversion. There are a lot of good examples out there.
Ethan -
CSA: Use with Script Logic
Has anybody used CSA to protect a Script logic server. With so many remote applications attempting access to the script logic server and files, what method do you find is best to keep this server protected without opening up too many holes?
Thanks!
-WyleyI would make a group of servers that are allowed to talk to the Script login server and either turn off alerts for them or just make them informational.
Also create another protection policy if you want even more protection on that server. -
Script logic not working for GL account with Zero balance
Dear Experts,
I have a scenario where the GL account balance in ECC is 0 and when a script logic runs in BPC the same should capture a closing balance as "1".
Though I have written the below logic, this is not getting executed and writing back the value as "1".
Kindly help me on the same.
*WHEN ENTITY
*IS "ABC"
*WHEN ACCOUNT
*IS "20300000"
*REC(EXPRESSION = 11, ACCOUNT = 20300000,FLOW = F99, ENTITY = ABC, PROFITCENTER = 130010 , INTERCO = I_NONE , CONSOSCOPE = G_NONE, CURRENCY = LC ,CATEGORY = ACTUAL, AUDITID = INPUT)
*ENDWHEN
*ENDWHEN
*COMMIT
Regards,
ShilpaHello Vadim Kalinin,
Thanks for the very swift help.
Merger of the client happened in 2007. ECC is using the " 20300000- change in fair value " account to record both pre-acquisition and post-acquisition values.
Since the treatment of pre-consolidation and post consolidation reserves is different the split of the amount between pre and post-acquisition values has to be done. For the same post acquisition value is reduced from this account using a script logic as below.
WHEN FLOW
*IS "F99"
*WHEN ENTITY
*IS "ABC"
*REC(EXPRESSION = ([ACCOUNT].[20300000] -3258603),ACCOUNT = 20300000,FLOW = F99, INTERCO = I_NONE , CONSOSCOPE = G_NONE ,CURRENCY = LC ,CATEGORY = ACTUAL )
This logic worked when the account has a figure, but in July 2014 in ECC the account had a transaction and the balance has become Zero. Until this account has a figure this pre acquisition logic is not working.
For making this work, I am trying to write a new logic to make the balance of this account as "1" in BPC through the script logic.
Kindly suggest me on the same.
Regards,
Shilpa -
Problems with "GET" in a Script Logic
Hi,
I created a Script Logic in BPC NW with the following code:
*WHEN *
*IS *
*REC(GET(CONCEPTO=M30121),CONCEPTO=M213)
*ENDWHEN
And I click "Validate and Save" and I get this error:
Validation Error
Unknown Dimension Name in Keyword: "*:
What's happening?
Regards,
Miguel.Thanks, but my problem is with "GET" function in Script Logic. You don't look at what I do with the code because it's an example. The problem is that the GET function doesn't work.
I created a Script Logic in BPC NW with the following code:
*WHEN CONCEPTO
*IS M30121
*REC(FACTOR=GET(CONCEPTO=M213),CONCEPTO=M30121)
*ENDWHEN
And I click "Validate and Save" and I get this error:
Validation Error
Unknown Dimension Name in Keyword: "M213):
And if the code is like this:
*WHEN CONCEPTO
*IS "M30121"
*REC(FACTOR=GET(CONCEPTO="M213"),CONCEPTO=M30121)
*ENDWHEN
The error is this:
Validation Error
Unknown Dimension Name in Keyword: ""M213"):
Regards,
Miguel. -
How to copy applications using script logic with conditions
Hi,
I have two copy data between application A to application B, but only i want to copy the March's Data of Application A. Dimensions are the same in both applications
I'm going to use this script logic, ¿this script will work?
*WHEN TIME
*IS "2009.MAR"
*DESTINATION_APP=B
Thanks in advance
Regards,
JuanHi all,
Finally I solved the issue, the problem was that i haven't add this line in the script logic:
TASK(Execute formulas,USER,%USER%)
But now i need to pass in the script logic as an input: entity and time. Below is the code I prepare, it has no error but it doesn't work. ¿any idea?
Thanks in advance
Regards,
Juan
*SSIS PACKAGE *
'DEBUG(ON)
PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when running logic.",1,{"Yes, check for work status settings before running logic","No, do not check work status settings"},{"1","0"})
PROMPT(SELECTINPUT,,,"Please select entity and time to copy data from LegalAppNceu to LegalApp",%ENTITY_DIM%%TIME_DIM%)
TASK(Execute formulas,USER,%USER%)
TASK(Execute formulas,APPSET,%APPSET%)
TASK(Execute formulas,APP,%APP%)
TASK(Execute formulas,LOGICFILE,%APPPATH%..AdminApp%APP%CopyApplication.lgx)TASKTASK(Execute formulas,RUNMODE,1)
TASK(Execute formulas,LOGICMODE,1)
TASK(Execute formulas,CHECKLCK,%CHEKCLCK%)
SCRIPTLOGIC
*DESTINATION_APP=LEGALAPP
*SKIP_DIM= COSTCENTER
*WHEN ENTITY
*IS "%ENTITY_DIM%"
*WHEN TIME_DIM
*IS "%TIME_DIM%"
*REC(FACTOR=1)
*ENDWHEN
*ENDWHEN
*COMMIT
Maybe you are looking for
-
itunes app no longer showing genres or the top charts/genius bar in the top bar ... it only displays a faint music in the centre with just the search box..why? i need them back:-(
-
Is this website loading slow to u?
Click to check my website I has tried to clean the codes and use background images more and less graphics Can anyone help to tell me? and give me some advices? Many thanks.
-
Should I restore Java Shared Archive in 10.3.9
Does anyone know if restoring the Java Shared Archive (JSA) is still necessary on a Mac running OS X 10.3.9, QuickTime 7.1.2, and Java 1.4.2? I know that restoring the JSA was an optional step for those users whose Java implementation stopped working
-
FM patch 12.0.4 relased
There is a new FM patch (12.0.4) available through the Adobe Update Manager (Help > Updates...). A direct download link hasn't been posted yet. The readme file is in the documents section here: Adobe FrameMaker 12.0.4 ReadMe.pdf There also is a patc
-
Aperture 2.1 update made pix offline
Yesterday OK, today my pix are "offline" with 2.1 and 10.5.3 updates. What went wrong? Some older ones were "offline" before, but ok now - strange!