I had a problem when implementing some posting’n’clearing action (FM POSTING_INTERFACE_CLEARING).
Once I’ve filled correctly all required fields I’ve found that with other account it doesn’t work.
The answer is simple – the field requirement is handled with configuration in OB14 transaction.
Underneath you’ll find some slides with an example.
OB14 – main list (Field status group is assigned to an account and company code)
OB14 – usually for standard posting/clearing “Payment transactions” is used
OB14 – details for “Payment transactions”. As we can see “Value date” is required in this group.
From OB14 transaction it looks great and clear, but if we go deeper in technical details you’ll find it’s not so easy as in other SAP areas.
The configuration is stored in F004F tab and an entry for “Payment transactions” may look like this:
As you can see it’s not so obvious to find which field’s are obligatory and which not.
During posting when you use an account with this group – our field (Value date) be visible and required – so when you code your fields for Posting Interface input or for batch processing you need to know if this field is required or not. Otherwise you’ll get an error.
To resolve this issue I’ve created an method to calculate if this field is required or not. Underneath you’ll find an interface for this meth.:
As you can see input parameters are: Company code, Acount number, tabname, fieldname, account type (as default S – for G/L accounts).
Tabname and fieldname you can obtain from a transaction where you enter FI document manually (fe. F-02, F-04…) – just check with F1.
Underneath is an example of usage of this method, which usually should be call when filling fields for t_ftpost table.
Finally – what’s most interesting for all of you probably a copy-paste ABAP code of this method.
Enjoy using it. Should be helpful running Posting interface including both POSTING_INTERFACE_DOCUMENT and POSTING_INTERFACE_CLEARING FMs…