Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5985013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:27:57+00:00 2026-05-22T22:27:57+00:00

I’m working on a web service that will create orders in SAP using .NET.

  • 0

I’m working on a web service that will create orders in SAP using .NET. Right now when I run the code below, I receive no errors and no order is created. I was hoping someone could help.

    string message = "";

    // create initial connection
    Z_SALESORDER_CREATE createOrder = new Z_SALESORDER_CREATE();

    try
    {
        NetworkCredential cred = new NetworkCredential("password", "username");

        createOrder.Url = "http://saphost:8010/sap/bc/srt/wsdl/bndg_d0823E1C21F1A334DSE0001555D658D08/wsdl11/allinone/ws_policy/document?sap-client=110";
        createOrder.Credentials = cred;
    }
    catch (Exception ex){
        message = "An error occured." + ex.Message;
    }


    // ORDERS_HEADER_IN
    Bapisdhd1 order_header_in = new Bapisdhd1();
    order_header_in.DocType = "OR";
    order_header_in.CollectNo = "1109512";
    order_header_in.SalesOrg = "10090";
    order_header_in.DistrChan = "100";
    order_header_in.Division = "000";
    order_header_in.DlvBlock = "020";
    order_header_in.PurchNoC = "E-COMM ORDER TEST ORDER";

    // ORDER_ITEMS_IN
    Bapisditm order_items_in = new Bapisditm();
    order_items_in.ItmNumber = "198295";
    order_items_in.Material = "454659";
    order_items_in.GrossWght = 0.003M;
    order_items_in.NetWeight = 0.003M;
    order_items_in.UntofWght = "KG";

    Bapisditm order_items_in2 = new Bapisditm();
    order_items_in2.ItmNumber = "198425";
    order_items_in2.Material = "454664";
    order_items_in2.GrossWght = 0.003M;
    order_items_in2.NetWeight = 0.003M;
    order_items_in2.UntofWght = "KG";

    Bapisditm order_items_in3 = new Bapisditm();
    order_items_in3.ItmNumber = "198725";
    order_items_in3.Material = "454647";
    order_items_in3.GrossWght = 0.003M;
    order_items_in3.NetWeight = 0.003M;
    order_items_in3.UntofWght = "KG";

    Bapisditm order_items_in4 = new Bapisditm();
    order_items_in4.ItmNumber = "198275";
    order_items_in4.Material = "45696INK";
    order_items_in4.GrossWght = 0.003M;
    order_items_in4.NetWeight = 0.003M;
    order_items_in4.UntofWght = "KG";

    // ORDER_PARTNERS
    Bapiparnr order_partners = new Bapiparnr();
    order_partners.PartnRole = "SP";
    order_partners.PartnNumb = "110512";

    order_partners.PartnRole = "BP";
    order_partners.PartnNumb = "110512";

    order_partners.PartnRole = "PY";
    order_partners.PartnNumb = "110512";

    order_partners.PartnRole = "SH";
    order_partners.PartnNumb = "120109";

    Bapicond order_conditions = new Bapicond();
    order_conditions.ItmNumber = "000010";
    order_conditions.CondStNo = "013";
    order_conditions.CondCount = "01";
    order_conditions.CondType = "ZPRM";
    order_conditions.CondValue = 1;
    order_conditions.Currency = "USD";

    // commit transation
    Bapiret2 commit = new Bapiret2();
    message += commit.Message + commit.MessageV1 + commit.MessageV2 + commit.MessageV3 + commit.MessageV4 + commit.LogMsgNo + commit.LogNo;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:27:58+00:00Added an answer on May 22, 2026 at 10:27 pm

    The issue is that I needed to build an array and insert it into the object. See Below.

    Bapisdhd1 order_header_in = new Bapisdhd1();
    order_header_in.DocType = "OR";
    order_header_in.CollectNo = "1109512";
    order_header_in.SalesOrg = "10090";
    order_header_in.DistrChan = "100";
    order_header_in.Division = "000";
    order_header_in.DlvBlock = "020";
    order_header_in.PurchNoC = "E-COMM ORDER TEST ORDER";
    newOrder.OrderHeaderIn = order_header_in;
    

    I also needed something to tie the zSalesOrderCreate object back to the Z_SALESORDER_CREATE method.

        ZSalesorderCreateResponse res = createOrder.ZSalesorderCreate(newOrder);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
this is what i have right now Drawing an RSS feed into the php,
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I want use html5's new tag to play a wav file (currently only supported
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.