Parameters: p_kunnr type kunnr.
DATA: G_FNAME TYPE NAME1_GP,
G_SNAME TYPE NAME2_GP,
G_CITY TYPE NAME2_GP,
G_STREETNO TYPE STRAS_GP.
CLASS class1 DEFINITION ABSTRACT.
PUBLIC SECTION.
METHODS DISPLAY ABSTRACT IMPORTING IV_KUNNR TYPE KUNNR
EXPORTING EV_FNAME TYPE NAME1_GP
EV_SNAME TYPE NAME2_GP
EV_CITY TYPE ORT01_GP
EV_STREETNO TYPE STRAS_GP.
ENDCLASS.
CLASS CLASS2 DEFINITION INHERITING FROM CLASS1.
PUBLIC SECTION.
METHODS DISPLAY REDEFINITION.
ENDCLASS.
CLASS CLASS2 IMPLEMENTATION.
METHOD DISPLAY.
SELECT SINGLE NAME1 NAME2 ORT01 STRAS
FROM KNA1
INTO ( EV_FNAME , EV_SNAME , EV_CITY , EV_STREETNO )
WHERE KUNNR = P_KUNNR.
ENDMETHOD.
ENDCLASS.
START-OF-SELECTION.
DATA: OBJECT1 TYPE REF TO CLASS2.
CREATE OBJECT OBJECT1.
OBJECT1->DISPLAY( EXPORTING IV_KUNNR = P_KUNNR
IMPORTING EV_FNAME = G_FNAME
EV_SNAME = G_SNAME
EV_CITY = G_CITY
EV_STREETNO = G_STREETNO ).
WRITE:/ 'DETAILS ARE:',
/ 'FIRST NAME :', G_FNAME,
/ 'SECOND NAME :', G_SNAME,
/ 'CITY NAME :', G_CITY,
/ 'STREET NUMBER :', G_STREETNO.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 |