0% found this document useful (0 votes)
225 views

Functional Specifications Template

This document provides details on enhancements to automate the selection of tax codes during purchase order creation. The enhancements aim to ensure the correct tax code is chosen with minimal user interaction, guaranteeing accurate tax calculation when invoices are received. Key requirements include defining tax rules based on material usage and origin, maintaining a custom Z table for specific rules, and creating a transaction to allow users to update the Z table as needed for business and regulatory changes. Training will also be provided to users and tax teams on maintaining the new Z table transaction.

Uploaded by

Ewerton
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
225 views

Functional Specifications Template

This document provides details on enhancements to automate the selection of tax codes during purchase order creation. The enhancements aim to ensure the correct tax code is chosen with minimal user interaction, guaranteeing accurate tax calculation when invoices are received. Key requirements include defining tax rules based on material usage and origin, maintaining a custom Z table for specific rules, and creating a transaction to allow users to update the Z table as needed for business and regulatory changes. Training will also be provided to users and tax teams on maintaining the new Z table transaction.

Uploaded by

Ewerton
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 31

Functional Design Specification for Enhancements

Object ID

E_FI025

Object Type

Enhancement

Object Title

Description

Process Area

Sub Process Area

Finance

Customer Service

Supply Chain

Procurement

Logistics

Master Data

Operations

Other

PO creation

Complexity

Simple

Rollout information <In


which rollout this
Enhancement will be
executed>

D1

Page 1 of 31

Medium
D2

327487523.doc

D3

D4

Complex

High Complex

BEST PRACTICES
1. The content in BLUE is the synopsis of what the section of FDS should
contain. Please remove the content in Blue before updating the respective
sections.
2. Refer to the Functional Specification Review checklist (FSR) for
Enhancements before delivering the Functional Design Specification for
technical review.
3. Update Table of contents section before base lining/delivering/updating
CRs of the Functional Design Specification.
4. Section 1 Document History is mandatory to log initial and further
changes to the Functional Design Specification. Please highlight in different
color if, critical content pertaining to a Change Request is being updated.
5. Enable Track changes if to modify Baseline Functional Design specification.
6. Section 3 Open Items should capture all TBDs and pending business
decisions, on the respective design or impacting business decisions on
dependencies.
7. Section 6.1 Process flow diagram should be included from Invista
Industry Print.
8. Sections 9.2 - Should capture all possible business test cases (minimum
10). This will become the base for technical unit testing (TUT) and
functional unit testing (FUT).
9. Critical or Mandatory section/s

Page 2 of 31

Section 7.1,7.2, 7.3,7.4 ,7.6 and 7.7 for ECC Enhancements


Section 7.5 for Portal Requirements.
Section 9.

327487523.doc

Table of Contents
5.1 Requirement Overview.....................................................................................7
5.2 Business Driver...............................................................................................7
5.3 Change Management Considerations/Roles and Volumes......................................7
5.4 Business Risks/Issues......................................................................................7
5.5 Business Dependencies/Considerations..............................................................7
5.6 Requirements Traceability Matrix.......................................................................7
6.1 Process Description and Flow............................................................................9
6.2 Detailed Business Requirements........................................................................9
6.3 Dependencies...............................................................................................10
6.3.1 Environment/Configuration..........................................................................10
6.3.2 Development Dependencies.........................................................................10
6.3.3 Run/Execution Dependencies.......................................................................10
6.4 Assumptions.................................................................................................10
6.5 Definitions....................................................................................................11
7.1 Enhancement Type........................................................................................12
7.2 Detailed Description of the Enhancement..........................................................12
7.3 Access Method or Path for Enhancement..........................................................27
7.4 Required Custom Tables (if known)..................................................................27
7.5 User interface (UI) Enhancement.....................................................................28
7.5.1 Detailed Description....................................................................................28
7.5.2 Access Method/Path/Navigation....................................................................28
7.5.3 Screen Flow...............................................................................................28
7.5.4 Screen Layout.........................................................................................28
7.5.5 Field List.................................................................................................28
7.5.6 Screen Controls.......................................................................................28
7.5.7 Group Validations.....................................................................................28
7.5.8 Links to Related Documents......................................................................28
7.5.9 Content Management...............................................................................29
7.6 System Integration........................................................................................29
7.7 Performance Requirements................................................................................29
8.1 Security Requirements...................................................................................30
8.2 Auditing and Controls Requirements................................................................30
9.1 Data Requirements........................................................................................31
9.2 Test Cases....................................................................................................31

Page 3 of 31

327487523.doc

1.

Document History

Version

Change Description

Author

Date
Released

Initial Creation

Ronnie Freire

06/04/2015

Modifications

Ronnie Freire

06/12/2015

Included a rule to also cponsider


the field MWART equal V at
J_1BTAXCODEV table.
3

Add a new validation for


Purchase of Raw Materials
scenario. The validation is to
allow users to select the second
option ICMS and the fourth
option PIS/COFINS

Add a new validation for


Purchase of Raw Materials
scenario. The validation is to
allow users to select only the
fourth option PIS/COFINS

06/30/2015

Ronnie Freire
07/06/2015

Ronnie Freire

Change on Purchase of Assets


scenario; adding new logic on PR

Ronnie Freire

07/18/2015

Change on Purchase of Assets,


Service POs and Purchase of
Consumption Materials

Ronnie Freire

08/03/2015

Change on Importing POs


scenario to also consider Service
POs.

Ronnie Freire

09/02/2015

2.

Document Sign Off

The individuals listed here will be required to review and approve this document.

Reviewed By:
The Reviewed By signature indicates the individual(s) who reviewed this document for
content and clarity, and to the best of their knowledge, this document satisfactorily achieves
the purpose and scope defined herein:
Name

Title/Role <Designation, Department>

Reviewed By
Signature

Date:

Reviewed By
Signature

Page 4 of 31

Date:

327487523.doc

Approved By:
The Approved By signature indicates the individual(s) who approved this document for
content and clarity, and to the best of their knowledge, this document complies with
corporate policies and procedures:
Name

Title/Role <Designation, Department>

Approved By
Signature

Date:

Approved By
Signature

Page 5 of 31

Date:

327487523.doc

3. Open Items
Date
Opened

Description

Assigned to

Due
Date

4. Contact List
Name

Team /
Organization

Email

Ronnie Freire

PR / Deloitte

[email protected]

Page 6 of 31

327487523.doc

Status

5. Executive Summary
This document explain the tax code automation at the moment of Purchase Document
creation. The purpose of this automation is to assure the correct tax code is chosen
automatically with a minimun user interaction, which will guarantee the correct tax
calculation at the moment of Invoice Receipt.

5.1

Requirement Overview

In order to have the correct tax code being defined automatically at the moment of PO
creation it will be necessary to define the fiscal rules, which will be based on some master
data information as; material usage, material origin, etc. It will also be necessary have a Z
table for specific rules. As this table will have to be maintained by users to keep it updated
according to business and government requirements, it will be necessary to have a Z
transaction, so users will be able to maintain it.

5.2

Business Driver

Currently the tax code is maintened by the purchase team at the moment of Purchase
Document creation, however, as they do not have the needed tax expertise, sometimes the
wrong tax code can be informed causing re-work or even failing on compliance to the fiscal
requirements.

5.3

Change Management Considerations/Roles and Volumes

It will be necessary to have the new Z transaction, to be created, added to role


ZEFI_M_XXXX_TX_TAX_MNTC, in order to tax team has the correct access to maintain it. It
also be necessary to provide some training to users, tax team, for this new transaction.
Role

Estimated Volume

ZEFI_M_XXXX_TX_TAX_MNTC

10 people

5.4

Frequency

Business Risks/Issues

Wrong tax postings, re-work and no compliance with Brazilian tax authorities.

5.5

Business Dependencies/Considerations

Doc ID

5.6

Name

Association (Describe how these objects are


related)

Requirements Traceability Matrix

Page 7 of 31

327487523.doc

IP Code Project Req. ID

Description

P-080080-

P-080-080-320

P-080080-

P-080-080-080

L-240010-

L-240-010-020

The tax code


must be
determined at
the moment
the PO is
saved
The tax code
must be
determined at
the moment
the PO is
saved
The tax code
must be
determined at
the moment
the PO is
saved

Page 8 of 31

327487523.doc

GAP ID

GAP
Description

FDS
Document
No

6. Process Information
The processes indirectly afected by this Enhancement are P-080-080-320, P-080-080-080
and L-240-010-020.

6.1

Process Description and Flow

This development will be executed in background, so it will not require any user interacton.

6.2

Detailed Business Requirements

The tax scenario in Brazil is very complex, with different kind of taxes and many rules that
applies to each one, making the activity of choosing the correct tax code very complex to
someone without an expertize on Brazilian Tax requirements. As normally the responsibility
to inform the tax code on the purchase documents is granted to the purchase team, it is
usual to have mystakes on tax code determination, requiring extra effort from tax and
financial teams to correct the wrong postings on the system.
The propoposal of this development is to avoid any error or re-work related to tax code
determination based on the rules defined by business. Basically it were defined by business
six different scenarios for tax codes, which one with specific rules.
1. Tax for purchase of freight freight POs
These POs will be created automatically based on the information sent by TM, which
will send the type of freight for which one the PO is being created. Based on the item
category and the type of freight the tax code will be determined.
2. Foreign Vendors Importing POs
For purchase documents created for foreign vendors, the purchase document will be
created using a tax code which does not calculate any tax. For that it will be
necessary check the material usage for find the correct tax code.
In cases of purchase of services, the system will determine a default tax code,
without any tax.
3. Tax for purchase of service Withholding taxes
The tax code determination will be based on the item category and account
assignment used on the PO and on the service master. It will also be to check the
cost center it is being used to determine the credit for PIS and COFINS, as it should
be appied only for services involved on production.
4. Tax for purchase of consumption material
The tax code determination will be based on material usage, material origin and on
account assignment. Besides these information it will also be necessary to have a
pop-up where user will select the taxes applied to the type of purchase.
5. Tax for purchase of raw material
The tax code determination will be based on material usage, material origin and on
account assignment. Besides these information it will also be necessary to have a
pop-up where user will select the taxes applied to the type of purchase.
6. Tax for purchase of asset

Page 9 of 31

327487523.doc

The tax code determination will be based on material usage, material origin and on
account assignment. It will also be to check the cost center it is being used to
determine the credit for PIS and COFINS, as it should be appied only for products
involved on production. For assets the pop-up will not be used.
In order to make sure the correct tax code is being determined, specially in cases
when the materials which is being purchased has contact with the final material, and
consequently allows Invista to get special taxes credits, it is necessary to create a
new tab o purchase requisition with three options:
a. No Produtivo
b. Contato com material final
c. Sem contato com o material final

This tab must be available and mandatory only for Brazil plants and PRs with account
assignment network or project, below the logic for that:
Brazil plants:
Select V_T001K_ASSIGN-WERKS
Where V_T001K_ASSIGN-BUKRS = BR10
PR Account Assignment
EBAN-KNTTP = N or EBAN-KNTTP = P

6.3

Dependencies

6.3.1 Environment/Configuration
All taxes codes must be created, in order to be determined by this development and all
information correctly maintained on Z table.
6.3.2 Development Dependencies
N/A
6.3.3 Run/Execution Dependencies
N/A

6.4

Assumptions

Below the assumptions to assure this enhancement working properly:

The new Z table must be maintained accordingly to the business rules;

All master data involved, material, vendor and fiscal (J1BTAX), must be maintenaide
accordingly to the business rules;

Page 10 of 31

327487523.doc

For freight POs, the information sent by TM must be accurated accordingly to the
business rules and it will be considered only the POs created automatically;

For Service POs it will considered only the POs created using the service item
category;

For Service POs it is being considered to work with service master.

6.5

Definitions

Acronym/Term

Description

TM
Tax Code

Transport Management
Group of taxes used to calculate tax on
purchase order
Purchase Order
Purchase Order, Contract or Scheduling
Agreement

PO
Purchase Document

Page 11 of 31

327487523.doc

7. Enhancement Details
7.1

Enhancement Type

Type of Development
Modification of standard SAP T-Code/Program
Name of standard T-Code/Program, if known:
Core Modification

_____________________

Customer Exit

_____________________

BADI

ME_PROCESS_PO_CUST

BTE

_____________________

User Exit

______________________

Validations/Substitutions

______________________

Enhancement Spot

______________________

Customer specific program

______________________

Others (Please specify)

______________________

Attachment
Insert any relevant attachments here (screen mock-up, drawing, etc.)
Yes

7.2

No

Detailed Description of the Enhancement

The tax code determination must be applied at the moment of Purchase Document (PO,
Contract or Scheduling Agreement creation), or when it is changed, for this it can be used
the interface IF_EX_ME_PROCESS_PO_CUST on BAdI ME_PROCESS_PO_CUST to
check the transaction code is equal to 'ME21N', 'ME22N', 'ME23N', 'ME29N', ME31K,
ME32K, ME33K, ME31L, ME32L or ME32L and company code equal BR10 (the
company code may be defined using TVARV).
Below some rules which apply to all scenarios, except for freight POs:

At the moment the Purchase Document is being created the tax code cannot be
changed, if necessary, it only be possible after the document is created using the
transaction for changing it;

All POs created with reference to a contract or Scheduling Agreement must keep the
same tax code used on the previous document;

Page 12 of 31

327487523.doc

If there is an info record for the Purchase Document, which is being created, the tax
code determined by the program has to be adopted;

The tax code is maintained at item level, based on that all logic has to be applied at
item level.

Once the BAdI is called it will be necessary start the logic to check the correct tax code to
be determined. For that the logic was split into six purchase scenarios: freight PO, importing
PO, service PO, purchase of consumption materials, purchase of assets and purchase of raw
material, each one with specific rules.

If the PO type is ZFRT (EKKO-BSART = ZFRT), then it is a Freight PO;

Else if LFA1-LAND1 is different of BR, then it is an Importing PO. To get the LFA1LAND1, it is necessary check the table LFA1, where LFA1-LIFNR = EKKO-LIFNR;

Else if the PO item category is a service item category (EKPO-PSTYP = 9), then it is a
Sevice PO;

Else if the PO item category is empty (EKPO-PSTYP = ) and the material usage is 2
(EKPO-J_1BMATUSE = 2), then it is a Purchase of Consumption Material;

Else if the PO item category is empty (EKPO-PSTYP = ) and the material usage is 3
(EKPO-J_1BMATUSE = 3), then it is a Purchase of Asset;

Else if the PO item category is empty or it is a subcontracting item category (EKPOPSTYP = or EKPO-PSTYP = 3) and the material usage is 0 or 1 (EKPO-J_1BMATUSE
= 0 or EKPO-J_1BMATUSE = 1), then it is a Purchase of Raw Material;

After having identified the purchase scenario it is necessary check the specific rules for each
scenario in order to find the correct tax code. Below the specific rules for each scenario:

Freight POs
These POs will be created automatically based on the information sent by TM, which
will send the type of freight for which one the PO is being created. Based on the item
category and the type of freight the tax code will be determined.
For that it were defined three types of freight, from the fiscal point of view:

Sales of goods, purchase of raw material, shipment for industrialization and


Import of goods freight type = 1

STO freight type = 2

Any other operation freight type = 3

Below the logic to find it:


Select EKPO-PSTYP
Where EKPO-TXZ01 = VTTS-TKNUM
AND VTTP-TKNUM = VTTS-TKNUM
AND LIKP-VBELN = VTTP-VBELN
AND LIPS-VBELN = LIKP-VBELN

Page 13 of 31

327487523.doc

AND LIPS-VGBEL = EKPO_2-EBELN


AND EKPO_2-PSTYP = 7
If SY-SUBRC = 0 then
Select ZTABLE-TAXCODE
Where ZTABLE-FREIGHTTYPE = 2
Else if SY-SUBRC is not 0 then
Select VBAK-VBELN
Where EKPO-TXZ01 = VTTS-TKNUM
AND VTTP-TKNUM = VTTS-TKNUM
AND LIKP-VBELN = VTTP-VBELN
AND LIPS-VBELN = LIKP-VBELN
AND LIPS-VGBEL = VBAK-VBELN
AND VBAK is not in (to be determined in TVARV the order types to not be
considered)
If SY-SUBRC = 0 then
Select ZTABLE-TAXCODE
Where ZTABLE-FREIGHTTYPE = 1
ELSE Select
Select EKPO-PSTYP
Where EKPO-TXZ01 = VTTS-TKNUM
AND VTTP-TKNUM = VTTS-TKNUM
AND LIKP-VBELN = VTTP-VBELN
AND LIPS-VBELN = LIKP-VBELN
AND LIPS-VGBEL = EKPO_2-EBELN
AND EKPO_2-PSTYP is not equal 7
AND EKPO_2-J_1BMATUSE in (0, 1)
If SY-SUBRC = 0 then
Select ZTABLE-TAXCODE
Where ZTABLE-FREIGHTTYPE = 1
Else
Select ZTABLE-TAXCODE
Where ZTABLE-FREIGHTTYPE = 3

Foreign Vendors Importing POs

Page 14 of 31

327487523.doc

First the system must check if it is a service PO, EKPO-PSTYP = 9, if yes then tax
code must be R1. Otherwise continue with the logic below.
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = ( If EKPO-J_1BMATUSE <= 1 then
EKPO-J_1BMATUSE = 1, Else if EKPO-J_1BMATUSE > 1 then EKPOJ_1BMATUSE = 2)
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM0
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI0
And KONP_2-LOEVM_KO =

Service POs
To determine the correct tax code for a service PO is necessary check the account
assignment and the service number at PO item.
First check the Z table only with the service number at the PO item, if the select
returns more than one record, then check the logic as below, if the program did not
find the any record based on the service number and account assignment, then get
the record which has the same service number and account assignment empty. If the
select returns only one record, the get the tax code for the service from Z table.
Below the logic to find the service number:
Select ASMD-ASNUM
WHERE EKPO-PACKNO = ESLL-PACKNO
AND ESLL-PACKNO = ESLL1-SUB_PACKNO
AND ESLL1- SUB_PACKNO = 0000000000
AND ASMD-ASNUM = ESLL1-SRVPOS
If the account assignment is unknown (EKPO-KNTTP = U), then go to Z table and get
the correspondent tax code for the service number;
Else if the account assignment is for cost center (EKPO-KNTTP = K), then go to Z
table where the PO item service number is equal to Z table service number and PO
item account assignment, cost center, is equal to Z table account assignment. Below
the logic to find the PO item cost center:
SELECT EKKN-KOSTL
WHERE EKKN-EBELN = EKPO-EBELN
Else if the account assignment is for project (EKPO-KNTTP = P), then go to Z table
where the PO item service number is equal to Z table service number and PO item

Page 15 of 31

327487523.doc

account assignment, project, is equal to Z table account assignment. Below the logic
to find the PO item project:
SELECT EKKN-PS_PSP_PNR
WHERE EKKN-EBELN = EKPO-EBELN
Else if the account assignment is for order (EKPO-KNTTP = F), then go to Z table
where the PO item service number is equal to Z table service number and PO item
account assignment, order, is equal to Z table account assignment. Below the logic to
find the PO item order:
SELECT EKKN- AUFNR
WHERE EKKN-EBELN = EKPO-EBELN
Else if the account assignment is for network (EKPO-KNTTP = N), then go to Z table
where the PO item service number is equal to Z table service number and PO item
account assignment, network, is equal to Z table account assignment. Below the
logic to find the PO item network:
SELECT EKKN-NPLNR
WHERE EKKN-EBELN = EKPO-EBELN

Purchase of Consumption and Raw Materials


In order to contemplate all possible tax scenarios it will be necessary have a pop-up
at the moment of saving the purchase document with some data to be informed, and
based on the information it will be determined the correct tax code.
Below the pop-up format:

The text, which must be maintained in English and Portuguese:


o

Simples Nacional

ICMS

IPI

PIS/COFINS

ST

Page 16 of 31

327487523.doc

As the tax code is maintained at item level, the pop-up will appear for each item
existing on purchase document. If the purchase document has more than one item
the user can select one or more item, and when is selected more than one item the
program has to check if all items have the same material usage (EKPO-J_1BMATUSE)
and material origin (EKPO-J_1BMATORG). If one or more item have a differente
material usage/origin the program will show an error message, as follow:
Um dos itens selecionados possu origem/uso diferente dos demais.
This message has be maintained in Portuguese and English.
The information select on pop-up has to be stored on the item text note, below the
screenshot.

The fiels to be showed may vary based on the scenario, described in detail below:
o

Purchase of Consumption Materials


For consumption materials (EKPO-J_1BMATUSE = 2).

If the first option Simples Nacional is selected, the second option


ICMS will not be available for selection;

If the second option ICMS is selected, the first option Simples


Nacional will not be available for selection.

Below the logic based on pop-up selection:

Only the first option Simples Nacional is selected


Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 2
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM0
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI0
And KONP_2-LOEVM_KO =

Page 17 of 31

327487523.doc

The first option Simples Nacional and the fourth option


PIS/COFINS are selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 2
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM0
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI0
And KONP_2-LOEVM_KO =
And KONP-MWSK1 = KONP_3-MWSK1
And KONP_3-KSCHL = ICON
And KONP_3-LOEVM_KO =
And KONP-MWSK1 = KONP_4-MWSK1
And KONP_4-KSCHL = IPSN
And KONP_4-LOEVM_KO =

The first option Simples Nacional and the thirdy option IPI
are selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 2
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM0
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI2
And KONP_2-LOEVM_KO =

The first option Simples Nacional, the thirdy option IPI and
the fourth option PIS/COFINS are selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 2
And J_1BTAXCODEV-MWART = V

Page 18 of 31

327487523.doc

And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ


And KONP-KSCHL = ICM0
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI2
And KONP_2-LOEVM_KO =
And KONP-MWSK1 = KONP_3-MWSK1
And KONP_3-KSCHL = ICON
And KONP_3-LOEVM_KO =
And KONP-MWSK1 = KONP_4-MWSK1
And KONP_4-KSCHL = IPSN
And KONP_4-LOEVM_KO =

The second option ICMS and the second option IPI are
selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 2
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM2
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI2
And KONP_2-LOEVM_KO =

The second option ICMS, the second option IPI and the
fourth option PIS/COFINS are selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 2
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM2
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI2

Page 19 of 31

327487523.doc

And KONP_2-LOEVM_KO =
And KONP-MWSK1 = KONP_3-MWSK1
And KONP_3-KSCHL = ICON
And KONP_3-LOEVM_KO =
And KONP-MWSK1 = KONP_4-MWSK1
And KONP_4-KSCHL = IPSN
And KONP_4-LOEVM_KO =

The second option ICMS, the second option IPI, the fourth
option PIS/COFINS and the fifith option ST are selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 2
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM2
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI2
And KONP_2-LOEVM_KO =
And KONP-MWSK1 = KONP_3-MWSK1
And KONP_3-KSCHL = ICON
And KONP_3-LOEVM_KO =
And KONP-MWSK1 = KONP_4-MWSK1
And KONP_4-KSCHL = IPSN
And KONP_4-LOEVM_KO =
And KONP-MWSK1 = KONP_5-MWSK1
And KONP_5-KSCHL = ICS2
And KONP_5-LOEVM_KO =

The second option ICMS, the fourth option PIS/COFINS and


the fifith option ST are selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 2
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ

Page 20 of 31

327487523.doc

And KONP-KSCHL = ICM2


And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI0
And KONP_2-LOEVM_KO =
And KONP-MWSK1 = KONP_3-MWSK1
And KONP_3-KSCHL = ICON
And KONP_3-LOEVM_KO =
And KONP-MWSK1 = KONP_4-MWSK1
And KONP_4-KSCHL = IPSN
And KONP_4-LOEVM_KO =
And KONP-MWSK1 = KONP_5-MWSK1
And KONP_5-KSCHL = ICS2
And KONP_5-LOEVM_KO =

The second option ICMS and the fourth option PIS/COFINS


are selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 2
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM2
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_3-MWSK1
And KONP_3-KSCHL = ICON
And KONP_3-LOEVM_KO =
And KONP-MWSK1 = KONP_4-MWSK1
And KONP_4-KSCHL = IPSN
And KONP_4-LOEVM_KO =

Only the fourth option PIS/COFINS is selected


Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 2
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ

Page 21 of 31

327487523.doc

And KONP-KSCHL = ICM0


And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI0
And KONP_2-LOEVM_KO =
And KONP-MWSK1 = KONP_3-MWSK1
And KONP_3-KSCHL = ICON
And KONP_3-LOEVM_KO =
And KONP-MWSK1 = KONP_4-MWSK1
And KONP_4-KSCHL = IPSN
And KONP_4-LOEVM_KO =
o

Purchase of Raw Materials


For raw materials (EKPO-J_1BMATUSE = 0 or 1).

If the material usage is for resale or industrialization (EKPOJ_1BMATUSE = 0 or 1), the last option ST on pop-up will not appear;

If the first option Simples Nacional is selected, the second option


ICMS will not be available for selection;

If the second option ICMS is selected, the first option Simples


Nacional will not be available for selection.

Below the logic based on pop-up selection:

Only the first option Simples Nacional is selected


Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 1
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM0
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI0
And KONP_2-LOEVM_KO =

The first option Simples Nacional and the fourth option


PIS/COFINS are selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 1

Page 22 of 31

327487523.doc

And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM0
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI0
And KONP_2-LOEVM_KO =
And KONP-MWSK1 = KONP_3-MWSK1
And KONP_3-KSCHL = ICOV
And KONP_3-LOEVM_KO =
And KONP-MWSK1 = KONP_4-MWSK1
And KONP_4-KSCHL = IPSV
And KONP_4-LOEVM_KO =

The first option Simples Nacional and the thirdy option IPI
are selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 1
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM0
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI1
And KONP_2-LOEVM_KO =

The first option Simples Nacional, the thirdy option IPI and
the fourth option PIS/COFINS are selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 1
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM0
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1

Page 23 of 31

327487523.doc

And KONP_2-KSCHL = IPI1


And KONP_2-LOEVM_KO =
And KONP-MWSK1 = KONP_3-MWSK1
And KONP_3-KSCHL = ICOV
And KONP_3-LOEVM_KO =
And KONP-MWSK1 = KONP_4-MWSK1
And KONP_4-KSCHL = IPSV
And KONP_4-LOEVM_KO =

The second option ICMS and the second option IPI are
selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 1
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM1
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI1
And KONP_2-LOEVM_KO =

The second option ICMS and the fourth option PIS/COFINS


are selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 1
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM1
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_3-MWSK1
And KONP_3-KSCHL = ICOV
And KONP_3-LOEVM_KO =
And KONP-MWSK1 = KONP_4-MWSK1
And KONP_4-KSCHL = IPSV
And KONP_4-LOEVM_KO =

Page 24 of 31

327487523.doc

Only the fourth option PIS/COFINS is selected


Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 1
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM0
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI0
And KONP_2-LOEVM_KO =
And KONP-MWSK1 = KONP_3-MWSK1
And KONP_3-KSCHL = ICOV
And KONP_3-LOEVM_KO =
And KONP-MWSK1 = KONP_4-MWSK1
And KONP_4-KSCHL = IPSV
And KONP_4-LOEVM_KO =

The second option ICMS, the second option IPI and the
fourth option PIS/COFINS are selected
Select J_1BTAXCODEV-MWSKZ
Where J_1BTAXCODEV-J_1BUSAGE = 1
And J_1BTAXCODEV-MWART = V
And KONP-MWSK1 = J_1BTAXCODEV-MWSKZ
And KONP-KSCHL = ICM1
And KONP-LOEVM_KO =
And KONP-MWSK1 = KONP_2-MWSK1
And KONP_2-KSCHL = IPI1
And KONP_2-LOEVM_KO =
And KONP-MWSK1 = KONP_3-MWSK1
And KONP_3-KSCHL = ICOV
And KONP_3-LOEVM_KO =
And KONP-MWSK1 = KONP_4-MWSK1
And KONP_4-KSCHL = IPSV
And KONP_4-LOEVM_KO =

Page 25 of 31

327487523.doc

Purchase of Assets
To determine the correct tax code for an Asset PO is necessary check the account
assignment at Purchase Document item.
To attend the new tab created on PR, it is necessary to add a new field on Z table to
match with the information on PR.
Before checking the account assignment at Z table, first select the tax code on Z
table based only on the PR_OPTION field at Z table, if the select returns only one
record, then determine the tax code maintained on Z table. If more than one record
were returned, then check the account assignment. If the program did not find the
any record based account assignment, then get the record which has the account
assignment empty

If the account assignment is unknown (EKPO-KNTTP = U), then go to Z table where


Z table account assignmen is empty and Z table service number is empt. Below the
logic to find the PO item cost center
Else if the account assignment is for cost center (EKPO-KNTTP = K), then go to Z
table where the Purchase Document item account assignment, cost center, is equal
to Z table account assignmen and Z table service number is empt. Below the logic to
find the PO item cost center:
SELECT EKKN-KOSTL
WHERE EKKN-EBELN = EKPO-EBELN
Else if the account assignment is for project (EKPO-KNTTP = P), then go to Z table
where the Purchase Document item account assignment, project, is equal to Z table
account assignment and Z table service number is empty and PR new tab option is
equal to new field at Z table. Below the logic to find the PO item project and check
the option flagged on PR:
PO item project
SELECT EKKN-PS_PSP_PNR
WHERE EKKN-EBELN = EKPO-EBELN
Option flagged at PR
SELECT EBAN-option flagged at PR
WHERE EKPO-BANFN = EBAN-BANFN
If the select return 0, then consider the new field at Z table as not checked.
Else if the account assignment is for order (EKPO-KNTTP = F), then go to Z table
where the Purchase Document item account assignment, order, is equal to Z table
account assignment and Z table service number is empty. Below the logic to find the
PO item order:
SELECT EKKN- AUFNR
WHERE EKKN-EBELN = EKPO-EBELN

Page 26 of 31

327487523.doc

Else if the account assignment is for network (EKPO-KNTTP = N), then go to Z table
where the Purchase Document item account assignment, network, is equal to Z
table account assignment and Z table service number is empty and PR new tab
option is equal to new field at Z table. Below the logic to find the PO item network
and check the option flagged on PR:
PO item network
SELECT EKKN-NPLNR
WHERE EKKN-EBELN = EKPO-EBELN
And KONP_5-LOEVM_KO =
Option flagged at PR
SELECT EBAN-option flagged at PR
WHERE EKPO-BANFN = EBAN-BANFN
If the select return 0, then consider the new field at Z table as not checked.

7.3

Access Method or Path for Enhancement

Execution:

7.4

Custom Transaction Code: ________


Menu Path

: ________

Standard Transaction Code

: ________

Other

: BAdI

Required Custom Tables (if known)

Table Name: TBD


Table Description: Rules for Tax Code Determination
Field
Description

Primary
Key

Type (text
or numeric)

Maximum field
length

Tax Code

Yes

Alphanumeric

Freight Type

No

Alphanumeric

Service Code

No

Alphanumeric

Type ASMD-ASNUM

Item Category

No

Number

Type EKPO-PSTYP

Account
Assignment

No

Alphanumeric

20

Page 27 of 31

327487523.doc

Value
Restrictio
ns?

Check
Table

Material Usage

No

Number

EKPO-J_1BMATUSE

Material Origin

No

Number

EKPO-J_1BMATORG

CFOP
Category

No

Number

EKPO-J_1BINDUST

7.5

User interface (UI) Enhancement

N/A.

7.5.1 Detailed Description


N/A.
7.5.2 Access Method/Path/Navigation
This development will be executed at the moment of PO creation whithout any user
interaction.

7.5.3 Screen Flow


N/A

Screen flow.docx

7.5.4 Screen Layout


N/A.
7.5.5 Field List
N/A.
Screen
Label

Type /
Size

Mandatory

Range
Require
d

Reference
Field Name

7.5.6 Screen Controls


N/A.
7.5.7 Group Validations
N/A.

Page 28 of 31

327487523.doc

Source

Target

Field
Properties

7.5.8 Links to Related Documents


N/A.
7.5.9 Content Management
N/A.

7.6

System Integration

ECC

CRM

GRC

SCM

BW

TM

BPC

Ariba

MDG

Vertex

HANA

GTS

Opentext

Legacy/Non-SAP System

T-Box

Y-Box

P33

WP1

Others (Please specify,if Applicable)____________

7.7 Performance Requirements


N/A.

Page 29 of 31

327487523.doc

Security and Controls

8.1

Security Requirements

The new Z code to be created must be added to the role ZEFI_M_XXXX_TX_TAX_MNTC.


Role

Level of Security

ZEFI_M_XXXX_TX_TAX_MNTC

Modification

8.2

Auditing and Controls Requirements

N/A.

Page 30 of 31

327487523.doc

Unit Test Requirements

Create POs for the following scenarios:

Freight PO

Service PO with whitholding tax

Purchase of raw material

Purchase of consumption material

Purchase of asset

9.1

Data Requirements

N/A.

9.2

Test Cases

S. No

Business Test Cases

Data to be used
for the test case

Expected Results

Freight PO

PO to be created
automatically by TM

PO created with
specific service tax
code for freight

Service PO with whitholding tax

Service PO

PO created with
specific service tax
code with withholding
tax

Purchase of raw material

Raw material

PO created with
specific tax code for
this kind of purchase

Purchase of consumption material

Consumption
material

PO created with
specific tax code for
this kind of purchase

Purchase of asset

Asset

PO created with
specific tax code for
this kind of purchase

1.

2.

3.

4.

5.

10. Additional Information


N/A.

Page 31 of 31

327487523.doc

You might also like