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: 

Related to internal table

Former Member
0 Kudos
148

Hi

I am very new to ABAP. In my program i am creating one internal table for registration form.I want to display all the details from the internal table according to register no.

please help me..

regards,

shyja

1 ACCEPTED SOLUTION

Former Member
0 Kudos
112

Hi Shyja,

First sort the internal table by Reg.No.

Loop at itab into wa.

at new Reg.No.

Write: wa-Regno.

endat.

write: wa with all the remaining field values.

Endloop.

Reward if it helps.

-Satish

14 REPLIES 14

Former Member
0 Kudos
112

hi,

select *

from dbname

into itab

where registerno = ' '.

0 Kudos
112

hi,

thanks for ur reply.. but here im not using any database table.. i want to access it from internal table.

please help me..

shyja

0 Kudos
112

hi,

try like this,

LOOP AT ITAB.

WRITE:/10 .......................

.......................

.............

ENDLOOP.

if u want to read records from internal table then use READ TABLE ST AS

READ TABLE ITAB WITH KEY FIELD = 'MATNR'.

or

READ TABLE ITAB WITH KEY INDEX = SY-INDEX.

when using in aloop then give index as INDEX = SY-TABIX.

if helpful reward some points.

with regards,

Suresh.A

Former Member
0 Kudos
112

Hi

Declare a internal table

data: itab like DBtable occurs 0 with header line.

select-options: s_regn no for DBTABLE-REGIstrationno.

write select statement

select * from DBTABLE into table ITAB

where registration no in s_no.

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos
113

Hi Shyja,

First sort the internal table by Reg.No.

Loop at itab into wa.

at new Reg.No.

Write: wa-Regno.

endat.

write: wa with all the remaining field values.

Endloop.

Reward if it helps.

-Satish

Former Member
0 Kudos
112

Hi,

DATA: BEGIN OF OCCURS 0,

regno type i.

END OF ITAB.

regno = 20.

append itab.

regno = 30.

append itab.

regno = 40.

append itab.

LOOP AT ITAB.

WRITE:/10 'REGNO:', regno.

ENDLOOP.

IF USEFULL REWARD

0 Kudos
112

Hi uday,

This is not my question . Just go through my question.

shyja

Message was edited by:

Shyja vv

0 Kudos
112

Shyja,

As per your question i had given the answer. Could you please elobarate more if my thinking is wrong?

-Satish

0 Kudos
112

Hi,

The data in the internal table must be selected from some DB table. so first you require the name of the table from where you will be geting data.

Regards,

Atish

0 Kudos
112

Hi Shyja,

If you want to display all the details from the internal table according to registration number, there are 2 ways.

1) If you expect more than one record for the given regn. no.

Loop at itab into wa where regn = regno.

write wa-<components>.

Endloop.

2) If you expect only one record for the given regn. no.

Read Table itab into wa with key regn = regno.

write wa-<components>.

Hope this helps.

0 Kudos
112

Hi,

my internal table name is itab.

while giving this code '''field wa is unknown'''' like one error is coming.Actually what is this wa??

Former Member
0 Kudos
112

Hi,

DATA: BEGIN OF OCCURS 0,

regno type i.

END OF ITAB.

regno = 20.

append itab.

regno = 30.

append itab.

regno = 40.

append itab.

LOOP AT ITAB.

WRITE:/10 'REGNO:', regno.

ENDLOOP.

IF USEFULL REWARD

former_member196280
Active Contributor
0 Kudos
112

LOOP at <INTERNAL TABLE NAME> where registerno = 'XXX '.

**DISPLAY

ENDLOOP.

REWARD points if useful.

Regards,

SaiRam

Former Member
0 Kudos
112

Hi,

DATA: BEGIN OF OCCURS 0,

regno type i.

END OF ITAB.

regno = 20.

append itab.

regno = 30.

append itab.

regno = 40.

append itab.

LOOP AT ITAB.

WRITE:/10 'REGNO:', regno.

ENDLOOP.

IF USEFULL REWARD