Páginas filhas
  • SERASA - Submission and Return layouts using MILE

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.
Attention: The implementation of the SERASA submission and return layouts is only available for Protheus version 12, as of release 12.1.6.

To use SERASA file submission and return, you must import the MILE layouts serasa_layout_envio.xml and serasa_layout_retorno.xml, which were made available with release 12.1.6.

After importing layouts in the MILE (MILE: Model Integrator Layout Engine) these can be modified in order to meet some customer particularity or customization. To import them, you must perform the following procedures:

  • On the Configurator (SIGACFG), access Environment > Workflow > Layouts
  • Select Import.
  • The screen for selecting the MILE layout file path for import appears.

  • Perform the procedure for each layout file separately.
  • At the end, confirm the import of SERA_ENV and SERA_RET layouts.
  • After importing them, you can perform changes.

Note: The naming of the SERA_ENV (submission) and SERA_RET (return) layouts is standard for use in Protheus and cannot be changed.


When changing the layouts, you can change the data capture position and order. However. the segments predefined in the imported layout must be kept for the files to be generated and read correctly.


Structure of the SERASA submission layout

Structure of the SERASA return layout

This layout is used by the SERASA processes routine (FINA770), which is available in the Financial (SIGAFIN) module under Updates / Accounts Receivable / SERASA - Processes.

Note: the generation of the submission file is only possible if there are submission batches generated, also through the SERASA (FINA770) process routine.


To generate the submission file, in the window of the SERASA processes routine, select the Export batch option. To process the SERASA return file, in the window of the SERASA processes routine, select the Return file option.

Structure of the SERASA layout

The SERASA submission layout has the following structure:

Header:

Field

Start

End

Size

Content

Record Code

001

001

001

'0'

CNPJ (EIN):

002

010

009

SM0->M0_CGC

Transaction date

011

018

008

DtoS(dDataBase)

Area Code (DDD)

019

022

004

To be set by the user

Contact Phone Number

023

030

008

To be set by the user

Contact Phone No. Extension

031

034

004

To be set by the user

Contact Name

035

104

070

To be set by the user

Fixed File ID

105

119

015

"SERASA-CONVEM04"

Remittance Number

120

125

006

F770GetArq()

File submission code

126

126

001

"E"

Remittance difference

127

130

004

Space(4)

Blanks

131

533

403

Space(403)

Code for errors

534

593

060

Space(60)

Record sequence

594

600

007

F770SeqReg()


Detail:

Field

Start

End

Size

Content

Record Type                

001

001

001

"1"                                              

Operation Code              

002

002

001

Fa770GetOp()                                    

Contracting Digit/Branch

003

008

006

Configurable by the user with the CNPJ information of the SERASA service contractor

Occurrence Date

009

018

008

F770Vencto()

Contract End Date

017

024

008

F770Vencto()

Operation Nature Code

025

027

003

FW9_TIPO

Embratel Market Code

028

031

004

SPACE(4)                                         

Person Type

032

032

001

F770Client(1)

First Document Type

033

033

001

F770BTip()

First Document

034

048

015

F770Client(2)

Posting Reason

049

050

002

SPACE(2)                                         

Second Document Type

051

051

001

SPACE(1)                                         

Second Document

052

056

015

SPACE(15)                                        

Document State

067

068

002

F770BEst()

Joint Obligor

069

069

001

SPACE(1)                                        

Joint Obligor Document Type

070

070

001

SPACE(1)                                        

Joint Obligor First Document

071

085

015

SPACE(15)                                         

Blanks

086

087

002

SPACE(2)

Joint Obligor Second Document Type

088

088

001

SPACE(1)

Joint Obligor Second Document

089

103

015

SPACE(15)

Document State

104

105

002

SPACE(2)

Joint Obligor Debtor Name

106

175

070

SPACE(70)

Date of Birth

176

183

008

SPACE(8)                                         

Father Name

184

253

070

SPACE(70)                                        

Mother Name

254

323

070

SPACE(70)                                        

Full Address

324

368

045

F770Client(3)

Corresponding District

369

105

020

F770Client(4)

Corresponding City

389

175

025

F770Client(5)

Collection State

414

415

002

F770Client(6)

Collection Postal Code

416

423

008

F770Client(7)

Amount

424

438

015

F770ValTit()

Identification of the Submitted Bill

439

454

025

FW9->FW9_IDTITU

Blanks

455

488

034

SPACE(34)

Debtor Area Code

489

492

004

F770Client(8)

Debtor Phone No.

493

501

009

F770Client(9)

Settlement Date

502

509

008

F770Vencto()

Settlement Value

510

524

015

F770ValTit()

Blanks

525

533

009

SPACE(9)

Error Codes

534

593

060

SPACE(60)

Record Sequence

594

600

007

F770SEQREG()                                      


Trailer:

Field

Start

End

Size

Content

Record Type

001

001

001

"9"

Blanks

002

002

001

Space(1)

Error codes

003

008

006

Space(6)

Record sequence

594

600

007

F770SeqReg()


The SERASA return layout has the following structure:

Field

Start

End

Size

Variable*

Record Type

001

001

001

TP_REG

Batch

120

125

006

CD_LOTE

File type

126

126

001

TP_ARQ

Operation

002

002

001

CD_OPER

Operation Type

025

027

003

TP_OPER

Customer

034

048

015

CD_CLIENTE

Amount

424

438

015

VL_SERASA

Bill ID

439

454

016

ID_TIT

Error

534

593

060

CD_ERRO


*Each variable corresponds to the field defined in the return layout. If the return layout is customized, these fields must be kept. Only new fields can be inserted into the layout.

**The variables are fed at each row read from the file. To identify if the row corresponds to the file Header, Detail or Trailer, validate the contents of the TP_REG variable: "0" = Header; "1" = Detail; "9" = Trailer.