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

select

Former Member
0 Likes
834

I would like to create this select statement<br />

select * into lw_temp from p0002 where nachn,vorna like lt_header_appraisee -name .<br />

How we can concatenate vorna and nachn in this statement<br />

??<br />

thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
816

Split lt_header_appraisee -name into nachn and vorna

and use in where condition.

split lt_header_appraisee -name at space into v_nachn v_vorna.

5 REPLIES 5
Read only

JozsefSzikszai
Active Contributor
0 Likes
816

hi,

you could use FOR ALL ENTRIES, but in this case nachn and vorna have to be separate fields in your internal table:

select *

into lw_temp

from pa0002

FOR ALL ENTRIES IN lt_header_appraisee

where nachn = lt_header_appraisee-nachn

and vorna = lt_header_appraisee -vorna.

hope this helps (some)

ec

Read only

Former Member
0 Likes
817

Split lt_header_appraisee -name into nachn and vorna

and use in where condition.

split lt_header_appraisee -name at space into v_nachn v_vorna.

Read only

0 Likes
816

Srinivas, your answer is most likely correct. But here's my question...

What if it is a compound last name? Depending for wich country he is working this might not be the right way to do it, as there are last names like De la Rosa or Von Saperstein

I think Cartman's choice is better, he need to find a way to separate both fields

Read only

Former Member
0 Likes
816

In fact I have a var name which contain last name and vorname (exp met choco jean) and I have another variable which contain the last name (met choco) but I need each var separately (last name ok and vorname alone)? can you give me a function that extract a substring from another in abap. thanks in advance.

Read only

Former Member
0 Likes
816

resolved