Friday, 19 June 2020

S4 HANA – Debugging Validation Rules (GGB0) in F110 – Automatic Payment Program

Introduction:


Validation Rule is a tool where finance consultants can implement control checks at the time of Document Posting / Save as Complete to generate messages (Error/Information/Warning) with out the help of ABAP. They also use the trace function to check whether the validation rules are working as required.

ABAP Testing and Analysis, SAP S/4HANA, SAP ABAP Tutorial and Materials, SAP ABAP Guides, SAP ABAP Certification, SAP ABAP Exam Prep

When the document is being posted in FI module, the system shows whether the conditions are “True” or “False”.

ABAP Testing and Analysis, SAP S/4HANA, SAP ABAP Tutorial and Materials, SAP ABAP Guides, SAP ABAP Certification, SAP ABAP Exam Prep

However, this is not the case in F110 because F110 generates a background job. In this case we should know some basic debugging skills for validation rules.

Break-Point for the Validation Steps:


First we need to identify the Program and Step. You can identify it by select the validation rule and entering “=SHCD” in the T-Code Bar and press Enter.

ABAP Testing and Analysis, SAP S/4HANA, SAP ABAP Tutorial and Materials, SAP ABAP Guides, SAP ABAP Certification, SAP ABAP Exam Prep

It will take you to the specific ABAP program.

ABAP Testing and Analysis, SAP S/4HANA, SAP ABAP Tutorial and Materials, SAP ABAP Guides, SAP ABAP Certification, SAP ABAP Exam Prep

Now you have to find the step no. for the validation rules. In this case as an example I have used Step No. 1. So within the above program you have to find “G_STEP = ‘001”.

ABAP Testing and Analysis, SAP S/4HANA, SAP ABAP Tutorial and Materials, SAP ABAP Guides, SAP ABAP Certification, SAP ABAP Exam Prep

Double Click on the PERFORM “VALCOND_1ZFI003#001” so that you can go to the specific step.

ABAP Testing and Analysis, SAP S/4HANA, SAP ABAP Tutorial and Materials, SAP ABAP Guides, SAP ABAP Certification, SAP ABAP Exam Prep

You may identify the ABAP Logic for the Pre-Requisite that you have entered in the GGB0. You can put a break point here (For E.g. Line No. 39) for the validation check.

ABAP Testing and Analysis, SAP S/4HANA, SAP ABAP Tutorial and Materials, SAP ABAP Guides, SAP ABAP Certification, SAP ABAP Exam Prep

Execute F110

For Debugging, we don’t need to execute the F110 on immediate basis. We will set a start time and then go to SM37 to check the background job.

ABAP Testing and Analysis, SAP S/4HANA, SAP ABAP Tutorial and Materials, SAP ABAP Guides, SAP ABAP Certification, SAP ABAP Exam Prep

Execute SM37

Enter JDBG in the T-Code Bar and press Enter

ABAP Testing and Analysis, SAP S/4HANA, SAP ABAP Tutorial and Materials, SAP ABAP Guides, SAP ABAP Certification, SAP ABAP Exam Prep

Initially it will take you to the standard program. Then when you press F8, it will take you to the break point that you selected earlier.

ABAP Testing and Analysis, SAP S/4HANA, SAP ABAP Tutorial and Materials, SAP ABAP Guides, SAP ABAP Certification, SAP ABAP Exam Prep

On the right hand side in the variable Tab, I have added variable “RES001”. If it is “T” which is true, the validation check is successful. In the program, press “F5” to check the steps.

The above steps will check the validation Pre-Requisites are met or not. You will have to press F5 till you reach Program: GBTFUFI0 / GBTFUFID.

ABAP Testing and Analysis, SAP S/4HANA, SAP ABAP Tutorial and Materials, SAP ABAP Guides, SAP ABAP Certification, SAP ABAP Exam Prep

If the Pre-Requisites are met, the condition is considered as “TRUE” and it will perform the Check Condition from GGB0. Press F5 to further evaluate the checks.

No comments:

Post a Comment