String lenght
Hello everyone
In my script by using "get digit string" menu i get customers unique number but i want that to be at least 5 character long.For example i do not want him to enter "123" he must enter at least 5 digits.when he enters least then 5 digits i want to play a warning prompt and turn back.I will use "if" menu i think.How can i do that ?
Thank you...
The get digit string step has a maximum length value which you would set to 5, and yes that is documented.
However, what it lacks is a minimum value to set. Anything less than the maximum, and without a terminating key (i.e., #), would fall to the Timeout branch. In the timeout branch you would check the resulting input's length.
CED = Get Digit String(--Trggering Contact--, p[please_enter_account_number]) Successful ... Timeout if (CED.length() > 0) True Play Prompt(--Triggering Contact--, p[too_few_digits]) ... False Play Prompt(--Triggering Contact--, p[no_input_detected]) ... Failure ...
Similar Messages
-
String lenght of a multy-byte string
Hi Friends,
I am working with multy-byte(Korea) Strings. What I am doing is I am looking for the presence of an english substring in a multybyte string, find out the position of this substring using java indexof ()method.I am facing a problem here. For the purpose of comparing I am doing a toUppercase() of the multybyte string . I have noticed that this toUppercase() changes the string length and the position of the substring identified by the indexof() method becomes wrong. I could not find out a way to apply indexof() method in an "ignore-case" mode. Is there any java methods to resolve this. Please tell me a way out of this .
This is a bit urgent. Thanks in advance!!!Well, I'm not sure what doing toUpperCase does to non-ASCII characters. If you want to know if it's
English characters, you should probably do something else...
java.lang.Character
public static char toUpperCase(char ch) {
char mapChar = ch;
int val = A[Y[((X[ch>>5]&0xFF)<<4)|((ch>>1)&0xF)]|(ch&0x1)];
if ((val & 0x00010000) != 0) {
if ((val & 0x07FC0000) == 0x07FC0000) {
switch(ch) {
// map chars with overflow offsets
case '\u00B5' : mapChar = '\u039C'; break;
case '\u017F' : mapChar = '\u0053'; break;
case '\u1FBE' : mapChar = '\u0399'; break;
// map char that have both a 1:1 and 1:M map
case '\u1F80' : mapChar = '\u1F88'; break;
case '\u1F81' : mapChar = '\u1F89'; break;
case '\u1F82' : mapChar = '\u1F8A'; break;
case '\u1F83' : mapChar = '\u1F8B'; break;
case '\u1F84' : mapChar = '\u1F8C'; break;
case '\u1F85' : mapChar = '\u1F8D'; break;
case '\u1F86' : mapChar = '\u1F8E'; break;
case '\u1F87' : mapChar = '\u1F8F'; break;
case '\u1F90' : mapChar = '\u1F98'; break;
case '\u1F91' : mapChar = '\u1F99'; break;
case '\u1F92' : mapChar = '\u1F9A'; break;
case '\u1F93' : mapChar = '\u1F9B'; break;
case '\u1F94' : mapChar = '\u1F9C'; break;
case '\u1F95' : mapChar = '\u1F9D'; break;
case '\u1F96' : mapChar = '\u1F9E'; break;
case '\u1F97' : mapChar = '\u1F9F'; break;
case '\u1FA0' : mapChar = '\u1FA8'; break;
case '\u1FA1' : mapChar = '\u1FA9'; break;
case '\u1FA2' : mapChar = '\u1FAA'; break;
case '\u1FA3' : mapChar = '\u1FAB'; break;
case '\u1FA4' : mapChar = '\u1FAC'; break;
case '\u1FA5' : mapChar = '\u1FAD'; break;
case '\u1FA6' : mapChar = '\u1FAE'; break;
case '\u1FA7' : mapChar = '\u1FAF'; break;
case '\u1FB3' : mapChar = '\u1FBC'; break;
case '\u1FC3' : mapChar = '\u1FCC'; break;
case '\u1FF3' : mapChar = '\u1FFC'; break;
// ch must have a 1:M case mapping, but we
// can't handle it here. Return ch.
// since mapChar is already set, no need
// to redo it here.
//default : mapChar = ch;
else {
int offset = val << 5 >> (5+18);
mapChar = (char)(ch - offset);
return mapChar;
} -
How to calculate the length of a string
Hi everyone,
A simple question. How to calculate the length of a string?
Thanks!Hi Wuyia Nata,
As everyone has suggested you search the forum before posting a question, i guess for basic questions u never have to post a question, you will get the answer in your search. Anyways see the code below for string lenght.
Data:
w_string type string,
w_lenght type i.
w_string = 'vhdskbvsdkbvdsvnsknvs'.
w_lenght = strlen( w_string ).
Write:
w_lenght.
With luck,
Pritam. -
I just want to know if anyone knows the code so I can select the first character in a string and the last character in the string so that I can do the following function :
First("ABC") ^ Last("ABC") = Answer
Tks for any helpYou can use the charAt() method of the String class to help you find out the values. To find the first character use charAt(0) and to find the last character you can use charAt(String.lenght() - 1).
Example:
String word = "ABC";
char firstLetter = word.charAt(0);
char lastLetter = word.charAt(word.length() - 1);
I hope this helps. -
Hi
I am reading a string from an instrument in the format hr:min:sec, 0.000, 0.000, 0.000,0.000
I need to separate each part and add it to an excel file. I have triend scan from string and
string subset. I am unable to use scan from string as the first output is in different format than the others.
I cannot use string subset as the value changes to a negitive value sometimes which makes it difficult to get the right string lenght.
Can someone help me in figuring out the best way to split the string and add to an excel file
Thank you in advance
Raghu
Attachments:
pressure sensor.vi 27 KBHere is the screen shot after I ran the vi. Along with copying the data to an excel sheet I need the individual data to use in my program later.That is the reason I wanted to parse the string.
Thanks,
Raghu
Attachments:
string.JPG 153 KB -
How to take last 5 char from a string
Hi All
I have a requirement,
base on some comp i have to populate another field.
in this case i have compare last 3 char of a string
example if total string say asasdffrx i have to take last three char here it is frx.
always i have to last 3 char.
i can use +6(3) but it wont work every time because string lenght is not fix for all vaue.
thanksHi,
A.H.P sample is ok but insert additional check for strigs shorter than 3 (to avoid negative offset):
data : n TYPE I.
n = STRLEN( zfield ) - 3.
if n >= 0.
result = zfield+n(3).
else.
result = zfield.
endif.
Krzys -
Is Java String stored in Unicode??
I have a few questions regarding String in Unnicode:
1) Is really all internal representation of String is in Unicode?
2) If so, why do we need the Collator class? As refer to the javadoc "The Collator class performs locale-sensitive String comparison". If all String are stored in Unicode, why do we require this classs to do the comparison. should it be as simple as comparing with the ASCII value? Because every char should be assigned a unique 16 bit number, therefore it should be trival to do this.
3) Also, I do not understand why the String.charAt(), String.lenght() will return wrongly in Internationalization programing, as each of the char in String are 16 bits unicode.
I am new to the Internationalization and please correct me if any of my understand is wrong.1) Is really all internal representation of String is
in Unicode?Yes.
2) If so, why do we need the Collator class? As refer
to the javadoc "The Collator class performs
locale-sensitive String comparison". If all String are
stored in Unicode, why do we require this classs to do
the comparison. should it be as simple as comparing
with the ASCII value? Because every char should be
assigned a unique 16 bit number, therefore it should
be trival to do this.The order of the characters in the Unicode is not always the same as the order of the characters in a particular language's alphabet. For example in Lithuanian the letter y comes near the beginning of the alphabet, close to i and j. And in French it's normal to put e and é together in alphabetical lists, whereas they are not adjacent in Unicode.
3) Also, I do not understand why the String.charAt(),
String.lenght() will return wrongly in
Internationalization programing, as each of the char
in String are 16 bits unicode. They do? Who says so? -
hello
in order to input the string array to table, let say two string
array A and B, these 2 arrays will fill in the row of the table
with conditional case, if element of array A is larger than B, then A
should be filled in the row of table and vice versa. what my question
is that should i use build array to build array A and array B?i tried.
but it got 2 one row is alternate blank between row of table. what i
desire is that it choose only the either correct string A or string B
into the row of table. is it possible?pls brief me how am i going to do
it. it is simple i think.but i just cant do it.
thanks
regardsYour description is quite confusing. Since you have two array of strings, what do you mean by "larger"? There are many possibilities, e.g.:
Translate string to a number and compare their value.
Check the string lenght and take the longer string.
Compare the strings and pick the one that would sort higher alphabetically.
Still the code will be similar in all cases. Feed both arrays to a FOR loop, compare elements pairwise however you choose, and select the winner. Form a new 1D array in an outoindexing output tunnel. Create a table from the resulting array.
I assume both input arrays have the same number of elements. If not, you need to decide what to do with the surplus elements and adjust the code accordingly.
Message Edited by altenbach on 01-27-2007 10:02 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
ArrayBlend.png 12 KB -
Fetching SSIS error message into Audit table using SP
Hi Experts,
I want to fetch SSIS Error Info along with Task Name into Audit table 'Error_Info' column. This is nvarchar(max) datatype, i wrote below Stored Procedure for this (Column names passing dynamically in SP)
CREATE PROC [dbo].[usp_AuditErrorHandler]
@AuditTableName nvarchar(MAX)
,@Audit_Status nvarchar(100)
,@Audit_ErrorDescription sql_variant
,@Audit_PkgEnd_dttm nvarchar(100)
,@task sql_variant
,@errordescription sql_variant
,@Audit_ID nvarchar(10)
,@LogID INT
AS
BEGIN
DECLARE @STRQuery NVARCHAR(MAX)
SET @STRQuery = '
UPDATE '+@AuditTableName+'
SET '+@Audit_Status+' = ''Failed''
,'+@Audit_PkgEnd_dttm+' = GETDATE()
,'+@Audit_ErrorDescription+' = ''Task['+ @task +']:'+@errordescription +'''
WHERE ' +@Audit_ID+ ' = ' + CAST(@LogID AS NVARCHAR)
The above procedure is working fine in SSMS and inserting complete error info into table, but when i am executing thru SSIS Pkg i am getting error like
"[Execute SQL Task] Error: Executing the query "exec usp_AuditErrorHandler ?,?,?,?,?,?,?,?" failed with the following error: "Incorrect syntax near '@P1'.". Possible failure reasons: Problems with the query, "ResultSet"
property not set correctly, parameters not set correctly, or connection not established correctly."
So, i tot of checking with string lenght and modifed the code by adding left () to @errordescription as below.
UPDATE '+@AuditTableName+'
SET '+@Audit_Status+' = ''Failed''
,'+@Audit_PkgEnd_dttm+' = GETDATE()
,'+@Audit_ErrorDescription+' = ''Task['+ @task +']:'+LEFT(@errordescription ,100)+'''
WHERE ' +@Audit_ID+ ' = ' + CAST(@LogID AS NVARCHAR)
Here, it is inserting till 119 chars, if i give more than 119 chars pkg is failing with above error.
I want to get insert Complete error info into the column.
Can anybody suggest on this??
Thanks in advance !!!Thanks Arthur for the response, i have tried with the Sql_Variant data type also, here procedure itself not creating and throwing below error.
"The data types nvarchar(max) and sql_variant are incompatible in the add operator."
This is the procedure i am using to fetch error info into Audit table.
ALTER PROC [dbo].[usp_AuditErrorHandler]
@AuditTableName nvarchar(MAX)
,@Audit_Status nvarchar(100)
,@Audit_PkgEnd_dttm nvarchar(100)
,@Audit_Task_ErrorCode nvarchar(100)
,@Audit_ErrorDescription SQL_VARIANT
,@errorcode nvarchar(max)
,@task SQL_VARIANT
,@errordescription SQL_VARIANT
,@Audit_ID nvarchar(10)
,@LogID INT
AS
BEGIN
SET NOCOUNT ON;
DECLARE @STRQuery SQL_VARIANT
BEGIN TRY
SET @STRQuery = '
UPDATE '+@AuditTableName+'
SET '+@Audit_Status+' = ''Failed''
,'+@Audit_PkgEnd_dttm+' = GETDATE()
,'+@Audit_Task_ErrorCode+' = '''+@errorcode+'''
,'+@Audit_ErrorDescription+' = ''Task['+ @task +']:'+ @errordescription +'''
(Error is giving in this line)
WHERE ' +@Audit_ID+ ' = ' + CAST(@LogID AS NVARCHAR)
EXEC (@STRQuery)
END TRY
Below is the Audit Table Schema -
Source is Oralce. Destination is SQL Server.
Requirement - I have to fetch sql server server data (empid's) based emp table and send this as input data to oracle to fetch and empid's are common.
I cannot use merge or loopkup or for each as oracle have too many records.
For example - In MS SQL - i have empid=1,2..Only these records, I have to fetch from oracle source into sql server destination. For this, I have adopted the below approaches...The major problem I face, when i build a empid's as a string, it is taking only
4000 chars. My string lenght is 10000. How do I breakup this string lengh and send to data flow task till all broken strings length passed to DFT.
Approach-1
created two variables - oraquery string, empid string
step1 - ms sql database - created sql task - declare @empid varchar(max)
SELECT @empid=
Stuff((SELECT ',' + empid
FROM
(SELECT DISTINCT convert(varchar(10),empid ) empid FROM emp
) x
For XML PATH ('')),1,1,'')
select @empid = '(' + @empid + ')'
select @empid
resultset=singlerow
resultset=resultname=0; variablename=User::empid (empid is declared as string)
step2 - oracle database - created data flow task
created oledb source
I put this statemnt in oraquery expression - "select * from dept where dept in "
+ @[User::empid] + "
expression=true
[OLE DB Source [1]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for Oracle" Hresult: 0x80040E14 Description: "ORA-00936: missing expression".
Approach-2
created three variables - oraquery string, empid int, loop object--when I put int then it is automatically setting to 0
step1 - ms sql database - created sql task - SELECT DISTINCT convert(varchar(10),empid ) empid FROM emp
resultset=fullresult
resultset=resultname=0; variablename=User::loop
step2 - created a for each loop container
for loop editor - for each ado ennumerator
enumerator configuration - loop
variablemapping - variable=empid;index=0
step3 - oracle database - created data flow task (outside for each loop. If I put inside it is taking long time)
created oledb source
I put this statemnt in oraquery expression - "select * from dept where dept in "
+ @[User::empid] + "
expression=true
Data inserting in a destination table but empid=0.Sorry didnt understand if your step3 is outside loop how
@[User::empid] will get values for the empids from User::loop. The iteration happens inside loop so you
need to have a logic to form the delimited list inside using a script task or something and concatenating everything and storing to variable @[User::empid]
. Then only it will have full value used to be used in step3 query
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Writing BLOB column from Cobol
Hi,
I´m using the Pro*Cobol pre-compile to execute SQL statements into programs Cobol Net Express.
I need two helps.
1 - How can do to the Pro*Cobol cut the blanks on the right into PIC X Varying hosts variables ?
For example :
..... LastName VARCHAR(20)
..... 05 LASTNAME PIC X(20) VARYING.
The Pro*Cobol documentation say that precompile transform the elementary item LASTNAME to the group item bellow :
05 LASTNAME.
10 LASTNAME-LEN PIC S9(04) COMP.
10 LASTNAME-ARR PIC X(20).
When a string less than 20 is moved to LASTNAME-ARR, the exact string lenght is moved to the LASTNAME-LEN and the string is writen
into DB without blanks on right.
When a string is red from DB, the precompile write into LASTNAME-LEN the exact string lenght and the LASTNAME-ARR receive the
string value without blanks on write.
Occurs that when I compile the program the Pro*Cobol/Micro Focus don´t recognize LASTNAME-LEN and LASTNAME-ARR.
Am I correct ? May I use any directive that resolve that ?
2 - I need to check these step-by-step to write a text file generated from cobol into a BLOB column.
The LOAD FROM FILE statement receive SQLCODE -22275 : Invalid LOB locator specified.
Assumptions :
MAG-RELAT-BFILE SQL-BFILE.
MAG-RELAT-BLOB SQL-BLOB.
The fiel R1401 exists in D:\Petros\NE\
Source Code :
MOVE 'D:\Petros\NE\' TO ALIAS
MOVE 13 TO ALIAS-L
MOVE 5 TO FILENAME-L
MOVE 'R1401' TO FILENAME
EXEC SQL
ALLOCATE :IMAG-RELAT-BFILE
END-EXEC.
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO ALLOCATE' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BFILE' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
EXEC SQL
LOB FILE SET :IMAG-RELAT-BFILE
DIRECTORY = :ALIAS,
FILENAME = :FILENAME
END-EXEC.
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO LOB FILE SET' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BFILE' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
EXEC SQL
ALLOCATE :IMAG-RELAT-BLOB
END-EXEC
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO ALLOCATE' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BLOB' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
EXEC SQL
LOB LOAD :TOTAL-BYTES
FROM FILE :IMAG-RELAT-BFILE
INTO :IMAG-RELAT-BLOB
END-EXEC.
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO LOAD FFOM FILE' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BFILE, IMAG-RELAT-BLOB' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
Thanks,907466 wrote:
Hi,
I´m using the Pro*Cobol pre-compile to execute SQL statements into programs Cobol Net Express.
I started my career as a cobol programmer in 1981, and the last project I worked on before transitioning to DBA was implementing MF Cobol. It's been a number of years but ...
I need two helps.
1 - How can do to the Pro*Cobol cut the blanks on the right into PIC X Varying hosts variables ?
For example :
..... LastName VARCHAR(20)
..... 05 LASTNAME PIC X(20) VARYING.
The Pro*Cobol documentation say that precompile transform the elementary item LASTNAME to the group item bellow :
05 LASTNAME.
10 LASTNAME-LEN PIC S9(04) COMP.
10 LASTNAME-ARR PIC X(20).
When a string less than 20 is moved to LASTNAME-ARR, the exact string lenght is moved to the LASTNAME-LEN and the string is writen
into DB without blanks on right.
When a string is red from DB, the precompile write into LASTNAME-LEN the exact string lenght and the LASTNAME-ARR receive the
string value without blanks on write.
Occurs that when I compile the program the Pro*Cobol/Micro Focus don´t recognize LASTNAME-LEN and LASTNAME-ARR.
Am I correct ? May I use any directive that resolve that ?
I don't know if you are correct or not. Is the pre-compiler or compiler step throwing an error message? If you are correct, there should be an error message that you should share with us.
2 - I need to check these step-by-step to write a text file generated from cobol into a BLOB column.
The LOAD FROM FILE statement receive SQLCODE -22275 : Invalid LOB locator specified.
Assumptions :
MAG-RELAT-BFILE SQL-BFILE.
MAG-RELAT-BLOB SQL-BLOB.
The fiel R1401 exists in D:\Petros\NE\
Source Code :
MOVE 'D:\Petros\NE\' TO ALIAS
MOVE 13 TO ALIAS-L
MOVE 5 TO FILENAME-L
MOVE 'R1401' TO FILENAME
EXEC SQL
ALLOCATE :IMAG-RELAT-BFILE
END-EXEC.
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO ALLOCATE' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BFILE' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
EXEC SQL
LOB FILE SET :IMAG-RELAT-BFILE
DIRECTORY = :ALIAS,
FILENAME = :FILENAME
END-EXEC.
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO LOB FILE SET' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BFILE' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
EXEC SQL
ALLOCATE :IMAG-RELAT-BLOB
END-EXEC
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO ALLOCATE' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BLOB' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
EXEC SQL
LOB LOAD :TOTAL-BYTES
FROM FILE :IMAG-RELAT-BFILE
INTO :IMAG-RELAT-BLOB
END-EXEC.
IF SQLCODE NOT EQUAL +0
MOVE 'ERRO COMANDO LOAD FFOM FILE' TO WW-CA-MENSAGEM
MOVE 'IMAG-RELAT-BFILE, IMAG-RELAT-BLOB' TO WW-CA-ARQUIVO
MOVE SQLCODE TO WW-ST-ARQUIVO
MOVE 08 TO RETURNO-CODE
PERFORM 999-TRATA-ERRO THRU 999-FIM
END-IF.
Thanks,So far you haven't shown us any symptoms, errors, etc. Just a description of what you are doing and a statement that you assume it won't work. Your executable code has a lot of reference to host variables that we can only assume a spelled correctly to match to variables you've declared in your data division. Are you going straight from submitting precompile to run-time, or are you using the very excellent interactive source-level debugger that is a prime feature of MF Cobol? -
Hi well i will have to transform data via FCC. The recieving data e.g. DT_Test has an element with occurence 0..1. because of '0' there is the possibilty that this element will be left blank, so nothing will be transferred.
in FCC on receiver side i have to give the parameter '.fieldFixedLengths' and i am not able to say XI: " Well if the field is blank, don't use the value given in fieldFixedLengths!
br JensHi Jens,
you can solve that as well with XSLT and an if-condition on string lenght of source field:
<xsl:if test="//string-length(//myField) != 0"><fieldFixedLengths...
Regards,
Udo -
Hi All,
In partner profile, i have set XML port for outbound IDOC. IDOC in XML format is generated successfully on App. server.
when I view this file using AL11 I see its shows only the control records not the data records.
I also see one xml tag <SERIAL>20110831085519</SERIAL>.
Is this id contains the data ?
How to view contents of this Id ?
Thanks
JitendraHi Michael,
i suppose you r using a message mapping?
And u have a problem if the source field is empty?
Use function "exist" to ask if field exist and may be ask for the string lenght > 0. Only in that case (function if) map the field. Or use a XSLT mapping.
Regards,
Udo -
BPEL Assign Activity XPath failure
Hi,
My BPEL process fails during the Assign activity and it is failing because the Query expression does not find the 'from' element. Which makes sense because for one my test cases I am not including a value for that element in the XML instance. My question - How do I handle this situation such that when the 'from' element is either missing or has no value then nothing gets assigned to the target variable?
******* Error Message from BPEL PM Assign audit *****************
[2009/05/14 21:37:45] Error in evaluate <from> expression at line "127". The result is empty for the XPath expression : "/ns2:CRMODAccounts/ns2:CRMODContactID".less
oracle.xml.parser.v2.XMLElement@1a1d727
[2009/05/14 21:37:45] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.less
- <selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
- <part name="summary">
<summary>
empty variable/expression result.
xpath variable/expression expression "/ns2:CRMODAccounts/ns2:CRMODContactID" is empty at line 127, when attempting reading/copying it.
Please make sure the variable/expression result "/ns2:CRMODAccounts/ns2:CRMODContactID" is not empty.
Possible reasons behind this problems are: some xml elements/attributes are optional or the xml data is invalid according to XML Schema.
To verify whether XML data received by a process is valid, user can turn on validateXML switch at the domain administration page.
</summary>
</part>
</selectionFailure>
*********************** section from bpel source for the assign function ****************
<assign name="assignEBSAccountDetails">
<copy>
<from variable="inputVariable" part="payload"
query="/ns2:CRMODAccounts/ns2:CRMODAccountID"/>
<to variable="invokeEBSAccountDetails_GetEBSAccountDetailsPL_InputVariable"
part="InputParameters"
query="/ns3:InputParameters/ns3:P_CRMOD_ACCOUNT_ID"/>
</copy>
(versions) BPEL PM 10.1.3.4.0 JDev 10.1.3.4
thanks,
ilyasUse a switch, e.g. if string-lenght(/ns2:CRMODAccounts/ns2:CRMODContactID) > 0
or you can do a transform and put an if condition for the mapping using the same code.
cheers
James -
Seperating numbers according to digits
Hello All,
I have a long report and it includes a lot of numbers.
I am asked to change number format.
In my report, i see the numbers like this : 12345678
What i am asked is to make numbers like this : 12.345.678
I know i can do this by finding string lenght, reducing 3 and putting dots between.
But i wonder if there is a simple way or a function for this?
Thanks..Hi,
Check the following program:
parameter:p_intval like WMTO_S-AMOUNT. "Internal Amount
data: gd_disval like WMTO_S-AMOUNT. "Display Amount
data: p_discur like TCURC-WAERS.
*Start-of-selection.
START-OF-SELECTION.
p_discur = 'INR'.
CALL FUNCTION 'CURRENCY_AMOUNT_SAP_TO_DISPLAY'
EXPORTING
currency = p_discur
amount_internal = p_intval
IMPORTING
AMOUNT_DISPLAY = gd_disval
EXCEPTIONS
INTERNAL_ERROR = 1
OTHERS = 2.
*End-of-selection.
END-OF-SELECTION.
write: 30 'number is displayed:', gd_disval decimals 0.
Regards,
Bhaskar
Maybe you are looking for
-
How do I set calendar to always start in Month view?
My Ipod Touch calendar always seems to revert to Day view, even when I go into Month view and then turn it off. Next time I open it, it's back in Day view. I prefer to have it open in Month view, and I can't see any option or setting that would do th
-
How to make shiny effects on cloth in illustrator?
Hi there, # The exact version of Illustrator you are running. Illustrator cs3 # Your Operating System details. Windows XP # Amount of installed RAM. 2 GB ram # Amount of free disk space. ~360 GB # Make/Model of Video Card. NVidia Ge Force 7600 GS I m
-
[SOLVED] Gnome panel goes bonkers (no apps listed)!
Don't know how this happened, but I now have no apps listed under 'Applications' in 2.20. I can start them from the CLI or from customised launchers - but there's nothing in the menu! Does anyone know a command to repopulate menu lists? Many thanks L
-
Revision: 7671 Author: [email protected] Date: 2009-06-09 07:31:19 -0700 (Tue, 09 Jun 2009) Log Message: The SWF metadata tag has optional attributes widthPercent and heightPercent. The expected format is "[ws]double%[ws]". For example, [SWF (
-
This is getting old. When will Apple fix this issue?