Wednesday, January 10, 2007

A banal one v2.0

Please don't blame me for this one either...

If you are not sure how to automatically retrieve correct OLTP RFC destination, try this:

* rfc
DATA: lv_rfcdest TYPE rfcdest,
lt_erpsites TYPE STANDARD TABLE OF smof_erpsh,
ls_erpsites TYPE smof_erpsh.

CALL FUNCTION 'SMOF_READ_SMOFERPSH'
TABLES
t_erpsites = lt_erpsites.

READ TABLE lt_erpsites INTO ls_erpsites
WITH KEY sitetypeid = 'SMOF_ERPSITE'.
IF sy-subrc = 0.
lv_rfcdest = ls_erpsites-rfcdest.
endif.
** ^^

0 Comments:

Post a Comment

<< Home