cancel
Showing results for 
Search instead for 
Did you mean: 

event location for expected events

Former Member
0 Kudos

Hello.

I'm trying to display Location, City, Region, Country on EM Portal for Expected Events.

These are the steps I've taken:    

     1) Define Location Codes and How They are Mapped.

     2) Add field to Web Interface.

     3) Test with SE37 /SAPTRX/BAPI_EH_ADDEVENTMSG_02  (Tables Header/Location/Address).

Result: In the EM Portal I only see Location, all others are blank.

(I can get unexpected events to display location details when posting via WE19 idoc)

Thanks for any help.

Zenon.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Does anybody have an example of an idoc or parameters for /SAPTRX/BAPI_EH_ADDEVENTMSG_02 to make this work for Expected Events?  As I mentioned previously it works for Unexpected Events.

I have document 'Event Message Input in SAP EM4.0:BAPI EventHandle. AddEventMessage02 and IDoc EVMSTA02'  Version 1.1.   I'm out of ideas.

Thanks for any help.

Zenon.

MarcoFreischlag
Advisor
Advisor
0 Kudos

Hi Zenon,

did you check table /SAPTRX/EH_EXPEV for your EH?

are the fields LOC_ID_1, COUNTRY, LOCAT_DESC and REGION filled?

Regards Marco

Berthold_vH
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Zenon,

just to get it right - you want to update your expected events (so adding a new one)
including Location, City, Region and Country using an Event Message? Or you
want to add this kind of information when you create the Event Handler?

In case you want to do it when creating the Event Handler you need to update the table
MILESTONEDATA (structure /SAPTRX/EXP_EVENTS) of BAPI /SAPTRX/BAPI_EH_POST. When you create your expected events there fill also the corresponding fields for
location, city, region and country.

In case you want to add a new expected event you need to have a look into the structure
/SAPTRX/BAPI_EVM_EE_MODIFY of BAPI
/SAPTRX/BAPI_EH_ADDEVENTMSG_02. But
for me it looks like that there are no fields for city, region and country. So these fields might not be supported in case you want to add a new expected event using an Event Message.

 

The tables location and address in /SAPTRX/BAPI_EH_ADDEVENTMSG_02 are used to send the respective location and address where the event is acutal happen. This means if you expect that the event should happen in location ABC but in the event message is sent from location XYZ the event will be mark as
unexpected event (also depending on some settings in the customizing of the expected event profile).

Best regards 

Berthold

Former Member
0 Kudos

Hi Berthold.

An example:

I have an Expected Event 'Proof of Delivery' that has a planned date.

The carrier (e.g. UPS) send an idoc when the Actual event occurs.

This idoc contains Event Code,Tracking code, date,time etc.

The idoc also has below fields populated:

E1EVMLID-LOCID1

E1ADRM3-CITY1

E1ADRM3-COUNTRY1

E1ADRM3-REGION.

The Web-Dynpro displays LOCID.  City, Country and Region are blank.

If I make 'Proof of Delivery' an Unexpected Event and post the same idoc,

the Web-Dynpro displays LOCID, City, Country and Region.

How do I make the Expected event display City, Country and Region??

Thanks.

Zenon.

Former Member
0 Kudos

Hi Marco

/SAPTRX/EH_EXPEV 

Fields LOC_ID_1, COUNTRY, LOCAT_DESC and REGION.

They are not filled.   

Do I have to update all of these fields?

Regards.

Zenon.

Berthold_vH
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Zenon,

I think I got your point but it looks like that this is missing functionality.

In case you have an expected event the system expect that you have already defined the city, conutry and region when you create the expected event. Which means you would fill the table /SAPTRX/EH_EXPEV when creating an Event Handler (which Marco refers to and what I meant with "when creating the Event Handler..").

In your case you don't have filled this structure beforehand. Now when display the data the system calls the function module /SAPTRX/CONSOLIDATE_EVENTS and creates the consolidated event view. As your event is expected it try to read the data from the expected event structure where these data is not maintained. So nothing can be displayed.

In case of an unexpected event there is no data for an expected event available and the system also reads the location information from the unexpected event (happens in perform map_message_field_ue of the function module).

So if you want to show these information for expected events you need to fill it when you create your expected events. Or check the BAdI Update Event Handler Data method  AFTER_GET_DATA_DISP. I guess there you can implement such a logic.

Best regards

Berthold

Former Member
0 Kudos

Thanks Berthold and Marco!!

Answers (0)