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

Using FM 'RFC_GET_TABLE_ENTRIES'

Former Member
0 Likes
1,661

Hi

I've a program who need's read data from another machine.

I've some z's programs that use that FM and i try use it but the result is empty.I call the function by this way...

CALL FUNCTION 'RFC_GET_TABLE_ENTRIES' DESTINATION l_rfcdest " RFC destination of my other machine

EXPORTING

gen_key = l_genkey "VBELN of VBKD

max_entries = 1

table_name = 'VBKD'

TABLES

entries = lt_dadosremote

EXCEPTIONS

OTHERS = 1.

IF sy-subrc NE 0.

  • cf_retcode = 1.

sy-msgid = 'ZSD'.

sy-msgno = '079'.

sy-msgty = 'E'.

sy-msgv1 = l_rfcdest.

EXIT.

ENDIF.

Can somebody help me ?

Thanks

Hi

I've a program who need's read data from another machine.

I've some z's programs that use that FM and i try use it but the result is empty.I call the function by this way...

CALL FUNCTION 'RFC_GET_TABLE_ENTRIES' DESTINATION l_rfcdest " RFC destination of my other machine

EXPORTING

gen_key = l_genkey "VBELN of VBKD

max_entries = 1

table_name = 'VBKD'

TABLES

entries = lt_dadosremote

EXCEPTIONS

OTHERS = 1.

IF sy-subrc NE 0.

  • cf_retcode = 1.

sy-msgid = 'ZSD'.

sy-msgno = '079'.

sy-msgty = 'E'.

sy-msgv1 = l_rfcdest.

EXIT.

ENDIF.

Can somebody help me ?

Thanks

3 REPLIES 3
Read only

former_member156446
Active Contributor
0 Likes
770

Check this[ wiki|https://www.sdn.sap.com/irj/scn/wiki?path=/pages/viewpage.action&pageid=85000499]

Read only

Former Member
0 Likes
770

Hi Richardo,

First you should confirm , whether VBKD table has any entries in destination system.

You should made the following change in your code.

In the following Code,

CALL FUNCTION 'RFC_GET_TABLE_ENTRIES' DESTINATION l_rfcdest " RFC destination of my other machine

EXPORTING

from_key = l_fromkey

max_entries = 10

table_name = 'VBKD'

TABLES

entries = lt_dadosremote

EXCEPTIONS

OTHERS = 1.

IF sy-subrc NE 0.

  • cf_retcode = 1.

sy-msgid = 'ZSD'.

sy-msgno = '079'.

sy-msgty = 'E'.

sy-msgv1 = l_rfcdest.

EXIT.

ENDIF.

You got the required records from destination system.

by

Prasad GVK.

Read only

Former Member
0 Likes
770

Hello Ricardo

Just tried the FM in our systems

Seems to work fine if:

data exists in remote table for the vbeln entered

vbeln is entered in correct format

- if you used parm get_key you must pad vbeln with 0s.

- if you used parm from_key you do not need to pad vbeln.

Regards

Greg Kern