Skip to Content
avatar image
Former Member

SAP .NET Connector help

Hi All,

I'm quite new to the SAP .NET connector (and SAP in general). I am trying to access warehouse stock through a BAPI, but the tables keep returning 0 entries. I'm not certain if I'm doing something wrong with the function call - maybe someone could point me in the right direction.

Here is the call I am making:

proxy.Bapi_Whse_Stock_Get_List(null, "DT07-10U1-000", 0, null, "US01", null, null, null, null, null, "001", ref theTable, ref keyTable, ref anoTable);

From what I understand, the QUANTKEYTable should return a quant key which I can use in the Bapi_Whse_Stock_Get_Detail method.

Thanks,

Alan

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Feb 27, 2006 at 08:20 AM

    Some points to consider:

    - All tables you want values to receive must be initialized - at least empty, e.g.

    QUANTKEYTable keyTable; // keyTable will allways stay empty
    QUANTKEYTable keyTable = new QUANTKEYTable(); // keyTable will be filled.

    - Be sure that all input parameters are filled as expected by the function. If it works in SE37, it does not necessarily mean that is works with NCo, because SE37 automatically changes or adds input paramters according to there type defintion.

    Executing the function with APAP debugging helps, because you see the difference of the input parameters.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 29, 2007 at 09:05 AM

    We spent a lot of time with debugging a similar problem on the SAP and .NET components. We got the right values back in SE37 and received only "0" via NCO. Finally we found out that SE37 automatically filled the input variable up to the required length which NCO does not.

    So my tip as referred to input variables transferred to SAP via NCO: Check the exact data type definition and field length via SE11, verify that you submit the variable in the right length to SAP and see also initial values of the used data types in http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb2fcc358411d1829f0000e829fbfe/frameset.htm

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 28, 2008 at 09:26 AM

    Hi Alan!

    I think Reiner is correct. Don't forget to create the Table object, because an null variable won't be filled. That simple!

    (please reward point if usefull)

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 01, 2008 at 03:08 PM

    Hi,

    I am at the same situation,

    I am able to connect to the SAP Database, Could get the values in the SAPTable.

    I could see the count of the Rows/Cloumns also. But when i try to print the values, it is not.

    And also i want to bing this values to the ASP.Net Datagrid. I am not able to do this.

    Kindly let me know what could be the possible errors.

    Regards,

    Prasanna.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 01, 2008 at 07:17 PM

    Hi Experts,

    Can any one tell me, what is the BAPI functions to find the Warehouses, and Items in the warehouse

    Thanks In advance,

    bye,

    Prasanna.

    Add comment
    10|10000 characters needed characters exceeded