Business Function Specification
General Logic - Flow
Source NameB7602020DesignerMiriam Kato
Data Structure D7602020ProgrammerMiriam Kato
Function Name Add Lines To Receipt FileSystem Code76
Function CategoryVery Complex
Function UseUPD
Revisions Log
DateProgrammerSAR NumberDescription
06/05/98Miriam Kato1844117Created
1.Functional Description
1.1Purpose
This Business Function adds lines related to ICMS Substitution, ICMS Substitution Recoverable, IPI, IPI Recoverable, ICMS Recoverable, Repasse and
Trade Discount to the PO Receipts File (F43121). It will also create GL entries, cardex and average cost for each type of entry described above. This
function will be called by UBE R76B804 after the distribution AAIs and accounts validation.
1.2Setup Notes and Prerequisites
These setup notes refer to the global process, which includes the call form the Nota Fiscal Maintenance program, UBE R76B804 (Process Taxes in
Receipt File) and other business functions.
1.Order Activity Rules for NF (for UBE processing options)
2.UDC 76/GL: entries SUB, SBR, IPI, IPR, ICR,REP, TDC
3.Distribution AAIs for Table Numbers 4385 (Debit) and 4390 (Credit)
4.Accounts for each entry in the chart of accounts
5.Check SAR document for setup details.
1.3Special Logic
The recoverability flags for IPI, ICMS and ICMS Substitution are defined in the Special Handling Code for the UDC 76/PU. In order to read each one
separately, the following offsets were defined:
#defineIPI_RECOV_POS0(IPI)
#defineICMS_RECOV_POS1(ICMS)
#defineICMS_SUBSRECOV_POS2(ICMS Substitution)
1.3Special Logic
2 Technical Specifications
2.1 Parameters:
Data Item Data Structure DescriptionI/ORequiredNotes
BNNFmnNotaFiscalNumberIYNota Fiscal Number
BSERszNotaFiscalSeriesIYNota Fiscal Series
N001mnNextNumberIYNota Fiscal Next Number 001
DCTszDocumentTypeIYNota Fiscal Document Type
UKIDmnUniqueKeyIdInternalIYNota Fiscal Unique Key Id
EV01cCurrencyConversionFlagIYGot in R76B804, used in multi-currency conversion
CRYRcCurrencyConverYNARIYGot from CO 00000, used for multi-currency conversion
USERszUserIdIYFrom Get Audit Information
PIDszProgramIdIYR76B804
TDAYmnTimeofDayIYFrom Get Audit Information
UPMJmnDateUpdatedIYFrom Get Audit Information
APIcAPIInterfaceYNDistIYFrom Get Line Type Information
IVIcInventoryInformationIYFrom Get Line Type Information
JOBNszWorkstationIdIYFrom Get Audit Information
NXTRszPOStatusCodeNextIYFrom Processing Options
LTTRszPOStatusCodeLastIYFrom Processing Options
EV01cReturnStatusOIf 1, error; else, no error
ICUmnBatchNumberI/OReturn batch number processed
2.2Related Tables
Table Table Description
F43121PO Receipts File
F7611BNota Fiscal Detail
F4105Cost (Server)
F4111Item Ledger (Server)
F0011Batch
F0911GL Transactions (Server)
2.3Related Business Functions
Source NameFunction Name
B7601090Get Receiver Next Line
GETABDA7Get AB Alpha Name
B0000009Get Next Journal Entry Line Number Header File
B0000042Open, Close Batch
B0900049F0911 MBF
B7601080Get Distribution AAI and Validate Account
B4001040Get Item Master Information
XF4105Get Item Cost
B4100050Inventory Cardex Shell
2.4Processing
Initializations
Read the Nota Fiscal Detail record with Key1 = Parameters BNNF, BSER, N001, DCT, UKID
Get related F43121 record with Key1 = MATC, DOCO, DCTO, KCOO, LNID, DOC, NLIN
Get Vendor Alpha Name ( GETABDA7 )
Get Last NLIN ( B7601090 )
Define Recoverability from UDC 76/PU, Key = fdbcfc
Get Next JE Line Number for this document (B0000009 )
If Input Batch Number is zero
F0911 MBF Begin Doc (B0900049 )
// Add ICMS Substitution Line
If ( AP Interface == Y )
Write Receipt Line (ICMS Substitution)
// Add ICMS Substitution Recoverable Line
If (ICMS Substitution Recoverable Flag = 1 )
Write Receipt Line (ICMS Substitution Recoverable)
// Add IPI Line
If ( AP Interface == Y )
Write Receipt Line (IPI)
// Add IPI Recoverable Line
If (ICMS Substitution Recoverable Flag = 1 )
Write Receipt Line (IPI Recoverable)
// Add ICMS Recoverable Line
If (ICMS Recoverable Flag = 1 )
Write Receipt Line (ICMS Recoverable)
// Add Repasse Line
If ( AP Interface == Y )
Write Receipt Line (Repasse)
// Add Trade Discount Line
If ( AP Interface == Y )
Write Receipt Line (Trade Discount)
F0911 MBF End Doc
Process Batch Header
If Update Flag == 1
Call Update Average Cost (B7602030)
Clean Up
Write Receipt Line
If Amount != 0
Update Flag = 1
// Move Amount to :
PRECST (Amount Extended Cost)
PRAOPN (Amount Open)
PRAREC (Amount Received)
If CNV ==1 and PRCRR != 0
If CRCY = Z
Assign Foreign Amount to:
PRFAP (Foreign Open Amount)
PRFREC (Foreign Received Amount)
// Unit Cost
Unit Cost = Amount/PRUREC
Cum Unit Cost = Cum Unit Cost + Unit Cost
If GL Class [Code] != blank
PRVRMK = Remark [Code]
// Process line number to write
PRALIN = SavNlin
LastNlin = LastNlin + 1
PRNLIN = LastNlin
Create GL Entries
Update Cardex
Load Defaults
Quantities = 0: PRUORG, UPTD, UCLO, QTYS, QTYR, QTYW, QTYC, QTYJ. QTYA
Amounts = 0: PRPRRC, APTD, ACLO, AVCO, VARC, FRRC, FEC, FAPT, FAP, FREC, FCLO
Status = blanks: PRLTTR, NXTR
Tax Fields
Blanks: EXR1, TXA1, VANI
MATC = 1
TX = 1
Open Batch
Call Open Batch ( B0000042)
Save Batch Number
F0911 MBF Begin Doc
Load Parameters
Call F0911FSBeginDoc (B0900049)
F0911 MBF End Doc
Load Parameters
Call F0911FSEndDoc (B0900049)
Create GL Entries
// Get Accounts Numbers for Credit AAI Tale 4385 and Debit- 4390
Compose new GL Class Code = Code Line + prglc
Get New GL Class and Remark in 76/GL
Call B7601080 (Get Distribution AAI and Validate Account)
Load Parameter for F0911 MBF Edit Line
Update Line Number
Call F0911 MBF Edit Line for Debit
Validate amount
Update Accounts
Update Line Number
Call F0911 MBF Edit Line for Credit
Update Cardex
Parameters (dsF43121, Unit Cost, Inventory Interface, GL Document Type, lpDS, Remark, GL Batch Number)
If (Unit Cost equal zero)
//Get Item Cost
F4105 Get Item Cost (XF4105) read LEDG
//Bypass ledger if cost method is standard (07) or if not full inventory interface
If ( (Cost Method equal 07) or (Inventory Interface not equal to Y))
Load values to include
Call "Inventory Cardex Shell" (B4100050)
2.4Field Mapping
2.6Mapping
FIELD MAPPING F0911 - "Add Tax Lines to Receipt File"
DATA ITEMFIELD DESCRIPTIONUPDATE /WRITEVALUE
F0911ItemFrom FileNote
GLKCODocument CompanyKCOOF43121
GLDCTDocument Type"AE"
GLDOCDocument NumberDOCF43121
GLDGJGL Date
GLJELNJournal Entry line #Next Line
GLEXTLLine Extension Code
GLPOSTGL Posted Code
GLICUBatch NumberB0000042
GLICUTBatch Type"O"
GLDICJBatch DateUPMJlpDS
GLDSYJBatch System DateUPMJlpDS
GLTICUBatch TimeTDAYlpDS
GLCOCompanyCOF43121
GLANIAccount NumberB7601090
GLAMAccount ModeB7601090
GLAIDAccount IDB7601090
GLMCUBusiness UnitB7601090
GLOBJObject AccountB7601090
GLSUBSubsidiaryB7601090
GLSBLSubledger
GLSBLTSubledger Type
GLLTLedger Type"AA"
GLPNGL Period Number0
GLCTRYCentury0
GLFYFiscal Year
D7602020 - Add Lines to Receipt File - Brazil - 43A
Data Item Data Structure DescriptionI/ORequiredNotes
BNNFmnNotaFiscalNumberIYNota Fiscal Number
BSERszNotaFiscalSeriesIYNota Fiscal Series
N001mnNextNumber IYNota Fiscal Next Number 001
DCTszDocumentTypeIYNota Fiscal Document Type
UKIDmnUniqueKeyIdInternalIYNota Fiscal Unique Key Id
EV01cCurrencyConversionFlagIYGot in R76B804, used in multi-currency conversion
CRYRcCurrencyConverYNARIYGot from CO 00000, used for multi-currency conversion
USERszUserId IYFrom Get Audit Information
PIDszProgramId IYR76B804
TDAYmnTimeofDay IYFrom Get Audit Information
UPMJmnDateUpdated IYFrom Get Audit Information
APIcAPIInterfaceYNDistIYFrom Get Line Type Information
IVIcInventoryInformationIYFrom Get Line Type Information
JOBNszWorkstationIdIYFrom Get Audit Information
NXTRszPOStatusCodeNextIYFrom Processing Options
LTTRszPOStatusCodeLastIYFrom Processing Options
EV01cReturnStatus OIf 1, error; else, no error
ICUmnBatchNumber I/OReturn batch number processed
^
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnNotaFiscalNumber | BNNF | MATH_NUMERIC | OPT | NONE |
A six-character number that identifies a nota fiscal. The number consists of the nota fiscal number and the nota fiscal series. | ||||
szNotaFiscalSeries | BSER | char | OPT | NONE |
A two-character number that along with the nota fiscal number, identifies a nota fiscal. The Nota Fiscal Series field is the second key that the
| ||||
mnNextNumber001 | N001 | MATH_NUMERIC | OPT | NONE |
The number that the system will assign next. The system can use next numbers for voucher numbers, invoice numbers, journal entry
| ||||
szDocumentType | DCT | char | OPT | NONE |
A user defined code (00/DT) that identifies the origin and purpose of the transaction. PeopleSoft reserves several prefixes for document
| ||||
mnUniqueKeyIDInternal | UKID | MATH_NUMERIC | OPT | NONE |
This field is a unique number used to identify a record in a file. | ||||
cCurrencyConversionFlag | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cCurrencyConverYNAR | CRYR | char | OPT | NONE |
A code that specifies whether to use multi-currency accounting, and the method of multi-currency accounting to use:
Codes are:
N Do not
| ||||
szUserId | USER | char | OPT | NONE |
The code that identifies a user profile. | ||||
szProgramId | PID | char | OPT | NONE |
The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry
| ||||
mnTimeOfDay | TDAY | MATH_NUMERIC | OPT | NONE |
The computer clock in hours:minutes:seconds. | ||||
jdDateUpdated | UPMJ | JDEDATE | OPT | NONE |
The date that specifies the last update to the file record. | ||||
cAPInterfaceYNDist | API | char | OPT | NONE |
A code that indicates whether the system reflects the dollar or unit value of any activity containing this order line type in Accounts Payable.
| ||||
cInventoryInterface | IVI | char | OPT | NONE |
A code that identifies the type of interface to the Inventory Management system. Valid values are:
Y The dollar or unit value of any activity
| ||||
szPOStatusCodeNext | NXTR | char | OPT | NONE |
A user defined code (system 40/type AT) indicating the next step in the order flow of the line type. | ||||
szPOStatusCodeLast | LTTR | char | OPT | NONE |
A code (system 40/type AT) specifying the last step in the processing cycle that this order line has successfully completed. | ||||
szWorkStationId | JOBN | char | OPT | NONE |
The code that identifies the work station ID that executed a particular job. | ||||
cReturnStatus | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
mnBatchNumber | ICU | MATH_NUMERIC | OPT | NONE |
A number that identifies a group of transactions that the system processes and balances as a unit. When you enter a batch, you can either
| ||||
szGlClassVendorFRT_LC | GLC | char | OPT | NONE |
A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates
| ||||
szGlClassVendorINS_LC | GLC | char | OPT | NONE |
A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates
| ||||
szGlClassVendorEXP_LC | GLC | char | OPT | NONE |
A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates
| ||||
szGlClassLineTypeFRT_LC | GLC | char | OPT | NONE |
A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates
| ||||
szGlClassLineTypeINS_LC | GLC | char | OPT | NONE |
A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates
| ||||
szGlClassLineTypeEXP_LC | GLC | char | OPT | NONE |
A code that determines the trade account that the system uses as the offset when you post invoices or vouchers. The system concatenates
| ||||
cInvInterfaceFRT_LC | IVI | char | OPT | NONE |
A code that identifies the type of interface to the Inventory Management system. Valid values are:
Y The dollar or unit value of any activity
| ||||
cInvInterfaceINS_LC | IVI | char | OPT | NONE |
A code that identifies the type of interface to the Inventory Management system. Valid values are:
Y The dollar or unit value of any activity
| ||||
cInvInterfaceEXP_LC | IVI | char | OPT | NONE |
A code that identifies the type of interface to the Inventory Management system. Valid values are:
Y The dollar or unit value of any activity
| ||||
cAPInterfaceFRT_LC | API | char | OPT | NONE |
A code that indicates whether the system reflects the dollar or unit value of any activity containing this order line type in Accounts Payable.
| ||||
cAPInterfaceINS_LC | API | char | OPT | NONE |
A code that indicates whether the system reflects the dollar or unit value of any activity containing this order line type in Accounts Payable.
| ||||
cAPInterfaceEXP_LC | API | char | OPT | NONE |
A code that indicates whether the system reflects the dollar or unit value of any activity containing this order line type in Accounts Payable.
| ||||
szDocTypeCadexExp_LC | DCT | char | OPT | NONE |
A user defined code (00/DT) that identifies the origin and purpose of the transaction. PeopleSoft reserves several prefixes for document
| ||||
szDocTypeCadexReg_LC | DCT | char | OPT | NONE |
A user defined code (00/DT) that identifies the origin and purpose of the transaction. PeopleSoft reserves several prefixes for document
| ||||
cF43121ByTotal_LC | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
cF43121ProcessFlag_LC | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
mnTotalFreight_LC | BFRT | MATH_NUMERIC | OPT | NONE |
A complementary expense to your customer. The system prorates this expense amount among each of the notas fiscais listed and adds
| ||||
mnTotalInsurance_LC | BSEG | MATH_NUMERIC | OPT | NONE |
The insurance amount that you charge the client as complementary expense. This amount must be included on the nota fiscal. | ||||
mnTotalExpenses_LC | BDFN | MATH_NUMERIC | OPT | NONE |
The amount of the total financial expenses that is printed on the nota fiscal. | ||||
cLandedCostYorN | EV01 | char | OPT | NONE |
An option that specifies the type of processing for an event. | ||||
szErrorMessage | DSCA | char | OPT | NONE |
A description for the data items. Enter text in upper and lower case. The system uses this name to search for similar data items. To enter an
| ||||
szPOOverrideStatus | LTTR | char | OPT | NONE |
A code (system 40/type AT) specifying the last step in the processing cycle that this order line has successfully completed. |
None |
None |