When upgrading from R/3 4.6C to a more recent release, many companies encounter a severe error with user exit PBAS0001. You can fix it by following these steps.
Key Concept
Starting with SAP R/3 4.7 all SAP-delivered software meets Unicode compliance standards. Therefore, custom user exit code is subjected to the same Unicode compliance checks. In particular, your custom code in user exit PBAS0001 may cause an error after you upgrade from an R/3 4.6C system. User exit PBAS0001 causes a runtime syntax error in your upgraded system when you execute transaction PA30 and update any information in infotypes.
One of the problems that you may face after upgrading from R/3 4.6C is a problem in maintaining your infotypes. This error occurs immediately when you try to change and update any master data in infotypes. The system terminates transaction PA30 and shows a runtime error message: The current ABAP program “SAPFP50M” had to be terminated because one of the statements could not be executed (Figure 1). The error message also indicates that a syntax error exists in the program SAPLXPAD in the include ZXPADF01. This action prevents you from proceeding in your necessary testing phase before you deliver the system to the users. We will explain how this user exit problem occurs and show you how to fix it. This error appears with non-Unicode-compliant code in R/3 4.6C. If you upgrade from R/3 4.7 or mySAP ERP Central Component (ECC) 5.0 or 6.0, then you shouldn’t encounter this problem.

Figure 1
Runtime error after executing PA30 and updating infotypes
Update Master Data Runtime Error
Starting with SAP R/3 4.7, all SAP-delivered programs and function groups have the Unicode check active flag set to perform a Unicode check on all user exit code. This explains why the error message does not occur in earlier releases of the software.
In SAP HR, all infotype actions involve user exit PBAS0001 for specific custom validation requirements. During the execution of the function module, it is necessary to transfer import parameter INNNN (structure type PRELP) to the corresponding infotype structure (for example, structure I0008 for infotype 0008). In Unicode-compliant programs, I0008 has to be of the same structure type as Innnn (n equals infotype number) for the MOVE operation or assignment to execute correctly.
Note
SAP also offers other enhancement techniques. As of R/3 Release 4.6A, SAP provides Business Add-Ins (BAdIs), which are based on a multi-level system landscape instead of a two-level landscape such as user exits. This means you can create definitions and implementations of BAdIs at any level of the system landscape. To unify enhancements, SAP recommends migrating user exits to BAdIs, which can be time consuming. Also, during the up-grade, it may introduce additional risks related to extensive custom code base change. We recommend that you approach BAdI migration with caution. SAP still supports other enhancement techniques, including user exits.
Tip!
In enhancement PABS0001, you should always use a Pnnnn type structure and never a PAnnnn table type structure.
Note
Pnnnn is a respective infotype structure used in your custom code. PRELP structure is an HR master data buffer used for exporting and importing content of any HR infotype structure to and from user exit PABS0001. Class CL_HR_PNNNN_TYPE_CAST carries out the necessary conversion between PRELP and any of the Pnnnn structures.
Solution
To resolve this error, you need to remove and fix the logic for proper type conversion between import and export parameter Innnn structure of type PRELP and your temporary structure of type Pnnnn. Modify logic in the user exit programs (ZXPADU01, ZXPADU02, or in our example ZXPADF01) in the HR function group XPAD to make it Unicode compliant. The following two simple steps allow you to resolve this issue.
Step 1. Search and fix all of the moves from the PRELP type structure (i.e., import parameter Innnn or its local copy) to the relevant infotype Pnnnn local structure
Step 2. Search and fix all of the moves from relevant infotype Pnnnn local structure to PRELP type structure (i.e., export parameter Innnn or its local copy) in the include program ZXPADF01 (or ZXPAPU01/ZXPAPU02).
Step 1. Search and fix all of the moves from the PRELP type structure (i.e., import parameter Innnn or its local copy) to the relevant infotype Pnnnn local structure. Use transaction SE38 or follow SAP menu path Tools>ABAP Workbench>Development>ABAP Editor. Click on ABAP Editor to see the screen shown in Figure 2. Enter the include program ZXPADF01 (or ZXPADU01 or ZXPADU02, depending on the program you have implemented at your company) and click on the Change button. As a result, the system displays the source code. Use the search icon to look for all of the MOVE or assignment statements from PRELP type parameter Innnn (or its local copy) in Figure 3 to Pnnnn type structures. In our example, we searched the local copy of parameter Innnn with a name of V_INNNN_COPY. Our exact search string in this example was move v_innnn_copy.

Figure 2
ABAP Editor initial screen

Figure 3
Search result for move from PRELP type structure to the relevant infotype Pnnnn type structures
Then, replace each MOVE or assignment of a PRELP type structure to the respective Pnnnn type structure using the method PRELP_TO_PNNNN of the class CL_HR_PNNNN_TYPE_CAST. In other words, replace all statements that may exist in your program that have Figure 4’s syntax (this may vary in each customer site) with Figure 5’s syntax.

Figure 4
From PRELP type structure to Pnnnn type structure: the statement to replace

Figure 5
From PRELP type structure to Pnnnn type structure: the statement after replacement (Unicode compatible)
Step 2. Search and fix all of the moves from relevant infotype Pnnnn local structure to PRELP type structure (i.e., export parameter Innnn or its local lcopy) in the include program ZXPADF01 (or ZXPADU01/ZXPADU02) . You need to search for all of the MOVE or assignment statements from infotype Pnnnn type structure to PRELP type structure by clicking the search icon. In our example, we searched for to v_innnn_copy sequence. Our search finds the code highlighted in Figure 6.
Note
Using deep structures in DO .. , PERFORM .. VARYING constructs may cause incorrect results and errors. We recommend using only flat structures with this construct. A flat structure is composed only of fields that have simple data types.
Note
This syntax error also might occur with transactions other than PA30 such as PA40, PA61, and HRBEN0001.

Figure 6
Search result for move from the relevant infotype PNNNN structure to PRELP
Then, you need to replace each move of a Pnnnn type structure to a PRELP type structure using the method PNNNN_TO_PRELP of the class CL_HR_PNNNN_TYPE_CAST. Your original statement may resemble the syntax shown in Figure 7. Replace it with the syntax shown in Figure 8 adjusting to your particular structure names.

Figure 7
From Pnnnn type structure to PRELP type structure: the statement to replace

Figure 8
From Pnnnn type structure to PRELP type structure: the statement after replacement (Unicode compatible)
After replacing the syntax in the above two steps in program ZXPADF01 (or ZXPADU01/ZXPADU020), perform a syntax check and activate it. Consequently, end users can maintain all HR infotypes and never realize that you had this problem during the upgrade.
Mohamed Khalid Yousif
Mohamed Khalid Yousif is a certified senior SAP HR consultant. Mohamed has a master’s degree in computer science from Khartoum University, Sudan. He is currently the team leader of the SAP HR support team and also was team leader of the ECC 5.0 upgrade project at National Drilling Company, Abu Dhabi, UAE.
You may contact the author at myousif@ndc.ae.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.
Vijaya Madala
Vijay Madala is a certified senior SAP ABAP consultant. Vijay has a bachelor’s degree from University of Madras, Chennai, India. He is currently working in the SAP NetWeaver Center of Excellence team and also involved in the ECC 5.0 upgrade project at National Drilling Company, Abu Dhabi, UAE.
You may contact the author at vmadala@ndc.ae.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.

Piotr Zalewski
Piotr Zalewski is a certified senior SAP technical consultant. Piotr holds a master’s degree from Warsaw University of Technology in Poland. He is currently involved in custom development projects in the SAP NetWeaver Center of Excellence and led an ABAP development team during the ECC 5.0 upgrade project at National Drilling Company, Abu Dhabi, UAE.
You may contact the author at pzalewski@ndc.ae.
If you have comments about this article or publication, or would like to submit an article idea, please contact the editor.