on 2014 May 21 7:27 PM
Boa tarde.
Alguém saberia me informar se existe alguma maneira de verificar se uma nota fiscal já existe na base de dados quando criando notas pela J1B1N, ou seja, controle de duplicidade de notas ?
Grato.
Ulisses.
Request clarification before answering.
Solução standard:
Aplicar SAP notes: 1614648 e 1606367 (INCLUDE LJ1BB2FF0)
Atualizar visão J_1B_T160M_V com a mensagem 8B 669.
Ao gravar a NF, irá mostrar a mensagem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oi Ulisses
Se você tiver o TDF existe uma chamada para que você possa aplicar diversas validações. Caso contrário o jeito é partir para uma field exit.
Veja o exemplo abaixo:
FUNCTION field_exit_j_1bseries.
ASSIGN ('(SAPMJ1B1)J_1BDYDOC-PARID') TO <parid>.
ASSIGN ('(SAPMJ1B1)J_1BDYDOC-NFTYPE') TO <nftype>.
ASSIGN ('(SAPLJ1BB2)J_1BDYDOC-NFNUM') TO <nfnum>.
ASSIGN ('(SAPLJ1BB2)J_1BDYDOC-NFENUM') TO <nfenum>.
IF NOT <nfnum> IS INITIAL.
SELECT * INTO j_1bnfdoc FROM j_1bnfdoc UP TO 1 ROWS
WHERE nfnum EQ <nfnum>
AND parid EQ <parid>
AND nftype EQ <nftype>
AND series EQ input
AND cancel NE c_x
AND direct EQ c_1.
ENDSELECT.
IF sy-subrc IS INITIAL.
MESSAGE e120.
ENDIF.
ENDIF.
IF NOT <nfenum> IS INITIAL.
SELECT * INTO j_1bnfdoc FROM j_1bnfdoc UP TO 1 ROWS
WHERE nfenum EQ <nfenum>
AND parid EQ <parid>
AND nftype EQ <nftype>
AND series EQ input
AND cancel NE c_x
AND direct EQ c_1.
ENDSELECT.
IF sy-subrc IS INITIAL.
MESSAGE e120.
ENDIF.
ENDIF.
ENDFUNCTION.
Abraço
Eduardo Chagas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bom dia Ulisses,
Talvez um ABAP consiga lhe ajudar melhor com os detalhes da implementação.
Mas na Wiki existe um material informando sobre essas etapas que me foi útil, acredito que possa lhe ajudar > http://wiki.scn.sap.com/wiki/display/ABAP/Field+exits.
Atenciosamente,
Evandro Cortes.
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 6 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.