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: 

Fetching the values

Former Member
0 Kudos

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

madan_ullasa
Contributor
0 Kudos

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

Former Member
0 Kudos
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>

former_member181995
Active Contributor
0 Kudos

>

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

One value or first value?

0 Kudos

Only one value

madan_ullasa
Contributor
0 Kudos

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..