Skip to Content
0

RFC Lookup

Sep 21, 2017 at 09:23 AM

51

avatar image
Former Member

Hi

I am new to PI i have the requirement like i need to implement the RFC Lookup in file to file scenario i have gone through some blogs but i didn't proper answer so can any one explain it step by step .

Thanksℜgards

Ramesh

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Peter Wallner Sep 22, 2017 at 06:47 AM
1

Hi Ramesh,

1. create a function module: make sure it is remote enabled

source code:

FUNCTION ZPI_READ_MARM_TAB.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(PI_MATERIAL) TYPE MATNR
*" EXPORTING
*" VALUE(ET_MARM) TYPE MARM_TAB
*" EXCEPTIONS
*" NOT_FOUND
*"----------------------------------------------------------------------


DATA:
ld_matnr TYPE matnr
.

CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = pi_material
IMPORTING
output = ld_matnr
EXCEPTIONS
length_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.


CALL FUNCTION 'MARM_GENERIC_READ_WITH_MATNR'
EXPORTING
* KZRFB = ' '
MATNR = ld_matnr
* MAXTZ = 0
TABLES
MARM_TAB = et_marm
* MEINH =
* O_MARM_TAB =
* O_MEINH =
EXCEPTIONS
WRONG_CALL = 1
NOT_FOUND = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
raising not_found.
ENDIF.



ENDFUNCTION.

then is the big question: do you use graphical mapping in SAP PI/PO or XSLT?

Best regards, Peter


bvxca.png (12.0 kB)
7qnvq.png (20.5 kB)
nlrpq.png (9.7 kB)
in60i.png (12.1 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Sep 25, 2017 at 06:49 AM
1

Thanks a lot for your reply

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Sep 25, 2017 at 06:09 AM
1

Hi Ramesh,

nicely explained by peter about rfc lookup..

Please if you can not avoid rfc look up, you may opt to go for proxy lookup which is far better compared to RFC lookup .

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hello,

Is there a blog on how Proxy Lookup works?

Thank you, Peter

0
Former Member
0