Skip to Content

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 22, 2017 at 04:53 PM

    Actually try:

    raise exception type cx_ujd_datamgr_error
    exporting
    textid = cx_ujd_datamgr_error=>EX_FAILED

    error = 'Error text'.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 22, 2017 at 04:19 PM

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

    Add comment
    10|10000 characters needed characters exceeded