REPS RVVBTYP: Syntactically incompatible change of existing functionality
SAP introduced Data Model Changes in SD with S/4 HANA. ABAP programmers can run ATC checks to detect Syntactically incompatible change of existing functionality for example for RVVBTYP include which includes constants for sales document categories. Since VBTYP field's date element is changed and this field is modified from 1 character long data type to 4 character on S4HANA, custom ABAP developments should be checked via a code quality tool like ABAP Test Cockpit ATC for possible errors.
S/4HANA: Search for usages of simplified objects
Syntactically incompatible change of existing functionality
(REPS RVVBTYP, see Note(s): 0002198647)
S/4 HANA: DATA MODEL CHANGES IN SD
Priority 1
Cannot be hidden using a pragma or pseudo-comment
When I clicked on the object name which led me to the position of the error in the ABAP codes, I see that the error is triggered at:
If you double click on the rvvbtyp include name, following information is displayed within the content of the include as comment.
* DO NOT USE!
* VBTYP has been replaced by VBTYPL with a length of 4 characters
* New constants can be found in interface IF_SD_DOC_CATEGORY and
* combinations of document categories may be analyzed using
* class CL_SD_DOC_CATEGORY_UTIL
So to get more information about the change, I checked the SAP Note 2198647 - S/4 HANA: Data Model Changes in SD on 2198647 and download attachment Cookbook VBTYP Field Length Extension which provides detailed information.
I copy the following image from the attached document summarizing the change during S/4HANA migration on VBRK table VBTYP field.
So VBRK-VBTYP field is modified from 1 character long data type to 4 character long data type on S4HANA SAP systems.
So instead of using RVVBTYP include which contains constants for Sales Document Types, interface IF_SD_DOC_CATEGORY attributes can be used in S/4 HANA custom code developments.
Here is the full list of sales document types from the interface IF_SD_DOC_CATEGORY
INQUIRY | IF_SD_DOC_CATEGORY=>INQUIRY | 'A' |
QUOTATION | IF_SD_DOC_CATEGORY=>QUOTATION | 'B' |
ORDER | IF_SD_DOC_CATEGORY=>ORDER | 'C' |
ITEM_PROPOSAL | IF_SD_DOC_CATEGORY=>ITEM_PROPOSAL | 'D' |
SCHED_AGREE | IF_SD_DOC_CATEGORY=>SCHED_AGREE | 'E' |
SCHED_AGREE_EXT_SERV_AGENT | IF_SD_DOC_CATEGORY=>SCHED_AGREE_EXT_SERV_AGENT | 'F' |
CONTRACT | IF_SD_DOC_CATEGORY=>CONTRACT | 'G' |
RETURNS | IF_SD_DOC_CATEGORY=>RETURNS | 'H' |
ORDER_WO_CHARGE | IF_SD_DOC_CATEGORY=>ORDER_WO_CHARGE | 'I' |
DELIVERY | IF_SD_DOC_CATEGORY=>DELIVERY | 'J' |
CREDIT_MEMO_REQ | IF_SD_DOC_CATEGORY=>CREDIT_MEMO_REQ | 'K' |
DEBIT_MEMO_REQ | IF_SD_DOC_CATEGORY=>DEBIT_MEMO_REQ | 'L' |
INVOICE | IF_SD_DOC_CATEGORY=>INVOICE | 'M' |
INVOICE_CANCEL | IF_SD_DOC_CATEGORY=>INVOICE_CANCEL | 'N' |
CREDIT_MEMO | IF_SD_DOC_CATEGORY=>CREDIT_MEMO | 'O' |
DEBIT_MEMO | IF_SD_DOC_CATEGORY=>DEBIT_MEMO | 'P' |
WMS_TRANS_ORDER | IF_SD_DOC_CATEGORY=>WMS_TRANS_ORDER | 'Q' |
GOODS_MOVEMENT | IF_SD_DOC_CATEGORY=>GOODS_MOVEMENT | 'R' |
CREDIT_MEMO_CANCEL | IF_SD_DOC_CATEGORY=>CREDIT_MEMO_CANCEL | 'S' |
RETURNS_DELIVERY_FOR_ORDER | IF_SD_DOC_CATEGORY=>RETURNS_DELIVERY_FOR_ORDER | 'T' |
PRO_FORMA_INVOICE | IF_SD_DOC_CATEGORY=>PRO_FORMA_INVOICE | 'U' |
PURCHASE_ORDER | IF_SD_DOC_CATEGORY=>PURCHASE_ORDER | 'V' |
INDEPENDENT_REQTS_PLAN | IF_SD_DOC_CATEGORY=>INDEPENDENT_REQTS_PLAN | 'W' |
HANDLING_UNIT | IF_SD_DOC_CATEGORY=>HANDLING_UNIT | 'X' |
REBATE_AGREEMENT | IF_SD_DOC_CATEGORY=>REBATE_AGREEMENT | 'Y' |
MASTER_CONTRACT | IF_SD_DOC_CATEGORY=>MASTER_CONTRACT | '0' |
SALES_ACTIVITIES | IF_SD_DOC_CATEGORY=>SALES_ACTIVITIES | '1' |
EXTERNAL_TRANSACTION | IF_SD_DOC_CATEGORY=>EXTERNAL_TRANSACTION | '2' |
INVOICE_LIST | IF_SD_DOC_CATEGORY=>INVOICE_LIST | '3' |
CREDIT_MEMO_LIST | IF_SD_DOC_CATEGORY=>CREDIT_MEMO_LIST | '4' |
INTERCOMPANY_INVOICE | IF_SD_DOC_CATEGORY=>INTERCOMPANY_INVOICE | '5' |
INTERCOMPANY_CREDIT_MEMO | IF_SD_DOC_CATEGORY=>INTERCOMPANY_CREDIT_MEMO | '6' |
DELIVERY_SHIPPING_NOTIF | IF_SD_DOC_CATEGORY=>DELIVERY_SHIPPING_NOTIF | '7' |
SHIPMENT | IF_SD_DOC_CATEGORY=>SHIPMENT | '8' |
SHIPMENT_COSTS | IF_SD_DOC_CATEGORY=>SHIPMENT_COSTS | 'a' |
CRM_OPPORTUNITY | IF_SD_DOC_CATEGORY=>CRM_OPPORTUNITY | 'b' |
UNVERIFIED_DELIVERY | IF_SD_DOC_CATEGORY=>UNVERIFIED_DELIVERY | 'c' |
TRADING_CONTRACT | IF_SD_DOC_CATEGORY=>TRADING_CONTRACT | 'd' |
ALLOCATION_TABLE | IF_SD_DOC_CATEGORY=>ALLOCATION_TABLE | 'e' |
ROUGH_GOODS_RECEIPT_IS_RETAIL | IF_SD_DOC_CATEGORY=>ROUGH_GOODS_RECEIPT_IS_RETAIL | 'g' |
CANCEL_GOODS_MOVEMENT | IF_SD_DOC_CATEGORY=>CANCEL_GOODS_MOVEMENT | 'h' |
GOODS_RECEIPT | IF_SD_DOC_CATEGORY=>GOODS_RECEIPT | 'i' |
JIT_CALL | IF_SD_DOC_CATEGORY=>JIT_CALL | 'j' |
AGENCY_DOCUMENT | IF_SD_DOC_CATEGORY=>AGENCY_DOCUMENT | 'k' |
GOODS_MOVEMENT_DOCUMENTATION | IF_SD_DOC_CATEGORY=>GOODS_MOVEMENT_DOCUMENTATION | 'p' |
TD_TRANSPORT_IS_OIL | IF_SD_DOC_CATEGORY=>TD_TRANSPORT_IS_OIL | 'r' |
LOAD_CONF_REPOSTING_IS_OIL | IF_SD_DOC_CATEGORY=>LOAD_CONF_REPOSTING_IS_OIL | 's' |
GAIN_LOSS_IS_OIL | IF_SD_DOC_CATEGORY=>GAIN_LOSS_IS_OIL | 't' |
REENTRY_INTO_STORAGE_IS_OIL | IF_SD_DOC_CATEGORY=>REENTRY_INTO_STORAGE_IS_OIL | 'u' |
DATA_COLLATION_IS_OIL | IF_SD_DOC_CATEGORY=>DATA_COLLATION_IS_OIL | 'v' |
LOAD_CONF_GOODS_RECEIPT_IS_OIL | IF_SD_DOC_CATEGORY=>LOAD_CONF_GOODS_RECEIPT_IS_OIL | 'x' |
AFS | IF_SD_DOC_CATEGORY=>AFS | '$' |
ACCOUNTING_DOCUMENT_PLUS | IF_SD_DOC_CATEGORY=>ACCOUNTING_DOCUMENT_PLUS | '+' |
ACCOUNTING_DOCUMENT_MINUS | IF_SD_DOC_CATEGORY=>ACCOUNTING_DOCUMENT_MINUS | '-' |
REVENUE_RECOGNITION | IF_SD_DOC_CATEGORY=>REVENUE_RECOGNITION | '#' |
REVENUE_CANCELLATION | IF_SD_DOC_CATEGORY=>REVENUE_CANCELLATION | '~' |
REVENUE_RECOGNITION_NEW_VIEW | IF_SD_DOC_CATEGORY=>REVENUE_RECOGNITION_NEW_VIEW | '§' |
REVENUE_CANCELLATION_NEW_VIEW | IF_SD_DOC_CATEGORY=>REVENUE_CANCELLATION_NEW_VIEW | '!' |
SERVICE_ORDER | IF_SD_DOC_CATEGORY=>SERVICE_ORDER | ':' |
SERVICE_NOTIFICATION | IF_SD_DOC_CATEGORY=>SERVICE_NOTIFICATION | '.' |
WAREHOUSE_DOCUMENT | IF_SD_DOC_CATEGORY=>WAREHOUSE_DOCUMENT | '&' |
PICK_ORDER | IF_SD_DOC_CATEGORY=>PICK_ORDER | '*' |
SHIPMENT_DOCUMENT | IF_SD_DOC_CATEGORY=>SHIPMENT_DOCUMENT | ',' |
RESERV_IS_OIL | IF_SD_DOC_CATEGORY=>RESERV_IS_OIL | 'w' |
RESERV_LITTLE_M | IF_SD_DOC_CATEGORY=>RESERV_LITTLE_M | 'm' |
RESERV_LITTLE_N | IF_SD_DOC_CATEGORY=>RESERV_LITTLE_N | 'n' |
BILL_PERIOD_END_INV | IF_SD_DOC_CATEGORY=>BILL_PERIOD_END_INV | 'f001' |
BILL_PERIOD_END_CRED_MEMO | IF_SD_DOC_CATEGORY=>BILL_PERIOD_END_CRED_MEMO | 'f002' |
BILL_PERIOD_END_INV_IB | IF_SD_DOC_CATEGORY=>BILL_PERIOD_END_INV_IB | 'f003' |
BILL_PERIOD_END_CRED_MEM_IB | IF_SD_DOC_CATEGORY=>BILL_PERIOD_END_CRED_MEM_IB | 'f004' |
CEM_SHIPPING_DOCUMENT | IF_SD_DOC_CATEGORY=>CEM_SHIPPING_DOCUMENT | 'CEM' |
BOS_SERVICE_ENTRY_SHEET | IF_SD_DOC_CATEGORY=>BOS_SERVICE_ENTRY_SHEET | 'BOS' |
EXT_BILLING_DOC_REQUEST | IF_SD_DOC_CATEGORY=>EXT_BILLING_DOC_REQUEST | 'EBDR' |
PS_BILLING_DOC_REQUEST | IF_SD_DOC_CATEGORY=>PS_BILLING_DOC_REQUEST | 'PBDR' |
PRE_BILLING_DOCUMENT | IF_SD_DOC_CATEGORY=>PRE_BILLING_DOCUMENT | 'PBD' |
Although above interface attributes can be used for single sales document type values, if a range of document types are used with a single constant, the methods of CL_SD_DOC_CATEGORY_UTIL class can be used.
For example, instead of vbtyp_verk constant which is equal to a range of sales document types represented with 'ABCDEFGHIKLW0', an ABAP developer should use cl_sd_doc_category_util=>rg_any_sales( ).
The attached Cookbook includes codes samples explaining the conversion of old and new constanst.
To resolve the ATC check issue, I simply commented "INCLUDE rvvbtyp." ABAP code line to see where in my program I have referenced to constants within this include. Also VBRK field VBTYP can be searched within ABAP codes, etc.
Another example of this type of ATC errors can be using directly VBTYP Data Element (SD Document Category) which is still 1 character long as input/output parameter data types or in ABAP programs as variable data types.
As a sample case, here is an input parameter "LV_VBTYP_N" for an AMDP method (AMDP Stored Procedure on SAP HANA systems) with data type as VBTYP.
Since the business logic changed for the sales document category field and we are now using VBTYPL which is 4 characters long, an ABAP programmer has to replace all VBTYP data elements with new VBTYPL data element.