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

Read

Former Member
0 Likes
594

Hi

Say i am retrieving data from VBAK

select * from vbak

retrieving data from vbap

select * from vbap

retreiving from likp

select * from likp

retrieving from lips

select * from lips

retrieving from kna1

select * from kna1...

i want to pass all data to final internal table..

which table we loop first ....why is that so..

How read works on these tables??

Thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
558

Hi,

better join VBAK & VBAP,

LIKP & LIPS.

SELECT * FROM VBAK & VBAP

SELECT * FROM LIKP & LIPS

SELECT KNA1.

This will be easy for you to read the data

<b>LOOP at IT_VBAK_VBAP.

READ TABLE IT_LIKP_LIPS WITH KEY VBELN = IT_LIKP_LIPS-VBELN.

IF SY-SUBRC = 0.

ENDIF.

READ TABLE IT_KNA1 WITH KEY KUNNR = IT_VBAK_VBAP-KUNNR.

IF SY-SUBRC = 0.

ENDIF.

ENDLOOP.</b>

Thanks

Vikrtanth Khimavath

5 REPLIES 5
Read only

Former Member
0 Likes
558

Why don't you JOIN them? It would be better -:)

Greetings,

Blag.

Read only

Former Member
0 Likes
558

Use Join as these tables ahve key fields...

regards,

barath.

Read only

Former Member
0 Likes
558

Hi RK,

better join VBAK & VBAP,

LIKP & LIPS.

SELECT * FROM VBAK & VBAP

SELECT * FROM LIKP & LIPS

SELECT KNA1.

This will be easy for you to read the data

Thanks

Vikranth khimavath

Read only

Former Member
0 Likes
558

b

Read only

Former Member
0 Likes
559

Hi,

better join VBAK & VBAP,

LIKP & LIPS.

SELECT * FROM VBAK & VBAP

SELECT * FROM LIKP & LIPS

SELECT KNA1.

This will be easy for you to read the data

<b>LOOP at IT_VBAK_VBAP.

READ TABLE IT_LIKP_LIPS WITH KEY VBELN = IT_LIKP_LIPS-VBELN.

IF SY-SUBRC = 0.

ENDIF.

READ TABLE IT_KNA1 WITH KEY KUNNR = IT_VBAK_VBAP-KUNNR.

IF SY-SUBRC = 0.

ENDIF.

ENDLOOP.</b>

Thanks

Vikrtanth Khimavath