Thursday, November 24, 2005

[BW] Error Msg in Transfer Rule Start routine ( Sample Code )

DATA: l_s_datapak_line type TRANSFER_STRUCTURE,
l_s_errorlog TYPE rssm_s_errorlog_int.
ABORT = 0.
LOOP AT DATAPAK INTO l_s_datapak_line.
IF ( L_S_DATAPAK_LINE-/BIC/ZPNRSBU = '' AND
L_S_DATAPAK_LINE-/BIC/ZPNRSUB NE '' ) OR
( L_S_DATAPAK_LINE-/BIC/ZPNRSBU NE '' AND
L_S_DATAPAK_LINE-/BIC/ZPNRSUB = '' ).
L_S_ERRORLOG-RECORD = L_S_DATAPAK_LINE-RECORD.
L_S_ERRORLOG-MSGTY = 'E'.
L_S_ERRORLOG-MSGID = 'ZBCS'.
L_S_ERRORLOG-MSGNO = '003'.
L_S_ERRORLOG-MSGV1 =
'PNRSUB & PNRSBU should both contain value or not.'.
L_S_ERRORLOG-MSGV2 = ''.
L_S_ERRORLOG-MSGV3 = ''.
L_S_ERRORLOG-MSGV4 = ''.
append l_s_errorlog to G_T_ERRORLOG .
ABORT = 1.
ENDIF.
IF ( L_S_DATAPAK_LINE-/BIC/ZINVSBU = '' AND
L_S_DATAPAK_LINE-/BIC/ZINVSUB NE '' ) OR
( L_S_DATAPAK_LINE-/BIC/ZINVSBU NE '' AND
L_S_DATAPAK_LINE-/BIC/ZINVSUB = '' ).
L_S_ERRORLOG-RECORD = L_S_DATAPAK_LINE-RECORD.
L_S_ERRORLOG-MSGTY = 'E'.
L_S_ERRORLOG-MSGID = 'ZBCS'.
L_S_ERRORLOG-MSGNO = '003'.
L_S_ERRORLOG-MSGV1 =
'INVSUB & INVSBU should both contain value or not.'.
L_S_ERRORLOG-MSGV2 = ''.
L_S_ERRORLOG-MSGV3 = ''.
L_S_ERRORLOG-MSGV4 = ''.
append l_s_errorlog to G_T_ERRORLOG .
ABORT = 1.
ENDIF.
IF L_S_DATAPAK_LINE-FISCYEAR = ''.
L_S_ERRORLOG-RECORD = L_S_DATAPAK_LINE-RECORD.
L_S_ERRORLOG-MSGTY = 'E'.
L_S_ERRORLOG-MSGID = 'ZBCS'.
L_S_ERRORLOG-MSGNO = '003'.
L_S_ERRORLOG-MSGV1 =
'Blank entry?'.
L_S_ERRORLOG-MSGV2 = ''.
L_S_ERRORLOG-MSGV3 = ''.
L_S_ERRORLOG-MSGV4 = ''.
append l_s_errorlog to G_T_ERRORLOG .
ABORT = 1.
ENDIF.
ENDLOOP.