cancel
Showing results for 
Search instead for 
Did you mean: 

How to get internal table from SAP Data Provider C#

Former Member
0 Kudos

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 ?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sergey,

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

thanks for your help.

Regards.

Jonathan