Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

add fields in abap query

Former Member
0 Likes
684

Hi,

Please let me know , how to add two fields in ABAP Query. Please it showing two fields in list fileds but i want to add two into one.

thanks,

Sonar

Hi,

Please let me know , how to add two fields in ABAP Query. Please it showing two fields in list fileds but i want to add two into one.

thanks,

Sonar

4 REPLIES 4
Read only

Former Member
0 Likes
647

Hi ,

Use concatenate and add two fields into one field.

Thanks & Regards

G.Vendhan

Read only

Former Member
0 Likes
647

Hi Sonarali,

This is possible, you need to just write the logic to concatenete the two fields and display in output while making the query.

Also, you have to declare a seperate field for output.

Hope its help you.

Read only

Former Member
0 Likes
647

Hi,

You can use CONCATENATE Statement for join 2 fields But remember There data type should be same.

For Example.

DATA:p1(10) type c VALUE 'All',

p2(10) type c VALUE 'the',

p3(10) type c VALUE 'best',

result type string.

concatenate p1 p2 p3 into result.

Try this I hope so it will help you.

Prashant

Read only

0 Likes
647

Thanks for Inf

Here I want to print total of two fields into one field, where concatenate should be there

mv_abrmenge, mn_abrmenge

select ebelnr, htariftyp, csparte, cvertrag, cvkont, mbelzart, cbegabrpe, cendabrpe, mv_abrmenge, mn_abrmenge, e~budat

from erchc as e

join dberchz1 as m

on ebelnr = mbelnr

join erch as c

on mbelnr = cbelnr

join ever as r

on cvertrag = rvertrag

join eanlh as h

on hanlage = ranlage

where h~tariftyp in @p1@

and c~erchc_v = 'X'

and c~simulation = space

and c~tobreleasd = space

and e~budat in @p2@

and e~simulated = space

Thanks,

Sonar