Skip to Content
avatar image
Former Member

Unable to Download SAP TABLE DATA to MS ACCESS

Dear Experts,

SAP has provided a standard Program RIACCESS which creates the similar database table in MS Access.I have followed all the steps mentioned in the help document attached below ;

1.Use the standard ABAP program "RIACCESS.” 
2.Before using the program "RIACCESS,” you need to install the PS utilities, which are part of SAPGUI install CD. 
3.Then do the followings : 
a.Select transaction code SALE -> Systems in network-> Define RFC Destination. 
b.You will need two RFC destinations (TCP/IP connections for the front-end workstation).

Here , I Have Setup the two RFC destinations PS_ACCESS_1 and PS_ACCESS_2 and you'll have to get them to point to  wdpsastr.exe and wdpsatab.exe respectively.

c.Then execute RIACCESS and choose PS_ACCESS_1 to generate access tables.  

4.The system must also be able to access the RFC-DLL files (librfc2.dll, librfc3.dll, librfc4.dll, librfc5.dll, librfc6.dll, vrfc.dll).  

After completing Step 3a and 3b, and when I execute 'RIACCESS' with Input to the selection Screen as below

PC database	: C:ZTEST.MDB
RFC destination	: PS_ACCESS_1
Lang.           : EN
Table name      : ZTEST
Download and log: Both

 <b>I am getting the error ' Object required ' & the pgm gets cancelled . </b> . 
I debugged RIACCESS & found one function MSACCESS_STRUCT_EXPORT_RFC which Is supposed to create the table , Intrestingly I find  there is no source code in this FM . 

Can somebody Please help me in solving this problem & creating the same table in Access ?

Thanks Experts in Advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

8 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 10, 2005 at 07:08 PM

    Hi,

    This is caused due to the files Wdpsastr.exe & Wdpsatab.exe. Download the lates version of these files

    attached to OSS note 826163 and replace the files on your PC with these new files . Hope this helps.

    Cheers.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 10, 2005 at 05:02 PM

    Hi Ranjan,

    Function module without source code is not a problem, because this is just for defining the interface for the RFC. Actual implementation is on the frontend.

    Are you sure you have a table ZTEST in your SAP system ?

    Cheers,

    Sanjeev

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Jagdeesh,

      There is a problem in your passing parameters to your function module .

      The correct parameter for this export of table to MS access is <b>DEST = 'PS_ACCESS_2'</b>

      CALL FUNCTION 'TABLE_EXPORT_TO_MSACCESS'
      EXPORTING
      DBNAME = 'C:jmk.mdb'
      <b>DEST = 'PS_ACCESS_2'</b>
      TABNAME = 'ZSTRUC'
      * REFTABLE = 'ZTEST'
      * FLG_NO_DOWNLOAD = ' '
      * FLG_APPEND = 'X'
      * FLG_POPUP = 'X'
      TABLES
      DTAB = LT_DATA_TABLE
      EXCEPTIONS
      WRONG_FORMAT = 1
      STRUCT_TOOLONG = 2
      UNKNOWN_DATATYPE = 3
      SYSTEM_FAILURE = 4
      COMM_FAILURE = 5
      OTHERS = 6 .

      Let me know if you still have problems .

      Cheers

  • avatar image
    Former Member
    Sep 13, 2005 at 05:19 PM

    Hi ,

    Any luck with the OSS notes.

    Cheers.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Sanjay,

      Currently the place i am working at does not have an OSS system and I have applied for an OSS login.

      I request you sir, if you can provide me a document of the OSS note if possible on my email id - ranjanmr@gmail.com.

      Thanks in Advance,

  • avatar image
    Former Member
    Sep 14, 2005 at 05:33 AM

    Send the attachment in your mail.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi RMR.

      I am also having difficulty in using 'TABLE_EXPORT_TO_MSACCESS' and 'TABLE_EXPORT_TO_MSACCESS_RFC'.

      Here is my code for 'TABLE_EXPORT_TO_MSACCESS':

      CALL FUNCTION 'TABLE_EXPORT_TO_MSACCESS'

      EXPORTING

      dbname = 'C:\TEST.MDB'

      langu = sy-langu

      dest = 'PS_ACCESS_2'

      tabname = 'PERSON'

      • REFTABLE = 'PERSON'

      • FLG_NO_DOWNLOAD = ' '

      • FLG_APPEND = ' '

      • FLG_POPUP = 'X'

      TABLES

      dtab = zpm_it_test

      • EXCEPTIONS

      • WRONG_FORMAT = 1

      • STRUCT_TOOLONG = 2

      • UNKNOWN_DATATYPE = 3

      • SYSTEM_FAILURE = 4

      • COMM_FAILURE = 5

      • OTHERS = 6

      .

      IF sy-subrc <> 0.

      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

      ENDIF.

      My Access DB is 'C:\TEST.MDB'.

      My table is Person.

      I have tried the dest as 'C:\TEST.MDB' or 'PS_ACCESS_2'.

      I get an internal error when I try to use this FM.

      Here is my table in MS Access:

      Table Person.

      Field1: ID type Number, Field Size Integer

      Field2: Age type Number, Field Size Integer

      Field3: Name type Text (Primary key), Field Size 50.

      Here is my global(defined in Dictionary)internal table:

      Table zpm_it_test.

      Field1: ID type INT1, Length 3

      Field2: Age type INT1, Length 3

      Field3: Name type C, Length 50

      The internal table has a standard key, thus name would be the key.

      Any help will be greatly appreciated!

  • avatar image
    Former Member
    Sep 15, 2005 at 04:18 AM

    You mail server rejected attachment . Any other mail id.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Dear Experts,

      From the program RIACCESS, <b>I am able to download the Structure of the table </b> TO MS-ACCESS. But I am <b> unable to Download the data </b> within the SAP table into MS access.

      One of the SDN expert had mentioned to useTABLE_EXPORT_TO_MSACCESS to download the data from the ITAB to MS ACCESS, which I used but unable to get the results.

      Please see my code below.

      FIRST I EXECUTED RIACCESS TO CREATE THE STRUCTURE.
      SECOND I EXECUTED ZTEST1 TO DOWNLOAD THE DATA INTO THE STRUCTURE CREATED.
      REPORT ZTEST1 .
      
      * Data declaration
      DATA : IT_ZTEST LIKE ZTEST OCCURS 0 WITH HEADER LINE.
      DATA : N TYPE I.
      
      START-OF-SELECTION.
      
        CLEAR: IT_ZTEST, IT_ZTEST[].
        SELECT * FROM ZTEST INTO TABLE IT_ZTEST.
      
      DESCRIBE TABLE LINES N.
      IF N > 0.
      
        CALL FUNCTION 'TABLE_EXPORT_TO_MSACCESS'
          EXPORTING
            DBNAME          = 'C:ZTEST.MDB'
            DEST            = 'C:ZTEST.MDB'
            TABNAME         = 'ZTEST'
      *     REFTABLE        = 'ZTEST'
      *     FLG_NO_DOWNLOAD = ' '
      *     FLG_APPEND      = 'X'
            FLG_POPUP       = 'X'
          TABLES
            DTAB            = IT_ZTEST
         EXCEPTIONS
           WRONG_FORMAT     = 1
           STRUCT_TOOLONG   = 2
           UNKNOWN_DATATYPE = 3
           SYSTEM_FAILURE   = 4
           COMM_FAILURE     = 5
           OTHERS           = 6  .
        IF SY-SUBRC <> 0.
      * ERROR MESSAGE
        ENDIF.
      ENDIF.
      
      <b>
      Please help me , how should i download the data of ztest into MS ACCESS ? </b>
      
      Thanks in Advance.
      
      

  • avatar image
    Former Member
    Apr 04, 2007 at 11:19 AM

    I have the same problems:

    - I downloaded the latest version (MS Access 2.03).

    - Set up the TCP/IP respectifly the RFC connection to the new files, after I copied them to the SAPGUI...PS/ACCESS/ dir

    - The test is successful

    - I start the report RIACCESS via se38.

    Exporting the Tablestructure via PS_ACCESS_1 works fine.

    Then, I go back change PS_ACCESS_1 to PS_ACCESS_2 and it does not work.

    It just says, 'Program aborted' - Errornote JO 703

    Things to do - Call SAP hotline.

    Help pls.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Send me your code. I can take a look at it and correct your code.

      In my case : - The code is working fine and am able to download data from SAP to MS-Access.

      Thanks

  • avatar image
    Former Member
    Mar 03, 2008 at 10:49 AM

    Special Thanks to Sanjay Sinha . His inputs were good to resolve and also the OSS ID.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 10, 2009 at 05:37 AM

    Dear Experts,

    Well with using 'TABLE_EXPORT_TO_MSACCESS' am able to download data to MS access at specific local location.

    The code is below..

    CALL FUNCTION 'TABLE_EXPORT_TO_MSACCESS'

    EXPORTING

    dbname = 'C:\SAPTEST.MDB'

    langu = sy-langu

    dest = 'PS_ACCESS_2'

    tabname = 'ZOZEKIMESSAGEOUT'

    TABLES

    dtab = ozekimessageout[] .

    But My requirement is that my database location is at on the other PC with XP operating system,

    so with this parameter

    dbname = '
    172.58.0.36\C\SAPTEST.MDB'

    am be able to download the data to that PC. but as its of XP operating it prompt me for user name and password that i do not want so what to do in that situation. Any parameter can be passed with dbname.

    Hope will get help soon,

    Regards,

    Sameer

    Add comment
    10|10000 characters needed characters exceeded