Skip to Content
author's profile photo Former Member
Former Member

BAPI Tables and XMLSerialize

I am using the .NET connector with C# and doing a proof of concept calling the bapi Bapi_Customer_Getdetail, which is working great. My problem is, I want to serialize the contents of the BAPIKNA101 table to an XML document. I have produced the XML file, but there is only one problem with how it is doing this. For attributes of the BAPIKNA101 table that have an underscore in the name, the serialization puts the characters ' 5f' in. For example, here is the 'POSTL_CODE' node: <POSTL_ 5fCODE>2500 BG</POSTL_--5fCODE>. Here is a short piece of code doing the serialization:

sap_proxy.Bapi_Customer_Getdetail(CustomerNo,

null, null, null, "1", out tab_kna1, out tab_return);

XmlSerializer objSr = new XmlSerializer(typeof(BAPIKNA101));

TextWriter writer = new StreamWriter(@"c:\sr.xml");

objSr.Serialize(writer, tab_kna1);

Any help would be great. I will see how the responses here are, I may need to take this to a C# forum.

Thanks.

Don

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on May 12, 2005 at 02:20 PM

    Please install the patch from OSS note 506603 and regenerate (right-click .sapwsdl file and say "Run custom tool". This will fix the problem with the XML attributes.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.