SPLIT function
Hello, i need separate a string, example, 1,95,02,55, by ',' into a internal table. if i use "SPLIT p_frase AT ',' INTO TABLE t_frase" but it create a registry for string. Is it posible in only one registry?
Excuse for my bad english.
Thanks.
You may want to try something like this.
report zrich_0001.
data: str type string.
data: istr type table of str with header line.
data: begin of xstructure,
field1(10) type c,
field2(10) type c,
field3(10) type c,
field4(10) type c,
end of xstructure.
field-symbols: <fs>.
str = '12,345,678,901'.
split str at ',' into table istr.
do.
read table istr index sy-index.
if sy-subrc <> 0.
exit.
endif.
assign component sy-index of structure xstructure to <fs>.
<fs> = istr.
enddo.
write:/ xstructure-field1,
xstructure-field2,
xstructure-field3,
xstructure-field4.
Regards,
Rich Heilman
Similar Messages
-
Order split functionality with PP-PI
Hello Forum,
I am not sure whether we can use the order split functionality with process orders . I had implemented it earlier for a client with discrete MFG production type but not aware whether we can do so in process industry (couldn't find the provision to do so in process order operation overview screen function menu path).
Cheers
KaushikHi Kaushik,
Yes your right.
Order split functionality is only applicable for Discrete manfg not for PI industry this is major difference between PI & DM.But you can achieve this at the time of process order confirmation.
Example :-In the Goods Movement Overview of Process Order confirmation FG material is done Auto GR. This FG material Quantity needs to be splitted. Push button "Split" is provided in the bottom of the Goods Movement Overview screen of Process Order Confirmaton.
Say FG quantity = 25 KG which is to be confirmed. Client wants to split the FG quantity into 1 KG wise, for this he needs to split into 25 times.
You can implement this by using below work order
Please use the WORKORDER_GOODSMVT for splitting the GR in Confirmation
This u can implement in PI.Also check Mr.Paulo reply that could be one possibility.
check & revert.
TnX -
Problem in using Split function
Hello,
I have a problem using the Split function and I can't find any solution in internet.
I'm trying to make a list of int but it seems that the Split function doesn't work.
Can you help me please ?
Here is my code :
public class Dessin
List<Forme> dessin = new List<Forme>();
public void Ajouter(Forme forme)
dessin.Add(forme);
public void Lecture()
StreamReader monStreamReader = new StreamReader("ExempleTout.csv");
int ligne = int.Parse(monStreamReader.ReadLine());
while (ligne != null)
int[] temp = ligne.Split(';'); // Error : 'int' doesn't contain a definition for 'Split'
if (temp[0].Equals("Cercle"))
Cercle cercle1 = new Cercle(temp[1], temp[2], temp[3], temp[4], temp[5], temp[6], temp[7], temp[8]);
ligne = int.Parse(monStreamReader.ReadLine());
foreach (Cercle c in dessin)
Console.WriteLine(c.ToString());
Console.ReadKey();
Console.ReadKey();
monStreamReader.Close();
Best regards,Split is a method of string, not int. You are looking for strings anyway, I don't know why you'd parse to an int to begin with. Try this:
string ligne = monStreamReader.ReadLine();
while (ligne != null)
string[] temp = ligne.Split(';');
if (temp[0].Equals("Cercle"))
Cercle cercle1 = new Cercle(int.Parse(temp[1]), int.Parse(temp[2]), int.Parse(temp[3]), int.Parse(temp[4]), int.Parse(temp[5]), int.Parse(temp[6]), int.Parse(temp[7]), int.Parse(temp[8]));
ligne = monStreamReader.ReadLine();
~~Bonnie DeWitt [C# MVP]
http://geek-goddess-bonnie.blogspot.com -
Can I use split function in PLD?
Dear Experts,
Can anyone show me if I have this value in a variable F_001 in PLD.
012345-FAB
How can I get the below output? (Taking off the -FAB, by either using a split() function or equivalent)
012345
Much Thanks!
ChinhoHi Chinho,
ok, for example, IF you use add the last 4 Character only in CardCode(-FAB)
F_001 -> CardCode = 012345-FAB
or
F_001 -> CardCode = 1000123456-FAB
or
F_001 -> CardCode = 987456814-ADM
but you need to print the Value of CardCode is before last 4 Character Value .
Output: 012345 or 1000123456 or 987456814
Try this formula in PLD.
Substring(F_001,0,(Length(F_001)-4))
Regards,
Madhan. -
Split Function in Java 1.4
Hi,
I tried the new split function in the Java 1.4 and it works except with some characters like '|' and '[' .
Please review the code below let me now the suggestions.
/***********Program******************/
class SplitCheck
public static void main(String args[])
String aSplit[];
aSplit="ABC|1|a".split("|");
for (int i=0;i<aSplit.length;i++)
System.out.println("String=" + aSplit);
/***********Program******************/
The out program is expected to be like this.
String=ABC
String=1
String=a
But I got it as
String=
String=A
String=B
String=C
String=|
String=1
String=|
String=a
Is there any exception in using the split function.
Waiting for your reply,
ShamI think that was a bad idea to push a regex functionality
into a java.lang.String directly... -
Hi All,
i have a small code :-
String selecteID = "QP|10009";
String radioId []= selectedID.split("|");
int i = 0 ;
System.out.println("radioId[0] ="+radioId);
System.out.println("radioId[1]= "+radioId[++i]);
Its output is
radioId[0]=
radioId[1]=Q
However i wanted the code to return ans as :--
radioId[0]=QP
radioId[1]=10009
Why does the split function does not work for '|' ? Or we cannot use '|' in case of split functions.Personally I prefer split("[|]")coz I hate trying to read RE's full of those dang \\'s
Keith -
The split function doesn't work.
Following function:
var s:String ="test (H) :) (L) (L) :) (H) (H)(H)(H:):) "
var myPattern:RegExp = /\([a-zA-z0-9]\)/g;
trace(s.match(myPattern))
trace(s.split(myPattern))
this is the output:
(H),(L),(L),(H),(H),(H)
test , , , , ,,(H:):)
The split function is deleting all the matches! Why is this happening?The split function works differently with Regular expressions
For example look at this code
var s:String ="test (H) :) (L) (L) :) (H) (H)(H)(H:):) "
var myPattern:RegExp = /\([a-zA-z0-9]\)/g;
trace(s.match(myPattern))
trace(s.split(myPattern))
var myPattern2:RegExp = /(:[)|(pD*]|;[)(*])/g;
trace(s.match(myPattern2))
trace(s.split(myPattern2))
Regular expression pattern 2 will find emoticons and split them into items in the array. For some reason this is not happening in the first regex pattern.
this is the output of the above code (ignore the emoticons):
first pattern: Notice (H) is removed
(H),(L),(L),(H),(H),(H)
test , , , , ,,(H:):)
second pattern: Notice smiley not removed, but split a new array item. This is correct.
test (H) ,:), (L) (L) ,:), (H) (H)(H)(H,:),,:), -
I've noticed that the 'Add edit' aka cut, slice, split function of PP CC no longer adds the edit to the clips selected in the left pane (v1, v2, etc). Instead I have to highlight the actual clips on the timeline before cutting them. This is inefficient and not how Premiere Pro has functioned since I started using it years ago. Is there a workaround for this? I tried locking the tracks I don't want cut and doing an 'Add Edit to all' but there is a half second to second delay using that method which slows down my editing.
In version 7.2.2, the keyboard shortcut works on all targeted tracks when no clips are selected, and on selected clips without regard to targeting. This gives the best of all possible scenarios.
The tool (C) cuts on the clips you apply it to, without regard to targeting. -
Split function failed with '&'
Hi, I'm using the split function to retrieve some values, like this:
String s_id = request.getParameter("id");
String[] id_array=s_id.split("�");
if (id_array != null){
out.println(id_array[0]);
out.println(id_array[1]);
It works almost fine, except when the "id" field contains '&', then I got an error:
java.lang.ArrayIndexOutOfBoundsException: 1
Does anyone have any idea?!
thanks..oops, my code was a bit messed up with the formatting...
try one more time......
if(s_code.equalsIgnoreCase("Participant1")){
while(i3.hasMoreElements()){
final Participant1VO vo = (Participant1VO)i3.nextElement();
out.println("<tr><td><a href=\"insert_code.jsp?id=" + StringUtil.escape(vo.getParticipant1()) + "�" + StringUtil.escape(s_code) + "\">"+ vo.getParticipant1() +" </a></td>" +
"</td><td> <input type='checkbox' name='checked' value= " + vo.getParticipant1() + "> " + "</td></tr>" ); -
Split Function unable to parse string correctly
Hi,
I'm using split function to split string into multiple rows using comma "," as delimiter. In a string I have following values which are not parsed correctly as they have comma inside the values.
American Dawn, Inc.
Battalian USA, Inc.
Fria USA, Inc.
Lazer, Inc.
Mexilink Inc.
Is there any other approach to fix this issue?
Here is the split function Im using:
CREATE Function [dbo].[fnSplit] (
@List varchar(MAX),
@Delimiter char(1)
Returns @Temp1 Table (
ItemId int Identity(1, 1) NOT NULL PRIMARY KEY ,
Item varchar(MAX) NULL
As
Begin
Declare @item varchar(MAX),
@iPos int
Set @Delimiter = ISNULL(@Delimiter, ';' )
Set @List = RTrim(LTrim(@List))
-- check for final delimiter
If Right( @List, 1 ) <> @Delimiter -- append final
delimiter
Select @List = @List + @Delimiter -- get position of
first element
Select @iPos = Charindex( @Delimiter, @List, 1 )
While @iPos > 0
Begin
-- get item
Select @item = LTrim( RTrim( Substring( @List, 1, @iPos
-1 ) ) )
If @@ERROR <> 0 Break -- remove item form list
Select @List = Substring( @List, @iPos + 1, Len(@List)
- @iPos + 1 )
If @@ERROR <> 0 Break -- insert item
Insert @Temp1 Values( @item ) If @@ERROR <> 0 Break
-- get position pf next item
Select @iPos = Charindex( @Delimiter, @List, 1 )
If @@ERROR <> 0 Break
End
Return
End
Another user in this forum posted a split function that
he wrote:
CREATE FUNCTION dbo.splitter(@string VARCHAR(MAX), @delim CHAR(1))
RETURNS @result TABLE (id INT IDENTITY, value VARCHAR(MAX))
AS
BEGIN
WHILE CHARINDEX(@delim,@string) > 0
BEGIN
INSERT INTO @result (value) VALUES (LEFT(@string,CHARINDEX(@delim,@string)-1))
SET @string = RIGHT(@string,LEN(@string)-CHARINDEX(@delim,@string))
END
INSERT INTO @result (value) VALUES (@string)
RETURN
END
GO
Both of them are unable to parse above values incorrectly.
FYI: String is made of values that are selected
by user in SSRS report. I think SSRS when combine values , put comma "," between multiple values.
Any help or guidance would be appreciated.
ZKduplicate of
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/820ac53c-ce25-4cc7-b828-5875a21d459d/split-function-unable-to-parse-string-correctly-in-ssrs-report?forum=sqlreportingservices
please dont cross post
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Salary Split functionality in R12
Hi there , Does any one used the new feature "Salary Split" functionality in R12
I raised an OSS note , but got a reply that it is the way it works.
-
Message Mapping Split Function Problem
Hi All,
Could somebody plz help me on this problem of splitting the messege:
Source Field:
-MATMAS
-Idoc
-EMARAM
-MTART: 1,
2,
3
Target Required:
Based on the occurrence of Mtart, the target Idoc should be generated:
-MATMAS
-Idoc
-EMARAM
-MTART: 1
-MATMAS
-Idoc
-EMARAM
-MTART: 2
-MATMAS
-Idoc
-EMARAM
-MTART: 3.
Should I use a User-def function for the same or a split by value is sufficient.
I want to generate several idocs in my target if there are several Emaram segments in a single file in the source...!
Thanks & Regards,Hi,
You cannot use Multi Mapping as you have the Idoc adapter on the inbound side. There is a work around though.
Use SAP note : 814393 and change the occurence of your IDOC from 1..1 to 0 to unbounded.
Your mapping requirement is notvery clear though. Can you give some more detail?
Regards,
Bhavesh -
Document Splitting Function in 6.0 dectvt & reactvt
Dear All,
At our client site, some user with access to customisation, deactivated the Document Splitting by checking the Inactive Tick for the Company Code.
This came to light after some days. This directly affected out Business area balance sheet.
Now client wants to reactivate Document Splitting.
My question is -
1) Can we do it now again?
2) If yes, what problems we may face?
We have started working on it.
If anybody of you has any experience / suggestions, pl help.
Thanks & regards,
GovDear Gov,
First you stop giving IMG authorization to users.
u check for required fields in document splitting,
and find when they de activated this function,
if it is very period is very less or transactions are less u better to assign required fields in all those transactions before activating.
If the splitting fields are not available system will not accept clearing transactions. and your statement of affairs also will show wrong information.
you can activate at any point of time
regards -
Document Splitting Function in 6.0 deactivation & reactivation
Dear All,
At our client site, some user with access to customisation, deactivated the Document Splitting by checking the Inactive Tick for the Company Code.
This came to light after some days. This directly affected out Business area balance sheet.
Now client wants to reactivate Document Splitting.
My question is -
1) Can we do it now again?
2) If yes, what problems we may face?
We have started working on it.
If anybody of you has any experience / suggestions, pl help.
Thanks & regards,
GovDear Gov,
First you stop giving IMG authorization to users.
u check for required fields in document splitting,
and find when they de activated this function,
if it is very period is very less or transactions are less u better to assign required fields in all those transactions before activating.
If the splitting fields are not available system will not accept clearing transactions. and your statement of affairs also will show wrong information.
you can activate at any point of time
regards -
Dear All
Can you provide information on this functionality in orders? How it is used ? when it is used?
RegardsI assume that by split you mean splitting the work of operation on an order between different persons.
You assign individuals to WC (Mini HR master activated). Then create an operation with that WC with certain hours.
Once you do that click on operation and go to internal tab. In this tab at the bottom you will see the details of assigning different persons and work to the same work center. You can also dispatch the work from here. For detailed analysis you can use CM25.
This functionality is used, where your HR is in place and you want to assign a specific resource on a specific operation.
Also search forum for this and you should get some posts around this.
Thanks
Sarang -
ERS in Amount Split functionality
IS it possible to enable ERS functionality in Amount Split?
I want to pay suppose 80% of payment within 20 days and rest 20% after 100 days. And this vendor is also ERS activated.
Please advice.Thanks.
I cannot use installment payment because I am using RE document type while MIRO.
So it is giving error 'no terms of installment payments allowed when posting net'.
This is the reason I am trying to use Amount split, but in this procedure we will manually split amount while doing invoicing.
But how I can divide the amount automaticall if I am using ERS?
please advice.
Thanks.
Edited by: PS on Sep 22, 2009 9:27 PM
Maybe you are looking for
-
BSP: Logout does not work
Hello. At the moment i am re-developing a bsp-application, that i have written about 2 years ago. I have to add a logout-funtion to the new version, as the users desperately want it (Some of our users seem to get nervous, when login on to a page, tha
-
I have store credit on iTunes (on my pc) but it doesn't use it when I click 'buy' on an album, it just wants me to select a credit card type. How can I buy the album?
-
Briefly: - Working in a project with about 10 audio instruments and 10 audio tracks - "Multi-thread plugin seems to cause a problem" - logic crashes and autosave the project - reopen the project, unload the plugins that "caused" the problem - save th
-
Tax Code field in Cash journal
Dear All, Can Tax Code field be activated in Cash Journal . If yes how? Useful answers will be rewarded with points. Regards Milind Nair
-
Problem with Reader Extending during render.
I have a process that uses a custom renderer which pre-populates some fields on a form and then reader extends the form for the users. The problem I am having is that when the process is initially invoked, the renderer works fine, and users using Ad