Skip to Content
0

Messages are not mapped from BOPF to SADL

Apr 27, 2017 at 02:20 PM

140

avatar image
Former Member

Hi colleagues,

I've faced with following problem: I generated a Business Object based on CDS view. On one of nodes of the BO I created an alternaive key. As a result altkey validation was generated. This validation works perfect and in BOBT I get message that instance already exists (when I try to duplicate a record). But when I did the same on UI (doesn't matter in Smart template app or freestyle app) I don't get that message and only exception is raised. I investigated the problem and found that messages are not mapped from BOPF to SADL somewhere in this method /BOBF/CL_SADL_MESSAGE_HANDLER=>POPULATE_LOCATION_MAP. The same situation when I try to do authority check.

Does anybody faced the same problem?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ivo Vollrath
May 15, 2017 at 10:33 AM
0

Hi Siarhei,

what is the exact exception? If you found the place where the message is not mapped: have you been able to identify a reason why it is not mapped?

For message issues, it is also important to know whether you have a draft-enabled BO.

Regards,

Ivo

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member
Hi Ivo,

The exception /IWBEP/CX_MGW_MED_EXCEPTION is raised - what is correct, I suppose.

It is not mapped due to alternative key conversion (line 57 in the method above) does not return filled table. As result nothing to map :(

In my case BO is not draft-enabled.

Thanks in advance,

Siarhei

0

Hi Siarhei,

OK, I guess the exception is raised only because there is no other error message. The message might possibly get removed because the instance which is referenced in the message location does not exist (any more). Another possibility: if the message has lifetime STATE (instead of TRANSITION), the message is removed when the transaction gets rolled-back (BOPF CLEANUP). You may want to try explicitly setting the message's lifetime to TRANSITION to see if this could be the issue.

In your scenario, any failing validation would probably trigger a CLEANUP of the transaction. Therefore, the lifetime of the messages should probably always be TRANSITION (i.e. /bobf/cm_frw=>co_lifetime_transition).

Regards,

Ivo

0