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

join with 2 itab

Former Member
0 Likes
477

Hi expert

I don't able to write this abap code. I have 2 itab and I shoul add lt_ausp into lt_equi

lt_equi

EQUNR SERNR

000000000010001803 000000000000008795

000000000010001805 000000000000001233

lt_ausp

Cx OBJECT ATINN ATWRT

1 000000000010001803 0000001620 AAAAA

2 000000000010001803 0000001624 BBBBBB

3 000000000010001803 0000001651 SREWREWR

4 000000000010001803 0000001658 EREWR

5 000000000010001803 0000001703 18

1 000000000010001805 0000001620 ZZZZZZZZZ

2 000000000010001805 0000001624 REWREW

3 000000000010001805 0000001651 STANDARD

4 000000000010001805 0000001659 STANDARD

5 000000000010001805 0000001704 4-1/2-8

this is my abap code

LOOP AT lt_ausp.

READ TABLE lt_equi WITH KEY equnr = lt_ausp-objek BINARY SEARCH.

IF sy-subrc = 0.

lt_equi-lv_count = lt_ausp-lv_count.

lt_equi-atinn = lt_ausp-atinn.

lt_equi-atwrt = lt_ausp-atwrt.

APPEND lt_equi .

ENDIF.

ENDLOOP.

but doens't work.

Edited by: Giorgio Vecchiato on Oct 29, 2009 3:31 PM

2 REPLIES 2
Read only

Former Member
0 Likes
431

Hi,

The structure of lt_EQUI does not seem to contain all the fields in lt_ausp. Then how will you map the fields?

Thanks,

Harini

Read only

0 Likes
431

hi Harini

this is the structure of table

DATA: BEGIN OF lt_equi OCCURS 0,

equnr LIKE equi-equnr,

equnr50 LIKE ausp-objek,

sernr LIKE equi-sernr,

objnr LIKE equi-objnr,

parvw LIKE ihpa-parvw,

parnr LIKE ihpa-parnr,

mganr LIKE bgmkobj-mganr, "

gwldt LIKE bgmkobj-gwldt,

cuobj LIKE equi-cuobj,

atinn LIKE cawn-atinn,

lv_count TYPE sy-index,

atwrt LIKE ausp-atwrt,

END OF lt_equi.

DATA: BEGIN OF lt_ausp OCCURS 0,

lv_count TYPE sy-index VALUE 1,

objek LIKE ausp-objek,

atinn LIKE ausp-atinn,

atwrt LIKE ausp-atwrt,

END OF lt_ausp.