Ansicht
Dokumentation

ICAFF - Define Field Functions

ICAFF - Define Field Functions

BAL Application Log Documentation   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

In this Customizing activity, you can create your own field functions that can be used for setting field values in posting rule definition.

Take the following steps to create a custom field function:

  1. Enter the field function name and description.
  2. Select a function category, that is, the data type of the values returned by the function.
  3. Enter the function parameter pattern. A pattern starts with "&", the placeholder for an argument, and is followed by a sequential number. After the number, add the escape character "\" and then an argument type, such as "\d", which means a number. You can add multiple arguments separated by a comma (,), for example, &1\FIELD, &2\FIELD, &3\w.
See the table below for all the pattern symbols:
Symbol Description Example
& Placeholder for an argument, followed by a number indicating sequence &1\Value
\d Number 100
\w String '0001000000'
\VALUE Literal values, can be number or string 100, 'Test'
\FIELD Field of any type FSItem
\AMOUNT_FIELD Field of amount type KSL
\SC_FIELD Field of character type FSItem
\DATE_FIELD Field of date type BUDAT
\NU_FIELD Field of numeric type RYEAR

  1. Enter your implementation class. It's required for a custom field function and must inherit from the abstract class CL_ICA_FIELD_FUNCTION. For more information, press F1 key to get the field help for Implementation Class.
  2. If a further explanation about the function is necessary, input the long text in transaction se91 (Message Maintenance) and note down the message class and message number. Afterwards, come back to this Customizing activity and enter the message class and number. In this way, the long-text message can display when the function is called in defining posting rules. It replaces the function description you specified above.
  3. On the Parameter Labelspage, specify a label text for each parameter. The texts will display as field labels when the function is called. This step is optional.
Field of numeric type

SAP delivers the following field functions, which you can reference when creating your own:

  • CONCATENATE: Concatenates the values of field 1 and field 2 using the specified separator.
  • COPY_FROM: Copies value of source field to the target field.
  • DEBIT_CREDIT: Returns the value on the debit side if the to-be-posted amount is positive or 0, otherwise returns the value on the credit side.
  • FIX_VALUE: Returns a fixed value to the target field.
  • INITIAL: Clears value of the target field.
  • REVERSE: Returns opposite value of the numeric field.
  • SUBSTRING: Returns a substring of the assigned string field value based on the 'Start Position' and 'Substring Length'.
  • CURRENT_DATE: Returns the current date in the system time zone.
  • CURRENT_TIME: Returns the current time in the system time zone.





RFUMSV00 - Advance Return for Tax on Sales/Purchases   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.

Length: 5073 Date: 20240523 Time: 200603     sap01-206 ( 56 ms )