Hi Dominik,
For making asynchronous call you can achieve in two ways.
- Multi threading
- Parallel Processing
- Assuming you are retrieving data from same system in this case Multi Threading will help you to speed up. As you said you have various panels which retrieves data and the only one or may be two are taking time because of huge amount of data available. For those specific functionality assuming you have separate FM that can be called Multi Threaded mode and rest as normal you are doing now.
You can do this as follows :
Use SPBT_INITIALIZE FM to get All WPs available and All Available WPs on one logon Group. You can check Logon Group using TCode RZ12.
Based on total and available WPs you need decide when to call this in Multi threaed mode or not (careful while using this, you should not use all available WPs ). For this you can have a flag which will be true only if sufficient WPs are availabe to be used.
CALL FUNCTION 'ZPP_FM_AS'
STARTING NEW TASK lv_task "this task name should be generated dynamically"
DESTINATION IN GROUP lv_logon_group
PERFORMING get_dataON END OF TASK
EXPORTING
lv_start = lv_start
lv_end = lv_end
EXCEPTIONS
communication_failure = 1
system_failure = 2
resource_failure = 3
OTHERS = 4.
get_data is one subroutine which will get called.
*--> Here we are receiveing data so only receiving table will be here..
RECEIVE RESULTS FROM FUNCTION 'ZPP_FM_AS'
IMPORTING
ev_bool = lv_bool
TABLES
lt_output = it_data_temp1
EXCEPTIONS
communication_failure = 1
system_failure = 2
resource_failure = 3
OTHERS = 4.
APPEND LINES OF it_data_temp1 TO it_data.
it_data is your final table which will have all data available. and you can bind this with your context node to display records.
This will work in Async mode so no need to wait.
Hope this will Help.
Thanks-
Abhishek