Delete Spaces
Hello,
I have an info object F1which is being loaded from Data Source to DSO.
Length of this object in source is 22 and in DSO it is 10 as per business requirement and cannot be changed.
This field is coming from Source flat file and the in this file the format is (16) spaces followed by the 6 digit value.
The type of this object is Char in DSO.
Since the DSO is length 10 we get this field as empty spaces.
I want to remove these spaces from Data Source so that i get the value.
Please suggest what to do and if routine please suggest full routine and where.
Regards
Hello,
you can use a start routine in update rules (or transformation):
I suppose you have all 22 chars in F2.
LOOP AT DATA_PACKAGE.
SHIFT DATA_PACKAGE-F2 LEFT DELETING LEADING SPACE.
DATA_PACKAGE-F1 = DATA_PACKAGE-F2.
MODIFY DATA_PACKAGE.
ENDLOOP.
BR
Ondrej
Edited by: Ondrej Vach on Dec 2, 2009 4:05 PM
Similar Messages
-
Delete spaces on the right of a string of characters
Hi,
I'd like to know how to delete space on the right of a string of characters and ONLY the ones on the right in order I can get the real length of the string (I don't want to condense the spaces between words even though there's more than one).
data: text(20).
text = 'SAP Forum'
In this case, if I use both DESCRIBE LENGTH and DESCRIBE OUTPUT LENGTH, the result will be 20, but the real length is 9.Use STRLEN( ), as described by the other posters.
To delete space chars on the right of a string, use following static method:
CALL METHOD cl_abap_string_utilities=>del_trailing_blanks
CHANGING
str = lv_text. -
How do i delete files and have the deleted space become available
When i delete files, the system does not show the deleted space as available. How do I fix that?
Have you emptied the trash?
-
hi i have the folllowing sql trying to delete spaces,but it does not delete what happen is it show that 2 rows have been updated but when i go to the table i still find extra spaces because when i run again the same sql it still show that 2 rows have been updated
UPDATE CFG_OFFICE
SET OFFICECODE = TRIM (OFFICECODE);
I did commit after updateEdited by: adf009 on 2013/01/29 10:16 AMHi,
Have you commited the transaction after update.
For example.
SQL> select * from test;
EMPNO EMPTYPE SALARY JDATE DEPTNO
6 back office 2000 24-DEC-12 99
1 HR 10000 01-JAN-12 10
2 Admin 10000 01-DEC-11 20
3 MARKETING 12000 01-JAN-12 30
4 FACILITY 14000 12-FEB-12 40
8 IT 12000 10-JUN-10 80
5 ADMIN 11111 23-JAN-13 50
9 Finance 10000 07-NOV-12 90
10 "100HR" 9000 07-NOV-12 100
9 rows selected.
SQL> update test set emptype=' back office' where empno=6;
1 row updated.
SQL> commit;
Commit complete.
SQL> select * from test;
EMPNO EMPTYPE SALARY JDATE DEPTNO
6 back office 2000 24-DEC-12 99
1 HR 10000 01-JAN-12 10
2 Admin 10000 01-DEC-11 20
3 MARKETING 12000 01-JAN-12 30
4 FACILITY 14000 12-FEB-12 40
8 IT 12000 10-JUN-10 80
5 ADMIN 11111 23-JAN-13 50
9 Finance 10000 07-NOV-12 90
10 "100HR" 9000 07-NOV-12 100
9 rows selected.
SQL> update test set emptype=trim(emptype);
9 rows updated.
SQL> commit;
Commit complete.
SQL>
SQL> select * from test;
EMPNO EMPTYPE SALARY JDATE DEPTNO
6 back office 2000 24-DEC-12 99
1 HR 10000 01-JAN-12 10
2 Admin 10000 01-DEC-11 20
3 MARKETING 12000 01-JAN-12 30
4 FACILITY 14000 12-FEB-12 40
8 IT 12000 10-JUN-10 80
5 ADMIN 11111 23-JAN-13 50
9 Finance 10000 07-NOV-12 90
10 "100HR" 9000 07-NOV-12 100
9 rows selected.
SQL>Edited by: Chanchal Wankhade on Jan 28, 2013 11:15 PM -
Delete space from para style name
Hi All,
There are some space character at the end of my paragraph style naming.
How can we delete [space] only from at the end of the paragraph style name? I don't want to delete [space] if it is coming between paragraph style naming.
Please provide the js code.
Thanks,
TanskPlease provide the js code.
Oh sure, you are in a hurry, right?
Can you not call upon the scripting forum for every menial task? Please? In these six hours you were twiddling your thumbs and nervously checking the forum every five minutes or so, you could have done this by hand.
Oh whatever:
for (p=2; p<app.activeDocument.paragraphStyles.length; p++)
app.activeDocument.paragraphStyles[p].name = app.activeDocument.paragraphStyles[p].name.replace(/\s+$/,''); -
Certain keys don't work-delete, space bar, caps lock, quotes-apostrophe key
Certain keys don't work on the built-in keyboard: delete, space bar, caps lock, quotes-apostrophe key...I have to use the "keyboard viewer" to use these particular keys. My adapter is connected to the computer, but the problem persists.
Can anyone please suggest troubleshooting for this annoying problem? It has been like this for about 2 weeks now.
Thanks in advance for any suggestions!Does anything happen when you hit these keys?
Try this:
In System Preferences>Keyboard & Mouse, click the "Keyboard Shortcuts" tab, then the "restore defaults" button.
~Lyssa -
How to delete space in an internal table
Hi All,
In internal table I want to compress the leading space
After searching I found Condense and SHIFT LEFT DELETE leading space commands work it is written...
but when I write code A single space is appreaing in between the two fields...can any body help me where I am going wrong??
Ex:
data: begin of itab occurs 1 ,
PSAtext TYPE CHAR15,
psa type btrtl,
end of itab.
now o/p BEFORE CHANGE IS :
SBI-CT |1023
After condense is SBI-CT |1023
bETWEEN SBI-CT AND | there is a additional space. How can we avoid that?
Sas
Edited by: saslove sap on Sep 29, 2010 7:43 AMWell this is what I am going to solve this
data:begin of STRING OCCURS 1 ,
S1 TYPE STRING,
END OF STRING.
loop at itab.
concatenate itab-f1 itab-f2 into string-s1 seperated by '|'.
append string.
end of itab.
then I can transfer this string to Application server.
Thanks for all the contributions.
Regards
sas -
Delete spaces in internal table
Hi this question is to improve my performance...
what is the performance oriented way of delete entires in internal table where any of the field is empty.
1 2 3 4 5 6 7
A B C D E F G "<< ok
A B C E F G "<< delete
A B C E G "<< delete
or
loop at itab.
if itab-f1 eq space or itab-f2 eq space.....
delete itab.
endif.
endloop. " how to eliminate this loop...?Try this way
delete itab where f1 eq space
or f2 eq space
or f7 eq space.
a® -
Deleting word deletes space before it as well
I don't know if this has always been the case, but I've only just started to notice it and it is frustrating the **** out of me.
In pages on the iphone and iPad, if I delete all the letters in the word, the space before the word automatically gets deleted as well.
Try it.
I just went to the apple store and it's happening on their ipads as well.
I type for a living and cannot tell you how many thousands of times today I had to go back and correct words that had no space between them.
Did someone really think that when I press delete once what I actually want is to delete twice?!
So, anyone know if there's a way around this issue? I'm wondering if it came in with ios 7? Interestingly it's only pages, not happening on notes or email etc.For tips on how to get around it go here:
https://discussions.apple.com/message/23253948?ac_cid=tw123456#23253948
Either type with an X in front of where you're typing, or turn on tracking and set to "final" in settings.
Best we have for now! -
Hi guys,
When I delete a word in Pages for iOS 7 character-by-character, the deletion automatically includes the space before the word, even if I don't initiate a keypress for that space. This is sporadic in that it consistently occurs in some sections of text (usually at the end of lines) and not in others, in paragraphs with custom Styles and in paragraphs with default Styles alike.
If the bug happened consistently, I could probably by habit overcome this extra deletion. However, since it does not happen in every circumstance, it's unpredictable and as such very disruptive to my workflow.
This occurs in new documents with no formatting. I've also tried Resetting All Settings, restoring the app through the Settings menu, and deleting and re-downloading the app from the App Store. It occurs both when I use my Bluetooth wireless keyboard (Logitech) and when I use the iPad Mini's OS keyboard.
I really don't want to restore my entire iPad just to fix this problem, as I think it's an app-based bug (the problem does not happen at all in any other text app).
This Pages version is 1.7.2, and I'm using iOS 7.0.2 on an iPad Mini WiFi only.
Could anyone with a similar setup try this out? I can't be the only one...right?I am experiencing this as well. In another thread (https://discussions.apple.com/thread/5374836) it appears someone contacted support about it and was told this is expected behavior.
For me, this will cause me to stop using Pages. It's extremely aggravating. -
Deleting Space - Internal Table
Hi All,
I wish to know how to delete the leading / trailing spaces in <b>Internal Table's</b> field & bolding the field name in Report Output.
Ex: In report output - when i output BSID-WRBTR via an Internal table how to delete the blank spaces.
I appreciate ur time.
Regards
Tinahi Tina,
Use <b>Condense</b> Statement
i.e,
<b>The CONDENSE statement deletes redundant spaces from a string:</b>
CONDENSE <c> [NO-GAPS].
This statement removes any leading blanks in the field <c> and replaces other sequences of blanks by exactly one blank. The result is a left-justified sequence of words, each separated by one blank. If the addition NO-GAPS is specified, all blanks are removed.
DATA: STRING(25) VALUE ' one two three four',
LEN TYPE I.
LEN = STRLEN( STRING ).
WRITE: STRING, '!'.
WRITE: / 'Length: ', LEN.
CONDENSE STRING.
LEN = STRLEN( STRING ).
WRITE: STRING, '!'.
WRITE: / 'Length: ', LEN.
CONDENSE STRING NO-GAPS.
LEN = STRLEN( STRING ).
WRITE: STRING, '!'.
WRITE: / 'Length: ', LEN.
Output:
one two three four !
Length: 25
one two three four !
Length: 18
onetwothreefour !
Length: 15
Note that the total length of the field STRING remains unchanged, but that the deleted blanks appear again on the right.
Regards,
Santosh -
In my ipod the Category Other is taking up way too much space and i dont know what it is or whats in it! please help!
See this post on Others by tt2. which gives a good explanation on OTHERS segment
To delete and recover your space, Restore the iPod to Factory settings, hopefully your iPod Hardisk is still in good Condition to be restored. -
How to delete Spaces in String
Can somebody help to modify my source, cos i want to delete certain space. Thanks
private static String printStar(int SpaceForStar){
String sDelOneSpace =" ", sAddOneSpace=" ", star ="*", sTtlSpace ="";
for(int i=0; i<numSpace; i++){
sTtlSpace += sAddOneSpace;
for(int i =0; i<8; i++){
sTtlSpace = sTtlSpace - sDelOneSpace; // seem that not working.. can somebody help Thanks
return sTtlSpace+star;
}Thanks in advance
jasWhat you are trying to do will not work - subtraction of Strings does not make any sense.
To remove spaces, I suggest you use a StringTokenizer with space as dividing token. Lop trough the tokens and add them to a new String, like this:
public static void main (String[] args) throws Exception {
String withSpace = "aaa sss bbb";
System.out.println(removeSpaces(withSpace));
static String removeSpaces(String withSpaces) {
java.util.StringTokenizer t = new java.util.StringTokenizer(withSpaces, " ");
StringBuffer result = new StringBuffer("");
while (t.hasMoreTokens()) {
result.append(t.nextToken());
return result.toString();
}This will remove all spaces, and print "aaasssbbb". If you only want to remove the first or the last space, you can use indexOf() or lastIndexOff to find the space, and then substring to pick the text before and after that space and concatenate those two strings to a new string without the space:
static String removeFirstSpace(String withSpaces) {
int spaceIndex = withSpaces.indexOf(' '); //use lastIndexOf to remove last space
if (spaceIndex < 0) { //no spaces!
return withSpaces;
return withSpaces.substring(0, spaceIndex)
+ withSpaces.substring(spaceIndex+1, withSpaces.length());
} -
im working in ipages on a template and have xtra space in the template i want to delete so i can move 2 lines on the 2nd page onto the first page.need help asap.thanks
What application are you using?
-
Deleting space between events in IMovie
How do you trim the space between events? I am trying to take a video that was emailed in 3 parts and put it together again and I need to just remove the spaces between the selections.
I am also puzzled by this loss of disk space when iMovie imports iPhoto for the first time. Would also like to reclaim that space back.
Here may be the solution: http://discussions.apple.com/thread.jspa?messageID=9415197�
Not sure if it would work to delete the movies in the data folder in iPhoto.
Maybe you are looking for
-
Deploying Adobe Reader 11.0.4 via SCCM 2012
Hello members, I am looking to deploy the latest version of Reader to our workstations both during OS build and also on existing machines. I have successfully created a custom install using the Adobe Customization Wizard I'm leaning towards the use o
-
JMenu with RIGHT_TO_LEFT Orientation
Hello, I have a JFrame contains a JMenuBar and it's menus, My application direction is RIGHT_TO_LEFT, I changed the direction of the JMenuBar, JMenu, JMenuItem, to all the Heirarchy of the menus, and I got the required GUI. Unfortunately, when the di
-
Cutover Strategy : Customer Service
Dear All, Am facing problem of deciding data migration strategy from legacy system to SAP for customer service module. Here am explaining the situation at my project. My client is manufactures of water purifier systems.It sells and provides services
-
Hello, I have a customer defined idoc, when it comes into the inbound queue it get's status 64 - "IDoc ready to be transferred to application", and a job is generated for the processing instead of just immidiate processing. It's important to mention
-
One Bind Variable used in multiple VOs jdev 11.1.2.3 redhat 5.8
Hello: I have multiple View Objects and each view object needs to use a bind variable. I would like each VO to reference the same bind variable. Example: I have 3 VO and in each VO where clause I need something like emp_key = :p_emp_key, but I want o