Skip to Content
avatar image
-2
Former Member

concate two table fields

I have two table fields first name and last name. I want concatenation of these two fields into new table field Name. Please help me with this.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Jun 23, 2017 at 06:57 AM

    Hi Malaviben.

    You will need to read up on the following statements:

    TYPES

    DATA

    FIELD-SYMBOLS

    SELECT [INTO TABLE]

    LOOP AT [Assigning Field Symbol]

    String concatenation using &&, and ` instead of ' as a string delimiter

    ENDLOOP

    I'm not going to provide the code for you because this is so basic (if you'll pardon the pun).

    Rich

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 23, 2017 at 07:49 AM
    -1

    Hi,

    Loop at i_tab into w_tab.
    w_final-f_name = w_tab-f_name.
    w_final-l_name = w_tab-l_name.
    concatenate w_tab-f_name w_tab-l_name into w_final-full_name seperated by space.
    endloop.

    Hope this works.

    Regards,

    Mangesh

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 23, 2017 at 07:14 AM
    -4

    Hi malaviben,

    Step 1 : ( define long string)

          DATA final TYPE soli-line.

    Step 2: ( get data from table and pass to field)

          LOOP AT itab INTO wa.
            l_f1 = wa-firstname .
            l_f2 = wa-secondname .
          ENDLOOP.
    

    Step 3: ( now pass the two field value to log sting"final" field)

           LOOP AT it_soli1.
            CONCATENATE l_f1 l_f2 INTO final.
          ENDLOOP.
    

    Regards,

    Umayaraj.B

    Add comment
    10|10000 characters needed characters exceeded