report z745oops9. Returning parameters
class abc definition. public section. methods getvendor importing i_lifnr type lfa1-lifnr returning value(e_land1) type lfa1-land1.
endclass.
class abc implementation. method getvendor. select single land1 from lfa1 into (e_land1) where lifnr = i_lifnr. endmethod.endclass.
start-of-selection.data ob type ref to abc.create object ob.
parameters p_lifnr type lfa1-lifnr.data : lv_land1 type lfa1-land1.
call method ob->getvendor exporting i_lifnr = p_lifnr.
write :/ 'Not received return parameter...'.write :/ 'Vendor Country key :',lv_land1.
uline.call method ob->getvendor exporting i_lifnr = p_lifnr receiving e_land1 = lv_land1.
write :/ 'Vendor Country key :',lv_land1.
uline.clear : lv_land1.
lv_land1 = ob->getvendor( i_lifnr = '0000001000' ).
write :/ 'Vendor Country key :',lv_land1.