> For the complete documentation index, see [llms.txt](https://docs.theconfigteam.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.theconfigteam.com/prebilt-for-im-wm-strm/app-master-data/general-configuration-elements/conversion-exits.md).

# Conversion Exits

It should be possible to use most standard SAP conversion exits in the apps. However the following additional conversion exits will be available as part of the standard TCT package.

{% hint style="info" %}
**Note**

As of release v5.9.0, it is possible to use conversion exits to ensure that the data entry on the device screen does not exceed the number of characters that SAP supports for that field. There are two possible setups:

1. The relevant \<data type> should be used with the particular conversion exit in the conversion exit AMD field. e.g. "VBCUP,CHARG\_D" will transfer a batch field input to uppercase and also check it is no more than 10 characters. A popup warning will be given if the data entry exceeds the allowed value but note that **the data will be truncated to the allowed length upon closing the warning message**.
2. It is also possible to not use a specific conversion exit but just define a blank conversion exit together with suitable data type. e.g. put ",BKTXT" into conversion exit AMD field for material document header text, and the user will be prevented from entering more than the 25 characters that the BKTXT data type supports.
   {% endhint %}

## BESTQ

* Stock Category in WM – Output only.
* Convert status indicator to description, e.g. instead of ‘S’ ability to show ‘Blocked’.

## BSTAR

* Physical Inventory Stock Type (IM) – Output only.
* Convert stock type to description, e.g., instead of ‘1’ ability to show ‘Warehouse’, or instead of ‘2’ ability to show ‘Quality inspection’.

## SOBKZ

* Special Stock Type Description – Output only.
* Convert special stock type to description, e.g. instead of ‘Q’ ability to show ‘Project Stock’.

## NVERS,CHAR\<NUM>

* Physical Inventory Recount Version – Output only.
* Pad Physical Inventory Recount Version to a numeric value based on the value entered for \<NUM>, e.g. NVERS,CHAR2 would display ‘01’ instead of ‘1’.

## DOMTEXT,\<DATA-TYPE>,\<PARAMETER>

* Displays text instead of the domain value, where \<DATA-TYPE> can be used to change the displayed format (if left blank, defaults to CHAR100) and \<PARAMETER> is the parameter to be converted - Output only.
* Converts the value to the associated standard domain text as per the conversion exit that follows.
* Example entries are:
  * DOMTEXT,,LINK-ISTAT – Inventory Count Status – converts ‘N’ to ‘Not Counted’.
  * DOMTEXT,,LINK-LGTYP – Storage Type Description – converts storage type to description, e.g. instead of ‘916’ ability to show ‘Shipping Area Deliveries’.
  * DOMTEXT,,MSEG-SHKZG – Debit/Credit Indicator – converts ‘S’ to ‘Debit’.
  * DOMTEXT,CHAR3,MSEG-SHKZG – Debit/Credit Indicator – converts ‘S’ to ‘Deb’.

## YYMMDD

* Year conversion – Input only.
* Convert a value of ‘YYMMDD’ to ‘20YYMMDD’, e.g. ‘210101’ would display as, and be passed back to SAP as, ‘20210101’. This is primarily for converting scanned date barcodes in gs1 format.

## MATN1, or MATN1,MATNR

* Material display.
* Removes the need to type / display leading zeroes in numeric materials.
* MATN1 for input fields on selection screens (SELECT\_OPTS) and display fields on list screens and input screens.
* MATN1,MATNR for input fields on input screens.

## ALPHA,\<DATA-TYPE>,\<PARAMETER>

* Remove leading zeroes from numeric fields such as transfer order number and delivery number. If no value is entered for \<DATA-TYPE> is maintained, a default entry of CHAR100 will be used. A value for parameter is optional.
* Example entries are:
  * Transfer order number – ALPHA,TANUM
  * Transfer order item – ALPHA,TAPOS
  * Delivery number – ALPHA,VBELN
  * Batch – ALPHA,CHARG\_D (N.B. if data element CHARG is used to display batches, no conversion exit is required.)

## PDATE, IDATE, LDATE, SDATE

* Converts the date displayed to the required date format.
* Example entries are:
  * PDATE - 18.11.2020
  * IDATE - 18NOV2020
  * LDATE - 18. November 2020
  * SDATE - 18.NOV.2020

## DEC,0,X; DEC,1,X; DEC,2,X; DEC,3,X

* Truncated display of decimal places – Output only.
* Note that DEC does not perform true rounding, it just truncates to the decimal position indicated.
* The number 0, 1, 2 or 3 denotes the number of decimal places.
* X (if it is optionally used) means trim off any trailing zeros.

{% hint style="info" %}
**Note**

Currently, these conversion exits cannot be used where there are minus figures. If used and the value is less than zero, then the quantity will not be displayed. It is recommended that the DECIMAL conversion exit be used instead.
{% endhint %}

## DECIMAL; DECIMAL,,1,X; etc.

* Standard SAP conversion exit DECIMAL for use on output fields only.
* Note that this is different from the DEC conversion exit in that it does do true rounding and will round down to zero if required.
* To use DECIMAL, the same parameter format as for other standard SAP conversion exits must be followed:
  * The first parameter is the target data type, which we generally don't care about and so will leave blank.
  * The second parameter is the number of decimal places required, and this can be 0, 1, 2 or 3.
  * The third parameter is the indicator to remove trailing zeros or not. "X" denotes removing the trailing zeros.
* E.g. DECIMAL,,2,X - this trims a number to 2 decimal places and removes any trailing zeros. Note the double comma in the sequence because we do not need to specify a target data type.
* DECIMAL with no parameters rounds to zero decimal places.

## DECF; DECF,,1; DECF,,1,X; etc.

* NEW for release 5.9.0 for use on display output only.
* Performs like the DECIMAL conversion but with the following difference:
  * This exit does NOT round down to zero (which of course can be confusing to show zero when, for example, the stock quantity is not zero) - it will display the full decimal regardless of the decimal places parameter.
* To use DECF, the same parameter format as for other standard SAP conversion exits must be followed:
  * The first parameter is the target data type, which we generally don't care about and so will leave blank.
  * The second parameter is the number of decimal places required, and this can be 0, 1, 2 or 3.
  * The third parameter is the indicator to remove trailing zeros or not. "X" denotes removing the trailing zeros.
* E.g. DECF,,2,X - this trims a number to 2 decimal places and removes any trailing zeros. Note the double comma in the sequence because we do not need to specify a target data type.
* DECF with no parameters rounds to zero decimal places BUT will not round down to zero - the decimal number will still display.

## CUNIT

* Unit of measure – Output only.
* This will display the unit of measure converted to the external unit of measure.

## VBCUP or VBCUP,\<DATA-TYPE>

* Converts entered data from lowercase to UPPERCASE.
* It can be used with or without a data type being defined.
* Using a data type ensures that the field length is not exceeded.
* Typically within PreBilt we have used it for batch fields to support lowercase keyboard entry of the batch but then conversion to uppercase for validation or creation in the SAP database.
