Script logic : determine the content of a variable according to a IF test
Hello experts,
I have the following need in a script logic
determine the content of a variable according to a IF test
For example I tried :
*WHEN %ENTITY%
*IS "CH20","CH30","ES10"
*SELECT(%ENTITYPBPD%, "[ID]", "ENTITYCC", "[ID] = '%ENTITYCC_SET%_PBPD'")
*ENDWHEN
Syntax is correct but I get a query execution error (Error in WHEN/ENDWHEN structure)
I guess it's because this when don't have any REC instructions.
In other words, if the user selection at the package prompt step are CH20, CH30 or ES10
the variable has to be selection_PBPD
if another member is selected
the variable has to take other value
Hope I've made my need clear, and thanks in advance.
G.
Hi G,
Will the *TEST_WHEN() statement work for this case?
The way that it works is that if the condition evaluates to TRUE, then the subsequent WHEN...ENDWHEN is processed, else it is not.
Have a look at Page 66 of "How To Use BPC Scripting Logic, Version 1.00, April 21, 2006" (It's a bit old but I use it a lot on our MS7.0 SP9 installation).
Hope this helps.
Regards
Nick
Similar Messages
-
The following error occurs.
Welcome to the Exchange Management Shell!
Full list of cmdlets: Get-Command
Only Exchange cmdlets: Get-ExCommand
Cmdlets that match a specific string: Help *<string>*
Get general help: Help
Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
Show quick reference guide: QuickRef
Exchange team blog: Get-ExBlog
Show full output for a command: <command> | Format-List
Tip of the day #0:
Did you know that the Identity parameter is a "positional parameter"? That means you can use:
Get-Mailbox "user" instead of: Get-Mailbox -Identity "user"
It's a neat usability shortcut!
VERBOSE: Connecting to mail1.dorothy.local.
New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
the destination computer. The content type is absent or invalid. For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
gTransportException
+ FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
Exception calling "GetComputerSite" with "0" argument(s): "The Specified directory object cannot be found."
At C:\Program Files\Microsoft\Exchange Server\V15\bin\ConnectFunctions.ps1:164 char:2
+ $localSite=[System.DirectoryServices.ActiveDirectory.ActiveDirectorySite]::GetC ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ActiveDirectoryObjectNotFoundException
Failed to connect to an Exchange server in the current site.
Enter the server FQDN where you want to connect.: mail1.dorothy.local
VERBOSE: Connecting to mail1.dorothy.local.
New-PSSession : [mail1.dorothy.local] Connecting to remote server mail1.dorothy.local failed with the following error
message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from
the destination computer. The content type is absent or invalid. For more information, see the
about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Microsoft.Excha ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
gTransportException
+ FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed
Randy CheekGood Morning,
Log into the server with an account that has appropriate Exchange rights, not a local account.
Note: By default - Domain Admins don't have Exchange rights.
Dame Luthas, ITILv3, MCSE Messaging 2013, MCSA, MCITP
My Technical Blog: http://thelifestrategist.wordpress.com
Discipline is the Difference between Goals and Accomplishments
If this post is useful, please hit the green arrow on the left & if this is the answer hit "mark as answer" -
I can't place the content of a variable in a TextField
Hi.
I have a TextField made at authoring time. I need to place
the content of a variable in a TextField.
The variable counts the clicks and i want to display the sum
in a TextField.
Here is the code I made:
var limit:Number=29;
var count:Number=0;
var current:Number=0;
_root.mask_mc.onPress = function() {
_root.bat_mc.gotoAndPlay(2);
if(count<limit) {
count++;
}else{
_root.nextFrame;
count=0;
_root.scor_txt.text = count;yes, that's right, (this code look very similar to something
I wrote for someone the other day ;)
I would also not call to _root as it doen't look like it's
needed here, if this resides on the main timeline (it looks that
way from here :) (if not leave them in there, I just don't like
calls to _root much)
also you will need to use:
nextframe();
so it should look more like: -
How to execute the content of varchar variable like a simple query
Hi everyone!
I did a PL/SQL region in apex, in this region I did the query which is storaged in a variable; it was did it concatenate several times,
in the procedure I have several sentences.
I thought that the command 'execute immediate' would get a good result but it do not print the result.
declare
variable varchar2(1000);
begin
--sentences
--execute inmmediate( variable );
--return variable
end;
I only want to how to execute the content of varchar variable.
For example, suppose that the result of this procedure is
'SELECT SYSDATE FROM DUAL'
How and what do I must do for this query execute like a normal query that is in apex?
I expect your prompt reply.
Thank you for your help.
Best regardsLet us say your table containing SQL is
t_sql_table
and has two columns
primary_key
and
sql_query.
You would need to do the following:
1. Create a Report of type "Function returning SQL Query"
2. Put the following there:
DECLARE
v_query VARCHAR2 (4000);
BEGIN
SELECT sql_query
INTO v_query
FROM t_sql_table
WHERE primary_key = 1;
RETURN v_query;
END;Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Can we run script logic at the time of preparing reports.
Helo Everybody!
I am new to SAP BPC.
Can we run script logic at the time of preparing reports.
Thanks & Regards,
Satish.If you mean, "Can we run script logic at the time of preparing reports" is equivalent to entering data into the report and sending it to the database, then yes, you may run logic as Marcel indicates. Defualt logic is ALWAYS run for ANY and EVERY set of data that is sent via an input template from the field. You may also run logic when posting a jOURNAL entry as well. But be careful....if default logic attempts to perform to MANY or COMPLEX calculations, the time it takes to complete the process may not be in expectations with the users plans. There is a fine design balance required when planning to run logic at the time of input, as opposed to running in a package or at specific times during the day.
Hope this helps. -
I work for the IT department for a medical center and we are creating signable PDF forms so that our center can move toward a paperless system. The center uses a program to organize all of the PDF forms once they are signed, but we are wanting to make everything structured to work seamlessly with this program. What we need to do this is that when a form is signed by a patient, a script within the PDF saves the file to a specific folder and then creates the file name based on the patient's idnumber, date of birth, and the name of the procedure the form was for (which is in the form as a drop down list). I haven't been able to find anything on how to do anything like this, so any help will be greatly appreciated.
It has been a while since I have posted here because I have been looking into doing this using a plugin, since Actions can't be run automatically by signing or any other form trigger. I have recently come accross folder level javascripts, though and am wondering if you guys think that would work, and if so, how could I do it? I'm reading through a post here: http://acrobatusers.com/tutorials/how-save-pdf-acrobat-javascript and it seems to be really close to what I need, it just isn't quite there. My code now looks like the following, (many thanks to you guys, by the way):
//Create the file name from text fields in the form
//Credit to Gilad D for the first part of this script.
var myFileName = this.getField("PATIENT_ID").valueAsString + "#" + this.getField("PATIENT_DOB_3").valueAsString + "#C#" + this.getField("PROCEDURE_NAME").valueAsString;
//Save the file
this.saveAs("/C/Users/ahill.CNC/Desktop/PDF test save/" + myFileName + ".pdf");
From what I am understanding, with a folder level script, I can make a script and save it to a specific folder that Acrobat can access and I should be able to call that script from within the form. I mainly need to know how to call the script and if there are any changes to the above script that need to be made to make it work as a folder level script, I need to know how to do that. I'm going to continue reading up on this, but If you happen to know how to do it and are able to help me, it would be greatly appreciated. Again, thank you guys for all the help. -
Sort the content in KM folder according to date modified
Hi,
I have a KM folder which has around 80 documents. The content order is all jumbled. I tried both Manual Ordering and Disabled Manual Ordering. I want to sort it according to the Modified Date. Is this possible?
If so, could you please let me know.
Thanks,
AjayHi,
I have listed the info you have asked for:
In System Admin -> System Config -> KM -> CM -> UI -> Settings -> Layout Set:
Layout Set Name: JupPoliciesAndProcedures
Show write-protect notice: Unchecked
Description: Layout set for the consumer standard explorer
Enabled for presentation settings: checked
Screen Reader enabled: checked
Fallback Layout Set for Screen Reader: Not set
Layout Controller: SimpletLayoutController
Collection Renderer: JupDocuments_And_Forms_NODATE
Resource Renderer: ConsumerResourceRenderer
Commands for the details menu: DetailsGroup
In System Admin -> System Config -> KM -> CM -> UI -> Settings -> Collection Renderer Settings:
Name: JupDocuments_And_Forms_NODATE
Description: The consumer collection renderer
Flavor: Not set
Components: left blank...
Base Settings: Not set
Breadcrumb Style: horizontal
Width Adjustment Mode: stretch
Height Adjustment Mode: left blank...
Mass Actions Style: off
Style for Info Used in Empty Collection: message
Mass Command Group: DetailsGroup
Bundle File for Empty Collection: left blank...
Key for Info Used in Empty Collection: left blank...
Collection Renderer: JupSubmissions
Breadcrumb Visibility Style: left blank...
Collection Command Group: Not set
Command Style for Root: off
Show Folder Name: No
Displayed Properties: rnd:icon,rnd:displayname(contentLink),rnd:description,jup:DetailsColumn Header Coloring: Table Title Color
Number of Rows: 30
Row Spacing: 2 px
Row Spacing Mode: standard
Row Background Style: ALTERNATING
Number of Columns: 1
Column Spacing: left blank...
Column Spacing Mode: standard
Resource List Filter: Not set
Extensions to be Filtered: left blank...
Mime Types to be Filtered : left blank...
Resource Types to be Filtered: left blank...
Show Hidden Resources: No
Folders Selection: all
Files Selection: all
Links Selection: all
Property for Sorting: rnd:displayname
Sorting Mode: ascending
Item Selection Mode: off
Background Image Path: left blank...
Background Image Style: left blank...
Max. Links for Page Browser: left blank...
Sort Enabled: checked
Column Ordering Mode: left blank...
In System Admin -> System Config -> KM -> CM -> UI -> Settings -> Resource Renderer Settings:
Name: ConsumerResourceRenderer
Description: The consumer resource renderer
Flavor: Not set
Base Settings: Not set
Resource Renderer: ResourceRenderer
Icon Width: left blank...
Icon Height: left blank...
Icon Setting: left blank...
Image Width: left blank...
Image Height: left blank...
Image Setting: left blank...
Entry Height: left blank...
Entry Width: left blank...
Folder Image Path: left blank...
File Image Path: left blank...
Link Image Path: left blank...
Primary Text Style: left blank...
Secondary Text Style: left blank...
Highlighted Text Style: left blank...
Tooltip Setting: left blank...
Show Resource Properties: left blank...
Child Folders' Style: off
Max Number of Child Folders: left blank...
Child Folder Delimiter: left blank...
Mode for Child Count: left blank...
Visible Properties: rnd:iconrnd:displayname(contentLink)rnd:action,rnd:description
Target Window Type: left blank...
Target Window Name: left blank...
Command Display: hover
Resource Command Group: DefaultResourceCommandGroup
Folder Command Group: DefaultResourceCommandGroup
Link Command Group: DefaultResourceCommandGroup
Please do let me know if you need any other details.
Thanks,
Ajay -
Script logic - how to use a selection variable within an allocation logic
Hi,
I want to implement a simple top-down distribution to distribute values from a yearly budget (Y20xx.TOTAL) to a quarter budget (Q20xx.Q1, ... Q20xx.Q4) using the actuals of the previous year as reference.
If we hard code the members it works fine:
*RUNALLOCATION
*FACTOR=USING/TOTAL
*DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
*DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
*DIM CATEGORY WHAT=SBO; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
*ENDALLOCATION
Of course, we want to make this dynamic, using the values inputted in the selection screen of the package: time, entity and category.
So if we start with write the following logic, it does not work anymore:
*RUNALLOCATION
*FACTOR=USING/TOTAL
*DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN); USING=<<<; TOTAL=<<<
*DIM TIME WHAT=%TIME_DIM%; WHERE=BAS(Q2009.TOTAL); USING=BAS(Q2008.TOTAL); TOTAL=<<<
*DIM CATEGORY WHAT=%CATEGORY_DIM%; WHERE=<<<; USING=ACTUAL; TOTAL=<<<
*ENDALLOCATION
So, how to use the selection variables in this allocation logic? %TIME%, %CATEGORY% also did not work ...
regards
Dries
solved it ...
Edited by: Dries Paesmans on Feb 22, 2009 8:31 PMHi Dries,
Looks like you solved this, but if I can just add a small point -- when you use syntax like this:
*DIM ACCOUNT WHAT=ACC_NOT_ASSIGNED; WHERE=BAS(FIN);
*DIM TIME WHAT=Y2009.TOTAL; WHERE=BAS(Q2009.TOTAL);
each time the logic runs, it will scan through the dimension from the FIN and Q2009.TOTAL members, one level at a time, until it reaches the base members (where calc = 'n'). This may happen very quickly, if the dimension has very few levels, but could take a bit of extra time if it's a particularly deep dimension. (By which I mean many levels of hierarchy -- not some 1970's Pink Floyd musical reference.)
You may speed things up by using a member property instead of the BAS(xyz). Flag all the base members using a specific property value, and that way the logic engine can pick up the complete list of members in the WHERE clause, in a single query.
*DIM Account What=ACC_NOT_ASSIGNED; Where=[FloydProperty]="DarkSideOfTheMoon"; ...
This adds some maitenance work in the dimension, which may be problematic if your admins are changing it regularly (and will cause problems if they forget to update this particular property).
I can't predict how much time this will save you (maybe not much at all), but anyway I figure you'd want to know exactly what work you're asking the system to perform.
Regards,
Tim -
Clean the content of a variable selection
HI,
coming from other forum,
I create Currency = OBJV().
Any time that I execute the layout the variable Currency get also the buffered value.
HOw can I refresh the value of the OBJV()?
RegardsHi
I have the same problem. Regarding BPS there is solution, run planning function before folder open and refresh values there.
CALL METHOD cl_sem_variable=>get_instance
EXPORTING
i_area = i_area
i_variable = wa_variable
RECEIVING
rr_variable = lr_variable
EXCEPTIONS
not_existing = 1
OTHERS = 2.
IF sy-subrc = 0.
* delete the restrictions
CALL METHOD lr_variable->set_user_restriction
EXPORTING
i_user = sy-uname
i_delete = 'X'
EXCEPTIONS
failed = 1
OTHERS = 2.
ENDIF.
There is one side effect - planning f-ction runs authorization check, so, you have to have values set in variable, otherwise system try to run pl.f-ction for all obj. And it raises authorization exceptions ;(
For web it is little bit worse - system clears varibale, but does not clear input field contents. User opens layout and get last values ;( Refresh data and fields are cleared.
Valters -
Use of Variable in Script Logic
Dear All,
We are working on a BPC Script Logic involving depreciation calculation, which calls an implementation of the BAdI BADI_UJ_CUSTOM_LOGIC. We are passing some parameters from the script logic to the BAdI. There are two parameters to be passed: an account number (Account in which the posting will happen), and the rate (rate with which depreciation will be affected). The parameters are stored in the Dimension member of the account dimension and need to be fetched from there. We are using the following piece of code to achieve this:
*INCLUDE FUNCTIONS.LGF
[#PERC] = PRO([%ACCOUNT_DIM%].CURRENTMEMBER,DEP_PERCENTAGE)
[#DEPACCOUNT] = PRO([%ACCOUNT_DIM%].CURRENTMEMBER,DEP_ACCT)
*START_BADI DEPR
QUERY = ON
WRITE = ON
DEPACCT = [#DEPACCOUNT]
PERCENTAGE = [#PERC]
*END_BADI
Here, FUCNTIONS.LGF contains the PRO function, which fetches the account and percentage properties from the account dimension member. Problem is, when we refer to the temporary variables within our code using the variables [#DEPACCOUNT] and [#PERC], we encounter a short dump for CX_SY_CONVERSION_NO_NUMBER. We suspect that instead of passing the parameter values, the logic is passing the variable name as the value. How do we rectify this? What is the correct syntax for passing such a parameter to the BAdI? Any ideas?
Thanks in Advance,
SidHi Ethan,
Thanks for the answer. Unfortunately, even after trying out your solution with K2 variables, we are getting the same dump, this time the log says:
An exception with the type CX_SY_CONVERSION_NO_NUMBER occurred, but was neither handled locally, nor declared in a raising clause
The argument '%PERC%' cannot be interpreted as a number
We are starting to think that maybe only substitution variables can be passed as parameter to the BAdI call, because whenever we use a local variable, we end up in passing the variable name to the BAdI, and not the variable value. We digged through the SAP Help, following is the excerpt from there:
Run the following instruction to call custom ABAP programs: where filter_value_of_your_BADI_implementation is the name of the filter you provided during the BADI implementation of UJ_CUSTOM_LOGIC BADI.
*START_BADI <filter_value_of_your_BADI_implementation>
<key1> = <value1>
<key2> = <value2>
*END_BADI
where filter_value_of_your_BADI_implementation is the name of the filter you provided during the BADI implementation of UJ_CUSTOM_LOGIC BADI.
Does this mean we can only pass <key>:<value> pairs, and not <key>:<variable> pairs? Is there any instance / documentation which points to this (or the contrary)?
Awaiting answers.
Thanks and Regards,
Sid -
Pass package variable to script logic
Hi expert,
I have creted a variable in a Package with the statement
PROMPT(TEXT,%PERCE%,"Revaluation rate",,"")
the variable appears and properly stores a value.
However, what statement can be used to pass it to the sript logic?
I tried 'TASK(Execute formulas,REPLACEPARAM,PERCE%EQU%%PERCE%) but it's somehow wrong.
Please..any help?
Thanks,
Alberto SabateJeffrey,
Thanks for your answer.
I am aware that within the script logic I have to use a variable between $ signs. So $PERCE$ is exactly what I had in my script logic.
However in order to get a value there we have to enter a command into the dstx file to actually send the value enter by the user into the script logic.
In the Package I have:
PROMPT(TEXT,%PERCE%,"Revaluation rate",,"")
TASK(RUNLOGIC,FORMULASCRIPT,"*FUNCTION PER=%PERCE%")
In the script I have
*WHEN *
IS
*REC(FACTOR=PER.INPUT)
*ENDWHEN
I have also tried $PERCE$ instead of PER.INPUT, but no luck either.
Still I'm not able to get the variable %PERCE% into the formula. Why?
Thanks
Alberto -
Script Logic: How to test the sign of data
Hi Forum,
I'm looking for a function to test if the amount of an account is positive or negative.
This test is necessary to choose the target account where transfer the amount.
In MS version there is the TEST_WHEN function, but doesn't work in NW (not implemented).
I'm trying to use an algorithm but I don't know the sintax in BPC of Square Root.
I'm working with BPC NW S04.
Have someone suggestion about it.
Thanks a lot in advance.
Gianluca OrlandiHey Gianluca,
Looks like this is a known issue and is not supported in NW....
check this thread...
Script Logic: chek the sing of the amount of an account
Hope this helps... -
Dear Gurus,
This is the logic I am working with:
*FOR %MONTH% = 2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
//CHECK IF THE VALUE OF THE ACCUMULATED DEPRECIATION IS GREATER THAN THE CAPITALIZED ASSET VALUE//
[ACCOUNT].[#AccumDepr] = (([ACCOUNT].[AccumDepr]+[ACCOUNT].[Depreciation])>[ACCOUNT].[EQUIPMENT1]? [ACCOUNT].[EQUIPMENT1] : ([ACCOUNT].[AccumDepr]+[ACCOUNT].[Depreciation]))
*NEXT
I am trying to execute the above script logic, but the system is throwing an error that says
"Duplicate formula found: [ACCOUNT].[#AccumDepr] = (([ACCOUNT].[AccumDepr]+......."
Any idea why this is happening?
Also, could you please suggest a better way of writing the above code?
Thanks,
Vijay.As a testing scenario, I have calculated the depreciation in a different part of the same logic. Here it is:
//This logic calculates the accumulated depreciation amount for the time period specified in the logic
//NOTE: This logic is not very dynamic and is only valid for the accounts specified in the logic
//A FUTURE ENHANCEMENT TO THIS LOGIC WOULD BE TO MAKE THE "LIFE" OF THE ASSET A $DATAMANAGER VARIABLE$
//AND WRITE A CUSTOM SCRIPT LOGIC
//BEGIN SCRIPT LOGIC FILE//
//CONSTANTS
*XDIM_MEMBERSET CATEGORY=ACTUAL
*XDIM_MEMBERSET ACCOUNT=Depreciation,AccumDepr,NBV_EQUIPMENT1,EQUIPMENT1
*XDIM_MEMBERSET ENTITY=STORE1
*XDIM_MEMBERSET TIME=2008.JAN,2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
//BEGIN: POPULATE NET BOOK VALUE FROM CAPITALIZED ASSET VALUE //
*WHEN ACCOUNT
*IS EQUIPMENT1
*WHEN TIME
*IS 2008.JAN
*REC(FACTOR=1,ACCOUNT="NBV_EQUIPMENT1")
*ENDWHEN
*ENDWHEN
*COMMIT
//END: POPULATE NET BOOK VALUE FROM CAPITALIZED ASSET VALUE //
//BEGIN: CALCULATE DEPRECIATION //
*WHEN ACCOUNT
*IS EQUIPMENT1
*REC(EXPRESSION=(%VALUE%/6),ACCOUNT="Depreciation")
*ENDWHEN
*COMMIT
//END: CALCULATE DEPRECIATION //
//BEGIN: CALCULATE ACCUMULATED DEPRECIATION AND NET BOOK VALUE //
*FOR %MONTH% = 2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
//CHECK IF THE VALUE OF THE ACCUMULATED DEPRECIATION IS GREATER THAN THE CAPITALIZED ASSET VALUE//
*WHEN CATEGORY
*IS ACTUAL
*REC(EXPRESSION=IIF((([ACCOUNT].[AccumDepr] + [ACCOUNT].[Depreciation])>[ACCOUNT].[EQUIPMENT1]), [ACCOUNT].[EQUIPMENT1], [ACCOUNT].[AccumDepr]+[ACCOUNT].[Depreciation]))
*ENDWHEN
*NEXT
//*FOR %MONTH% = 2008.FEB,2008.MAR,2008.APR,2008.MAY,2008.JUN,2008.JUL,2008.AUG,2008.SEP
//CHECK IF THE NET BOOK VALUE OF THE ASSET IS LESS THAN ZERO//
//*[ACCOUNT].[#NBV_EQUIPMENT1] = (([ACCOUNT].[NBV_EQUIPMENT1]-[ACCOUNT].[Depreciation])>0? ([ACCOUNT].[NBV_EQUIPMENT1]-[ACCOUNT].[Depreciation]) : 0)
//*NEXT
*COMMIT
//END: CALCULATE ACCUMULATED DEPRECIATION AND NET BOOK VALUE //
//END SCRIPT LOGIC FILE//
Please let me know if there is a better way to write this code.
Thanks for all your help. -
Send parameter from one script logic to another. SAP BPC 7.5 NW.
Hello!
Before i start, want to apologize for my English.
We work on SAP BPC 7.5 for NetWeaver.
In general, we want to send parameter from one Script logic file to another script logic file.
I will explain why :
1. We have parametr like %C_CATEGORY_SET% (and another four parameter, like groups, currency and etc.) that work on one script(next, i will named it A_Script).
We will send this parametr from BPC EXCEL (we will create button, then use command MNU_eData_SelectPackage(we also set parameters) and run package that we need, also before we set script for this package by the SAP Guide. We send some data, and this A_Script work good. Everything that we want from this script work correctly. )
2. Next we create another script(B_Script) , and we want use %C_CATEGORY_SET%, but we don't know how use this parametr, if we will just write this parametr on Script Logic, apears error ("C_CATEGORYDATAVALUE" is not assigned to the Data Administrator). We try to solve this problem by using System_Constants.lgf, but we get error.
Code:
*DIM C_CATEGORY WHAT=%C_CATEGORY_SET%; WHERE=<<<; USING=<<<; TOTAL=<<<
*DIM C_ENTITY WHAT=%ENTITYSET%; WHERE=<<<; USING=<<<; TOTAL=<<<
*DIM GROUPS WHAT=%GROUPS_SET%; WHERE=<<<; USING=<<<; TOTAL=<<<
*DIM RPTCURRENCY WHAT=%RPTCURRENCY_SET%; WHERE=<<<; USING=<<<; TOTAL=<<<
*DIM TIME WHAT=%TIME_SET%; WHERE=<<<; USING=<<<; TOTAL=<<<
If we will change %C_CATEGORY_SET% for ACTUAL, and also change another parameters, script will work, package will run correctly. But we need using parameters, because we didn't exactly what will choose our client.
Our question have BPC Script Logic some kind of Globar Parameter(Variable), that we will set in A_Script, and then use them on B_Script?
How can we define parameter from another script logic, maybe we should send it?
Should we use System_Constants for solving this problem, if yes, how?
Any help will be appreciated
Best Regards,
Erlan Kadraliev
Edited by: Erlan Kadraliev on Feb 8, 2011 4:50 PM
Edited by: Erlan Kadraliev on Feb 8, 2011 4:58 PM
Edited by: Erlan Kadraliev on Feb 8, 2011 4:59 PMHi Ethan Jewett
1. About %ENTITYSET% it is normal. Before this line i write :
*SELECT(%ENTITYSET%, "ENTITY", GROUPS, "[ID]=%GROUPS_SET%")
So it is not this problem. %ENTITYSET% just parameter, that i used.
2. Are you running the scripts using the same data manager package? I am running two different package for 2 different Script.
For example aPackage for aScript, and bPackage for bScript.
My questions was how can i send parametr from one script to another, for example i can run another script by using BADi command Runlogic, but how can send parameter that i need to used on another script. I have for example parameter %GROUPS_SET% (CG001) on aScript, but i can't get this parameter on another script, if i write %GROUPS_SET% i will get error ("GROUPSDATAVALUE" is not assigned to the Data Administrator)
OR
Maybe if you will answer for next question, i will be able solve problem , How can i send parameter CG001 (this is %GROUPS_SET%, for example it stay in EXCEL in cell A5) from excel to script logic by running package. Maybe i can get cell value on Dynamic Script Data Management?
My Dynamic Script on bPackage
PROMPT(RADIOBUTTON,%CHECKLCK%,"u0412u044Bu0431u043Eu0440 u0431u0430u0437u043Eu0432u043Eu0433u043E u043Fu043Eu043Au0430u0437u0430u0442u0435u043Bu044F.",1,{"u0412u0441u0435u0433u043E u0410u043Au0442u0438u0432u044B","u0421u043Eu0431u0441u0442u0432u0435u043Du043Du044Bu0439 u043Au0430u043Fu0438u0442u0430u043B","u0412u044Bu0440u0443u0447u043Au0430 u043Eu0442 u0440u0435u0430u043Bu0438u0437u0430u0446u0438u0438","u0414u043Eu0445u043Eu0434 u0434u043E u043Du0430u043Bu043Eu0433u043Eu0431u043Bu0430u0436u0435u043Du0438u044F u043Eu0442 u043Fu0440u043Eu0434u043Eu043Bu0436u0430u044Eu0449u0435u0439 u0434u0435u044Fu0442u0435u043Bu044Cu043Du043Eu0441u0442u0438"},{"BPAST_ALL","BPEQ","BPPROCE","BPOPIN_GO"})
INFO
(%EQU%,=)
INFO
(%TAB%,;)
TASK
(/CPMB/DEFAULT_FORMULAS_LOGIC,SUSER,%USER%)
TASK
(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPPSET,%APPSET%)
TASK
(/CPMB/DEFAULT_FORMULAS_LOGIC,SAPP,%APP%)
TASK
(/CPMB/DEFAULT_FORMULAS_LOGIC,REPLACEPARAM,CHECKLCK%EQU%%CHECKLCK%%TAB%)
TASK
(/CPMB/DEFAULT_FORMULAS_LOGIC,LOGICFILENAME,MYTEST_145.LGF)
Best Regards,
Kadraliev Erlan -
Script logic error - Invalid object name 'tblStatus'
Hi all,
Running BPC 5.1 SP5 on SQL 2005.
Has anyone ever seen this error message before? I only get the error message when choosing the run-time option in the package, to honor work status settings. This problem just appeared in the last few days, and I believe that a month or two ago, users were running the same logic (with the same yes-honor-work-status option selected).
We did recently upgrade from 5.1 SP3 to 5.1 SP5, and I'm wondering if this may be a cause? That's just a hypothesis though.
Invalid object name 'tblStatus'. in:
select distinct d.VERSION,d.ENTITY,d.TIMEID
from #RESULT_333729 d where signeddata<>0
and exists (select * from tblStatus s where [APP]='CONSOL' and d.VERSION=s.CATEGORY and d.ENTITY=s.ENTITY and d.TIMEID=s.TIME and [STATUS]>0)
I understand what it means, and of course there is no table in the appset database tblStatus. Work status locks are kept in tblConsolLock (where Consol is my app name). And in that table, the field name is StatusCode, not Status. So it appears that this is some vestige of code from an earlier version of BPC / O'soft.
This error occurs in a piece of script logic, that includes both basic SQL WHEN/IS/*REC's and also a *RUNALLOCATION. The error is thrown within the RUNALLOCATION code block. The complete run-up to the error message is shown below.
-- Calculate difference
insert into #DIFF_333729 ([ACCOUNT],[AFFILIATE],[CURRENCY],[DATASRC],[ENTITY],[PRODHIER],[TIMEID],[VERSION],signeddata)
select [ACCOUNT],[AFFILIATE],[CURRENCY],[DATASRC],[ENTITY],[PRODHIER],[TIMEID],[VERSION],amtWHERE as signeddata
from #WHERE2_333729
select [ACCOUNT],[AFFILIATE],[CURRENCY],[DATASRC],[ENTITY],[PRODHIER],[TIMEID],[VERSION],sum(signeddata) as signeddata
into #RESULT_333729 from #DIFF_333729
group by [ACCOUNT],[AFFILIATE],[CURRENCY],[DATASRC],[ENTITY],[PRODHIER],[TIMEID],[VERSION]
--Time to calculate and count differences (45459 found):2.5 sec.
select distinct d.VERSION,d.ENTITY,d.TIMEID
from #RESULT_333729 d where signeddata<>0
and exists (select * from tblStatus s where [APP]='CONSOL' and d.VERSION=s.CATEGORY and d.ENTITY=s.ENTITY and d.TIMEID=s.TIME and [STATUS]>0)
call 1 completed and data posted in 23.6 sec.
Run completed in 23.7 sec.
End time --->11:01:05 AM - Date:1/16/2009
Invalid object name 'tblStatus'. in:
select distinct d.VERSION,d.ENTITY,d.TIMEID
from #RESULT_333729 d where signeddata<>0
and exists (select * from tblStatus s where [APP]='CONSOL' and d.VERSION=s.CATEGORY and d.ENTITY=s.ENTITY and d.TIMEID=s.TIME and [STATUS]>0)
Here is the original script logic (from the LGX file -- the LGF file has a whole bunch of variables in it that would only confuse the matter more). It works just fine when the
*RUN_ALLOCATION @A_1||
USING/TOTAL|
ACCOUNT WHAT=659210,659310,659320,659410,659510,659610,659620,659630,659710,659810,659820,659910; WHERE=<<<; USING=PCAYTD510000; TOTAL=<<<|
PRODHIER WHAT=PRODHIERL1A;WHERE=[PRODHIERLEVEL]='5'; USING=<<<; TOTAL=<<<|
DATASRC WHAT=PCAASSESSSTAGE1,PCAASSESSSTAGE2; WHERE=PCAASSESSALLOC1; USING=INPUTCONSOL; TOTAL=<<<|
ENTITY WHAT=[COMPANYCODE]='7470' AND [PCAASSESSDRIVERBP]='PCAYTD510000' AND
([PCAASSESSMETHODBP] = 'ALLOCAUTO' OR [PCAASSESSMETHODBP] = 'ALLOCMANUAL');WHERE=<<<;USING=7470.BASE;TOTAL=<<<|
Anyone experience this same error message? I searched for SAP support notes and found nothing to do with tblStatus or similar.
Thanks for your help,
TimHi Sorin,
Thanks, you've confirmed what I suspected.
Yes, we always process & save apps & dims on any upgrade.
We've reproduced the problem in all 3 of the environments with the customer's appset. I haven't yet reproduced in ApShell, but will do so & report it as a bug.
And just out of curiousity -- was the other message you saw here in this EPM forum? Before I posted my question, I searched both here, and in the support notes, for "tblStatus" and a few other terms about work status lock errors, etc., and came up with 0 results.
Thanks again,
Tim
Maybe you are looking for
-
I use a wireless connection and will soon have a new iphone, so air printing would also be nice. I am a teacher and do tons of copying so an auto duplex adf would be preferred. I also do fax occasionally, so I need to keep that. I am having a hard ti
-
Lightroom 5 serial no not activating. i have a new computer
lightroom 5 serial no not working . I have got a new computer
-
I have down loaded the Adobe Flash Player 11
When I attempt to watch a you tube video or something, it show that I need to install it, even though it showed that it was successfully downloaded
-
Which share setting to use for Apple TV 1st generation?...
I want to export a project in a format that will play on a 1st generation Apple TV. But under the Share settings, in Apple Devices, both the 720p and 1080p options indicate they will not work with 1st generation Apple TV. How do I output my FCPX pr
-
Was given a splendid new iSight as a present and am trying to set it up but iChat is crashing every time I start it and/or when I connect the FireWire cable to the camera itself. iChat stays open for less than three seconds. Irritating is an understa