Call usual ABAP class in report using static method
Call class in report program.
Create class refer - Usual ABAP class with example using static method. (abappractice.blogspot.com)
1. Goto SE38.
2. Give program name and click on create.
3. Give title and click on save.
4. Write code.
REPORT zrp_cl_ekk1.
DATA:
bukrs TYPE bukrs,
bstyp TYPE bstyp,
bsart TYPE bsart,
spras TYPE spras.
PARAMETERS: p_vbeln TYPE ebeln.
START-OF-SELECTION.
CALL METHOD zcl_ekko1=>display
EXPORTING
pebeln = p_vbeln
IMPORTING
pbukrs = bukrs
pbstyp = bstyp
pbsart = bsart
pspras = spras.
IF sy-subrc = 0.
WRITE: / bukrs,
/ bstyp,
/ bsart,
/ spras.
ELSE.
MESSAGE 'Pls Give Correct Input' TYPE 'E'.
ENDIF.
Input
Output
Comments
Post a Comment