Skip to Content
0

BPC 10.1 NW - Set package stauts via Start/End Routine BADI

Sep 22, 2017 at 11:38 AM

91

avatar image

Hi all,

I'm trying to set a "Failed" status in a start routine BADI used to import transaction data from file.

I cannot set the "Failed" status properly:

1. There is no exception to be raised in method IF_UJD_ROUTINE~RUNROUTINE while in the BADI for script logic there is the exception CX_UJ_CUSTOM_LOGIC which can be used to set the "Failed" status.

2. If I set the message type 'E' in the table ET_MESSAGE:

                ls_message-msgid = 'ZXXXX'.
                ls_message-msgno = '001'.
                ls_message-msgty = 'E'. " I W A

the status is always "Warning" but this seems to be the same behaviour as the BADI for script logic (any message type always set the status to "Warning").

In addition I cannot use method "cl_ujk_logger=>log" for logging: no message is displayed if I use that method while works on BADI for script logic.

Components:

SAP_BW 740 0014

CPMBPC 810 0009

HANABPC 810 0009

Thanks,

Michele

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

2 Answers

Best Answer
Vadim Kalinin Sep 22, 2017 at 04:53 PM
0

Actually try:

raise exception type cx_ujd_datamgr_error
exporting
textid = cx_ujd_datamgr_error=>EX_FAILED

error = 'Error text'.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Vadim,

this works! Thanks.

Is it possibile to display a table of messages like ET_MESSAGE instead of only a string?

Michele

0

Sorry, I don't have a test routine badi in my system to play with it...

0
Vadim Kalinin Sep 22, 2017 at 04:19 PM
0

"There is no exception to be raised in method IF_UJD_ROUTINE~RUNROUTINE" - start with division by zero :)

"In addition I cannot use method "cl_ujk_logger=>log" for logging: no message is displayed if I use that method while works on BADI for script logic." - yes, this method is used only for Custom logic badi.

Share
10 |10000 characters needed characters left characters exceeded