cancel
Showing results for 
Search instead for 
Did you mean: 

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

michele_gaddi0
Explorer
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Actually try:

raise exception type cx_ujd_datamgr_error
exporting
textid = cx_ujd_datamgr_error=>EX_FAILED

error = 'Error text'.

michele_gaddi0
Explorer
0 Kudos

Hi Vadim,

this works! Thanks.

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

Michele

former_member186338
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

"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.