Trailing Space at the end of Record
Hi,
I need a blank space at end of header record when transferring data to a file on application server.
Appreciate help.
Code:
wa_header-empty = space. " Length 4 type char
wa_header-rec_type = 'ZREF'. " Length 4 , constant
wa_header-partner_id = '1234' " Length 35 type char
wa_header-i_usr_id = 'COMPANY'. " Length 35 type char
wa_header-p_id_qualf = space. " Length 4 type char
TRANSFER wa_header TO g_out_file.
Desired output: enclosed in brackets.
[ ZREF1234 COMPANY ]
The desired output has 28 trailing space after the text 'COMPANY'.
Hi,
Have you Tried the SHIFT hope it will solve out your problem,
or use Concatenate To insert Spaces to Right Side inside a loop.
Hi, Please Go Through the following Thread too hope will help you out.
[How to retain spaces in a string|Re: How to retain spaces in a string...really urgent]
Kind Regards,
Faisal
Edited by: Faisal Altaf on Feb 18, 2009 1:33 AM
Similar Messages
-
How to add spaces at the end of record
Hi Friends,
i am creating a file which contains more than 100 records.
In ABAP i have internal table with on field(135) type c.
some time record have length 120, somtime 130 its vary on each record.
but i would like to add space at the end of each record till 135 length.
Can you please help me how to add speace at the end of record.
regards
MalikSo why did you said that in your first posting? My glass sphere is out for cleaning...
Instead of type c use strings and add spaces until they have the appropriate length.
loop at outtab assigning <pout>.
while strlen( <pout>-val ) < 135.
concatenate <pout>-val `` into <pout>-val.
endwhile.
endloop. -
How to remove trailing space at the end of a song.
This is related to this thread: Shorten song length (remove trailing bars) in Garageband 10.0.1
I have also done some Googling and have found some links related to selecting and exporting regions, which I have tried, but this is what I noticed.
It does not work when I select certain instruments, eg Synthesizer - Soundscape - Subtle Shiftscape or Synthesizer - Lead - Screamlead. I believe that what is happening is that those sounds tend to have some additional length to it. No matter where I cut my region, the additional length still get added. I don't have that problem if I don't select those instruments.
Anybody has any ideas?Are you using GB 10.0.2 as well?
I am using both - GarageBand 10.0.2 and GarageBand '11.
And if I deselect all regions, File - Add Region to loop library is of course greyed out. Is it possible to save multiple tracks as a loop?
No.
Yep, I've deselected all regions. Still no luck.
My answer above was in answer to your "This time GB felt I only needed the first 4 measures of the song, even though I defined an entire Region over the length of the song and selected everything with Ctrl-A..."
You should be able to export the complete song, if you deselect all regions, and select all of the song using the cycle region with "Export Cycle region only" enabled, or with "Export Cycle region only" disabled, nothing selected, and the end-of-song marker correctly set.
However, this will not get rid of the trailing empty bars.
Reimport the bounced song to a new Ringtone project and trim it and save it as a tone, or to a regular project and add it to the Loop Library.
Find the AIFF file of the loop in the Loop library - it will be installed in your User Library in your Home folder
~/Library/Audio/Apple Loops/User Loops/SingleFiles/ -
Preserve a single space at the end of line using spool command
Hi,
Can you please help me to write the result of an sql query into a file with the last column of the row ending with a single space?
For example:
COL1DATA|COL2DATA|COL3DATA<space1>
As mentioned in the example the col3 value in the file should end with a single space. And there should not be any delimiters at the end of the row.
I tried with set trimspool on/off. But, it didn't work. When I say trimspool on - it is trimming all the trailing spaces.
When I say trimspool off - it is retaining all the trailing spaces to the size of the line.
But, I do not wish to modify the file through shell commands once it is written thru spool. I mean I do not wish to append spaces to the end of a line using shell script or any other method.
I do not wish to use other methods like UTL_FILE also.
Please help me how to do it using spool command?
Thank you.
RamanaMy requirement is that all the trailing spaces should be truncated except the last one in the row.Why?
As you have discovered a single column in sqlplus, is always a fixed length regardless of the size of the data, if the length of the data varies the output is padded to the maximum or line size with spaces. The trim and trimpsool commands are there to remove all the spaces from the end of a line if there are any. There are no commands to trim all the spaces except one, or even to trim all the spaces except two, or three even.
If you want such custom processing you should post process the file in the OS using sed, awk or perl or something designed for such things. -
Check space in the end to display warning message.
I am currently working on validations on functional locations in the EDIT MASK. the code is already written for validations on to check for space in the beginning of the each level in the edit mask. however user requirement is that the program should produce warning messages for spaces regardless of where they appear in the Edit Mask. we have not validated to check for space at the end of each level.
I have checked with condense ,shift string right deleting trailing spaces however I am not able to check for space at the end of levels.
when i debugged the program the level8 length shows as 2 even though there is only one char in the level8. i
could you please suggest any possible solution or any keywords that would help. you can go through the below code which is already written for checking space in the begining.
here l_level1
Level 8 errors
l_length = STRLEN( l_level8 ).
IF ( l_level8 = space AND l_dash_count > 6 ) OR
l_dash_count > 7 OR
l_length > 4.
lt_mask_err-error = '8E'.
APPEND lt_mask_err.
l_errlvl8 = c_y.
ENDIF.
Level 8 Warning
IF rb_bdc <> c_on AND p_warn = c_on AND
( l_level8 <> space AND l_level8+0(1) = space ).
lt_mask_err-error = '8W'.
APPEND lt_mask_err.
ENDIF.
i have added this code to display warning message using shift.
l_lev8 = l_level8.
shift l_lev8 right.
l_length = STRLEN( l_lev8 ).
IF rb_bdc <> c_on AND p_warn = c_on AND
( l_lev8 <> space AND l_lev8+0(1) = space ).
lt_mask_err-error = '1W'.
APPEND lt_mask_err.
ENDIF.You can use REGEX for string parsing, it is really handy. If you would like to test it out check out program "demo_regex_toy".
Trailing space:
FIND REGEX '[ ]+$' IN lv_text.
leading space
FIND REGEX '^[ ]+' IN lv_text.
Any space
FIND ALL OCCURRENCES OF REGEX '[ ]+' IN lv_text. -
Blank spaces at the end of an IDoc text field get lost when posted to R/3
Hi Guys,
I am facing the following issue:
In an XML file-to-Idoc scenario, there are spaces at the end of a text field in the inbound XML file, which I can see when I open the inbound file with a text editor like notepad, and they are kept after XI mapping is executed (I can see them in message mapping simulator). However, it seems that these spaces get lost once the IDoc is posted to SAP R/3 and they are not visible on SAP R/3 side.
Do you have any idea ? Thanks.
Best Regards,
Evaggelos GkatziosThat means SAP is removing the spaces from IDoc fields, where you spaces are not allowed. Does it create any problem?
Thanks,
Nabendu. -
Hello,
Is there a way to recognize space sign at the end of a sentence?
The meaning of that is that there is a word that somebody typed at the end of the sentence
and after that pushed the space bar . When looking at the text inside the sap system the text looks fine,
but when transferring to excel the text doesnt equal because the space at the end of the sentence.
Please advise
YifatDo you want to handle that space or just use the text value?
If you just want to use the text value (i.e 1word - space)...u simply say CONDENSE <UR TEXT VARIABLE>.
Else the other option is: Find the string length and then handle it the way u want.
Or if u r sure that every word has that extra space, and u dont want that u can even use SHIFT RIGHT BY 1 PLACE in thet text variable.
Hope this helps.
Thanks
Kiran -
How to pad spaces at the end of a string
Hi All,
I am new to ABAP and need help to achieve this functionality
I have to build a string with fixed lenth . my input string
is always lesser than equal to X . I need to calculate and
add that many spaces at the end of the input string .
I tried to do this and getting the following error
please help on this :
if strlen( t_resultc ) < 525.
RFILL(t_resultc,' ',525)
endif.
Error : Comma without preceding colon(after RFILL(T_RESULTC ?)
Q: Can I use RFILL with out Select statement in a ABAP program
Thanks & Regards
KLKHi,
Try the following code but kindly make a note..
Note:-USE quote like this ` `, Instead of normal single quotes ‘ ’
WHILE strlen( T_RESULTC ) < 525. “Check the length
CONCATENATE T_RESULTC ` ` INTO T_RESULTC. ”Add spaces at the end
ENDWHILE.
Hope this helps,
Andrew -
Adding space at the end of a ritchEditableText line
Hi!
I found an interesting behaviour in my application. I have a RichEditableText component with a fixed width . If I add text till almost the end of the line and then insert spaces, the cursor get's stuck at the end of the line. My surprise was on retreiving the text from that line in the code, where all that spaces existed even if they were not visible in the app. So on screen you see let's say 3 spaces, but then you save the text you can get 10. If you keep inserting any letter the cursor will move itself to the next line, but this does not seem to be the case of " "(space).
I tested it useing the following code. I'm useing 4.1 sdk.
<s:RichEditableText id="richTxt" width="100" height="500" change="richTxt_changeHandler(event)" />
protected function richTxt_changeHandler(event:TextOperationEvent):void
var noOfLines:int = richTxt.textFlow.flowComposer.numLines;
for (var i:int = 0; i < noOfLines; i++)
var startIndex:int = richTxt.textFlow.flowComposer.getLineAt(i).absoluteStart;
var seqLength:int = richTxt.textFlow.flowComposer.getLineAt(i).textLength-1;
var textLine:String = richTxt.text.substr(startIndex, seqLength);
I try to set clipAndEnableScrolling=true; for richTxt but this thid not change anything.
How can I retrieve only the visible text( with the corect number of spaces at the end of the line) from the RET in order to save it ?
Thanks !Do you want to handle that space or just use the text value?
If you just want to use the text value (i.e 1word - space)...u simply say CONDENSE <UR TEXT VARIABLE>.
Else the other option is: Find the string length and then handle it the way u want.
Or if u r sure that every word has that extra space, and u dont want that u can even use SHIFT RIGHT BY 1 PLACE in thet text variable.
Hope this helps.
Thanks
Kiran -
How to transfer trailing spaces in the source field type c
Hello,
I have to splitt a string key of 120 characters into two InfoObjects (CHAR). The problem is, that the trailing spaces are lost in the character Field.
Has anybody an idea to avoid the lost?
Thank you.
Conversion Table for Source Field Type c
The characters in the source field are inserted in the target field, left-aligned. Trailing spaces in the source field are not transferred. If the target field is longer than the number of characters transferred, it is filled with blank characters to the right. If the target field is shorter, the number is truncated from the right.Hi ,
Create two Characteristic InfoObjects in BW With length 60 Char and then in the Transfer Rules of this two InfoObjects write the Formula using Left() and right() function present in the Formula Builder .
That is First infoObject Contains the Left 60 Char and next one Contains the right 60 Char.
Regards,
Vijay. -
What is the best way to get the end of record from internal table?
Hi,
what is the best way to get the latest year and month ?
the end of record(KD00011001H 1110 2007 11)
Not KE00012002H, KA00012003H
any function for MBEWH table ?
MATNR BWKEY LFGJA LFMON
========================================
KE00012002H 1210 2005 12
KE00012002H 1210 2006 12
KA00012003H 1000 2006 12
KD00011001H 1110 2005 12
KD00011001H 1110 2006 12
KD00011001H 1110 2007 05
KD00011001H 1110 2007 08
KD00011001H 1110 2007 09
KD00011001H 1110 2007 10
KD00011001H 1110 2007 11
thank you
dennis
Edited by: ogawa Dennis on Jan 2, 2008 1:28 AM
Edited by: ogawa Dennis on Jan 2, 2008 1:33 AMHi dennis,
you can try this:
Sort <your internal_table MBEWH> BY lfgja DESCENDING lfmon DESCENDING.
Thanks
William Wilstroth -
May I run "shrink DB/truncate free space from the end of file" at PROD?
We have a SAP/MSS production system.
The disk is full.
We want to truncate the log file by:
"shrink DB/truncate free space from the end of file"
on the log file.
How risk is it? Can we do it during production is running?
Thanks! Points!Backup the log file (to save the data and keep a consistent backup) Then shrink the file. Its normal for the log not to shrink down to the size you want. Do not shrink past 1GB.
DO NOT TRUNCATE - you are losing/dropping data and recovery will only be possible to the last on-line, or on-line plus last log/s.
You can avoid a full log file by setting a 9002 trap - this will trigger a backup (like oraarch when you back up based on % full). Else you need to change the frequency of the backups for the logs to ensure the system never fills ups.
You can Also add a second log file on a separate F/S if this occurs regular - which it shouldn't if you have a correct backup strategy. -
Regarding blank space at the end of the record
Hi All,
We have a requirement where in which we have to pass either X or space to that field and this field is at the end of the record.
I can download it to local pc or to an application server.
If i pass normal space, i'm unable to view it when i download that to the local pc.
I tried with cl_abap_char_utilities, i was able to get the tab, can you please tell me how can i acheive space both in the presentation and at application server.
Thanks,
Bharathi.Sowmya answer should work.
Are you looking for something like this?
CONSTANTS: BEGIN OF end_of_file,
x(2) TYPE x VALUE '0D0A',
END OF end_of_file.
DATA: BEGIN OF itab OCCURS 0,
line(20),
END OF itab.
itab-line = 'Hello World '.
CONCATENATE itab-line end_of_file INTO itab-line SEPARATED BY space.
APPEND itab.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\helloworldtest.txt'
write_lf = ''
trunc_trailing_blanks = 'X'
TABLES
data_tab = itab. -
DMEE : Delete Trailing spaces in the output file..
Dear Friends
I am using a DMEE Tree t generate a payment file.
Everything is fine except that teh bank requires the trailing spaces to be deleted.
i.e. I am getting an output like below but with spaces in place of dots
:50H:/09618078222002EUR....................<CR/LF>
Sana'a............................................ <CR/LF>
:70:DMEE-TEST14.................<CR/LF>
Note:The dots represents spaces which I want to remove. The dots are added to show you the output...
The <CR/LF> is printing at the end of the field length. I mean if the field is 34 Chr long then the
<CR/LF> is getting printed at 35th Char irrexpective of teh field contents...
But the bank requires in the below format. i.e. remove the spaces thats all.
:50H:/09618078222002EUR<CR/LF>
Sana'a<CR/LF>
:70:DMEE-TEST14<CR/LF>
Can anyone help.
I am working on SAP 4.6C
Help will surely be reawrded....Hello Sam,
I DO NOT know if i can make you understand the logic, but will give it a try )
The <CR/LF> is printing at the end of the field length. I mean if the field is 34 Chr long then the
<CR/LF> is getting printed at 35th Char irrexpective of teh field contents...
You define an element of length 35 char, then in the "Mapping Procedure" select the "Own Mapping (Atoms)" & set the "Atom Handling" as 01 (Concatenate values in element).
Then create the ATOMS: one with the value "DMEE-TEST14" & the other atom with the value "<CR/LF>
". The output will be a concatenation of the two fields )
Did you get what i wanted to tell you )
BR,
Suhas -
Trailing Spaces in the output file
I am executing one script from the cron. This script extracts some data from the Oracle database and creates a spool file. But it is creating the file with lot of trailing spaces for each record.
1. If the same script is executed from the command prompt there are no trailing spaces.
2. Same script is working fine from the other box.
3. No problems in the data ( obvious from the point 1).
Any ideas why this happns only from the cron ?Not sure why, (a code snippet would help). But there are some differences between cron and command line.
1. By default cron uses /bin/sh
2. What user are you running as in crontab?
3. The default PATH for non-root cron jobs is /usr/bin:/usr/ucb:.
4. The default PATH for root cron jobs is /usr/sbin:/usr/bin
5. Take a look at /etc/default/cron to see if the PATH is set to something you don't expect.
6. Read the manpages for cron and crontab. Lots of useful info there.
My guess is that you're picking-up a different version of a command.
HTH,
Roger S.
Maybe you are looking for
-
I can't get my playlist from my pc itunes account which has a different name to copy onto my new ipod touch.
-
How to verify all the Services in Oracle R12 from Unix OS
Hi, Can someone please through some details on how to check and verify the unix processes and services from Unix backend in R12. In 11i I was using ps -ef|grep f60 ps -ef|grep httpd ps -ef|grep FNDLIB Currently , I am using './adopmnctl.sh status ' c
-
Stock Transport Order-shipping point not determined
Hi MM Gurus, We need to set up STO for transferring stock from plant 2000 to 1000. I have completed following setting. IMG Enterprise Structure-Assignment-Sales and Distribution-Assign sales organization to company code Both the sales orgnizations ar
-
Getting the value of a check box - annoying error
Hi guys, Ive got a web page with sets of hidden variables and check boxes which relate to different courses, but when I try and itterate through the value of the check box to see if it is checked or not im getting an outofIndexArray error because im
-
Ping on copper v ping on fibre
We joined Inifinity 2 on the 15th January just gone. Our ping was a fantastic rock solid 15ms and remained so til the second week of March. Since then it has varied between 25ms (minimum) and 49ms (maximum). Now that doesn't sound alot but that repre