Tabela 'T100' não contém nenhuma entrada para J1B_NFE 603 – NOTA SAP 1993419
E lembre toda vez que existir uma regra de validação apontando para uma mensagem, esta mensagem dever estar cadastrada na SE91 -> J1B_NFE 603.
Erro erro e erro... aff
O que o pré requesito não aplicado não faz!!!!
Dentro da BAPI create NF
CALL FUNCTION 'BAPI_J_1B_NF_CREATEFROMDATA' (linha 954)
PERFORM check_nf_bapi (linha 551)
CALL FUNCTION 'CHECK_DOMAIN_VALUES' (linha 894)
Regra de validação
Include - LJ1BBF2G
* Begin validations --> Note 1993419 "1993419
IF wk_header-nfe = 'X'. "1993419
* Always: NF-e: Check if Payment Form is valid in the "1993419
* domain values. "1993419
CALL FUNCTION 'CHECK_DOMAIN_VALUES' "1993419
EXPORTING "1993419
domname = 'J_1B_PAY_FORM_IND' "#EC NEEDED "1993419
value = wk_header-indpag "1993419
EXCEPTIONS "1993419
no_domname = 1 "1993419
wrong_value = 2 "1993419
dom_not_found = 3 "1993419
OTHERS = 4. "1993419
IF sy-subrc <> 0. "1993419
subrc = 8. "1993419
PERFORM bapireturn_fill "1993419
USING 'J1B_NFE' 'E' '602' "1993419
wk_header-indpag space space space "1993419
CHANGING return[]. "1993419
ENDIF. "1993419
"1993419
* Always: NF-e: Check if Freight mode is valid in the "1993419
* domain values. "1993419
CALL FUNCTION 'CHECK_DOMAIN_VALUES' "1993419
EXPORTING "1993419
domname = 'J_1B_FREIGHT_MODE' "#EC NEEDED "1993419
value = wk_header-modfrete "1993419
EXCEPTIONS "1993419
no_domname = 1 "1993419
wrong_value = 2 "1993419
dom_not_found = 3 "1993419
OTHERS = 4. "1993419
IF sy-subrc <> 0. "1993419
subrc = 8. "1993419
PERFORM bapireturn_fill "1993419
USING 'J1B_NFE' 'E' '603' "1993419
wk_header-modfrete space space space "1993419
CHANGING return[]. "1993419
ENDIF. "1993419
"1993419
* Always: NF-e: Check if NF-e Final Consumer Indicator "1993419
* is valid in the domain values. "1993419
CALL FUNCTION 'CHECK_DOMAIN_VALUES' "1993419
EXPORTING "1993419
domname = 'J_1BNFE_INDFINAL' "#EC NEEDED "1993419
value = wk_header-ind_final "1993419
EXCEPTIONS "1993419
no_domname = 1 "1993419
wrong_value = 2 "1993419
dom_not_found = 3 "1993419
OTHERS = 4. "1993419
IF sy-subrc <> 0. "1993419
subrc = 8. "1993419
PERFORM bapireturn_fill "1993419
USING 'J1B_NFE' 'E' '604' "1993419
wk_header-ind_final space space space "1993419
CHANGING return[]. "1993419
ENDIF. "1993419
"1993419
* Always: NF-e: Check if NF-e Customer Presence Indicator "1993419
* is valid in the domain values. "1993419
CALL FUNCTION 'CHECK_DOMAIN_VALUES' "1993419
EXPORTING "1993419
domname = 'J_1BNFE_INDPRES' "#EC NEEDED "1993419
value = wk_header-ind_pres "1993419
EXCEPTIONS "1993419
no_domname = 1 "1993419
wrong_value = 2 "1993419
dom_not_found = 3 "1993419
OTHERS = 4. "1993419
IF sy-subrc <> 0. "1993419
subrc = 8. "1993419
PERFORM bapireturn_fill "1993419
USING 'J1B_NFE' 'E' '605' "1993419
wk_header-ind_pres space space space "1993419
CHANGING return[]. "1993419
ENDIF. "1993419
"1993419
* Always: NF-e: Check if the Process origin indicator "1993419
* is valid in the domain values. "1993419
LOOP AT wk_ref_proc. "1993419
CALL FUNCTION 'CHECK_DOMAIN_VALUES' "1993419
EXPORTING "1993419
domname = 'J_1BNF_PROC_ORIGIN' "#EC NEEDED "1993419
value = wk_ref_proc-indproc "1993419
EXCEPTIONS "1993419
no_domname = 1 "1993419
wrong_value = 2 "1993419
dom_not_found = 3 "1993419
OTHERS = 4. "1993419
IF sy-subrc <> 0. "1993419
subrc = 8. "1993419
PERFORM bapireturn_fill "1993419
USING 'J1B_NFE' 'E' '608' "1993419
wk_ref_proc-indproc space space space "1993419
CHANGING return[]. "1993419
ENDIF. "1993419
ENDLOOP. "1993419
"1993419
* Always: NF-e: Check if the Account number is valid on "1993419
* table ska1. "1993419
CLEAR lv_ktopl. "1993419
SELECT SINGLE ktopl "1993419
INTO lv_ktopl "1993419
FROM t001 "1993419
WHERE bukrs = wk_header-bukrs. "1993419
"1993419
LOOP AT wk_item. "1993419
IF NOT wk_item-cod_cta IS INITIAL. "1993419
SELECT SINGLE saknr "1993419
INTO lv_saknr "1993419
FROM ska1 "1993419
WHERE ktopl = lv_ktopl "1993419
AND saknr = wk_item-cod_cta. "1993419
IF sy-subrc <> 0. "1993419
subrc = 8. "1993419
PERFORM bapireturn_fill USING 'F5' 'E' '106' "1993419
wk_item-cod_cta wk_header-bukrs space space "1993419
CHANGING return[]. "1993419
ENDIF. "1993419
ENDIF. "1993419
ENDLOOP. "1993419
"1993419
* Always: NF-e: Check if the Regions in transport "1993419
* tabstrip is valid in the table T005S. "1993419
CLEAR ls_addr1_val. "1993419
CALL FUNCTION 'J_1B_BRANCH_READ' "1993419
EXPORTING "1993419
branch = wk_header-branch "1993419
company = wk_header-bukrs "1993419
IMPORTING "1993419
address_value = ls_addr1_val "1993419
EXCEPTIONS "1993419
branch_not_found = 1 "1993419
address_not_found = 2 "1993419
company_not_found = 3 "1993419
OTHERS = 4. "1993419
"1993419
IF sy-subrc = 0. "1993419
IF NOT wk_header-uf1 IS INITIAL. "1993419
SELECT SINGLE mandt "1993419
INTO lv_dummy "1993419
FROM t005s "1993419
WHERE land1 = ls_addr1_val-country "1993419
AND bland = wk_header-uf1. "1993419
"1993419
IF sy-subrc <> 0. "1993419
subrc = 8. "1993419
PERFORM bapireturn_fill "1993419
USING 'J1B_NFE' 'E' '607' "1993419
wk_header-uf1 ls_addr1_val-country "1993419
space space "1993419
CHANGING return[]. "1993419
ENDIF. "1993419
ENDIF. "1993419
"1993419
IF NOT wk_header-ufembarq IS INITIAL. "1993419
SELECT SINGLE mandt "1993419
INTO lv_dummy "1993419
FROM t005s "1993419
WHERE land1 = ls_addr1_val-country "1993419
AND bland = wk_header-ufembarq. "1993419
"1993419
IF sy-subrc <> 0. "1993419
subrc = 8. "1993419
PERFORM bapireturn_fill "1993419
USING 'J1B_NFE' 'E' '607' "1993419
wk_header-ufembarq ls_addr1_val-country "1993419
space space "1993419
CHANGING return[]. "1993419
ENDIF. "1993419
ENDIF. "1993419
"1993419
LOOP AT wk_trailer_info. "1993419
IF NOT wk_trailer_info-veh_uf IS INITIAL. "1993419
SELECT SINGLE mandt "1993419
INTO lv_dummy "1993419
FROM t005s "1993419
WHERE land1 = ls_addr1_val-country "1993419
AND bland = wk_trailer_info-veh_uf. "1993419
"1993419
IF sy-subrc <> 0. "1993419
subrc = 8. "1993419
PERFORM bapireturn_fill "1993419
USING 'J1B_NFE' 'E' '607' "1993419
wk_trailer_info-veh_uf ls_addr1_val-country "1993419
space space "1993419
CHANGING return[]. "1993419
ENDIF. "1993419
ENDIF. "1993419
ENDLOOP. "1993419
"1993419
ELSE. "1993419
subrc = 8. "1993419
PERFORM bapireturn_fill "1993419
USING 'J1B_NFE' 'E' '606' "1993419
space space space space "1993419
CHANGING return[]. "1993419
ENDIF. "1993419
ENDIF. "1993419
* End validations <-- Note 1993419 "1993419
AVISO LEGAL
"As informações existentes nesta mensagem e nos arquivos anexados têm caráter confidencial e são para uso restrito. A utilização, divulgação, cópia ou distribuição desta mensagem, ou parte dela, por qualquer pessoa diferente do destinatário é proibida, sujeitando o infrator às sanções legais. Se esta mensagem foi recebida por engano, favor excluí-la e informar ao remetente pelo endereço eletrônico acima. Agradecemos sua cooperação."DISCLAIMER
"This email and its attachments may contain privileged and/or confidential information. Use, disclosure, copying or distribution of this message, or part thereof, by anyone other than the intended recipient is strictly prohibited, and will submit the infractor to the legal sanctions. If you have received this email in error, please notify the sender by reply email and destroy all copies of this message. Thank you for your cooperation."