2013 Oct 24 7:03 PM
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.
2013 Oct 24 7:12 PM
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.
2013 Oct 24 7:12 PM
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
2013 Oct 25 12:40 AM
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |