Professional Documents
Culture Documents
Segment O and N
Segment O and N
Segment O and N
BR Brasil
1 Requirement....................................................................................................................3
The DME file is created when payment method and barcode field met the following requirements:
If REGUH-UBNKL(3) = 341
Payment method = “O” (Field: REGUH-RZAWE)
Invoice Barcode = starts with “8” (Field: RF05L-BRCDE (1) = 8 (BRCDE = REGUP-ESRNR & REGUP-
ESRRE & REGUP-DMBTR)
The DME Concessionária structures are going to be created according following specifications:
File header
Lot header
Segment O
Field Name Bank Description Position Segment_O fields Component Lenght Structure Description
Código Banco na first three digits for house bank
Compensação key, e.g. '341' for Itau
Código do Banco 001 003 =J01 J01 3
Lot control (for header '0000',
for trailer '9999')
Código do Lote Lote de Serviço 004 007 =J02 J02 4
Registro Detalhe de record type, e.g. '0' for the
Lote header
Tipo de Registro 008 008 =J03 J03 1
Número do Nº Sequencial Registro
Registro no Lote
009 013 =J04 J04 5 record number
Código Segmento Reg.
Detalhe
Segmento 014 014 Fixed = “O” J05 1 Segment type
Tipo de
Movimento
Tipo de Movimento 015 017 =J06 J06 3 Tipo de movimento
BRCDE = REGUP-ESRNR & REGUP-
ESRRE & REGUP-DMBTR
código de barras código de barras 018 065 Defined in Column F
Nome da
concessionária
concessionária 066 095 =J12 J12 30 Partner name
DATA DO VENCIMENTO
(NOMINAL)
DATA VENCTO 096 103 =J13 J13 8 Due date, format DDMMYYYY
Lot trailer
File trailer
Same structure as j_1bdmext1 with changes in following Field:
The DME file is created when payment method and barcode field met the following requirements:
If REGUH-UBNKL(3) = 341
Payment method = “N” (Field: REGUH-RZAWE)
DARF
GPS
ICMS
FGTS
The above templates uses the following Invoice document fields to complement the DME creation:
Table ZTB00024:
Table to store interest GL account (687000).
Table to store fine GL account (750900).
Table ZTB00022:
Content for field XBLNR of DARF template details
Content for field XBLNR of GPS template details
DME Structures - file header, lot header, segment N, lot trailer and file trailer:
File header
Lot header
Segment N
Bank
Field Name Description Position Conteúdo Component Lenght Structure Description
Código Banco
Código do Banco na 001 003 =J01 J01 3 first three digits for house bank
Compensação key, e.g. '341' for Itau
Lot control (for header '0000', for
Código do Lote Lote de Serviço 004 007 =J02 J02 4 trailer '9999')
Nº Sequencial
Número do Registro no 009 013 =J04 J04 5 record number
Registro Lote
Código
Segmento Segmento Reg. 014 014 N J05 1 Tipo de segment
Detalhe
Tipo de Tipo de
Movimento Movimento 015 017 =J06 J06 3 Tipo de movimento
dados de
dados do tributo identificação do 018 195 Details (*)
tributo
nº docto
ATRIBUÍDo PELa
seu número empresa 196 215 =J21 J21 13 13 blanks
número
NOSSO Número atribuído pelo 216 230 =J22 J22 15 Nosso Numero
banco
CÓDIGO DE
OCORRÊNCIAS OCORRÊNCIAS 231 240 =J23 J23 10 Return code, blank when sending
P/ RETORNO
*Details (DARF)
Position in DME file:
Lot trailer
024 to 037 = Sum of all records of Net Amount (Valor do Principal 064 to 077).
038 to 051 = Sum values from all documents with content populated in field BSEG-KIDNO.
052 to 065 = Sum all values in GL account in tables Z_FI_CONTAS_JUROS and
Z_FI_CONTAS_MULTA.
066 to 079 = Sum of values of REGUP-WRBTR from all BELNR
080 to 240 = Blank
File trailer
Same structure as j_1bdmext1 with changes in following Field:
DME Structures - file header, lot header, segment N, lot trailer and file trailer:
File header
Lot header
Segment N
*Details (GPS)
Entries available for REGUP-XBLNR = 1406, 2100, 2119, 2208, 2216, 2631 and 2909 (Stored in
table Z_FI_CONTAS_INSS).
Lot trailer
024 to 037 = Sum of all records of Net Amount (Valor do Principal 044 to 057). If REGUP-
XBLNR is INSS (2100, 2119, 2208, 2216, 1406 or 2631) this amount must be deducted of
REGUP-KIDNO amount sum.
038 to 051 = Sum values from all documents with content populated in field BSEG-KIDNO.
052 to 065 = Sum all values in GL account in tables Z_FI_CONTAS_JUROS and
Z_FI_CONTAS_MULTA.
066 to 079 = Sum of all field 086 to 099 = Amount REGUP-WRBTR
080 to 240 = Blank
File trailer
Same structure as j_1bdmext1 with changes in following Field:
DME Structures - file header, lot header, segment N, lot trailer and file trailer:
File header
Lot header
Segment N
*Details (ICMS)
Entries available for REGUP-XBLNR = 1200, 0462 and 1929 (Stored in table Z_FI_CONTAS_INSS).
Lot trailer
024 to 037 = Sum of all records of Net Amount (Valor do Principal 044 to 057). If REGUP-
XBLNR is INSS (2100, 2119, 2208, 2216, 1406 or 2631) this amount must be deducted of
REGUP-KIDNO amount sum.
038 to 051 = Sum values from all documents with content populated in field BSEG-KIDNO.
052 to 065 = Sum all values in GL account in tables Z_FI_CONTAS_JUROS and
Z_FI_CONTAS_MULTA.
066 to 079 = Sum of all field 125 to 138 = Amount REGUP-WRBTR
080 to 240 = Blank
File trailer
Same structure as j_1bdmext1 with changes in following Field:
DME Structures - file header, lot header, segment N, lot trailer and file trailer:
File header
Lot header
Segment N
*Details (FGTS)
Entries available for REGUP-XBLNR = 150, 115 and 155 (Stored in table Z_FI_CONTAS_FGTS).
Lot trailer
024 to 037 = Sum of all records of Net Amount (Valor do Principal 044 to 057). If REGUP-
XBLNR is INSS (2100, 2119, 2208, 2216, 1406 or 2631) this amount must be deducted of
REGUP-KIDNO amount sum.
038 to 051 = Sum values from all documents with content populated in field BSEG-KIDNO.
052 to 065 = Sum all values in GL account in tables Z_FI_CONTAS_JUROS and
Z_FI_CONTAS_MULTA.
066 to 079 = Sum of all field 125 to 138 = Amount REGUP-WRBTR
080 to 240 = Blank
File trailer
Same structure as j_1bdmext1 with changes in following Field:
The payment method O Barcode starts with 8 and has 48 positions lengh. The field validation of
message 8B799, function module CONVERT_TO_BARCODE must be disable. The field have to free
for data entering.
CONVERT_BARCODE
Populate BSEG fields: ESRNR ESRRE
CONVERT_TO_BARCODE
Barcode numbering checking
In case barcode is written in 48 positions we have to convert into 44 to be written in DME file.
The conversion rule from 48 to 44 position is to remove the positions: 12, 24, 36 and 48:
Exemple:
Barcode 48 positions:
8 3 Digit
6 3 0 0 0 0 0 1 7 8 0 5 0 9 0 0 5 3 1 0 6 7 0 9 2 1 6 3 3 2 9 0 0 3 2 0 0 0 1 5 3 7 0 1 3 9
Position 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4
0 1 3 4 5 6 7 8 9 0 1 2 3 5 6 7 8 9 0 1 2 3 4 5 7 8 9 0 1 2 3 4 5 6 7
1 2 3 4 5 6 7 8 9 12 24 36 48
83630000017050900531060921633290020001537013
ESRNR( ESRNR
4) DMBTR (11) + 4 (4) ESRRE (25)
8 3 6 3 0 0 0 0 0 1 7 0 5 0 9 0 0 5 3 1 0 6 0 9 2 1 6 3 3 2 9 0 0 2 0 0 0 1 5 3 7 0 1 3
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
1 2 3 4 5 6 7 8 9
ESRNR: 83630053
ESRRE: 1060921633290020001537013
DMBTR: 00000170509 (Campo da BSEG tem 13 posições 0000000170509. Eliminar dois zeros à
esquerda para escrever o código de barras)
IF <fs_ZLSCH> IS ASSIGNED.
CONCATENATE LV_BARCODE_CHAR(11)
LV_BARCODE_CHAR+12(11)
LV_BARCODE_CHAR+24(11)
LV_BARCODE_CHAR+36(11)
into LV_BARCODE_CHAR.
ENDIF.
ENDIF.
4. Slution Test :
Enter FBL1N for company code 1820. Double click to select an item.
The report j_1bbr20 must be enhanced to upload file for Brazil in transaction FF.5 by report
RFEBKA00.
The below code must be updated for Segment ‘J’ and ‘O’ and ‘N’.