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 TABLE

Former Member
0 Likes
544

hi

I 'm new learning abap .

ı have a parameters,

I use it on read table, ıt's shape

PARAMETERS p_fpper LIKE s001-spmon .

cd-key-pernr = pernr-pernr.

rp-imp-c2-cd.

CHECK rp-imp-cd-subrc EQ 0.

READ TABLE rgdir WITH KEY fpper = p_fpper srtza = 'A'. "-----here----"

READ TABLE rgdir

CHECK sy-subrc EQ 0.

rx-key-pernr = pernr-pernr.

UNPACK rgdir-seqnr TO rx-key-seqno.

rp-imp-c2-tr.

but

ı want to SELECT-OPTIONS .

so I'm use

*READ TABLE rgdir WITH KEY fpper in p_fpper srtza = 'A'.* "-----here----"

error: unable to ınterpret 'in' possible causes of error :incorrect spelling or comma error.

. . .

4 REPLIES 4
Read only

Former Member
0 Likes
491

Hi,

we can't use 'IN' in the Read statement.

Edited by: Aalok Arun on Aug 1, 2008 11:01 AM

Read only

Former Member
0 Likes
491

Hi,

Read Table is used to fetch single record only.

So you cant use select option for that.

Insted of read table you can use Loop At statement for the same .

Regards,

Swarup

Edited by: Swarup basagare on Aug 1, 2008 11:03 AM

Read only

Former Member
0 Likes
491

The use of select option mean intended result is more than one one record. Thus loop statement is the correct option to use in such case.

Select-option can not be use with Read statement.

Example:

Loop at <table>

Check field value in <Select-option>

<Processing>

Endloop.

Mahesh

Read only

0 Likes
491

your answer thanks

this probleme ı unite

cd-key-pernr = pernr-pernr.

rp-imp-c2-cd.

CHECK rp-imp-cd-subrc EQ 0.

READ TABLE rgdir WITH KEY srtza = 'A'. "fırstly all rs

CHECK rgdir-fpper in p_fpper. ""herer" "than necessary rs

CHECK sy-subrc EQ 0.

rx-key-pernr = pernr-pernr.

UNPACK rgdir-seqnr TO rx-key-seqno.

Edited by: mesut agkus on Aug 1, 2008 2:07 PM