Application Development 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: 

How to fetch the perticular line of a internal Table

Former Member
0 Kudos

Hi Friends,

I am using Function Module VC_I_GET_CONFIGURATION and I am passing the instance Number.

Now i am getting 18 records in my ITAB.Here from this ITAB i need only ATBEZ = RELAY TYPES & ATBEZ = CASE Records.Only for the mentioned conditions i require the records.

How Can i Proceed.Plz suggest.As CASE is the reserved word and Types also reserved Word.

Plz suggest.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Please use the following code.

loop at itab into wa where ATBEZ = RELAY TYPES and ATBEZ = CASE .

append wa to itab1(new table).

clear wa.

endloop.

7 REPLIES 7

Former Member
0 Kudos

Hi,

Please use the following code.

loop at itab into wa where ATBEZ = RELAY TYPES and ATBEZ = CASE .

append wa to itab1(new table).

clear wa.

endloop.

GauthamV
Active Contributor
0 Kudos


Loop at itab where ATBEZ = 'RELAY TYPES'  or ATBEZ = 'CASE'..

move itab to itab1.

.........

endloop.

Former Member
0 Kudos

Hi,

Thanks for ur Reply and Can i Use Read statement for the same. My requirement is ATBEZ = 'RELAY TYPES' AND 'CASE'.

While Printing in smart form for one item there will be only one Relay type.How can i proceed.

If i write LOOP AT ITAB WHERE ATBEZ = 'RELAY TYPES' or ATBEZ = ' CASE'.

2 records r coming and only the secong recored is appending.First Record will not append.

How can i do.

Plz suggest.

Former Member
0 Kudos

HI,

Use the LOOP Statement with WHERE clause.

Former Member
0 Kudos

Dear Sameera,

use loop statement with ATBEZ = RELAY TYPES & ATBEZ = CASE as conditions in where clause.

Cheers

fareed

Former Member
0 Kudos

Hi Sameera,

Use the solution given abouve by the friends. But dont forget tosort the internal table by ATBEZ. It will improve the LOOP...ENDLOOP performancd.

Rgds,

Sachin.

Former Member
0 Kudos

hi,

assume your internal table is ITAB...

itab1[] = itab[] " copying itab to another internal table ',if you want the details.

delete itab where ATBEZ = RELAY and ATBEZ = CASE