Skip to Content
avatar image
Former Member

How to get internal table from SAP Data Provider C#

Hello.

ABAP:

   DATA: lt_t001 TYPE TABLE OF t001.
   DATA: url(1000) TYPE c.

  SELECT * INTO TABLE lt_t001 FROM t001.

  CALL FUNCTION 'DP_CREATE_URL'
    EXPORTING
      type                 = 'APPLICATION'
      subtype           = 'X-R3TABLE'
    TABLES
      data                 = lt_t001
    CHANGING
      url                    = url
    EXCEPTIONS
      OTHERS           = 4.

C#:

using SAPDataProvider;
using SAPTableFactoryCtrl;

public void SetDataFromUrl(string url)
        {            
            SAPDataProviderClass p = new SAPDataProviderClass();
            p.SetDataFromURL("APPLICATION", "X-R3TABLE", url);
            ISapDPR3Table tbl = p.GetDataAsR3Table("APPLICATION", "X-R3TABLE");
    
            SAPTableFactoryClass tf = new SAPTableFactoryClass();
            Table tb = (Table)tf.NewTable();

            tb.ISAPrfcITab = tbl.DataTable; // Exception !!!!!!
        }

How to get internal table from SAP Data Provider ?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jan 29, 2014 at 09:43 AM

    Hi Sergey,

    I'm trying to do the same, have you found a solution to solved it?

    thanks for your help.

    Regards.

    Jonathan

    Add comment
    10|10000 characters needed characters exceeded