‎2017 Jun 23 7:30 AM
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.
‎2017 Jun 23 7: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
‎2017 Jun 23 8:14 AM
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
‎2017 Jun 23 10:18 AM
Since the questioner seems to know nothing about ABAP, it isn't helpful to answer with faulty code excerpts that do not match at all.
‎2017 Jun 23 8:49 AM
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
‎2017 Jun 23 10:07 AM
Ever heard of the concatenation operator && or string templates? Maybe even FOR expressions?
‎2017 Jun 23 10:27 AM
There are many ways to do the same. I just commented one of them.
And no, i haven't heard of them. Thanks for the suggestion. I'll learn it for sure.