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

Concatenate

Hi I want to concatenate

data : v_date like sy-datum,

v_time like sy-uziet,

v_sess_name type D0100_MAPN.

Concatenate 'RB40' v_date4(4) v_time0(4)into v_sess_name.

CONCATENATE '0' V_SESS_NAME_NEW SY-MANDT

'ADMIN ' ' ' ' ' '/'

INTO WA_BGR00.

I want 7 spaces after ADMIN,

8 spaces for date

1 space for Keep as is in BGR00 table...

but when I concatenate my output is for e.g.

0RB4010130845200ADMIN/

IT IS NOT CONSIDERING THE SPACES IN BETWEEN. How do I get the spaces in the final output ??

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 Oct 13, 2006 at 03:40 AM

    Please use offset addition. It will resolve your problem.

    Eg:

    data:
      l_text1(10) type c value 'first',
      l_text2(10) type c value 'next',
      l_out(20)   type c.
    
      concatenate l_text1 l_text2 into l_out.
      write:/ l_out. " ---> Output: firstnext
    
      concatenate l_text1 l_text2 into l_out separated by space.
      write:/ l_out.  "---> Output: first next
    
      move: l_text1 to l_out.
      l_out+15 = l_text2.
      write:/ l_out. "----> Output: first          next

    Hope this helps you.

    Kind Regards

    Eswar

    Message was edited by: Eswar Rao Boddeti

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2006 at 03:41 AM

    hi sb,

    try giving like this and check...

    CONCATENATE '0' V_SESS_NAME_NEW SY-MANDT

    'ADMIN ' ' ' ' ' '/'

    INTO WA_BGR00 <b>separated by space</b>.

    hope this helps,

    do reward if it helps,

    priya.

    Add a comment
    10|10000 characters needed characters exceeded

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.