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

Moving fields to final internal table

Former Member
0 Likes
495

hi all,

after i select

elect aufk~aufnr

aufk~objnr

aufk~ktext

vbap~vbeln

vbap~posnr

from

inner join aufk

on vbapaufnr = aufkaufnr

into table t_contracts

where aufk~aufnr in s_proj

and vbap~vbeln in s_vbeln

and vbap~matnr in s_matnr

and vbap~abgru = c_abgru.

sort t_contracts by aufnr vbeln posnr.

i select status from jest like below

if t_contracts[] is not initial.

t_contracts_temp = t_contracts.

delete ADJACENT DUPLICATES FROM t_contracts_temp COMPARING aufnr objnr.

select stat

objnr

from jest

into table it_jest

for all entries in t_contracts_temp

where objnr = t_contracts_temp-objnr

and inact <> c_inact.

Now i want for every objnr the value of jest-stat should move to my final internal table it_contracts.

can you suggest the best way to do it?

2 REPLIES 2
Read only

andreas_mann3
Active Contributor
0 Likes
462

try:

SELECT aufk~aufnr

aufk~objnr

aufk~ktext

vbap~vbeln

vbap~posnr

jest~stat

FROM ( vbap JOIN aufk

ON vbapaufnr = aufkaufnr )

JOIN jest ON jestobjnr = aufkobjnr

INTO TABLE t_contracts

WHERE aufk~aufnr IN s_proj.

A.

Read only

Former Member
0 Likes
462

hi all,

Its done