SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for SAP HANA and ABAP, HANA Database, SQLScript, SAP UI5, Screen Personas, Web Dynpro, Workflow

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

ATC error for VBTYP Syntactically incompatible change of existing functionality

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:

INCLUDE rvvbtyp.
Code

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.

VBTYP with Data Model Changes in SD on S/4 HANA

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.

new SD document category constants from class interface on SAP S/4HANA

Here is the full list of sales document types from the interface IF_SD_DOC_CATEGORY

INQUIRYIF_SD_DOC_CATEGORY=>INQUIRY'A'
QUOTATIONIF_SD_DOC_CATEGORY=>QUOTATION'B'
ORDERIF_SD_DOC_CATEGORY=>ORDER'C'
ITEM_PROPOSALIF_SD_DOC_CATEGORY=>ITEM_PROPOSAL'D'
SCHED_AGREEIF_SD_DOC_CATEGORY=>SCHED_AGREE'E'
SCHED_AGREE_EXT_SERV_AGENTIF_SD_DOC_CATEGORY=>SCHED_AGREE_EXT_SERV_AGENT'F'
CONTRACTIF_SD_DOC_CATEGORY=>CONTRACT'G'
RETURNSIF_SD_DOC_CATEGORY=>RETURNS'H'
ORDER_WO_CHARGEIF_SD_DOC_CATEGORY=>ORDER_WO_CHARGE'I'
DELIVERYIF_SD_DOC_CATEGORY=>DELIVERY'J'
CREDIT_MEMO_REQIF_SD_DOC_CATEGORY=>CREDIT_MEMO_REQ'K'
DEBIT_MEMO_REQIF_SD_DOC_CATEGORY=>DEBIT_MEMO_REQ'L'
INVOICEIF_SD_DOC_CATEGORY=>INVOICE'M'
INVOICE_CANCELIF_SD_DOC_CATEGORY=>INVOICE_CANCEL'N'
CREDIT_MEMOIF_SD_DOC_CATEGORY=>CREDIT_MEMO'O'
DEBIT_MEMOIF_SD_DOC_CATEGORY=>DEBIT_MEMO'P'
WMS_TRANS_ORDERIF_SD_DOC_CATEGORY=>WMS_TRANS_ORDER'Q'
GOODS_MOVEMENTIF_SD_DOC_CATEGORY=>GOODS_MOVEMENT'R'
CREDIT_MEMO_CANCELIF_SD_DOC_CATEGORY=>CREDIT_MEMO_CANCEL'S'
RETURNS_DELIVERY_FOR_ORDERIF_SD_DOC_CATEGORY=>RETURNS_DELIVERY_FOR_ORDER'T'
PRO_FORMA_INVOICEIF_SD_DOC_CATEGORY=>PRO_FORMA_INVOICE'U'
PURCHASE_ORDERIF_SD_DOC_CATEGORY=>PURCHASE_ORDER'V'
INDEPENDENT_REQTS_PLANIF_SD_DOC_CATEGORY=>INDEPENDENT_REQTS_PLAN'W'
HANDLING_UNITIF_SD_DOC_CATEGORY=>HANDLING_UNIT'X'
REBATE_AGREEMENTIF_SD_DOC_CATEGORY=>REBATE_AGREEMENT'Y'
MASTER_CONTRACTIF_SD_DOC_CATEGORY=>MASTER_CONTRACT'0'
SALES_ACTIVITIESIF_SD_DOC_CATEGORY=>SALES_ACTIVITIES'1'
EXTERNAL_TRANSACTIONIF_SD_DOC_CATEGORY=>EXTERNAL_TRANSACTION'2'
INVOICE_LISTIF_SD_DOC_CATEGORY=>INVOICE_LIST'3'
CREDIT_MEMO_LISTIF_SD_DOC_CATEGORY=>CREDIT_MEMO_LIST'4'
INTERCOMPANY_INVOICEIF_SD_DOC_CATEGORY=>INTERCOMPANY_INVOICE'5'
INTERCOMPANY_CREDIT_MEMOIF_SD_DOC_CATEGORY=>INTERCOMPANY_CREDIT_MEMO'6'
DELIVERY_SHIPPING_NOTIFIF_SD_DOC_CATEGORY=>DELIVERY_SHIPPING_NOTIF'7'
SHIPMENTIF_SD_DOC_CATEGORY=>SHIPMENT'8'
SHIPMENT_COSTSIF_SD_DOC_CATEGORY=>SHIPMENT_COSTS'a'
CRM_OPPORTUNITYIF_SD_DOC_CATEGORY=>CRM_OPPORTUNITY'b'
UNVERIFIED_DELIVERYIF_SD_DOC_CATEGORY=>UNVERIFIED_DELIVERY'c'
TRADING_CONTRACTIF_SD_DOC_CATEGORY=>TRADING_CONTRACT'd'
ALLOCATION_TABLEIF_SD_DOC_CATEGORY=>ALLOCATION_TABLE'e'
ROUGH_GOODS_RECEIPT_IS_RETAILIF_SD_DOC_CATEGORY=>ROUGH_GOODS_RECEIPT_IS_RETAIL'g'
CANCEL_GOODS_MOVEMENTIF_SD_DOC_CATEGORY=>CANCEL_GOODS_MOVEMENT'h'
GOODS_RECEIPTIF_SD_DOC_CATEGORY=>GOODS_RECEIPT'i'
JIT_CALLIF_SD_DOC_CATEGORY=>JIT_CALL'j'
AGENCY_DOCUMENTIF_SD_DOC_CATEGORY=>AGENCY_DOCUMENT'k'
GOODS_MOVEMENT_DOCUMENTATIONIF_SD_DOC_CATEGORY=>GOODS_MOVEMENT_DOCUMENTATION'p'
TD_TRANSPORT_IS_OILIF_SD_DOC_CATEGORY=>TD_TRANSPORT_IS_OIL'r'
LOAD_CONF_REPOSTING_IS_OILIF_SD_DOC_CATEGORY=>LOAD_CONF_REPOSTING_IS_OIL's'
GAIN_LOSS_IS_OILIF_SD_DOC_CATEGORY=>GAIN_LOSS_IS_OIL't'
REENTRY_INTO_STORAGE_IS_OILIF_SD_DOC_CATEGORY=>REENTRY_INTO_STORAGE_IS_OIL'u'
DATA_COLLATION_IS_OILIF_SD_DOC_CATEGORY=>DATA_COLLATION_IS_OIL'v'
LOAD_CONF_GOODS_RECEIPT_IS_OILIF_SD_DOC_CATEGORY=>LOAD_CONF_GOODS_RECEIPT_IS_OIL'x'
AFSIF_SD_DOC_CATEGORY=>AFS'$'
ACCOUNTING_DOCUMENT_PLUSIF_SD_DOC_CATEGORY=>ACCOUNTING_DOCUMENT_PLUS'+'
ACCOUNTING_DOCUMENT_MINUSIF_SD_DOC_CATEGORY=>ACCOUNTING_DOCUMENT_MINUS'-'
REVENUE_RECOGNITIONIF_SD_DOC_CATEGORY=>REVENUE_RECOGNITION'#'
REVENUE_CANCELLATIONIF_SD_DOC_CATEGORY=>REVENUE_CANCELLATION'~'
REVENUE_RECOGNITION_NEW_VIEWIF_SD_DOC_CATEGORY=>REVENUE_RECOGNITION_NEW_VIEW'§'
REVENUE_CANCELLATION_NEW_VIEWIF_SD_DOC_CATEGORY=>REVENUE_CANCELLATION_NEW_VIEW'!'
SERVICE_ORDERIF_SD_DOC_CATEGORY=>SERVICE_ORDER':'
SERVICE_NOTIFICATIONIF_SD_DOC_CATEGORY=>SERVICE_NOTIFICATION'.'
WAREHOUSE_DOCUMENTIF_SD_DOC_CATEGORY=>WAREHOUSE_DOCUMENT'&'
PICK_ORDERIF_SD_DOC_CATEGORY=>PICK_ORDER'*'
SHIPMENT_DOCUMENTIF_SD_DOC_CATEGORY=>SHIPMENT_DOCUMENT','
RESERV_IS_OILIF_SD_DOC_CATEGORY=>RESERV_IS_OIL'w'
RESERV_LITTLE_MIF_SD_DOC_CATEGORY=>RESERV_LITTLE_M'm'
RESERV_LITTLE_NIF_SD_DOC_CATEGORY=>RESERV_LITTLE_N'n'
BILL_PERIOD_END_INVIF_SD_DOC_CATEGORY=>BILL_PERIOD_END_INV'f001'
BILL_PERIOD_END_CRED_MEMOIF_SD_DOC_CATEGORY=>BILL_PERIOD_END_CRED_MEMO'f002'
BILL_PERIOD_END_INV_IBIF_SD_DOC_CATEGORY=>BILL_PERIOD_END_INV_IB'f003'
BILL_PERIOD_END_CRED_MEM_IBIF_SD_DOC_CATEGORY=>BILL_PERIOD_END_CRED_MEM_IB'f004'
CEM_SHIPPING_DOCUMENTIF_SD_DOC_CATEGORY=>CEM_SHIPPING_DOCUMENT'CEM'
BOS_SERVICE_ENTRY_SHEETIF_SD_DOC_CATEGORY=>BOS_SERVICE_ENTRY_SHEET'BOS'
EXT_BILLING_DOC_REQUESTIF_SD_DOC_CATEGORY=>EXT_BILLING_DOC_REQUEST'EBDR'
PS_BILLING_DOC_REQUESTIF_SD_DOC_CATEGORY=>PS_BILLING_DOC_REQUEST'PBDR'
PRE_BILLING_DOCUMENTIF_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.

replace VBTYP variables with VBTYPL in ABAP programs



SAP HANA and ABAP

Install SAP Free
CRM Companies List
Web Based CRM Software


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.