cancel
Showing results for 
Search instead for 
Did you mean: 

how to save instance from HRASR_PROCESS_EXECUTE initalization

Former Member
0 Kudos

Hi,

We try to build a sapui5 appliction with is using HRASR_PROCESS_EXECUTE.

When the application is started we call the FM HRasr_process_execute with event INITIALIZE. This creates a instance and give us the initial values of the process.

When we change the data in application we want to trigger event SEND. But before we can do the event SEND we have to do the event INITIALIZE again.

Is there a possibility to re-use the instance created in the first step!

Kind regards,

Richard Middelburg

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member226203
Active Contributor
0 Kudos

Hi,

Initialize event has to be passed before the SEND event. This would invoke the hcm pf framework and returns the forms values etc. based on the configuration during design time.

You can call the Initialize even and get the form values back to CT_FORM_FIELD_VALUES and modify this internal table with any change in values required.

Then, trigger the SEND event.

sahirn
Active Contributor
0 Kudos

Not sure if you have read through the FM documentation. Check if you are following the correct sequence.

Copied here for your reference:

The typical sequence of events that must be passed to the function module during the execution of a process is as follows:

  1. 1. INITIALIZE - It is mandatory to invoke the function module with the INITIALIZE event before any further processing can be performed. This applies to both launching a workitem as well as starting a new process.
  2. 2. CHECK - After users have made changes to the form data, a CHECK event can be fired to the backend to check the form data. Invoke the function module with the parameter IV_EVENT  = 'CHECK'. If there are any errors, warnings or information messages returned from the infotype backend business logic, these will be filled in the parameter ET_MESSAGES.
  3. 3. User events - Any user events configured for a form scenario stage in the Design Time Tool (DTT) can be passed for execution.
  4. 4. SEND - After executing the CHECK if there are no errors, the form data can be submitted to the backend, for further processing. Invoke the function module with the parameter IV_EVENT = 'SEND'.

Regards,

Sahir.