How to specify a variable in the script logic
I want to pass a variable from the process chain using the prompt statement.
I want to refer to the variable name in the script. When I used the following statement in the script file, I got an error when validating the statement below:
//Increase Wage and Salary & Personnel Exp. by entered percentage
[P_ACCT].[#CE0004020] = [P_ACCT].[CE0004020] * ( 1 + $WS_PERCT$ / 100)
Syntax error:Reference Error: $WS_PERCT$ is not defined
One of the how-to guides indicated that I should use the dollar sign before and after the variable name.
Can someone explain how to specify a variable name in the script.
Thanks.
Thanks, Pravin.
I tried using the syntax with the # sign (as shown below) but when I validate the code I get an error. The message indicates there is an issue with $WS_PERCT$.
Syntax error:Reference Error: $WS_PERCT$ is not defined
P_ACCT].[#CE0004020] = [P_ACCT].[CE0004020] * ( 1 + $WS_PERCT$ / 100)
Can you please advise if am missing something here in the code.
Edited by: Sanjay Kumar on Sep 24, 2009 10:06 PM
Edited by: Sanjay Kumar on Sep 24, 2009 10:08 PM
Similar Messages
-
Hi There,
Please can someone tell me how to specify a variable in the path prefix of an External HTTP (RFC) connection in transaction SM59?
For example if my path prefix is /invoke/test/example?input=XYZ; how do I replace "XYZ" with a variable so that I can pass in any value after "=" ?
Thanks,
BrendonHi,
This is SAP Business one system administration forum. Please find correct forum and repost above discussion to get quick assistance.
Please close this thread here with helpful answer.
Thanks & Regards,
Nagarajan -
How to pass the variable in the script logic from text prompt
hai,
in my logic i am using Textprompt and the prompt is
PROMPT(TEXT,%period%,"Enter a period Category",,"")
i have to append this period in middle of the one category
how can i do this
thanks,
RajeshHi,
Can you please explain with an example, about what you are trying to achieve. -
HOW TO CREATE A VARIABLE IN SAP SCRIPT
HI ALL,
CAN ANYONE TELL ME HOW TO CREATE A VARIABLE IN SAP SCRIPT.
THANK YOU,
BYE
TAKE CARE.Hi Ravi,
You can use like this
A text in the editor contains the following DEFINE commands:
/: DEFINE &mysymbol& = 'xxx xxx xxxxx xxxx'
&mysymbol&
/: DEFINE &mysymbol& = 'yyyyy yyy yyyy'
/ &mysymbol&
The printed text appears -
How to use bind variables in the following query
CREATE OR REPLACE PROCEDURE MMDB.test IS
sel_qtn VARCHAR2 (10);
CURSOR PT_QUANTITY IS select * from mmdb.product_tree WHERE QUANTITY_CHECK ='E'
AND run_id = 100
a PT_QUANTITY%ROWTYPE;
BEGIN
FOR i IN PT_QUANTITY
loop
sel_qtn := i.quanttity-1;
While sel_qtn>=1
loop
insert into mmdb.product_tree (BILLING_ACCOUNT_NO ,S_CODE) values (i.BILLING_ACCOUNT_NO ,i.S_CODE||'E');
sel_qtn :=sel_qtn -1;
End loop;
commit;
end;Don't duplicate threads: How to use bind variables in the following query
-
How to specify multiple listeners in the init/spfile
hi experts,
can u explain me How to specify multiple listeners in the init/spfile ?you do not specify linsteners in spfile.
The easiest way to configure more listeners is to use Net Configuration Assistant tool. -
How to reuse some components of the scripts layout to other programes
how to reuse some components of the scripts layout to other programes
You can't reuse components; the only solution would be to copy a script and to remove all components not needed.
Regards,
John. -
I am working with the evaluation version of labVIEW as well and I have run into another error. I am using a MATLAB script node within a for loop and attempting to pass the for loop counter variable into the script. When I run the code it brings up a 1047 error and says "LabVIEW failed to send variable to the script server. Server:"" ". I looked up the error online which seems to have roots in a failed auto initialization of MATLAB. Is there something that I can do in labVIEW to fix the problem or is it strictly a MATLAB error?
I really appreciate your help.I'm using Labview 8.6 and Matlab 7.9 2009b on windows 7 (64bit)
when I tried to open the Lorenz Diff Eq.vi....it woes not work and gives the error
Error 1047 occurred at LabVIEW: LabVIEW failed to send variable to the script server. Server:"" in MATLAB script node - Lorenz Diff Eq.vi
I think there is no inital communication for opening the MATLAB server
any can help?
A.Hakim -
How to calc accumulate rate in a script logic?
Hi experts,
We are trying to generate a monthly accumulate rate in a script logic. We have a Unit rate in 12 months and we want UnitAccum rate (like YTD) in the same 12 months
Finally, we need to use this new rate in a multiplication.
How can we do it with a script logic? Any idea out there?
Kind regards
Albert MasHi Ethan,
You are understanding ok
We are working on SAP BPC NW version 7.0, SP05, and at the moment, it's impossible to update to SP08.
We have done all the following tests, trying to find some solution, under these conditions (we knew that some tests weren't going to work well, but anyway, we had to try them):
- always for only one product (*XDIM_MEMBERSET PRODUCT=Product1)
- UNITS and UNITACCUM are ACCOUNT base members
- UCostVtaAcumDimFor is an ACCOUNT Formula Base Member ([ACCOUNT].[UNITS],[MEASURES].[FYTD])
- FYTD is a Measures base member for Fiscal Year To Date (we use it because we want to see as Year to Date (YTD) as Fiscal Year To Date (first month of the year is September and the last one is August) (it works well)) (We have also tested on YTD instead of FYTD, with the same results)
(1)
*XDIM_MEMBERSET TIEMPO=2010.FEB
[ACCOUNT].[#UNITACCUM] = ([ACCOUNT].[UNITS],[MEASURES].[FYTD])
*COMMIT
Result: MEASURES not specified. Failed
(2)
*XDIM_MEMBERSET TIEMPO=2010.FEB
*WHEN ACCOUNT
*IS UNITS
*REC(EXPRESSION=([ACCOUNT].[UNITS],[MEASURES].[FYTD]), ACCOUNT=UNITACCUM)
*ENDWHEN
*COMMIT
Result: MEASURES not specified. Failed
(3)
*XDIM_MEMBERSET TIEMPO=2010.FEB
*WHEN ACCOUNT
*IS UNITS
*REC(ACCOUNT=UNITACCUM,MEASURES=FYTD,FACTOR=1)
*ENDWHEN
*COMMIT
Result: Unknown Dimension Name in Keyword "MEASURES". Failed
(4)
*XDIM_MEMBERSET TIEMPO=2010.FEB
*WHEN ACCOUNT
*IS UNITS
*REC(ACCOUNT=UNITACCUM,TIEMPO=TIEMPO.NEXTMONTH,FACTOR=1)
*ENDWHEN
*COMMIT
Result: it takes too much time (more than five minutes) without ending the process --> We stop this test
(for 2010.FEB, TIEMPO.NEXTMONTH=2010.MAR)
(5)
*XDIM_MEMBERSET TIEMPO=2010.FEB
*WHEN ACCOUNT
*IS UNITS
*REC(ACCOUNT=UNITACCUM,TIEMPO=TIEMPO.PREVMONTH,FACTOR=1)
*ENDWHEN
*COMMIT
Result: it takes too much time (more than ten minutes) without ending the process --> We stop this test
(for 2010.FEB, TIEMPO.PREVMONTH=2010.JAN)
(6)
*XDIM_MEMBERSET TIEMPO=2010.FEB
*WHEN ACCOUNT
*IS UNITS
*REC(ACCOUNT=UNITACCUM,FACTOR=1)
*ENDWHEN
*COMMIT
Result: Cancelled
(7)
*XDIM_MEMBERSET TIEMPO=2010.FEB
[ACCOUNT].[#UNITACCUM] = [ACCOUNT].[UCostVtaAcumDimFor]
*COMMIT
(UCostVtaAcumDimFor is a Formula Base Member ([ACCOUNT].[UNITS],[MEASURES].[FYTD]))
Result: Cancelled
Some more ideas?
Thanks in advance,
Albert Mas -
How to pass a variable to the shell script and crontab?
Friends,
here is my script.....
exp userid=username/password@realdb file=/u02/logical_backup/abc_+$date+.dmp log=/u02/logical_backup/abc_+$date+.log owner=oraadmin statistics=none
i want the exported file name as abc_2101.dmp and abc_2101.log (2101 is a date and month)
I want to execute this script daily at 02:00 AM.
so that i edited the crontab -e as....
00 02 * * * ./u02/script/dailybkp.sh
Now what i want is....
1. is the steps are correct for crontab -e?
2. Is the script of the crontab will execute daily at 02:00 AM?
3. how can i rename the .log filename and .dmp file name daily according to the date. for example abc_2001 is today's date and month.how can i replace with the variable.
thanks
sathyguysorry....i tested with cp command it was working fine...
so, i thought it should work for exp command also.
but its not working....also its not throwing any error....
the crontab -e is having...
00 02 * * * exp userid=system/password@realdb file=/u02/test/n22.dmp log=/u02/test/n22.log owner=scott statistics=none
also i have tested by calling the script.
#!/bin/bash
00 02 * * * /u03/script/testbkp.sh
its not working
but the below one is working....
00 02 * * * cp /u02/test.txt /u02/test/test.txt
also this one is working....
#!/bin/bash
00 02 * * * /u03/script/testbkp.sh
i listed the chkconfig --list crond
crond 0,1,6 = off
2,3,4,5 are on
what might be the reason?
thanks
sathyguy -
How does a global variable affect the runtime of optimisation-function fminsearch?
Hi,
my function "fmintest" needs 254s ~ 4min to finish calculation in Mathscript, while Matlab needs
3s!!! I need the sorfware for data processing in a real time measuring system, where the calculation have to be done within 5 seconds.
In the Mathscript-help I found the following (global -> details):
If you call this function from a MathScript Node, LabVIEW operates with slower
run-time performance for the MathScript Node. To optimize the performance of the
MathScript Node, remove this function from scripts.
How can I remove needed global variables in the fminsearch function handle? Is the system faster if I would/can remove the global variables?
How can I avoid Mathscript-breakdown after saving changes to m-files and restarting them again?
regards
Attachments:
ni3.7z 2 KBHi,
can you provid a VI and not only your m-files? It will be easier to help you!
Can the customer provide a VI that demonstrates this behavior, rather than just providing the m files?
Also, the Help file says fminsearch is not supported by the
LabVIEW Run Time engine, so please take that in mind. If you want to build an application you cant use this function.
Regards, RMathews -
How doi print Any variable at the end of page in ALV report?
Hi,
Anyone can tell me that How do i print Any variable at the end of page in ALV report?
Exmale: at the ende of alv report i want to print total no of employee who has taken house loan or education loan.Hi,
Go through these links
Thread in sdn regarding FOOTER IN ALV
[ALV FOOTER;
Wiki in sdn regarding HEADER AND FOOTER IN ALV
[https://wiki.sdn.sap.com/wiki/display/Snippets/ABAP%20Objects%20-%20ALV%20Model%20-%20Using%20Header%20and%20Footer]
Header and Footer in ALV
[http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm]
Hope this helps.
Thank you,
Pavan. -
How to specify logfile size at the time of adding to a member.
Hi All,
I am in the process of upgrading Oracle 9.0 to 10.1.
I am following manual upgrad process.As per the recomendation from the pre-upgrade information script,i need to recreate redo-log files.
Logfiles: [make adjustments in the current environment]
--> E:\ORACLE\ORADATA\PRODB229\REDO03.LOG
.... status="INACTIVE", group#="1"
.... current size="1024" KB
.... suggested new size="10" MB
--> E:\ORACLE\ORADATA\PRODB229\REDO02.LOG
.... status="INACTIVE", group#="2"
.... current size="1024" KB
.... suggested new size="10" MB
--> E:\ORACLE\ORADATA\PRODB229\REDO01.LOG
.... status="CURRENT", group#="3"
.... current size="1024" KB
.... suggested new size="10" MB
WARNING: one or more log files is less than 4MB.
Create additional log files larger than 4MB, drop the smaller ones and then
upgrade.i can add redo member by the below command,but not able to specicy the size as 10M.I did some googling but no luck with that..
SQL> ALTER DATABASE ADD LOGFILE MEMBER 'E:\oracle\oradata\prodb229\REDO01.rdo' T
O GROUP 1;
but it fails
ALTER DATABASE ADD LOGFILE MEMBER 'E:\oracle\oradata\prodb229\REDO01.rdo' TO GROUP 2 SIZE 10M;
ERROR at line 1:
ORA-00933: SQL command not properly ended
~ThnxIf you add a logfile to an existing group, you cannot specify the size for that file.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_1004.htm#i2079942
<quote>
ADD [STANDBY] LOGFILE MEMBER Clause Use the ADD LOGFILE MEMBER clause to add new members to existing redo log file groups. Each new member is specified by 'filename'. If the file already exists, it must be the same size as the other group members, and you must specify REUSE. If the file does not exist, Oracle Database creates a file of the correct size. You cannot add a member to a group if all of the members of the group have been lost through media failure.
<quote> -
How can use a variable in the folowing code?
How can use a variable 'W_ROWNUM2' in the folowing code?
MOVE '1' TO CNT.
LOOP AT L_T_PM2.
CONCATENATE '0' CNT INTO W_ROWNUM2.CONDENSE W_ROWNUM2.
CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
perform DYNPRO_FIELD using FLD2
L_T_PM2-vari12_con.
CNT = CNT + 1.
CONDENSE CNT.
ENDLOOP.
I need to increment the value of W_ROWNUM2.
Please ,it is urgent!!Hello
CONCATENATE 'F110V-VARI'W_ROWNUM2'(01)' INTO FLD2.
Try using spaces between parts of the resulting string.
CONCATENATE 'F110V-VARI' W_ROWNUM2 '(01)' INTO FLD2
Regards
Greg Kern. -
How not to see password in the script?
Hi all,
11.2.0.1
Aix 6.1 5L
I have a script expdp01.sh
Which contains:
expdp system/$1 schemas=HR
Then I can run the script at $ expdp01.sh hrpass
This is done so that the password will not be hard-coded in the script. Is this a good idea?
Is there a way to hide the input parameter?
Thanks a lot,
zxyyxes2013 wrote:
Hi all,
11.2.0.1
Aix 6.1 5L
I have a script expdp01.sh
Which contains:
expdp system/$1 schemas=HR
Then I can run the script at $ expdp01.sh hrpass
This is done so that the password will not be hard-coded in the script. Is this a good idea?
Is there a way to hide the input parameter?
Thanks a lot,
zxy
How is this question different from the one you asked two weeks ago? ==> How not to see database password?
Maybe you are looking for
-
Issues regarding huge pdf files.
I have a problem. After i export to pdf my indesign file and try to open it it says: "There was an error opening this document. The root object is missing or invalid." and it does this only if the pdf has more than 1GB. The export is made uncompresse
-
Converting sql timestamp into a usable java format??
hi there. does anyone know how to convert an sql timestamp into a usable java format? i have retrieved a timestamp from a mysql table in a jsp script and would like to convert it into the following format: 12:42pm | 08.07.02 as i understand it, i'll
-
How can you find patches for a specific product?
Unless you have a patch number, it is a pain to try and find the latest patch for a particular product. In fact, it is a pain to find a product unless you have the name:)) 1. If you do not have the product name, but know the function/purpose, what is
-
IPhoto v7.1 - Maximum number of images export to Web Gallery
Maximum number of images that can be exported to Web Gallery??
-
Start managed server cause acl.NotOwnerException
After domain admin server started, starting a managed server causes acl.NotOwnerException. The username and password for the managed server are set identical to that of the Admin server. WLS version 6.0sp2 platform NT4.0