In this section I discuss documents and the various elements regarding them, I will cover the following
Validation and Substitution
As I have mentioned SAP transaction processing is based on the document principle, with a unique document being
generated as a result of a posting in Financial Accounting (FI). There are two types of documents
original and processing
Original Documents checks, receipts, invoices, bank statements, etc
Processing Documents accounting documents, recurring entry, etc
It is important to remember that once a document is posted and a document number generated, you cannot change or
modify the document, except for certain fields (descriptive text), this makes sure that the transaction integrity is always
maintained, if you want to make changes to amounts or tax codes you have to post a new document.
There are several types of documents in the system with each document numbered uniquely, form a pre-defined number
range which can be internally or externally supplied. Together with posting keys (which we will talk about later) will
allow a document to posted and will determine the accounts to post too.
There are two different area's in a document - a header and the line items
Header identifies a document
Line Items portrays the transactions of the document
In the below screenshots you can see a document header (left-hand screenshot) and a data entry view which contains
part of the header and the line items (right-hand screenshot)
First lets discuss the document header which contains of the following elements
Document Date - represents when the transaction took place (posting, invoice or payment), it is when the
original document was issued, this will generally be prior to the posting date, it is a mandatory field
Document Type - determines which account (G/L, customer, vendor, etc) a document is to be posted to, it also
determines the type of transaction as to invoice, payment, credit memo, etc.
Company Code - represents the legal entity for which the document is prepared
Currency or Exchange Rate - when you enter the currency key the system automatically transfers the valid
exchange rate for that posting date, however you can enter a specific exchange rate to be used.
Translation Date - used when you want to use a different exchange rate from the document date, together the
system will determine the applicable exchange rate for the date entered
Posting Date - is the date which the transactions is entered into the system, this in general will be later than the
document date, this field is also mandatory.
Period - the posting period is derived from the posting date, see PPV for more information
Document Number - depends on the document type (internally or externally)
Reference - used for searching, it can contain any business reference, including the document number.
Ref. Transactn - describes the type of business transaction
Entered by - the user who created the document
Entry date - the date which the document was entered
Parked by - the user who parked the document (if the document was parked before posting)
A document header can also contain document text, trading partner business area and cross company code number,
there are also some rules regarding the document header
The document date can be different from the posting date, you can enter any date (past or future) from a
permitted posting period as the document date, though the system will default to the current date as the posting
date. When you post to the previous periods in the fiscal year the carry forward balance for the current year is
automatically corrected in the special periods.
The posting date can also be different from the document entry date and the document date (date when the
original document was created)
You must enter a currency key when entering the first document of the day and the system will default to this
currency key when entering in all subsequent documents for that day, the same is true for the company code.
However you able to change these.
You can edit REFERENCE, DOC.HEADER TEXT, CROSS-COMPANY CODE NO and TRADING BUSINESS
PARTNER AREA in the document header
A line item is made up of an account number, posting key (otherwise known as the debit or credit indicator), amount
and additional details such as tax code, tax amount, cost or profit center, business area and segment,each document
will have at least two line items.
You can automatically enable the system to automatically create some of the line items such as
Tax on sales or purchases while entering customer/vendor invoice
Payables and receivables between company codes when posting cross-company code transactions
Gains or losses from exchange rate differences between invoice and payment (customer/vendor)
Cash discount paid/received during payment postings
Residual items or bank charges while posting a customer or vendor payment and clearing open items
Tax adjustment posting for a down payment when entering special G/L transactions
You can only post a complete document in the system, it is considered complete when its debit is equal to credit. It can
always simulate a posting to check that it is correct, just make sure that the traffic light for the document is green, if
red the document will not be posted as there is a error.
In the below screenshot you can see a document, you can clearly see the document type AA (asset)
You can then drilldown into the document and see the line items, using the hat icon you can get more details on the
Set a the client level and applicable for the whole document a document type distinguishes business transactions and
helps in document storage. It also helps in the following
Controlling posting to the correct account types (customer, vendor, assets, G/L, etc)
Assigning number ranges
Determining if vendor net procedure must be applied (to calculate any discount and post the net amount during
vendor invoice posting)
Below is a screenshot of some of the document types already configured in the system
Using Data disk Mobile we will configure the system to demonstrate how to configure/use document types, first we will
create the document type JD, for this we will use transaction code OBA7, select the new entriesbutton and fill in the
detail below, although we specify the number range as JD we will be creating this later
Document type - enter a two character identifier
Number Range - we will discuss this later in this section
Reverse Document Type - this document type will be used for reversals, if left blank the system use the original
Authorization Group - this restricts the use of that type to effectively control the postings
Account Types Allowed - the type account that this document type can be used with
Btch Input Only - used for batch processing
Net Document Type - applicable only for vendor invoices, this enables you to deduct cash discounts from
vendor invoices when posted with the document type KN (net vendors)
Cust/Vend Check - this imposes a restriction that not more than one vendor or customer account would be
allowed to be posted in the same document
Negative Posting Permitted - when selected you can reserve the original postings without altering the trial-
balance transaction figures, this is only possible when the company code has been configured with to receive
Inter-Company Postgs - this allows cross-company account assignments within a single document, this enables
account assignment to several partners and account assignment to one or more trading partners and one
external business partner
Enter Trading Partner - check this to enter the trading partner manually in the document, it is normally
transferred to a posting document from the master record. You may select this checkbox in combination with
Ex Rate Type for Foreign Crncy Doc - use this exchange rate as the default when no exchange rate is specified
in the document header, this applies when you do not want the default exchange rate to be used by the system, by
default the system uses type M (average rate) when no exchange rate is defined.
Reference Number - use this if you want a reference number to be entered during document entry
Document Header Text - select this is you want to mandatory text to be entered
Debit Rec Indic - this applies to global companies in a joint venture where the costs incurred are shared among
various recovery indicators and settled among them using periodic settlement program, use this to denote the the
debit recovery indicator of the debit lines of a document type
Rec Ind Credit - this denotes the internal recovery indicator and is similar to above except that this is on the
Do not select the Inter-Company Postgs checkbox if you want to make postings to asset accounts for that document
type, this is also true if you want to inherit the partner company in all the line items for consolidation purposes. Select
the checkbox for business transactions such as adjustment postings and postings that have no effect on sales (automatic
payments) but require account assignments on an inter-company basis. You can set both Debit Rec Indic and Rec Ind
Credit at the document type level, cost element level or cost object level.
Now we need to make the reference number mandatory for the document types DR, KR, RE and RN as per the below
screenshot, remember to save when updating
The document number helps to identify a specific document with a company code and fiscal year, each document is
uniquely numbered from the document range, it is assigned when you post a document. As document numbers ranges
are company code dependant you need to create them for each of your company codes. The document number is
alphanumeric and can be up to 10 characters, if shorter than 10 characters the number is padded with leading zero's
(0) if numeric and trailing zero's (0) if alphanumeric. You can have both the same or different number ranges for both
master records and other documents. You can also use the same document numbers ranges in different company codes.
You can select either of the two types of number ranges
you allow the system to automatically assign a document number, sequentially from a range that has already been defined for a particular
document type. The internal numbers are always numeric and the last number used is stored in the current numberfield
you supply a unique number every time you create a new document, this number could come from a pre-invoicing system. No last number
is stored in the current number field.
Each number range will have a validity period defined in the system, this can be year-dependant or year-independent
defined only once all year-independent number ranges last forever in the system (with validity of 9999 years), try to create fairly large
number interval to make sure that you don't run out of numbers, this is important as the numbering must be sequential
you define these with a specific fiscal year, so you will need to do this every year or you can just create bunch of them to keep you going.
You can make the number ranges smaller as you will be creating them every year anyway.
Although it is possible to change the numbering you should only do this in special circumstances, as long as the
number has not been used the system will allow you to do this, the system will warn you if a number has been used
You can also have number ranges for reversal documents, for all document types with internal numbering the system
uses the same number range for reversal as well, unless you specify separate internal number ranges. You should
define separate number intervals for special documents such as sample and recurring documents, you should not use
these intervals for any other document types, SAP recommends using the number range "X1" for recurring entry
documents and "X2" for sample documents, so not to interfere with SAP's standard settings. Try to create a link
between the original document and the processing document, on the invoice you could write SAP document number
and in SAP you can use the reference number field to hold the original invoice number, then you have a clear link
between the documents.
Now lets create the document ranges for the Data disk Mobile, to create number ranges we use transaction
code FBN1, the initial screen asks for a company code and has three buttons
intervals (spy glasses) - used to view already defined number ranges
intervals (pencil) - used to create or delete number ranges
status - allows you to change the current number field
We select the intervals with the pencil (the below screenshot is the display button), then select the plus icon to add an
interval. Then add the below number ranges for the year 2013, notice that the JD number range is external, then save.
Now we can save some time by copying the number ranges to additional fiscal years, we use transaction code OBH2 to
do this, just enter the details below and save, you will get a results screen.
If we go back to transaction code FBN1 you will notice that the additional number ranges for the fiscal year 2014 have
Now again to save time we can copy these number ranges across our company codes (DD12, DD13, DD21 and DD22)
Again we get a result screen detailing that the numbers ranges have been copied to the company codes.
You can maintain the document entry screen variant either using transaction code OBY6 or OB71 (as seen in the
below screenshot), we are using standard variant 2 (applicable for all countries where extended withholding tax is in
Normally after posting you will not be able to change the content of fields (amount or account), which is central to the
document principle, however with the help of document change rules that we will be discussed next you can determine
when fields within the posted document can be changed. Even with this rules you still will be prevent from changing
some objects (business area, cost center), it is recommended not to tinker with the document change rules that have
already been supplied by the system.
We use transaction code OB32 to add or change the document change rules, you have change rules for document
header, line items, the initial screen details the document field names, just double click on a field
In the below screenshot's I have chosen the reference and the bank account fields, as you can see the reference field
can be changed but the bank account cannot.
You can view table NRIV to display the number ranges
A document cannot be posted without entering a posting key, the posting key controls the entry as well as the
processing of a line item in a document, it determines the type of account that can be posted with that key whether the
amount should be posted to the debit or the credit side of the account, what fields will be displayed on the document
entry screen and the field status of these fields (see FSG and FSV).
SAP comes with a number of posting keys as you can see from the screenshot below, you can use transaction OB41 to
create/change or delete posting keys
To create a new posting key select the create button and fill in the details, two characters for the posting key and some
The next screen is the detail screen, most of the below is self-explaining, if you do select a reversal key make sure that
this is configured first.
You can view the table TBSL for the posting keys
Defining tolerances instructs the system on how to handle the following issues within the defined tolerance limits
What is the maximum (payment) difference amount for which the system should adjust the cash discount, the
difference is added or subtracted from the cash discount
What is the maximum amounts or percentages for which the system should automatically post any difference to a
separate gain or loss account if the cash discount cannot be adjusted
There are three types of tolerances
Customer and vendor tolerance
G/L account clearing tolerance
Basically you administer tolerance through groups, for example the employee tolerance group will apply to all
employees within the group. The system will use the lowest tolerance group while processing a document.
See Data disk Mobile for the tolerance groups and limits that we will configure, we will use transaction code OBA4,
select the new entry icon, first we will create the null tolerance group for the company code DD11,
Now do this for the remain company codes, you can use the copy as button, you will have to remove the decimal point
for DD13, you should end up with something like below, five null tolerance groups.
Null Tolerance Groups Specific Tolerance groups
Now lets explain this how this works on how the system manages payment differences that are within the defined
tolerance limits, first the system will adjust the cash discount when there is a payment difference, if not possible it then
looks at the percentage or amount settings in revenue or expense rows and goes ahead with processing
Lets see some test cases to really get a better picture
Lets say that an invoice os $20,000 and the following is set
Expense and Revenue (cash discount adjust to) is set to $5
Expense (Amount and Percentage) are set to a maximum of $15 and 0.5%
Revenue (Amount and Percentage) are set to a maximum of $15 and 0.5%
Incoming payment of $1986
Since this is an underpayment the system first checks if the expense (cash discount adjust to) can be adjusted to accommodate the payment
difference, because the difference ($14) exceeds the discount adjustment limit of $5, the discount is not adjusted. Now the system looks up at the
Expense (Amount and Percentage) field values, These are 0.5% of 2000 which equals $10 but the actual payment is $14 (2000 - 1986) which is well
within the Expense (Amount) upper limit of $15. The system proceeds to book the loss of $14 to an expense amount and the transaction is cleared
Incoming payment of $1990
Again this is an under payment so the system checks the Expense (cash discount adjust to), as the difference is $10 which exceeds the discount
adjustment limit of $5, the discount is not adjusted. Again the system looks up at the Expense (Amount and Percentage) field values, 0.5% of 2000 =
$10 and registers that the actual payment difference is also $10 (2000 - 1990). The system proceeds to book the loss of $10 to an expense amount and
the transaction is cleared automatically.
Incoming payment of $1997
The system adjusts Expense (cash discount adjust to) to accommodate the payment difference ($3), since this is well within the discount adjustment
limit of $5 and thus a posting $3 is automatically carried out to a cash discount adjustment
The system will tolerate an under-payment or over-payment to a maximum of $15, which can be represented as 1985 < 2000 > 2015, if an invoice
amount is $2000.
All the payment differences exceeding the tolerance limits set for automatically clearing them can be treated either as
partial payment or residual items.
Partial payments - the system does not clear the original receivable, but posts the payment with an invoice
reference and enters the invoice number in the invoice reference field in the payment items. To determine the due
date of the payment the system calculates the net due date for an invoice, this date is then entered in the baseline
date field of the payment. The payment is then included in the dunning program and in cash management at this
date, in other words some action will need to place regarding this payment.
Residual payments - can be used to clear the original receivables and post the remaining amount to the
customer account as a residual item. The payment amount is noted in the line for the original receivables and
post the remaining amount to the customer account as a residual item. The payment amount is noted in the line
item for the original receivable.
You can also clear such original receivables and post the difference to an expense account.
To assign users to tolerance groups we will use transaction code OB57, remember if a user is not assigned to a
tolerance group he/she will be assign to the null tolerance group. The screenshot below shows that the user vallep is
assigned to the tolerance group DDGB.
You can view the table T043T for the tolerance groups
The user/tolerance group table is T043, you can see that user BC_RFC is assigned to tolerance group 1000
Define Text for Line Items
You can predefine text for line items which saves you from having to input the same text for line items, you just enter a
short text key and field will be populated with the entire text when you press enter and you can also maintain them in
different languages define by the logon.
We will use transaction OB56 to create our text lines, see Data Disk Mobile for all the text lines we will be creating,
the id (up to 4 characters) and text edit format (max 50 characters) fields are self explaining the control display field
tells the system to display the text that will be transferred to the line item and gives you a chance to modify if you so
You can speed up input by using default values, you can have default values for document type, fiscal year, value,
posting date, the system will also allow you to change them if you so wish. I will show how to
Default document type or posting key for a transaction (defining default values)
Default fiscal year
Default value date
Message control for document processing
First we will start with define default values regarding the document type and posting keys, for this we will use
transaction OBU1, double-click on the required entry and update the dialog screen with the new values,
selectcontinue to save.
You can get the system to propose a fiscal year default, this can be useful if you use year-dependant document number
ranges, we use transaction code OB63, just select the propose fiscal year checkbox
We can get the system to propose a default value date, this will use the CPU date as the default date when you enter
line items in a document. We will use transaction code OB68, select the proposed value date checkbox for the company
You can setup system messages, these can be in either a dialog box or in the footer, you can also change warnings to
error messages, deactivate warnings and error messages and make specifications for dialog processing and batch
input processed in the background. We will use transaction code OBA5, first select we select the application area, in
our case we will select F5 (type in F5 not hit F5 button)
This then takes you to the change/new entries screen, here you can switch off messages, create new messages, etc. I will
leave you to the documentation to dive deeper in message control.
Document parking allows you to enter and park (store) incomplete documents in the system without extensive entry
checks, you can call up the parked document at a later date and add, change, check or post it. I will discuss the
Changing the posting date for a parked documents
For each company code you can set the posting date is to remain unchanged or can be overwritten with the system date
by selecting from the available options
posting date is not changed during posting (blank)
posting date is set to the system date during posting (1)
posting date is set to the system date if the posting period is closed (2)
Datadisk Mobility wants all the parked documents to be posted with the system date as the posting date, we will use
transaction code OBD1, just enter a value in the prk pst dt field, in our case we will enter 1. You can use this function
only in classic FI parking transactions, in the new FI Enjoy (single-screen) transactions you can change the posting
date at any time.
Validation and Substitution
You can use validation to minimize errors in document entry, as this will call for additional checks other than the
system-built mandatory checks while posting a document. Substitution on the other hand will enable the system to
populate certain certain fields with the appropriate values (business area, cost center, etc) based on a pre-defined
conditions in the system.
First we will look at validation, which as I mentioned above allows you to to perform additional checks to minimize
data entry errors. Validations are define at the company code level and you can set them for either the document
header or line items, once set they will be used for automatic or manual entries.
For Data disk Mobile lets create a validation for company code DD11 that only allows business units FIX and SERV,
for this we will use transaction code OB28, on the overview screen select new entries and enter the details below
On the next screen select the validation button
Enter the name and descriptive text as per the below screenshot, then highlight DD11 in the line item in the validations
window on the left-hand side and select the step button
This will create a new folder called Step 001 as you can see below, you can add some descriptive text, Now select
the prerequisite icon from the window
And enter in the expert mode window (the white window on top of the right-hand side, if not in export mode
select settings->expert mode ) the text show in the below screenshot
Then select the check icon in the left-hand window and again in the expert mode window enter the text as below
Finally we assign a message number (in this case 004) to the validation, this will be displayed if any errors occur when
Save the configuration and select the Step 001 folder where all the configuration will be displayed
Now finish off the first put of the configuration by activating the validation, this means putting a 1 in the Activtn
level column (0 - inactive, 1 - active and 3 - active but no batch input)
You can now add additional validations for the remaining company codes is you so desire.
Substitutions helps to replace field contents based on a pre-defined condition/s, as with validation you can use them
with document headers or line items and they are for both automatic and manual entries. The procedure is the same as
validation, we will use transaction code OBBH, add the text below
This time we only need to add the prerequisite and substitutions which is similar to what we did for the validations
To insert substitutions you select the computer with a green cross a dialog box will appear listing what fields can be
substituted, here I selected Location the next screen will ask if you want to method you want to use, here I
choose constant value and entered NE. What this means is that if the BSEG-ZZSTATE equals any of the above
screenshot the location field will be change or populated to NE.
Again selecting the step 001 folder displays all the details of the substitution
Lastly we activate the substitution by putting a 1 in the activtn level column
You can archive or delete old documents that you no longer need, you can specify the number of days that an
accounting document (and the respective secondary indexes) must be kept in the system for before archiving, you can
specify if it is either a document type or an account type. We will use transaction code OBR7 (account life)
and OBR8 (document life), I will explain the account life which is the same as the document life,
CoCd - company code
AcType - the type of account (A - assets, D - Customer accounts, K- vendor accounts, etc)
From acct - here we select 0 and A to cover both numeric and alphanumeric accounts
To acct - same as above
Life - minimum life for the account
SecondaryIdxRun Time - you determine how many days the secondary index for a document can remain in the
system with respect to the clearing date and archiving key date
The below screenshot's shows that an account cannot be archive until it exceeds 730 days, however even after
archiving the accounts need to be available to be accessed from the respective archives for at least 365 days (1095 -
Finally we can check to see if an account or document can be archived, we use transactions code FB99, at the initial
screen enter the details of the document and select the green tick
A results screen then appears details if the document can be archived, in our case below yes it can.
Declaration: This is related to my Practice in Demo System ERP6 EHP5 since after my SAP Certification. I have taken guidance from SAP Expert
of UK who had given me full instructions on how to go about with certain configurations in Financials. I have successfully completed one