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 next record from internal table in a single case statement or loop.

harshal_pingale
Explorer
0 Likes
2,675

WHEN '40'.

perform bdc_field       using 'RF05V-NEWBS'

                              ITAB-NEWBS. "'40'.

perform bdc_field       using 'RF05V-NEWKO'

                              ITAB-NEWKO. "'39000660'.

perform bdc_dynpro using 'SAPLF040' '0300'.

perform bdc_field using 'BDC_CURSOR'

'RF05V-NEWKO'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'BSEG-WRBTR'

ITAB-WRBTR. "'16000'.

perform bdc_field using 'BSEG-BUPLA'

ITAB-BUPLA . "'NMUJ'.

perform bdc_field using 'BSEG-ZUONR'

ITAB-ZUONR. "'F/S - APRIL-14'.

perform bdc_field using 'BSEG-SGTXT'

ITAB-SGTXT. "'F/S FOR APRIL -2014'.

perform bdc_field       using 'RF05V-NEWBS'

                              ITAB-NEWBS. "'40'.

perform bdc_field       using 'RF05V-NEWKO'

                              ITAB-NEWKO. "'39000660'.

I want to fetch next record of itab-newbs and itab-newko in a single loop or case statement.

1 ACCEPTED SOLUTION
Read only

SharathYaralkattimath
Contributor
0 Likes
1,396

use READ TABLE with the next index,

pseudo code :---READ TABLE itab INDEX (sy-tabix + 1)

2 REPLIES 2
Read only

SharathYaralkattimath
Contributor
0 Likes
1,397

use READ TABLE with the next index,

pseudo code :---READ TABLE itab INDEX (sy-tabix + 1)

Read only

harshal_pingale
Explorer
0 Likes
1,396

Hi Sharath,

                Thank you, your solution solved my problem.