Skip to Content
author's profile photo Former Member
Former Member

reg : spaces in the output file .

Hi all ,

i have used concatenate command but the thing is that in output when i see after c_version value there shud be 20 spaces .but it is not happening now .whenevr i give blank spaces to add after all the variables then it is not taking .for ex ... i have below pasted the file output .after 2.0 there shud be 20 spaces but if we press right arrow key it shud not go to the next line after 20 spaces it shud go to the next line .any pointers plz thanx in advance ......

INVSYNSSD B70SAPAMS0000000005D0000002520200808130556352.0

data : l_spare TYPE string,

l_sp_size TYPE i VALUE '20'.

SHIFT l_spare RIGHT BY l_sp_size PLACES.

CONCATENATE c_msg_type c_msg_stype l_tr_type

zsource_site c_sou_appln l_seq_fno

l_envrn l_msg_flgth l_stamp

c_version l_spare INTO wa_final_header.

i had actually got replies to use respecting blanks but i am using sap 4.6c i think it does not support .can anybody plz help me out.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2008 at 01:57 PM

    Hello,

    If you want to use spaces at the end and you are having a problem to use it because of your version you can concatenate white character spaces at the end. To generate "White character Spaces" in your ABAP editor just use "ALT+255".

    What this does is, it create a space which is of type character as we are using the ASCII value of the space. Please query if you have any doubts.

    Thanks,

    Jayant Sahu.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2008 at 01:30 PM

    normally although you have spaces at last, SAP doesnot consider these spaces wjile downloading of data.

    One thing is you can use entry key separator at the end of the data line so as that the spaces are been shown up.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      You can try using RESPECTING BLANKS addition.

      This is from SAP help:

      Addition 3 
      ... RESPECTING BLANKS 
      
      
      Effect 
      The addition RESPECTING BLANKS is only allowed during string processing and causes the closing spaces for data objects dobj1 dobj2 ... or rows in the internal table itab to be taken into account. Without the addon, this is only the case with string. 
      
      
      
      Note 
      With addition RESPECTING BLANKS, statement CONCATENATE can be used in order to assign any character strings EX>text - taking into account the closing empty character - to target str of type string: CLEAR str. CONCATENATE str text INTO str RESPECTING BLANKS. 
      
      
      
      Example 
      After the first CONCATENATE statement, result contains "When_the_music_is_over", after the second statement it contains "When______the_______music_____is________ over______" . The underscores here represent blank characters. 
      
      TYPES text   TYPE c LENGTH 10. 
      DATA  itab   TYPE TABLE OF text. 
      DATA  result TYPE string. 
      
      APPEND 'When'  TO itab. 
      APPEND 'the'   TO itab. 
      APPEND 'music' TO itab. 
      APPEND 'is'    TO itab. 
      APPEND 'over'  TO itab. 
      
      CONCATENATE LINES OF itab INTO result SEPARATED BY space. 
      ... 
      CONCATENATE LINES OF itab INTO result RESPECTING BLANKS. 
      
      

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.