error when publishing a Service Object on K2 Visual Studio with BAPI_MATERIAL_SAVEDATA method

  • 24 February 2022
  • 0 replies
  • 15 views

Badge +1
 

ServiceObjectModel AutoCompiler error when publishing a Service Object on K2 Visual Studio with BAPI_MATERIAL_SAVEDATA method

kbt158683

PRODUCT
K2 connect
BASED ON
K2 connect (all)
TAGS
K2 connect for SAP
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

When publishing a Service Object on K2 Visual Studio, the following error is returned:

Image

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.

if deselecting the WAREHOUSENUMBERDATA and WAREHOUSENUMBERDATAX structures, you may still have to change the friendly names of those two properties.

0 replies

Be the first to reply!

Reply