cancel
Showing results for 
Search instead for 
Did you mean: 

Location Codes and descriptions

ZenonK
Participant
0 Kudos

Hello Gurus.

I'm posting an idoc in WE19 (in EM).

In idoc Segment E1EVMLID I update LOCCOD ABC1  and LOCID1 0001.

Spro Location Codes:  External Location Code Set = ABC1  Ext. Location ID1 = 0001.

Spro Location Codes:  Internal  Location Code Set = ABC1  Int. Location ID1 = 0001.  Update Street, City, Country etc.

Spro update Sender independent Mapping


The message posts and updates the EH  but does not pick up the Street, City, Country etc.  (Can't see it in se16  /saptrx/evm_hdr).


In Debug

/SAPTRX/CODE_MAPPING line 56   add_loc_data =' '.


IF add_loc_data = 'X'.

               PERFORM get_add_data CHANGING int_codes.


Is there something required in spro or the idoc that makes add_loc_data = 'X'.



Please can you help.

Cheers.

Zenon.

Accepted Solutions (1)

Accepted Solutions (1)

former_member190756
Active Contributor
0 Kudos

Hi Zenon,

is it available in table /SAPTRX/EVM_LID?

Best regards,

Steffen

ZenonK
Participant
0 Kudos

Hi Steffen.

/SAPTRX/EVM_LID  contains the EVT GUID and Location codes, but all the details (street,city etc) are empty.


Thanks,

Zenon,.

former_member190756
Active Contributor
0 Kudos

They should be handled here:

/SAPTRX/LEH_BAPISF12

Form assign_location.

They are moved from the address structure.

So maybe you could debug and check what is filled here.

Best regards,
Steffen

ZenonK
Participant
0 Kudos

Hi Steffen.

I was unable to get the location mapping to pick up the city, street etc.   Is this config working as expected in anyone elses scenarios?

I think I'll create a z version of the idoc processing function (IDOC_INPUT_EVMSTA) and update the street and city information there.

Regards.

Zenon.

Former Member
0 Kudos

Hi Zenon,

It didn't work for me either. Try creating OSS request for object /SAPTRX/LEH_BAPISF12 and it will help other EM consultants/projects too:)

While we have solution:

If there are not too many events, try using pre-processing functions instead of creating custom IDOC_INPUT_EVMSTA.

Other option is /saptrx/badi_message. As you already know, this BADI has been replaced by pre-processing technique but still works till we have a solution and you can de-active it later.

Thanks,

Vishnu

Former Member
0 Kudos

Hi Zenon,

The functional module /SAPTRX/CODE_MAPPING which you refer you have to configure "Sender-Dependent Location Mapping (Table /SAPTRX/MAPLOCI2)" to execute line number 56 IF add_loc_data = 'X'.

You have to configure Sender-Dependent Location Mapping to execute the line then it goes to line number 56.

Check and let me know.

Regards


GGOPII

Former Member
0 Kudos

Hi Gopi,

No matter what you pass, add_loc_data = 'X' will not happen. In location mapping for events in object /SAPTRX/LEH_BAPISF12, we are not passing add_loc_data = 'X' at all.

Even if there was add_loc_data = 'X' in the /SAPTRX/LEH_BAPISF12 for '/SAPTRX/CODE_MAPPING', I don't see City, State is being populated into location structures. Basically the location info is copied into location structures from Header structure which was built in /SAPTRX/LEH_BAPISF25.


Best if SAP team can take a look.


FYI: I am looking at the code in EM9.2


Thanks,

Vishnu




Former Member
0 Kudos

Hi Vishnu,

I debugged now and see that PERFORM get_add_data CHANGING int_codes is executing with same data with ADD_LOC_DATA = 'X'


The line number 91 executes and then line number 94 checks IF add_loc_data = 'X' and perform get_add_data.


It is fetching address now.



You can check and let me know.


Regards



GGOPII

Former Member
0 Kudos

Hi Gopi,

Not working for me. Can you add screen shot of your code /SAPTRX/LEH_BAPISF12 and what's your testing data?

Thanks,

Vishnu

Former Member
0 Kudos

Hi Vishnu,

1. First you need to configure Sender-Dependent Location Mapping.

2. Go to functional module /SAPTRX/CODE_MAPPING

3. Manually enter below config data and ADD_LOC_DATA = 'X'.

4. Execute then you can see the code goes to line number 91 and then it fetches address which I was given in previous.

Regards


GGOPII

ZenonK
Participant
0 Kudos

This works when using SE37 /SAPTRX/CODE_MAPPING and setting ADD_LOC_DATA = 'X'.

However this does not appear to work when using idocs.

As Vishnu said,  the ADD_LOC_DATA parameter is never passed when using idocs.

Former Member
0 Kudos

Hi Zenon,

Hmm, this looks strange.  There could be two reasons- the program has a bug or we haven't pass right data.

Have you created SAP OSS message for this?

regards

GGOPII

ZenonK
Participant
0 Kudos

Hi Gopi.

No I have not created an OSS.

My project needed the Location working yesterday so I created a custom IDOC_INPUT_EVMSTA.

This works very well.

Regards.

Zenon.

Answers (0)