Thank you ALL. Still getting same error while activating includes, FM. Please advise.
Fixed ZBAPI_QAIMPORT instead of MATNR. Structures - ZBAPI_QAIMPORT, ZBAPI_QAEXPORT are activated. Attached is source code -
FUNCTION ZBAPI_QA_GETWERKS.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(MATNR) TYPE ZBAPI_QAIMPORT-MATNR
*" EXPORTING
*" VALUE(RETURN) TYPE BAPIRETURN
*" TABLES
*" ZTABLE STRUCTURE ZBAPI_QAEXPORT
*"----------------------------------------------------------------------
select matnr werks from marc
into TABLE ztable
where matnr eq matnr.
if sy-subrc eq 0.
"Update BAPI return table accordingly to show success here
else.
"Update BAPI return table accordingly to show failure here
ENDIF.
ENDFUNCTION.