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

Sending Data through RFC based on line count

Former Member
0 Likes
645

Hi Gurus,

     I have created a RFC. User will call this RFC with parameters Line Start and Line End, Say if user specifies 1 to 1000, he should get first 1000 records, when user specifies 1501 to 2500,then he should get the the records from 1501 to 2500. Can you please tell me how to implement this logic in RFC.

Thanks,

Praveen.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
589

Hi Praveen,

You are getting start and end line no from user in import. You can use those directly on your final table as below.

Loop at it_final into lwa_final from start_line to end_line.

Fill output table .

endloop.

Regards,

Koustubh

Hi Gurus,

     I have created a RFC. User will call this RFC with parameters Line Start and Line End, Say if user specifies 1 to 1000, he should get first 1000 records, when user specifies 1501 to 2500,then he should get the the records from 1501 to 2500. Can you please tell me how to implement this logic in RFC.

Thanks,

Praveen.

2 REPLIES 2
Read only

Former Member
0 Likes
590

Hi Praveen,

You are getting start and end line no from user in import. You can use those directly on your final table as below.

Loop at it_final into lwa_final from start_line to end_line.

Fill output table .

endloop.

Regards,

Koustubh

Read only

0 Likes
589

also need to check if internal table line count is less than end count otherwise it will give dump.

l_count = lines(  it_final ).

if (start_line <= end_line) and (start_line > 0 )

     if l_count < end_line

       end_line = l_count.  

     endif

     Loop at it_final into lwa_final from start_line to end_line.

        Fill output table .

     Endloop.

else

     Give error message

endif.