Parameters
A parameter in SAP reports, also known as an input parameter, is a value that is required to run the SAP report. It allows the user to specify the criteria for generating the report output.
In SAP, parameters play an important role in filtering the data displayed in the report based on specific conditions, such as company code, fiscal year, document type, date range, etc.
The values for the parameters can be entered through the selection screen of the SAP report and the report is generated based on the specified parameters. The use of parameters in SAP reports helps to improve the accuracy and efficiency of report generation in SAP.
Let’s start with the creation of parameters.
Step 1 : Create a report, ZTEST_PARAMETERS ( you can take any name ) and write below code and activate (CTRL+F3) the report.
PARAMETERS : p_fstnam TYPE c LENGTH 20,
p_lstnam TYPE c LENGTH 20,
p_age TYPE i,
p_marks TYPE i,
p_totmrk TYPE i,
p_prcnt TYPE p DECIMALS 2.
The selection screen will look like this.
But the names of parameters are not user friendly so let’s make them human readable and more sensible.
Step 2 : Click on ‘More’ and select ‘Text Elements’ or press F5.
Click on ‘Selection Texts’. Enter suitable names in ‘Text’. This text will be displayed against your parameters on the selection screen.
Click on Activate or CTRL+F3.
Execute (F8) the report and check the selection screen. The parameters will have the new texts.