cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to extract data from ECC to CRM systems?

sap_beginner98
Explorer
1,103

I want to extract data from ECC Systems into CRM Systems

From ECC, I want to fetch some fields from a table and i need to display it in CRM report program.

Required: In CRM program, data fetched from ECC - I want some of those fields to be as input in selection screen

and output also

description: In ECC,from lips table i want some fields to be extracted to crm

Accepted Solutions (1)

Accepted Solutions (1)

michael_piesche
Active Contributor

sap_beginner98, it all depends on your requirements and the already available functionalities:

  • Look for Middleware download objects (escpecially if it is SAP customizing or SAP standard tables)
  • Look for RFC functions (especially if it is SAP standard data based on multiple standard tables)
  • Use the RFC_READ_TABLE function for accessing table entries based on a query, you can use several RFC_READ_TABLE calls to combine/join data from multiple tables (use primary key or secondary key index with full or partial key access, especially for large db-tables)
  • Write a RFC function module in ERP that solves your requirement and call it from CRM

In your special case of accessing LIPS, I would recommend to use RFC_READ_TABLE:

DATA myrfcdest   TYPE rfcdest .
DATA myrfctable  TYPE dd02l-tabname .
DATA mydelimiter TYPE char1 VALUE '|'.  "#EC NOTEXT .
DATA myoptions   TYPE TABLE OF rfc_db_opt.
DATA myfields    TYPE TABLE OF rfc_db_fld.
DATA mydata      TYPE TABLE OF tab512.
DATA option      TYPE rfc_db_opt.
DATA field       TYPE rfc_db_fld.

" ... 
field-fieldname = '...'.
INSERT field INTO TABLE myfields[].
" ...

" if you have a range object 
" you can use FM CRS_CREATE_WHERE_CONDITION and RSAN_UT_FILTER_BUILD_SQL_WHERE to create a sql where condition 
" be aware, both FMs are not released though, so maybe 'copy' the logic instead

"...
option-text = '...'.
INSERT option INTO TABLE myoptions[].
"...

CALL FUNCTION 'RFC_READ_TABLE'
      DESTINATION myrfcdest
      EXPORTING
        query_table           = myrfctable
        delimiter             = mydelimiter  " otherwise concatenated based on type length
*       NO_DATA               = ' '
*       ROWSKIPS              = 0
*       ROWCOUNT              = 0
      TABLES
        options               = myoptions[]  " select-options
        fields                = myfields[]   " fields from table to be selected
        data                  = mydata[]     " returned data
      EXCEPTIONS
        table_not_available   = 1
        table_without_data    = 2
        option_not_valid      = 3
        field_not_valid       = 4
        not_authorized        = 5
        data_buffer_exceeded  = 6
        communication_failure = 7
        system_failure        = 8
        OTHERS                = 9.

Answers (0)