Customer function in SAP schema extension

Hi,

When I try to add Z function to schema extension I get the following message:

  • Defined function parameter name PERSONAL_NUMBER was not marked as active in SAP data dictionary for function Z_TEST

There are some special requirements to function module? For any standard BAPI function everything works fine.

  • Function module interface:

*"----------------------------------------------------------------------
*"*"Local Interface:
*"  IMPORTING
*"     VALUE(PERSONAL_NUMBER) TYPE  PA0002-PERNR
*"  EXPORTING
*"     VALUE(OUTPUT) TYPE  ZOUTPUT
*"     VALUE(RETURN) TYPE  BAPIRET2
*"----------------------------------------------------------------------

  • Schema extension:

<?xml version="1.0" encoding="utf-8" ?>
<SAP>
 <Tables>
    <Table Definition = "PA0002Tab" TableName="PA0002" Key="PERNR" X500="CN" SQL="MANDT = sy-mandt" Load="" />
 </Tables>
<Functions>
   <Function Definition = "EMPLOYEE_STATUS" FunctionName="Z_TEST" OutStructure = "" Key ="PERSONAL_NUMBER" X500 ="CN">
           <Mapping>
            <Data ParameterName = "PERSONAL_NUMBER" PropertyName = "PERNR" />
        </Mapping>
    </Function>
</Functions>    
<SAPExtendedSchematypes>
    <SAPExtendedSchematype Bem = "TEST" Name = "AdditionalUserData" DisplayPattern="%PERNR%"  ListObjectsDefinition = "PA0002Tab" ReadObjectDefinition ="EMPLOYEE_STATUS" WriteObjectDefinition = "" DeleteObjectDefinition = "">
    </SAPExtendedSchematype>
</SAPExtendedSchematypes>
</SAP>

  • Hi Zinek,

    it looks like something went wrong during activation of your function "Z_TEST". Parameter validation found your parameter in SAP data dictionary but it is not set to active yet. You may check it due to click at the type column at definition of import parameter in the "Import" list of your function. You will see the activation state in the headline.

    Regards,

       Tino