Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

select data in an other database

Former Member
0 Likes
491

Hello

My program is in a system, and i want to select data from EKKO table in an other database system like that :

select SINGLE ebeln

g_ebeln

FROM ekko

      • from system SAP DH4_020 *****

WHERE ebeln = gs_poheaderc-po_number.

How can I do?

thank you in advance.

Peggy.

Hello

My program is in a system, and i want to select data from EKKO table in an other database system like that :

select SINGLE ebeln

g_ebeln

FROM ekko

      • from system SAP DH4_020 *****

WHERE ebeln = gs_poheaderc-po_number.

How can I do?

thank you in advance.

Peggy.

3 REPLIES 3
Read only

dani_mn
Active Contributor
0 Likes
449

HI,

from selection of data from other R/3 systems, you need RFC enabled function module.

create a function module and make it remote enabled. then give the server name in destination parameter.

Regards,

HRA

Read only

Former Member
0 Likes
449

Hello,

For this u have to create a RFC Enabled Func. Module.

Try like this

CALL FUNCTION <b>'Z08V_RA_D_P38ORD_FM'</b> DESTINATION 'D38_011'

EXPORTING

I_VBELN = P_VBELN

TABLES

IT_VBAK = G_T_HEADER

EXCEPTIONS

TEST1 = 1

OTHERS = 2.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF

The FM which is mentioned here should be created in the destination sytem. ie) the system from where u are getting the DATA from EKKO.

If useful reward.

Vasanth

Read only

andreas_mann3
Active Contributor
0 Likes
449

hi,

1) get the table ekko with fm TABLE_ENTRIES_GET_VIA_RFC

2) get your item with read table from the imported itab

A.

Message was edited by: Andreas Mann