LS_LOG-OBJECT = 'SALESORD'.
LS_LOG-SUBOBJECT = 'SALESITEM'.
CALL FUNCTION 'BAL_LOG_CREATE'
  EXPORTING
    I_S_LOG = LS_LOG
  IMPORTING
    E_LOG_HANDLE = L_LOGHAND
  EXCEPTIONS
    LOG_HEADER_INCONSISTENT = 1
    OTHERS = 2.
L_MSG-MSGTY = 'E'.
L_MSG-MSGID = 'B1'.
L_MSG-MSGNO = '999'.
L_MSG-MSGV1 = 'Update failed for'.
L_MSG-MSGV2 = LV_WI_ID.
CALL FUNCTION 'BAL_LOG_MSG_ADD'
  EXPORTING
    I_LOG_HANDLE = L_LOGHAND
    I_S_MSG = L_MSG
  IMPORTING
    E_MSG_WAS_LOGGED = B_LOG
    E_MSG_WAS_DISPLAYED = B_DISP
  EXCEPTIONS
    LOG_NOT_FOUND = 1
    MSG_INCONSISTENT = 2
    LOG_IS_FULL = 3
    OTHERS = 4.
* save logs


CALL FUNCTION 'BAL_DB_SAVE'
  EXPORTING
    I_SAVE_ALL = 'X'
  EXCEPTIONS
    OTHERS = 1.




Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP S/4 HANA Logistics Consultant
Contact : serkurumsal@yandex.com