K2 Connect Compiler Errors with BAPI_MATERIAL_SAVEDATA

  • 16 February 2021
  • 0 replies
  • 18 views

Badge +5

Issue

Publishing a ServiceObject that calls the BAPI_MATERIAL_SAVEDATA method throws the following error:

ServiceObjectModel AutoCompiler errorCS1519: Invalid token '2' in class, struct, or interface member declarationServiceObjectModel AutoCompiler errorCS1519: Invalid token '{' in class, struct, or interface member declarationServiceObjectModel AutoCompiler errorCS1519: Invalid token '{' in class, struct, or interface member declarationServiceObjectModel AutoCompiler errorCS1519: Invalid token ';' in class, struct, or interface member declarationServiceObjectModel AutoCompiler errorCS0116: A namespace cannot directly contain members such as fields or methodsServiceObjectModel AutoCompiler errorCS1022: Type or namespace definition, or end-of-file expected

Diagnosis

This BAPI has the following structures containing a property with a friendly name starting with a number:

  1. WAREHOUSENUMBERDATA (BAPI_MLGN Type)
  2. WAREHOUSENUMBERDATAX (BAPI_MLGNX Type)

The property in question is called 2STEP_PICK.

10296i5731E54B3769D4B5.png

 

Resolution

  1. Rename the property so that it starts with a non-numeric character. Below are examples you can use to change the name to:
    • TWOSTEP_PICK
    • _2STEP_PICK
  2. Click on Update Function to save the changes made on WAREHOUSENUMBERDATA and WAREHOUSENUMBERDATAX.
    10297iEF91C0E3CB9B6775.png
  3. Publish the ServiceObject.

 

 

 

 


0 replies

Be the first to reply!

Reply