I'm trying to call ISR_PROCESS_EVENT as an RFC, passing in the data for a form, and trying to validate the fields. To do this i first call ISR_PROCESS_EVENT with mode "CREATE" and get back the fields I need. So far so good.
Later, I call the same RFC, this time passing in parameters mode = "CREATE" and event = "CHECK". When calling the RFC this second time i get an assert failed error in the code pasted below.
Is it a requirement that the "check" variation must be called from the same abap session as the initial create call? I ask this because I've been able to make it work if i write a custom function module which calls first ISR_PROCESS_EVENT CREATE with event space and then immediately call ISR_PROCESS_EVENT CREATE CHECK int he same RFC, but with the same input tables it fails if called separately. My only working assumption at this point is that it relies on the function to be initialized with CREATE first in the same session, and since I'm doing this via RFC call in two steps, this isn't the case.
Please help!
The "data_containers" are initial in class CL_IM_HRASR00ISR=>GET_PROCESS_OBJECT_HANDLER
Get all data containers from all scenarios
IF data_containers IS REQUESTED.
CALL METHOD process_object_handler->get_all_data_containers
EXPORTING
message_handler = message_handler
IMPORTING
data_containers = data_containers_xml
is_ok = is_ok.
IF is_ok EQ false.
EXIT.
ENDIF.
LOOP AT data_containers_xml INTO data_container_xml.
Create a new data container if XML is not empty
(This happens if the BAdI is called from the glue step)
IF data_container_xml-data_container IS NOT INITIAL.
CREATE OBJECT data_container
EXPORTING
xml = data_container_xml-data_container.
APPEND data_container TO data_containers.
data_container_pair-data_container = data_container.
data_container_pair-data_container_xml = data_container_xml
APPEND data_container_pair TO data_container_pairs.
ENDIF.
ENDLOOP.
ASSERT data_containers IS NOT INITIAL.
ENDIF.
Edited by: Chris Hesse on Jun 30, 2010 8:13 PM
Edited by: Chris Hesse on Jun 30, 2010 8:14 PM