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

Fetching the values

Former Member
0 Likes
669

Hi,

Have writtten the code as

CALL FUNCTION 'LIST_TO_ASCI'

EXPORTING

LIST_INDEX = -1

WITH_LINE_BREAK = ' '

TABLES

listasci = it_asc

LISTOBJECT = it_list

EXCEPTIONS

EMPTY_LIST = 1

LIST_INDEX_INVALID = 2

OTHERS = 3

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

loop at it_asc.

if sy-tabix > 2.

write:it_asc-txt.

endif.

endloop.

in the table it_asc the values present is getting genereated as a report.From the report genereated i need to fetch only one value.How to get it...

1 ACCEPTED SOLUTION
Read only

madan_ullasa
Contributor
0 Likes
635

Hi,

If it is only one value then 'READ' the internal table with the key values or if you are sure of the index, then 'READ' with the index..

regards,

Madan..

4 REPLIES 4
Read only

Former Member
0 Likes
635
loop at it_asc.
if sy-tabix > 2.
if <selection condition>.
<var> = it_asc-<required field>.
endif.
endloop.

Now you can use the value from <var>

Read only

Former Member
0 Likes
635

>

>From the report genereated i need to fetch only one value.How to get it...

One value or first value?

Read only

0 Likes
635

Only one value

Read only

madan_ullasa
Contributor
0 Likes
636

Hi,

If it is only one value then 'READ' the internal table with the key values or if you are sure of the index, then 'READ' with the index..

regards,

Madan..