Hello all.
I am creating a payroll function, in order to do some additional validations, and issue some messages, in the schema "log".
When i want to issue an error message, that stops any kind of furter processing, everything is working fine.
However, when i try to issue a warning message (yellow color), nothing happens (the message is not issued, in the schema "log").
Does anyone know what i am doing wrong?
To issue the error message, i wrote the folowing code:
if sy-subrc <> 0.
Mensagem de erro no "log"
CONCATENATE 'Colaborador' pernr-pernr ',não criado como Fornecedor!'
INTO wa_PtEXT-TEXT1 SEPARATED BY SPACE.
wa_PTEXT-TLEVEL = '00'.
wa_PTEXT-TLENGTH1 = STRLEN( PTEXT-TEXT1 ).
wa_pTEXT-TINTENSIV1 = 1.
wa_PTEXT-EMPTY_LINES = 0.
wa_ptext-message = 'X'.
APPEND wa_ptext to P_TEXT.
PERFORM fill_msgtab TABLES p_text
ptext
USING space "pernr dependent
aper_numb
p_mess_pos
'E' "error
'A'
error "T100 Pointer
l_exp.
To issue the warning message, i wrote the following code, that is not working:
Mensagem de Sucesso no "log"
message id wa_mess_tab-msgid type wa_mess_tab-msgtyp number wa_mess_tab-msgnr
with wa_mess_tab-msgv1 wa_mess_tab-msgv2 wa_mess_tab-msgv3 wa_mess_tab-msgv4
INTO wa_PtEXT-TEXT1.
wa_PTEXT-TLEVEL = '00'.
wa_PTEXT-TLENGTH1 = STRLEN( PTEXT-TEXT1 ).
wa_pTEXT-TINTENSIV1 = 1.
wa_PTEXT-EMPTY_LINES = 0.
wa_ptext-message = 'X'.
APPEND wa_ptext to P_TEXT.
PERFORM fill_msgtab TABLES p_text
ptext
USING space "pernr dependent
aper_numb
p_mess_pos
'W' "error
'M'
error "T100 Pointer
l_exp.
Thanks in advance.
Sincerely,
Hugo Ferreira