cancel
Showing results for 
Search instead for 
Did you mean: 

Activity Function instead of Activity method not working

Former Member
0 Kudos

Hi EM Experts ,

I am sending few parameter from web portal . These parameter are captured under Parameter Component of structure /SAPTRX/EVM_TABLES when I create Z method under standard class . I have some restriction of creating a method under standard class . So I decided to create activity function to fulfill the requirement . However I noticed that Parameter Component of structure /SAPTRX/EVM_TABLES is not getting filled with value from the portal when I create activity function instead of activity method .

Any idea when to use activity method or activity function .

Thanks ,

Rajesh Dwivedi

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186607
Active Contributor
0 Kudos

Hi Rajesh,

normally this should work and you should have access in your activity function to the parameter component of /SAPTX/EVM_TABLES.

Do you retrieve the evm tables like proposed in the activity function template:

DATA: l_evm_tables  TYPE /saptrx/evm_tables.

*
  CATCH SYSTEM-EXCEPTIONS

          move_cast_error = 8.

    l_evm_model ?= i_eai-eh_model.

    l_evm_tables = l_evm_model->get_event_data( ).

  ENDCATCH. ?

If you do this the parameters like all other event message data should be available in l_evm_tables.

Best regards, Daniel

Former Member
0 Kudos

Hi ,

I am also facing the same issue.

I have a custom eventhandler with a z Extension table .  I am using a rule set using activity params_change_new to  update the system parameters in Z extension table.

When I post an  epcis object event with epc Z extension parametrs first time the z paramer values get updated in the z extension table.

When I post another object event with same epc id and different z parameters


values/updated values of the first set z paremerts  , these values  are not getting updated in the z extension table.

we checked l_evm_tables , parameters structure is blank.

Wanted to know where exactly the epc extension  Z parameters  passed & captured in EM .

Regards

Tusar

former_member186607
Active Contributor
0 Kudos

Hi Tusar,

ok, I assume you are using SAP EM as part of SAP OER. If you are using the EPCIS interface, there is a hard restriction that the system parameters can only be created with the first EPCIS message for an specific EPC. The EPC Extensions (which are used in the EPCIS message to set the system parameters) are not processed for all follow-up EPCIS messages for this EPC, they are simply ignored then. In the EPCIS scenario the system parameters are seen as static attributes of an EPC (respectively of the object related to the EPC) that cannot be changed.

What is your use case behind this?

Cheers, Daniel

Former Member
0 Kudos

Hi Daniel,

The scenario is  posting of  3 three events for the same epc ( pick, pack, load). Each event will be passing  new set of  custom z parameters and updating the same z table associated with the EH.

Based on these parametes, EM is going take different Post event actions.

Another question in EM scenario is does it make sense posting only epcis events without any associated document events?

Regards

Tusar

former_member186607
Active Contributor
0 Kudos

Hi,

and such an event includes multiple EPCs, I guess? And you want to post different custom z parameters and/or parameter values for each EPC?

What kind of events make sense always depends on the scenario. What do you mean with "document events"?

Cheers, Daniel

Berthold_vH
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Rajesh,

why don't you use the standard activity method PARAMETER_CHANGE? With this method you can add parameter.

Best regards

Berthold