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

QUERY

Former Member
0 Likes
769

Hi,

I have selected ebeln aedat lifnr fields from table ekko on condition

ebeln in s_ebeln into table t_ekko.

now i want to retrieve fields lifnr name spras from table lfa1

on lifnr must be equal to the lifnr which we have retrieved into table t_ekko.

like

lifnr = t_ekko-lifnr.

Pls suggest me the query.

Regards,

Nasru

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
739
if not t_ekko[] is initial.

  select lifnr name spras  into table it_lifnr from lfa1 for all entries in t_ekko where lifnr eq t_ekko-lifnr.

ebdif.
5 REPLIES 5
Read only

Former Member
0 Likes
740
if not t_ekko[] is initial.

  select lifnr name spras  into table it_lifnr from lfa1 for all entries in t_ekko where lifnr eq t_ekko-lifnr.

ebdif.
Read only

0 Likes
739

Hi Chandrasekhar,

Thank u.

Regards,

Nasru

Read only

Former Member
0 Likes
739

Hi,

use a Join for EKKO and LFA1 tables

select aebeln aaedat alifnr bname1 bland1 bort01 b~pstlz

into table t_ekko from

ekko as a join lfa1 on alifnr = blifnr where

a~ebeln in s_ebeln.

reward points if useful

regards,

ANJI

Read only

Former Member
0 Likes
739

Hi,

Use FOR ALL ENTRIES to serve for your purpose.

<b>select *

from lfa1

into <tab name>

for all entries in t_ekko

where lifnr = t_ekko-lifnr.</b>

Regards,

Read only

Former Member
0 Likes
739

Hai Nasru,

Select ebeln

aedat

lifnr fields

from table ekko

into table t_ekko

where ebeln in s_ebeln .

<b>Select lifnr_name

spras

from table lfa1

into table t_ekko

for all entries in t_ekko

where lifnr = t_ekko-lifnr.</b>

Hope you got it.

<b>Reward points if it helps you.</b>

Regds,

Rama chary.Pammi