ServiceObjectModel AutoCompiler error when publishing a Service Object on K2 Visual Studio with BAPI_MATERIAL_SAVEDATA method
kbt158683
PRODUCTIssue
When publishing a Service Object on K2 Visual Studio, the following error is returned:
This errors occurs only BAPI in this service: BAPI_MATERIAL_SAVEDATA.
Symptoms
This error usually occurs because one of the BAPI’s fields or structures have invalid characters in the name. The BAPI is converted to C# classes before it is published and what you see is the compiler complaining about an invalid character. For this particular BAPI, the error is occurring on the property "2STEP_PICK" that exists in the two structures below (in this case a property cannot start with a number):
- WAREHOUSENUMBERDATA - Type "BAPI_MLGN"
- WAREHOUSENUMBERDATAX - Type "BABI_MLGNX"
Troubleshooting Steps
Changing the Friendly name of this property to “_2STEP_PICK” or perhaps “TWOSTEP_PICK”, etc. in both Structures to allow for service object publishing.