You are on page 1of 43

THEMIS - < BR1SD05421 – Print Monitor NFe >

< Functional Design: Enhancement >

THEMIS
BR1SD05421 – PRINT
MONITOR NFE
FUNCTIONAL DESIGN:
ENHANCEMENT

Confidentiality MEDIUM
Object CREATE NEW TRANSACTION

Created by LBS Eduardo Fontes


Reviewed by CBU Cintia Elvira
Validated by CT
Last review 23/04/2018
Version as of
Status ON GOING
Reference

643091670.docx Printed on 14/02/2012 13:06:00 Page  1/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Changes Tracking

Date Author Version Review Purpose & Description


23/04/18 Eduardo Fontes 1 Creation
23/04/18 Eduardo Fontes 2 Business input
24/01/20 Susan Ohi 8 New functionalities requested by business

Attendees

Name
Eduardo fontes

Distribution List

Name
DANONE Cintia Elvira

Accenture Eduardo Fontes

643091670.docx Printed on 14/02/2012 13:06:00 Page  2/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

CBU Code naming convention

Company Name Business Unit CBU Code


DANONE BRASIL DAIRY
DANONE BRASIL WATER
DANONE BRASIL BABY
BRX
DANONE BRASIL MEDICAL
DANONE SUPPORT BABY
DANONE SUPPORT MEDICAL

=> Put in XXALLXX the Business Units concerned.

Domain Naming Convention

Domain Description Code


Cross Functional Domain CF
DSS DS
Finance FI
Inventory IN
Manufacturing PP
Plant Maintenance PM
Purchasing MM
Sales SD
Supply Chain Planning – APO SC

=> Put in XSDX the Domain concerned.

643091670.docx Printed on 14/02/2012 13:06:00 Page  3/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Summary

CBU CODE NAMING CONVENTION.............................................................................................3


DOMAIN NAMING CONVENTION.................................................................................................3
1. OBJECTIVE OF THE DOCUMENT.................................................................................5
1.1. FUNCTIONAL DESCRIPTION.............................................................................................5
1.2. BUSINESS BENEFIT........................................................................................................6
1.3. SCOPE..........................................................................................................................6
1.4. DEPENDENCIES/CONSTRAINTS.......................................................................................6
1.5. FREQUENCY AND TIMING................................................................................................6
1.6. INITIATING PROCESS/TRANSACTION/PROGRAM................................................................7
1.7. PROCESSING TYPE........................................................................................................7
2. DETAILED FUNCTIONAL REQUIREMENTS.................................................................8
2.1. PROCESS FLOW DIAGRAM...............................................................................................8
2.2. DETAILED DESCRIPTION SUMMARY.................................................................................8
2.3. ARCHITECTURE OVERVIEW...........................................................................................25
SAP ECC.............................................................................................................................25
2.4. BASIC PRINCIPLES AND ASSUMPTIONS...........................................................................25
We start from the premise that it is possible to identify in the SAP through the printer
settings which allows the stapling........................................................................................25
The data selection is performed from the information present in J1BNFE, we aren't
providing exceptions for this................................................................................................25
2.5. SAP R/3 CUSTOMIZING RELATED TO DEVELOPMENT......................................................25
3. REPORTING.................................................................................................................. 26
4. TESTING REQUIREMENT:...........................................................................................27
5. TECHNICAL ORIENTATION:........................................................................................28

643091670.docx Printed on 14/02/2012 13:06:00 Page  4/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

1. Objective of the document

1.1. FUNCTIONAL DESCRIPTION

Danone use EMS solution to print DANFE. When Themis is implemented, company will
have to use SAP Solution to generate Electronic Nota Fiscal.
During analysis between current system and SAP, users created two GAPS and these
will be solved through one new enhancement registered in this document. The Gaps
are: G-06656 and G-06700. In these GAPS are registered demands bellow:

 Create XML to upload manually in Suframa website


 Control print DANFE, Bank Slip and Miscellaneous Notification, possible to
staple these documents together after print.
 Print DANFE created contingency in official form (security form)
 Show all documents to print, data selection done from Nota Fiscal data or from
Shipment Document.
 Reprint documents

First alternative approved in GAP was add functionalities in standard NF-e Monitor, but
when we studied better this solution, decided maintain NF-e Monitor without changes
and create new transaction to process this needs. So, we avoid changes in critical
process: control and sending Electronic NF to SEFAZ. Thus, any problem in this critical
process will be SAP’s responsibility, because SAP must care standard programs and
should assurance its working correctly. Furthermore, despite functionalities required
have relationship with NF-e Monitor, this process happen after monitor process was
concluded. So, if new needs there aren't in NF-e Monitor not affect this one, because
are different process in the same flow.
New transaction should allow the user to print three different documents, furthermore
create XML that will be used to get PIN in Suframa website.
Regarding “Skipping NF Numbering” (GAP G-06700) we noted this functionality there
is in NF-e Monitor already and can be access in J1BNFE transaction, wherefore this
needs don’t be considered in this functional documentation.

643091670.docx Printed on 14/02/2012 13:06:00 Page  5/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

1.2. BUSINESS BENEFIT

Danone can’t print using SAP standard process, because its necessity is print different
documents intercalated and this process would be very slow in SAP, because has to
be done one by one. So it is so difficult to process great quantity.
SAP Standard can define to print automatically when documents are saved, but
Danone don’t accept this solution, because user need to control this process.
Regarding XML to Suframa could create manually, but to do it Danone need big
operational effort by users. This effort can be replaced by routine in system to create
automatically this file. Furthermore, when creation of this document is in the same
screen that DANFE, Danone can reduce mistakes in process, because is more difficult
to users forget this document and avoid problems in Fiscal borders.

<Start>DevSIR-39919 by Eduardo FONTES on 10.05.2018 <Start>

Danone will not create anymore the correction letter after we adjust the field quantity
format on Danfe printout for the Export Sales.

<End> DevSIR-39919 by Eduardo FONTES on 10.05.2018<End>

1.3. SCOPE

This transaction will be responsible only to control print process and create XML to
Suframa. So, if DANFE, Bank Slip or Miscellaneous Notification there isn’t created in
Invoice Output, the reason doesn’t have relationship with new transaction. So, the
analysis should be done in earlier system steps.
Printer settings won’t be done in this new transaction, follow be done in SAP Basis
transactions. The new transaction just uses this information in its rules.
This new transaction cannot ensure that documents will be printed, because after SAP
process has printer's process. So, this program must provide all information to print,
include with staple functionality or not.
The XML layout used to create this program was taken in Suframa website on 09-Feb-
12. If this layout changes later need to update this document and program. User should
inform IT team when this layout will be changed.
This task has a lot of SAP Basis concepts, but this document just registers SD
requirements, so don’t describe SAP Basis activities/needs.
This transaction includes Electronic Nota Fiscal from Sales Process or from Purchase
Process, so Partner ID field can be filled by Customer Number (SAP ID) or Vendor
Number (SAP ID).
Print Monitor covers only Electronic Nota Fiscal, don’t cover conventional Nota Fiscal.

<Start>DevSIR-39919 by Eduardo FONTES on 10.05.2018 <Start>

Actually, the Danfe´s printout is not showing the field Quantity format as Danone needs
for Export Sales.

<End> DevSIR-39919 by Eduardo FONTES on 10.05.2018<End>

643091670.docx Printed on 14/02/2012 13:06:00 Page  6/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

1.4. DEPENDENCIES/CONSTRAINTS

Only outputs documents present in invoice or in Material Movement can be printed or


reprinted by Print Monitor. Is not allowed in Print Monitor to process documents
reference any Nota Fiscal that there isn’t in NF-e Monitor (J1BNFE).
All printers informed in Print Monitor must be created earlier in SAP.
NF Writer will be selected by Print Monitor, but there isn’t some field filled, like
Reference (Material Movement and Invoice).
This program cannot control copy number (like copy 1, copy 2), so this control will be
done in FDBR1SD05419.

1.5. FREQUENCY AND TIMING

Print Monitor cannot be scheduled.


This routine should be started by transaction code.
This action is user’s responsibility.
Print Monitor doesn’t provide background processing.

Description Y/N
Daily N
Hourly Y
Monthly N
Weekly N
On request Y

1.6. INITIATING PROCESS/TRANSACTION/PROGRAM

Using transaction code only.

1.7. PROCESSING TYPE

Description Y/N
Batch N
Real Time Y

643091670.docx Printed on 14/02/2012 13:06:00 Page  7/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

2. Detailed Functional Requirements

2.1. PROCESS FLOW DIAGRAM

2.2. DETAILED DESCRIPTION SUMMARY

2.2.1 TRANSACTION ACCESS:

New transaction code is ZBR1SD05421 and will be called Print Monitor. Can be
executed filling transaction code in SAP specific field.

Print Monitor should be assigned to one or more profile, according business definition.
We don’t have request to include block for any functionality, it means all functionality in
this transaction can be process by everybody with this transaction in his profile.
Print Monitor transaction can be accessed using Themis Menu, follow path:

Themis Menu>Local Menues>User Menu for Danone Brazil

My suggestion is create SD folder under this option.

643091670.docx Printed on 14/02/2012 13:06:00 Page  8/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

2.2.2 SELECTION SCREEN

This screen contains two grids: one to choose functionality, other one to inform
selection criteria.

2.2.2.1 CHOOSE FUNCTIONALITY

In the first grid, user has to choose functionality between three options described
below:

1. Print - DANFE (Bank Slip, Miscellaneous Notification, Create XML SUFRAMA)


2. Reprint - DANFE – Contingency FS (Bank Slip, Miscellaneous Notification,
Create XML to Suframa)
3. Reprint - DANFE – Contingency A4 (Bank Slip, Miscellaneous Notification,
Create XML to Suframa)

The user cannot select more than one option, if user needs to print and reprint have to
access Print Monitor more one time.

In the option 2, FS means Security Form (in portuguese Formulário de Segurança), we


will maintain Portuguese sequence, because user knows this expression very well. In
the option 3, A4 is size of paper used in Brazil (21 x 29,7 cm).

When choose first option (Print) the system will select all Electronic Nota Fiscal with
DANFE available to print according Standard rules, using selection criteria informed by
user in the first screen. The documents available are:

 Normal Nota Fiscal valid and approved by SEFAZ, without print before
OR
 Nota Fiscal in Contingency, without print before

The program have to execute the same routine that Standard:

643091670.docx Printed on 14/02/2012 13:06:00 Page  9/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Access J1B3N
Inform Document Number (Internal number of Nota Fiscal)
Select Nota Fiscal in Menu
Select option Output

When choose second or third option (Reprint) the system will select all Electronic
Nota Fiscal with DANFE available to reprint, using selection criteria informed by user in
the first screen. For selection of documents there isn’t difference between two options
of Reprint, this difference will happen only during print process. The documents
selected are:

 Electronic Nota Fiscal showed in NF-e Monitor (J1BNFE) with field Printed filled
(J_1BNFE_ACTIVE-PRINTD). Rules will be Standard rules.

The system will execute the same routine of SAP Standard.

Access J1B3N
Inform Document Number (Internal Nota Fiscal Number)
Menu Option Nota Fiscal
Reprint
Yes (confirm popup)
Menu Nota Fiscal
Output

643091670.docx Printed on 14/02/2012 13:06:00 Page  10/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

First option (Print) is defined as default option when the system shows the first screen.

2.2.2.2 SELECTION CRITERIA

In the second grid of first screen is possible to inform selection criteria. Inform Business
Place and Company Code is mandatory. For three possibilities, print, reprint (normal
paper) or reprint (Security Form), selection criteria will be the same, follow below fields
available to filter Electronic Nota Fiscal:

 Company Code (mandatory)


 Business Place (mandatory)
 NF Number
 NF Serie (this one just available when NF Number is filled)
 Document Date (value default)
 Shipment Number
 Invoice Number
 Document Number (SAP)

643091670.docx Printed on 14/02/2012 13:06:00 Page  11/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

 Shipping Point
 Direction Movement - (same options in J1BNFE)
 Form of NF
 Partner ID (Customer/Vendor)
 Posted/Switched to Contingency – Both (Contingency and Normal), Only
Contingency, Only Normal
 NF Model
 Printer
 Printer to Contingency

Some fields accept just one value selected from system list (Match Code). Follow
below:

 Company Code
 Business Place (need to have Match Code)
 Printer
 Printer to Contingency

643091670.docx Printed on 14/02/2012 13:06:00 Page  12/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Some fields can be filled with range (from/to) or can inform more than one value
without specific range. You can see below:

 NF Number
 Shipment Number
 Invoice Number
 Document Number (SAP)
 Partner ID (Customer)
 Shipping Point
 NF Model
 Form of NF
 Direction Movement - (same options in J1BNFE)
 Document Date
 NF Series

There is one field can be filled using three options mandatory. Follow below:

 Posted/Switched Contingency

Options:
 Both: contingency and normal
 Only contingency
 Only Normal

Only DANFE situation is considered to define Print or Reprint, it means it isn’t


relevance if other documents were printed or not. It is true for XML to Suframa too,
created XML or not created is not relevance to select Electronic Nota Fiscal. So, if
Bank Slip or Miscellaneous Notification was printed before and DANFE wasn’t printed
yet, all documents reference from Electronic Nota Fiscal will be showed in Printed
functionality, the inverse is true too. If Bank Slip or Miscellaneous Notification wasn’t
printed before and DANFE was printed, all documents from this Electronic Fiscal will be
showed in both Reprinted functionality, because use only DANFE to define.
The system will always do select from J_1BNFE_ACTIVE table, this table store
documents showed in J1BNFE transaction. If one Nota Fiscal there isn’t in J1BNFE,
there isn’t any possibility this register be showed in Print Monitor.
When user inform Shipment, Invoice or Shipping Point number, the system will
investigate which is NF in the end of this process and will do selection to show in Print
Monitor using only NF number.
If do the selection using Shipment Number, the system has to check if there is Nota
Fiscal available to print created in J_1BNFE_ACTIVE for each delivery assigned in this
shipment. One shipment can have one or more deliveries assigned, if one of them
there isn’t Nota Fiscal available to print the system has to show popup explaining this
situation. Others documents from this Shipment, can be displayed in next screen
(Execution Screen). The message can be: “Deliveries from Shipment without Nota
Fiscal available to print. (list all deliveries without NF)”. The same shipment can have
deliveries from SD and MM.
If user informed NF Number, have to inform Series too. It’s mandatory.

643091670.docx Printed on 14/02/2012 13:06:00 Page  13/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Regarding fields “Posted/Switched to Contingency”, user has to define one value for
this field; he has to choose between three options:
 Both: Normal and Contingency
 Only Contingency
 Only Normal
When user select both the system should not consider the value in fields
J_1BNFE_ACTIVE- CONTING and J_1BNFE_ACTIVE-CONTING_S to do documents
selection.
When user select “Only Contingency” the system should consider the value in fields
J_1BNFE_ACTIVE- CONTING and J_1BNFE_ACTIVE-CONTING_S to do documents
selection. The system needs to select only documents with one of them fields marked
in J_1BNFE.
When user select “Only Normal” the system should consider the value in fields
J_1BNFE_ACTIVE- CONTING and J_1BNFE_ACTIVE-CONTING_S to do documents
selection. The system needs to select only documents with these fields empty in
J_1BNFE.
Danfes in contingency model will be printed using printer informed in field Printer to
Contingency (from selection criteria or from standard) of the Print Monitor, the others
documents (Bank Slip and Miscellaneous Notification) or Reprint of Danfe Contingency
A4 will be printed using always Printer informed in field Printer (from selection criteria
or from standard) of the Print Monitor. There is one exception, when Danfe is printing
through option Reprint DANFE A4, the system will use the same printer of others
documents and print only one sheet.
All documents reference Nota Fiscal created through normal process (without
contingency) will be printed using printer defined in field Printer (from selection criteria
or from standard).
Printer defined in Selection Criteria will be used for all register selected in this
execution, but when this field wasn’t informed in Selection Criteria, the system will fill
this field using SAP standard rules to define printer (J1BG), the same printer informed
in NAST table. Standard process has way to define one Printer for normal process and
other one for contingency process.
User can define printer one printer for each document displayed in Execution Screen.
User cannot define number of copies in Print Monitor. By default, just one copy for all,
include Reprint DANFE in Contingency A4, we have just two exceptions:
- Print Danfe in contingency or
- Reprint Danfe Contingency using FS (security system)
In this case, Danfe will be printed always with two copies. The system has to identify if
is contingency and send command to Printer defined in field “Printer to Contingency”,
furthermore print automatically two Danfes.

Selection screen should have resources from SAP Standard, samples: Variants, select
fields for selection, pre-define values, etc.

2.2.3 EXECUTION SCREEN

This initial description before first topic not depend functionality choose, so it is true for
three functionalities (Printer, Reprint FS or Reprint A4).

Execution screen is a report to show all documents selected from system considering
data in first screen, furthermore in this screen is possible to start some actions.

643091670.docx Printed on 14/02/2012 13:06:00 Page  14/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

The selection data will be used only for do selection, except data informed in fields
“Printer” and “Printer to Contingency”, because when these fields are filled in selection
screen is use in execution screen to fill respective fields for all documents displayed.
Documents from same Electronic Nota Fiscal are always showed in the same register
(line), information is organized in columns. A lot of Electronic Nota Fiscal can be
showed in the same execution, there isn’t limit. Is possible have Nota Fiscal Normal
process and Nota Fiscal in Contingency in the same processing.
The field content can be information or can define some action. It means don’t have
only fields to inform, but some fields could be edit according user needs.

Follow fields that will be showed in execution screen like information. The value for
these fields will be filled automatically and the system forbids changes. These fields
are:

 NF Number – external number for NF.


 NF Serie
 Shipment Number – SAP number. Sometimes this field can be empty, it means
this NF there isn’t shipment assigned in its flow. SAP rules could have more
than one, but here we will show only first value found.
 Reference Number – Document informed in field reference of this NF. SAP
rules could have more than one, but here we will show only first value found.
 Document Number (SAP) – Internal number for NF
 Shipping Point – Shipping Point assigned in Delivery. Sometimes this field can
be empty, it means this NF there isn’t delivery assigned in its flow. SAP rules
could have more than one, but here we will show only first value found.
 Direction Movement - (same options in J1BNFE)
 Form of NF – (Sample: NF55, NF56)
 Document Date
 Partner Name – Customer/Vendor Name
 Partner ID (Customer) – Internal code in SAP for Customer and Vendors
(J_1BNFDOC-PARID).
 Posted to Contingency – empty or X
 Switched to Contingency – empty or X
 NF Model – 55 for NF-e
 Created By – J_1BNFE_ACTIVE-CRENAM
 Created On – J_1BNFE_ACTIVE-CREDAT

Some fields will be filled by system, but user can edit this information (change). These
fields are:

 Printer
Printer that will be use to print or reprint documents available (print) or
documents selected (reprint). When this field is filled in selection criteria every
register will have same value in execution screen. When this field is empty in
selection criteria, the system will fill this information according SAP Standard
rules to define printer (J1BG – the same printer defined in NAST). User can fill
this field manually in each register.

 Printer to Contingency
NF created in contingency to be printed or reprinted using security form need to
have two printers defined, one in the field Printer, other one in the field Printer
to Contingency. Printer to Contingency will be used only to print DANFE using

643091670.docx Printed on 14/02/2012 13:06:00 Page  15/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Security Form. If the same NF has others documents selected to print, these
documents will be printed in Printer defined in field Printer. User can fill this field
manually in each register.This field appears disabled when the user doesn’t
select documents in contingency.

The user can change mass the printer through selection screen, this feature will not
run on the execution screen. To change the printer for all, the user must enter a new
value in the field Printer on the selection screen and run again, keeping the same
selection criteria as before.

 XML to Suframa

SUFRAMA is a government department that regulates the rules for tax


exemptions for the Free Zone and Free Trade Area. Since 2008, companies
that emit NF using the benefits must require a permission which is given
through PIN. To request this PIN the company must send the information in
XML format on pre-defined layout.
The process of sending the XML is done manually in Danone, the current
system creates the file and the user do manually Upload in Suframa website,
when received the PIN print it and attach it with others documents
accompanying the shipment.
XML to Suframa isn’t created like an Output Message of Invoice, it is created in
Print Monitor, so this program has to build this file and provide in Drive C or one
path in SAP environment. The program has to follow layout defined by Suframa.
According Suframa rules, one file can have fifty NF documents maximum, so,
SAP program have to create more than one file if we have more than fifty NF
with this functionality selected.
Displayed like Check Box, when selected means this document must be
created by Print Monitor. Just to remembering, Print or Reprinted isn’t defined
by XML to Suframa situation.
This check box is enabled only when the customer in NF has register
SUFRAMA in the customer master, if the customer have this field empty this
option will appear disabled in Print Monitor.
There isn't routine to check if this code SUFRAMA informed in the customer is
active or not, these checks must be made by professionals who will manage the
master data. Not all documents generated to customer with SUFRAMA code
must have a PIN generated, there are tax rules that indicate this necessity, but
these rules aren't in the system. In the Print Monitor if the PIN hasn't to be
generated for any reason, the user need indentify it through the selection of the
Check Box. We just will validate if Sap has all mandatory information to create
XML, if program found one register without this information has to show this
situation through Message (popup), informing which field is missing.

Always you have any Nota Fiscal with XML Suframa selected; the system should show
Browser and the user to indicate a path on the C drive in your machine or other Path in
SAP environment, so that the SAP provides the file at this path.

Layout XML Suframa

i. Nota Fiscal Eletrônica


# Field Description El Pai Type Event Size De Observation
e c

643091670.docx Printed on 14/02/2012 13:06:00 Page  16/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

- Batch TAG raiz do lote E - 1-1 TAG raiz do


lote
i.i. Identificação dos Dados do Lote
# Field Description El Pai Type Event Size De Observation
e c
A0 Nro Batch Number A - N 1-1 1-9 Suggestion
1 for
Numbering
sequencial
number +
year,
Sequencial
number+
month+year
A0 versao_sw Software version Sinal A - C 0-1 2 Used by
2 6.0 Desktop
system
SINAL 6.0
A0 dtEmissao Date created file. A - C 1-1 10 Valid Format
3 dd/MM/YYYY

A0 cnpjDestinatar Cnpj Ship To E - C 1-1 14 Mandatory


4 io registered in
SUFRAMA
A0 cnpjTransp CPF ou Cnpj do E - C 0-1 11 If informed,
5 Transport Agent (CPF) Mandatory
ou registered in
14 SUFRAMA
(CNPJ)
A0 inscSufDestin Suframa inscription E - C 1-1 9 Mandatory
6 atario from Ship to active in
SUFRAMA
A0 UFDestino State from Ship to E - C 1-1 2 Values
7 partner accepted:
AM, AC,
AP, RO ou
RR
A0 ufOrigem State from who is E - C 1-1 2 Values: All
8 shipping States of
Brasil.
A0 qtdeNF Quantity NF in file E - N 1-1 1-2 Minimum
9 value = 1,
Maximum
Value=50

643091670.docx Printed on 14/02/2012 13:06:00 Page  17/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

A1 notasFiscais TAG Group content G - - 1-1


0 NF-e
i.ii. Identify Notas Fiscais data
# Field Description El Pai Type Event Size De Observation
e c
B0 notaFiscal TAG to store E A1 1-50
1 information from NF-e 0

B0 chaveAcesso Key Access number A B0 C 1-1 44 Key Access


2 from NF-e 1 sending from
SEFAZ.
B0 txZero Inform if NF is classify A B0 B 1-1 1 Possible
3 like zero value 1 Values:
true – NF
with zero ou
false –NF
with value
positive (the
value should
be informed
in tiny
letters)

643091670.docx Printed on 14/02/2012 13:06:00 Page  18/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

In the execution screen should have several features from SAP Report, sample: Select
All, Filter, Change View, Record Variants, Record Layouts, etc. User can order data
displayed and program have to follow this sequence to execute the function selected.

2.2.3.1 PRINT

This description is specific for print functionality chooses in the first screen

The Execution Screen has differences according to the functionality selected in the first
screen (selection screen). If the user chooses to print, you will find two buttons under
the screen: Print and Generate XML.
User can edit only fields “Printer”, “Printer to Contingency” and “XML to Suframa”. Is
possible edit layout, change columns position or order of documents.

Print Button
Print button will identify the documents available to print for each NF and do print. This
print must necessarily be done subject to an order to the printer by NF, printing all the
documents reference a NF must be completed before to start printing the following
documents the next NF. Furthermore, the system has to follow sequence displayed to
print.
Any document will be displayed, but the system will look for these documents from
Nota Fiscal selected:
 DANFE,

643091670.docx Printed on 14/02/2012 13:06:00 Page  19/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

 Bank Slip,
 Miscellaneous Notification

User cannot see, neither to select what documents will print.

Follow short description about these documents:

 Danfe
It is simple graphical representation from NF-e. This document can be printed
or reprinted by Print Monitor. You can review DANFE concepts in FD
BR1SD05419.
The system have to identify if document was created in contingency model or
not (describe “how” above / J_1BNFE_ACTIVE-CONTING OR
J_1BNFE_ACTIVE-CONTING_S filled) in these cases the system has to use
printer defined in field Printer to Contingency and print two copies.

 Bank Slip
Bank Slip is message type of Invoice, so the system looks this register in NAST
and prints this document. If don’t found in NAST need to access Invoice and
defined new print to this document.
Rules to create Output message in Invoice is out of this routine, in Print Monitor
is possible just print or reprint when this register already exist.
Bank Slip is message type probably called ZBBS. This value should be
informed using parameters table (ZTO010). You can see Bank Slip details in
FD BR1SD05425.
Just to remembering, Print or Reprinted isn’t defined by Bank Slip situation.

 Miscellaneous Notification
Miscellaneous Notification is message type of Invoice, so the system looks this
register in NAST and prints this document. If don’t found in NAST need to
access Invoice and defined new print to this document. Rules to create Output
message in Invoice is out of this routine, in Print Monitor is possible just print or
reprint when this register already exist.
Miscellaneous Notification is message type probably called ZBMN. This value
should be informed using parameters table (ZTO010). You can see
Miscellaneous Notification details in FD BR1SD05412.
Just to remembering, Print or Reprinted isn’t defined by Miscellaneous
Notification situation.

User can process normal Nota Fiscal and contingency Nota Fiscal in the same
processing, the program will identify this difference and run according this
characteristics. When the NF was created in contingency, the system has to use
Printer to Contingency to print Danfe and release two copies. Others documents will be
printed always in printer informed in field called “Printer”.

SAP will have a single form for Contingency and for Normal process. Will be
transparent to the user, it cannot identify what type of file the SAP is sending to the
printer.

The transaction is expected to allow the print command can be done en mass, it is the
mainly reason for creating, so the system shouldn't limit the number of documents to
be selected.

643091670.docx Printed on 14/02/2012 13:06:00 Page  20/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

XML to Suframa
Regarding “XML to Suframa” user can create or not for each Nota Fiscal with this
possibility. If, user doesn’t want to create for one specific Nota Fiscal displayed, retire
check in this line. To create XML user needs to press button “XML to Suframa”,
program will create one XML for all Nota Fiscal selected (maximum fifty documents).
User will inform Local to save this file.

2.2.3.2 REPRINT (FS)

This description is specific for Reprint using Security Form for Danfe in Contingency
(functionality chooses in the first screen).

The Execution Screen has differences according to the functionality selected in the first
screen (selection screen). If the user chooses to reprint, you will find two buttons under
the screen: Reprint and Generate XML.

Is possible edit layout too, change columns position or order of documents.


All documents displayed in this screen can have documents to print (or reprint). By
default, whenever the user accesses the screen action by the reprint option, all
documents should be displayed not selected. So, user need to select what document
wants to print, can do it one by one or using functionality for mass change. Is possible
selected or unselected all column.
The system will display documents that have Output Invoice created. Follow
description about these fields:

User can edit:


 Printer
 Printer to Contingency
 XML to Suframa

643091670.docx Printed on 14/02/2012 13:06:00 Page  21/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

 DANFE
 Bank Slip
 Miscellaneous Notification

 Printer
Printer that will be use to reprint documents selected. When this field is filled in
selection criteria every register will have same value in execution screen. When
this field is empty in selection criteria, the system will fill this information
according SAP Standard rules to define printer (J1BG – the same printer
defined in NAST).

 Printer to Contingency
NF created in contingency to be printed or reprinted using security form need to
have two printers defined, one in the field Printer, other one in the field Printer
to Contingency. Printer to Contingency will be used only to print DANFE using
Security Form. If the same NF has others documents selected to print, these
documents will be printed in Printer defined in field Printer. This field appears
disabled when the user doesn’t select documents in contingency.

 Danfe
It is simple graphical representation from NF-e. Will displayed like Check Box,
when selected means this document must be reprinted by Print Monitor. You
can review DANFE concepts in FD BR1SD05419.
The system have to identify if document was created in contingency model or
not (describe “how” above / J_1BNFE_ACTIVE-CONTING OR
J_1BNFE_ACTIVE-CONTING_S filled) When Nota Fiscal was created in
contingency model the system has to use printer defined in field Printer to
Contingency and print two copies.

 Bank Slip
Displayed like Check Box, when selected means this document must be printed
or reprinted by Print Monitor. Bank Slip is message type of Invoice, so the
system looks this register in NAST and prints this document. If don’t found in
NAST need to access Invoice and defined new print to this document. When
there isn’t this document in Output Invoice, this field appears disable in Print
Monitor.
Rules to create Output message in Invoice is out of this routine, in Print Monitor
is possible just print or reprint when this register already exist.
Bank Slip is message type probably called ZBBS. This value should be
informed using parameters table (ZTO010). You can see Bank Slip details in
FD BR1SD05425.
Just to remembering, Print or Reprinted isn’t defined by Bank Slip situation.

 Miscellaneous Notification
Displayed like Check Box, when selected means this document must be printed
or reprinted by Print Monitor. Miscellaneous Notification is message type of
Invoice, so the system looks this register in NAST and prints this document. If
don’t found in NAST need to access Invoice and defined new print to this
document. When there isn’t this document in Output Invoice, this field appears
disable in Print Monitor.
Rules to create Output message in Invoice is out of this routine, in Print Monitor
is possible just print or reprint when this register already exist.

643091670.docx Printed on 14/02/2012 13:06:00 Page  22/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Miscellaneous Notification is message type probably called ZBMN. This value


should be informed using parameters table (ZTO010). You can see
Miscellaneous Notification details in FD BR1SD05412.
Just to remembering, Print or Reprinted isn’t defined by Miscellaneous
Notification situation.

When user press button Reprint the program will identify the documents were selected
for each NF and do reprint. This reprint must necessarily be made subject to an order
to the printer by NF, printing all the documents reference a NF must be completed
before to start reprinting the following documents the next NF. SAP will print using
same sequence of screen.

When the NF was created in contingency, the system has to use one Printer to Danfe
(informed in field Printer to Contingency) and other one to others documents (informed
in field Printer). The system need to print two copies for Danfe.
The transaction is expected to allow the print command can be done en mass, it is the
mainly reason for creating, so the system shouldn't limit the number of documents to
be selected.
Technically, the logical to reprint is different in SAP, but the user won't have this
perception by clicking the Reprint. It will have your file printed.

XML to Suframa
Regarding “XML to Suframa” user can choose create or not for each Nota Fiscal with
this possibility. If, user doesn’t want to create for one specific Nota Fiscal displayed,

643091670.docx Printed on 14/02/2012 13:06:00 Page  23/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

retire check in this line. To create XML user needs to press button “XML to Suframa”,
program will create one XML for all Nota Fiscal selected (maximum fifty documents).
User need to inform path to create this file.

2.2.3.3 REPRINT (A4)

This description is specific for Reprint using normal paper (A4) for Danfe in
Contingency (functionality chooses in the first screen).

The Execution Screen has few differences between Reprint using Security Form (FS).
All description above for Reprint FS is true for this option, except option for Printer to
Contingency. In this functionality this field will be hiding. Only printer informed in field
“Printer” will be used in this option.
If user needs print DANFE in Contingency will do using normal paper and will not use
security form. In this option print only one Danfe, when is using security system have to
print two Danfe.

2.2.4 ACTION

Print/Reprint

Here we will describe how program answer when user press button Print or Reprint in
the second screen. In this moment, user did selection of Nota Fiscal, informed printer
to use, chose documents to print (choose only for Reprint) and the system have to
send these documents to printer.

643091670.docx Printed on 14/02/2012 13:06:00 Page  24/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Program will send correct sequence to print according sort done in second screen by
user. All documents reference the same NF have to be printed together, if Danfe was
printed in different SAP printer, the system need to recognize and join documents to
staple together. Danfe in contingency is printed twice, but only first Danfe will be staple
with others documents.
Printer with functionality to clip documents will do it always that receives more than one
sheet for the same partner ID at same time.
SAP has to manager this process and creates only one Spool to printer.
When printer don’t have feature to staple, the system is just send in correct sequence,
but create just one Spool.
When user need print in PDF document, has to inform local printer local in Monitor
(locl) and selected PDF Creator like standard printer for your computer. SAP has to
create only one document with all documents.
If we selected a lot of documents to print and one of them has problem and isn’t allow
to print (or reprint), the system has to stop this execution, so next documents will not
process. The system has to show Error Message to user with good explanation (show
SAP message) about problem. User has to solve this problem, after that will access
Print Monitor again to print documents that were missing.

2.3. ARCHITECTURE OVERVIEW

SAP ECC

2.4. BASIC PRINCIPLES AND ASSUMPTIONS

We start from the premise that it is possible to identify in the SAP through the printer
settings which allows the stapling.

The data selection is performed from the information present in J1BNFE, we aren't
providing exceptions for this.

2.5. SAP R/3 CUSTOMIZING RELATED TO DEVELOPMENT

J1BG – define printer


VV31 – Outputs for invoice

643091670.docx Printed on 14/02/2012 13:06:00 Page  25/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

3. Reporting

643091670.docx Printed on 14/02/2012 13:06:00 Page  26/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

4. Testing requirement:

 Check selection screen, field by field


 Check selection printer
 Check Printer for Contingency
 Check if documents in J1BNFE are selected in Print Monitor correctly, using
Print option
 Check if documents in J1BNFE are selected in Print Monitor correctly, using
Reprint option
 Check field Bank Slip
 Check field DANFE
 Check field Miscellaneous Notification
 Check field Create XML to Suframa
 Check printer assignment
 Check create Spool to printer
 Check all possibilities to join documents in the same NF
 Check staple process
 Check processing for several documents

643091670.docx Printed on 14/02/2012 13:06:00 Page  27/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

5. Technical Orientation:

It is very important that this topic is read after the reading functional description, because,
this document is only to supplement information not presented at functional description. Any
doubts in functional have to be clarified before to start this part.

General Description

We need to create new transaction in SAP (Online), called Print Monitor. This new
transaction need to:
 Print: DANFE, Bank Slip and Miscellaneous Notification
 Reprint: DANFE (Security Form or Paper A4), Bank Slip and Miscellaneous
Notification
 Create XML and delivery this file in path informed

Some options need to be available:

 Select documents using selection criteria


 Choose Printer (mass or individual)
 Clip documents from the same Nota Fiscal
 Process several documents together
 Choose different printer to print DANFE in contingency
 Select manually documents to be printed

First Screen

Functionality Options

The system will display two grids in first screen. First one, user will choose between
functionality print or reprint. This selection is mandatory (radiobutton), default value is option
Print.

When user chooses Print, the program has to call program ZNFE_PRINT_DANFE, this is
program will do DANFE print

Regarding my understanding, we need to use these Perform to validate documents that


should be printed. I would like to do this validation before to start processing.

PERFORM nota_fiscal_read. " read nota fiscal


PERFORM check_nf_canceled. " check nota fiscal canceled,442570
IF wk_header-nfe = 'X'.

* The NFe to be printed must have an authorization code


PERFORM check_nfe_authorized.

643091670.docx Printed on 14/02/2012 13:06:00 Page  28/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Do check in retcode.
CHECK retcode IS INITIAL.

Basically, we need to select Nota Fiscal authorized by SEFAZ not printed yet or Nota Fiscal
in Contingency.

When user chooses Reprint (is not important if is FS or A4), the program has to select:

PERFORM authority_check USING 'AA' 'Re-Print'

User has to follow two steps to reprint. Select Reprint, after that select
output (print). I suggest to Debug in DEV199 using document number 15.

But, the system has to considerer to reprint Danfe printed before. I would like to verify these
documents before.

These process describe above are to select Danfes like a print or Reprint, after that the
system need to identify others documents related with this Nota Fiscal. Can be Bank Slip and
Miscellaneous Notification, both are Output Message from Invoice. The system has to
identify if the customer related with this NF has Suframa code. (KNA1-stceg).

The message types should be informed by Parameters Table (ZTO010).

Selection Criteria (first screen)

In the second grid inside first screen, we have selection criteria.

Program has to consider all information from first and second grid.

The final selection is always done in J_1BNFE_ACTIVE, but some parameters there isn't in
this table, so the program needs to found relation between this information and registers in
J_1BNFE_ACTIVE. These fields are:

 Shipment Number
 Shipping Point
 Invoice Number

Follow below explaining how to relate these documents informed with Nota Fiscal in
J_1BNFE_ACTIVE

When inform Shipment number, the program need:

Is possible inform more than one or one range. Only for print functionality the system has to
inform if there are Nota Fiscal not available to print reference shipment informed. I am
suggesting to do it using internal table “Shipment Inconsistency”

Access VTTP, to fill VTTP-TKNUM with value number informed in field “Shipment Number” in
Print Monitor.
Is possible have more than one register, we have to consider all registers
Get value from VTTP-VBELN, it is Delivery number.

We need to identify every item from deliveries.

643091670.docx Printed on 14/02/2012 13:06:00 Page  29/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Access LIPS
Inform LIPS-VBELN value from VTTP-VBELN
Identify all values in LIPS-POSNR, can be many items.

If user chose print functionality, keep this information (shipment and deliveries/items related),
because will need to verify if all deliveries from the same Shipment have Nota Fiscal created,
it has to be done before display data in second screen.

Look for subsequences documents from Delivery, can be Invoice for NF from SD process or
Material Movement for MM process.

Start looking for Delivery Subsequence Documents in SD

Access VBFA:
Inform VBFA-VBELV from VTTP-VBELN
Inform VBFA-POSNV from LIPS-POSNR
Inform VBFA- VBTYP_V with value “J”
Inform VBFA- VBTYP_N with value “M”
Identify VBFA-VBELN
Identify VBFA-POSNN
This values identified are Invoice and Item. Can be more than one, consider all values.

If user chose print functionality, confirm if there is one Invoice Item for each Delivery item,
If yes, follow the processing. If not, identify what delivery item there isn’t invoice item related
and keep this information in internal table “Inconsistency of Shipment”.

Access J_1BNFLIN
Inform J_1BNFLIN-REFTYP with value “BI”
Inform J_1BNFLIN-REFKEY from VBFA-VBELN
Inform J_1BNFLIN-REFITM from VBFA-POSNN
Identify J_1BNFLIN-DOCNUM

Here we have internal numbers of Nota Fiscal (DOCNUM)

If user chose print functionality, confirm if there is one Nota Fiscal for each Invoice item,
If yes, follow the processing. If not, identify what invoice item there isn’t Nota Fiscal related
and keep this information in internal table “Inconsistency of Shipment”. This register need to
have Delivery related.

Sort Nota Fiscal (DOCNUM), after that delete register repeated.

Access J_1BNFE_ACTIVE
Inform J_1BNFE_ACTIVE-DOCNUM from J_1BNFLIN-DOCNUM

If user chose print functionality, check if these Notas Fiscais are available to print using the
same logical build for select documents. If has Nota Fiscal not available to print, the system
has to keep this information in table “Inconsistency of Shipment”.

Considered others parameters informed in Criteria Selected.

If user chose print functionality, about Internal Table “Inconsistency of Shipment”, when one
or more register was record in this table, the system should show Alert Message:

643091670.docx Printed on 14/02/2012 13:06:00 Page  30/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

“Nota Fiscal selected from Shipment XXXXXX and delivery YYYYYY was not available to
print.”

Where YYYYYY is filled with list of deliveries without NF in the end (internal table
Inconsistency of Transport) and XXXXXX is filled with Shipment number.

The check using internal table “Shipment Inconsistency” has to be done only for print
functionality and look this relation for SD documents.

Follow looking for Delivery Subsequence Documents in MM

When subsequence documents from Delivery assigned in Shipment informed is not found in
SD process, program has to look these subsequences documents in MM process.

Access VBFA:
Inform VBFA-VBELV from VTTP-VBELN
Inform VBFA-POSNV from LIPS-POSNR
Inform VBFA- VBTYP_V with value “J”
Inform VBFA- VBTYP_N with value “R”
Identify VBFA-VBELN
Identify VBFA-POSNN
This values identified are Material Movement and Item. Can be more than one, consider all
values.

Access J_1BNFLIN
Inform J_1BNFLIN-REFTYP with value “MD”
Inform J_1BNFLIN-REFKEY from VBFA-VBELN + Year
Inform J_1BNFLIN-REFITM from VBFA-POSNN
Identify J_1BNFLIN-DOCNUM

Here we have internal numbers of Nota Fiscal (DOCNUM)

Sort Nota Fiscal (DOCNUM), after that delete register repeated.

Access J_1BNFE_ACTIVE
Inform J_1BNFE_ACTIVE-DOCNUM from J_1BNFLIN-DOCNUM

Considered others parameters informed in Criteria Selected.

When inform Invoice number, the program need:

Is possible inform more than one or one range.

Access J_1BNFLIN
Inform J_1BNFLIN-REFTYP with value “BI”
Inform J_1BNFLIN-REFKEY from VBFA-VBELN
Identify J_1BNFLIN-DOCNUM

Here we have internal numbers of Nota Fiscal (DOCNUM). Can have more than one register.

Sort Nota Fiscal (DOCNUM), after that delete register repeated.

643091670.docx Printed on 14/02/2012 13:06:00 Page  31/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Access J_1BNFE_ACTIVE
Inform J_1BNFE_ACTIVE-DOCNUM from J_1BNFLIN-DOCNUM

Considered others parameters informed in Criteria Selected.

When inform Invoice number, the program need:

Is possible inform more than one or one range.

Access J_1BNFDOC
Inform J_1BNFDOC-VSTEL with value informed in field Shipping Point in Print Monitor
Identify J_1BNFDOC-DOCNUM

Here we have internal numbers of Nota Fiscal (DOCNUM). Can have more than one register.

Access J_1BNFE_ACTIVE
Inform J_1BNFE_ACTIVE-DOCNUM from J_1BNFDOC-DOCNUM

Considered others parameters informed in Criteria Selected.

Print Parameters

Although these data are shown in the selection screen, do not have the selection function.
They are used only to inform the user which printer will replace all printers defined in the
Standard screen action.

 Printer
 Printer to Contingency

Values informed should be validated. Is possible inform only one value in each field.

Others selection criteria

These selection criteria will be select directly in J_1BNFE_ACTIVE. Follow description below:

 Company Code
Is a mandatory field, accept only one value. Value informed have to be validated.
J_1BNFE_ACTIVE – BUKRS fill using number informed by user.

 Business Place (mandatory)


Is a mandatory field, accept only one value. Match Code mandatory.
J_1BNFE_ACTIVE – BRANCH fill using number informed by user.

 NF Number
Is possible inform more than one value, include using Range.
J_1BNFE_ACTIVE – NFNUM9 fill using number informed by user.

 NF Serie (this one just available when NF Number is filled)


Is mandatory inform it when field NF Number is filled.
J_1BNFE_ACTIVE – SERIE fill using number informed by user.

643091670.docx Printed on 14/02/2012 13:06:00 Page  32/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

 Document Date
Is possible inform more than one value, include using Range. Current date is defined as
default.
J_1BNFE_ACTIVE – ACTION_DATE fill using number informed by user.

 Document Number (SAP)


Is possible inform more than one value, include using Range.
J_1BNFE_ACTIVE – DOCNUM fill using number informed by user.

 Direction Movement - (same options in J1BNFE)


Values proposed by the system (like Match Code in the table). Is possible to maintain
empty too, in this situation system not consider this field in the selection.
J_1BNFE_ACTIVE – DOCNUM

 Form of NF
Values proposed by the system (like Match Code in the table). Is possible to maintain
empty too, in this situation system not consider this field in the selection.
J_1BNFE_ACTIVE – FORM

 Partner ID (Customer/Vendor)
Is possible inform more than one value, include using Range. If is possible, user should
use some parameters to found.
J_1BNFE_ACTIVE – CREDAT fill using number informed by user.

 Posted/Switched to Contingency
Both, only normal or only contingency. The system always will consider this field.
J_1BNFE_ACTIVE – CONTING
J_1BNFE_ACTIVE – CONTING_S
When user select both the system should not consider the value in fields
J_1BNFE_ACTIVE- CONTING and J_1BNFE_ACTIVE-CONTING_S to do documents
selection.
When user select “Only Contingency” the system should consider the value in fields
J_1BNFE_ACTIVE- CONTING and J_1BNFE_ACTIVE-CONTING_S to do documents
selection. The system needs to select only documents with one of them (or both) fields
marked in J_1BNFE.
When user select “Only Normal” the system should consider the value in fields
J_1BNFE_ACTIVE- CONTING and J_1BNFE_ACTIVE-CONTING_S to do documents
selection. The system needs to select only documents with these fields empty in
J_1BNFE.

 NF Model
Values proposed by the system (like Match Code in the table). Is possible to maintain
empty too, in this situation system not consider this field in the selection.
J_1BNFE_ACTIVE – MODEL

643091670.docx Printed on 14/02/2012 13:06:00 Page  33/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Second Screen – Execution

Print Danfe

Display all documents from selection done in the first screen.

Layout is defined like a Report, each line have all information from the same Nota Fiscal.

Under of screen will have two buttons, one for Print documents, other one to create XML to
Suframa.

Some fields are displayed and cannot be change. Follow these fields:

Field Description Origin Comments


NF Number External number for J_1BNFE_ACTIVE-
NF NFNUM9
NF Serie J_1BNFE_ACTIVE-
SERIE
Shipment SAP number for Documents SD This field can be
Number Shipment Document empty, it means this
J_1BNFE_ACTIVE- NF there isn’t
DOCNUM shipment assigned
Access J_1BNFLIN view in its flow. SAP rules
Reference field could have more
inform DOCNUM than one, but here
Access Invoice Table we will show only
Access Flow Table first value found.
Identify Delivery
Access Shipment Table
(VTTP)

Documents MM

J_1BNFE_ACTIVE-
DOCNUM
Access J_1BNFLIN view
Reference field
Access Material
Movement table
Access Flow Table

Reference Document informed J_1BNFE_ACTIVE- SAP rules could


Number in field reference of DOCNUM have more than one,
this NF Access J_1BNFLIN, field but here we will
REFERENCE (REFKEY) show only first value
found.
Document Internal number for J_1BNFE_ACTIVE-
Number NF DOCNUM
Shipping Point Shipping Point J_1BNFE_ACTIVE- Sometimes this field
assigned in Delivery DOCNUM can be empty, it

643091670.docx Printed on 14/02/2012 13:06:00 Page  34/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

means this NF there


Access J_1BNFDOC isn’t delivery
field VSTEL assigned in its flow.
SAP rules could
have more than one,
but here we will
show only first value
found.
Direction Outgoing or Incoming J_1BNFE_ACTIVE-
Movement DIRECT
Form of NF Used by SAP to print J_1BNFE_ACTIVE-
FORM
Document Creation date J_1BNFE_ACTIVE-
Date CREDAT
Partner Name Name registered in J_1BNFE_ACTIVE- Customer/Vendor
Costumer or Vendor PARID Name
Master data LFA1 (VENDOR)
KNA1 (CUSTOMER)
Partner ID ID Customer or J_1BNFE_ACTIVE- Internal code in SAP
Vendor registered in PARID for Customer and
SAP Vendors
Posted to Identify Nota Fiscal J_1BNFE_ACTIVE- empty or X
Contingency created in CONTING
Contingency
Switched to Identify Nota Fiscal J_1BNFE_ACTIVE- empty or X
Contingency switch to CONTING_S
Contingency
NF Model NF Model J_1BNFE_ACTIVE- 55 for NF-e
MODEL
Created By User create this J_1BNFE_ACTIVE-
document in the CRENAM
system
Created On Date creation this J_1BNFE_ACTIVE-
document in the ACTION_DATE
system

Others fields will be filled automatically by system, but can be edit:

Field Description Origin Comments


Printer Printer used to print 1) Informed by User in Can be edit by user,
documents selection screen one by one in the
2) Transaction J1BG, execution screen
third key (condition
tables for output NF)
Printer to Printer used to print 1) Informed by User in Can be edit by user,
Contingency documents created in selection screen one by one in the
Contingency in 2) Transaction J1BG, execution screen.
Security Form second key Only for Danfe in
(Company Code, Contingency printed
Business Place, in Security System.

643091670.docx Printed on 14/02/2012 13:06:00 Page  35/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Form and Post


Conting)
XML to Enable when Without origin, user has Few costumers
Suframa customer has value in select or not when this have this situation.
VAT Number (KNA1- field is enable. When user select
stceg) means will include
this Nota Fiscal in
file created.

Button Print

When user presses this button, program has to identify all documents to print for each Nota
Fiscal.

Displayed in screen are all documents with Danfe available to print, so need to identify if
there are other documents for the same Nota Fiscal.

The documents considering in this process will be found in Table Parameters (ZTO010), but
are:
- Bank Slip : Invoice Output Message ZBBS
- Miscellaneous Notification: Invoice Output Message ZBMN
When these documents there are in Invoice have to be considered, even if it has been
previously printed.

The program has to create register in NAST and define one message for each document.

XML to Suframa Button

When user press this button the system has to open Browser to user define on path to create
the file. After that, the system has to create one XML file in path informed.

643091670.docx Printed on 14/02/2012 13:06:00 Page  36/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Where:
EGA (TAG type):
E – Element
G – Group
A – Attribute of the preceding element
Type:
N – Number
C – Alphanumeric
D – Date
B – Booleano
Event:
0-1- Can happen once or not happen
1-1- Can happen once (mandatory)
1-N – Can happen once or more times
Size:
X – Pre-defined size (sample. 5 --> Field should be filled with 5 characters )
1-X – Can change number of characters between interval informed (sample. 1-5 --> the
Field can be filled with one character or more than one, until 5)

Reprint Danfe (A4 or FS)

Display all documents from selection done in the first screen.

Layout is defined like a Report, each line have all information from the same Nota Fiscal.

Under of screen will have two buttons, one for Reprint documents, other one to create XML
to Suframa.

Some fields are displayed and cannot be change. Follow these fields:

Field Description Origin Comments


NF Number External number for J_1BNFE_ACTIVE-
NF NFNUM9
NF Serie J_1BNFE_ACTIVE-
SERIE
Shipment SAP number for Documents SD This field can be
Number Shipment Document empty, it means this
J_1BNFE_ACTIVE- NF there isn’t
DOCNUM shipment assigned

643091670.docx Printed on 14/02/2012 13:06:00 Page  37/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Access J_1BNFLIN view in its flow. SAP rules


Reference field could have more
inform DOCNUM than one, but here
Access Invoice Table we will show only
Access Flow Table first value found.
Identify Delivery
Access Shipment Table
(VTTP)

Documents MM

J_1BNFE_ACTIVE-
DOCNUM
Access J_1BNFLIN view
Reference field
Access Material
Movement table
Access Flow Table

Reference Document informed J_1BNFE_ACTIVE- SAP rules could


Number in field reference of DOCNUM have more than one,
this NF Access J_1BNFLIN, field but here we will
REFERENCE (REFKEY) show only first value
found.
Document Internal number for J_1BNFE_ACTIVE-
Number NF DOCNUM
Shipping Point Shipping Point J_1BNFE_ACTIVE- Sometimes this field
assigned in Delivery DOCNUM can be empty, it
means this NF there
Access J_1BNFDOC isn’t delivery
field VSTEL assigned in its flow.
SAP rules could
have more than one,
but here we will
show only first value
found.
Direction Outgoing or Incoming J_1BNFE_ACTIVE-
Movement DIRECT
Form of NF Used by SAP to print J_1BNFE_ACTIVE-
FORM
Document Creation date J_1BNFE_ACTIVE-
Date CREDAT
Partner Name Name registered in J_1BNFE_ACTIVE- Customer/Vendor
Costumer or Vendor PARID Name
Master data LFA1 (VENDOR)
KNA1 (CUSTOMER)
Partner ID ID Customer or J_1BNFE_ACTIVE- Internal code in SAP
Vendor registered in PARID for Customer and
SAP Vendors
Posted to Identify Nota Fiscal J_1BNFE_ACTIVE- empty or X
Contingency created in CONTING
Contingency

643091670.docx Printed on 14/02/2012 13:06:00 Page  38/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Switched to Identify Nota Fiscal J_1BNFE_ACTIVE- empty or X


Contingency switch to CONTING_S
Contingency
NF Model NF Model J_1BNFE_ACTIVE- 55 for NF-e
MODEL
Created By User create this J_1BNFE_ACTIVE-
document in the CRENAM
system
Created On Date creation this J_1BNFE_ACTIVE-
document in the ACTION_DATE
system

Others fields will be filled automatically by system, but can be edit:

Field Description Origin Comments


Printer Printer used to print 3) Informed by User in Can be edit by user,
documents selection screen one by one in the
4) Transaction J1BG, execution screen
third key (condition
tables for output NF)
Printer to Printer used to print 3) Informed by User in Can be edit by user,
Contingency documents created in selection screen one by one in the
Contingency in 4) Transaction J1BG, execution screen.
Security Form second key Only for Danfe in
(Company Code, Contingency printed
Business Place, in Security System.
Form and Post
Conting)
XML to Enable when Without origin, user has Few costumers
Suframa customer has value in select or not when this have this situation.
VAT Number (KNA1- field is enable. When user select
stceg) means will include
this Nota Fiscal in
file created.
DANFE Always enable Message type from All registers not
invoice. marked, user can
marks.
Bank Slip Only enable when Message type from All registers not
there is this document invoice. marked, user can
in invoice marks.
Miscellaneous Only enable when Message type from All registers not
Notification there is this document invoice. marked, user can
in invoice marks.

Button Reprint

When user presses this button, program has to identify all documents to reprint for each Nota
Fiscal.

643091670.docx Printed on 14/02/2012 13:06:00 Page  39/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

Displayed in screen are all documents with Danfe available to reprint, so need to identify if
there are other documents for the same Nota Fiscal.

The documents considering in this process will be found in Table Parameters (ZTO010), but
are:
- Bank Slip : Invoice Output Message ZBBS
- Miscellaneous Notification: Invoice Output Message ZBMN
When these documents there are in Invoice have to be considered, even if it has not been
previously printed.

The program has to create register in NAST and define one message for each document.

Print characteristics

Do or not staple process is not defined by user, when the printer has this functionality the
system will be clip all sheets from same customer, can have one or more documents.

If user send print documents to same printer, but using output device different, the system
need to identify and staple these documents together.

Use NAST table to management the print process.

<Start>DevSIR-39919 by Eduardo FONTES on 10.05.2018 <Start>

This adjust to the field Quantity is necessary because nowadays Danone is creating the
correction letter for Export Sales because the format for that field Quantity is not correct, so
basically the program needs to identify if the scenario is Export Sales to not impact any other
scenario.

Create the following parameters as selection option to use on the ZTO010 and check as the
logic below;

Table code: ZTO010

GAP FIELD ID VALUE_TO VALUE_FROM


BR1SD05421 24000000 ZBSO
BR1SD05421 24000300 ZBSO
BR1SD05421 24100000 ZBSO
BR1SD05421 24100300 ZBSO
BR1SD05421 24200000 ZBSO
BR1SD05421 24200300 ZBSO
BR1SD05421 24300000 ZBSO
BR1SD05421 24300300 ZBSO
BR1SD05421 23100000 ZBSO
BR1SD05421 23100300 ZBSO
BR1SD05421 24000000 ZBSI
BR1SD05421 24000300 ZBSI
BR1SD05421 24100000 ZBSI
BR1SD05421 24100300 ZBSI
BR1SD05421 24200000 ZBSI
BR1SD05421 24200300 ZBSI

643091670.docx Printed on 14/02/2012 13:06:00 Page  40/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

BR1SD05421 24300000 ZBSI


BR1SD05421 24300300 ZBSI
BR1SD05421 23100000 ZBSI
BR1SD05421 23100300 ZBSI

Sales Organization: 2400, 2410,2420,2430,2310


Distribution channel: 00, 03
Division: 00
Order type: ZBSO, ZBSI

REFTYP: BI
REGION: UY

Access the table J_1BNFLIN and take J_1BNFLIN-DOCNUM with this value found access
J_1BNFLIN and take the field J_1BNFLIN-REFTYP “BI” with this value found check if the
value is the same as the value registered on the table ZTO010 if the value is not the same as
registered on the table ZTO010 then not apply the logic but if the value is the same then the
program must access the table J_1BNFLIN /J_1BNFLIN-DOCNUM take the field
J_1BNFLIN-REFKEY with this value found access the table VBRP with J_1BNFLIN-REFKEY
/VBRP-VBELN And take VBRP-AUBEL with this value the program must go to the table
VBAK with VBRP-VBELN/VBAK-VBELN and take the follow fields;

VBAK-AUART
VBAK-VKORG
VBAK-VTWEG
VBAK-SPART

When this value found the program must be check if the values is the same as the value
registered on the table ZTO010 if the value is not the same as registered on the table
ZTO010 then not apply the logic but if the value is the same then the program must Access
the table VBAK with VBAK-VBELN and take the field VBAK-KUNNR with this value found the
system must go to the table KNA1 with KNA1- KUNNR/ VBAK-KUNNR and take KNA1-
REGIO when this value found the program must be check if the value is the same as the
value registered on the table ZTO010 if the value is not the same as registered on the table
ZTO010 then not apply the logic but if the value is the same then the program must Access
the table then the program must go to the table J_1BNFDOC and take the field J_1BNDOC-
DOCNUM with this value found take the value of the field J_1BNFDOC-NTGEW and fulfill
the field J_1BNFLIN-MENGE to be used on Danfe printout

Note: Related to the field J_BNFDOC-NTGEW "NET WEIGHT" is related to the total net
weight of all items related to the nota fiscal number.

Here below you can find one example with the current issue related to the fiscal team, so on
the right side at box called Peso liquido marked as yellow color we have the value that we
will need to have the same value on the left side at the box called quantidade.

643091670.docx Printed on 14/02/2012 13:06:00 Page  41/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

<End> DevSIR-39919 by Eduardo FONTES on 10.05.2018<End>

V 8 < Start of SA - PRJxxxxx - ENHCxxxxxx - Print of DANFE changes by Susan Ohi on


24.01.2020>
If the user chose the option print (first option) or reprint DAFE (Contingency FS)
( second option) in the functionality and Printer in the spool option in the selection
screen.
You need check if the Company code and Business place was set to contingency
mode in Security Form. For that, you need check the table J_1BNFE_CONTIN with
LAND1 = ‘BR’, BUKRS = Company Code selected in the selection screen, BRANCH =
Business Place selected in the selecteion screen and XI_OUT_SET = ‘X’. If you find
register, the Company code was set in a contingency mode.

If a contingency mode, you need open an pop up to user informed the information
below, after the Danfe were printed or re-printed.

Example by pop up:

Séri
e Subsérie Sequencia inicial Sequencia final Nr Autorização
         
         
         

Type of fields:

SÉRIE = CHAR 4
SUBSÉRIE = CHAR 3
SEQUENCIA INICIAL = NUMBER 12
SEQUENCIA FINAL = NUMBER 12
NR AUTORIZAÇÃO = NUMBER 60

After the user informed, you need save this information in a new Z tables

Z1 fo example

ID = NUMBER 9 (you need pick the last ID and sun 1)


Company code = BUKRS (Company code selected in the selection screen)
Business Place = J_1BBRANC_ (Business Place selected in the selection screen)
SÉRIE = CHAR 4 (Informed by user in the pop up)
SUBSÉRIE = CHAR 3 (Informed by user in the pop up)
SEQUENCIA INICIAL = NUMBER 12 (Informed by user in the pop up)
SEQUENCIA FINAL = NUMBER 12 (Informed by user in the pop up)
NR AUTORIZAÇÃO = NUMBER 60 (Informed by user in the pop up)

Z2

DOCNUM = J_1BDOCNUM (Docnumber selected by user to print/re-print, but it is


work fine)
ID = NUMBER 9 (ID informed in the Z1 table)

643091670.docx Printed on 14/02/2012 13:06:00 Page  42/43


THEMIS - < BR1SD05421 – Print Monitor NFe >
< Functional Design: Enhancement >

All fields will be key in the tables, because the user can insert more than one line in the
pop up and the Nota Fiscal can be re printed in another security form.

Example the Nota Fiscal the user can chose to print.

V 8 < End of SA - PRJxxxxx - ENHCxxxxxx – Print of DANFE Changes by Susan Ohi on


24.01.2020>

643091670.docx Printed on 14/02/2012 13:06:00 Page  43/43

You might also like