Professional Documents
Culture Documents
ABAP Proxy To File On SAP PI 731
ABAP Proxy To File On SAP PI 731
I have done and seen so many Proxy scenarios to File Scenarios. Today I am gonna blog
this scenario using SAP PI 7.31 Java Only Installation. The blog will cover scenario from
newly installed PI 7.31.
http://krisbiantowoo.blogspot.com/2013/04/scenarios-abap-proxy-to-file-on-sap-pi.html
Go and Log in to your SAP ERP. You go to transaction code RZ70. Put and execute as per
below shot
2.2. CREATE FTP TECHNICAL AND BUSINESS SYSTEM
Please create Technical System as per screen shot below and assigned product and
software component on step 1.2.
Add new business system based on created technical system per screen shot below
2.3. ASSIGN INSTALLED SOFTWARE TO TECHNICAL SYSTEM AND BUSINESS SYSTEM
This software assignment will be firstly done for Technical System SEV that created on step
2.1
on SAP ERP, go to transaction code SPROXY. You will find your software component
version inside that transaction.
You should go and look for service interface that will be used by SAP ERP to send. In this
case, it is service interface users_ob.
5.2. CONFIGURE INTEGRATION ENGINE FOR SERVICE INTERFACE ON SAP ERP
on SAP ERP, go to transaction code SXMB_ADM. You will need to do two step:
Please take a note, below program has some unused declaration, but the program is still
working for this scenarios.
*&---------------------------------------------------------------------*
*& Report zbc_downloadusers
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
*====================================================================
===
* DATA DECLARATION
*====================================================================
===
************************************************************************
* TABLES *
************************************************************************
TABLES:usr02.
************************************************************************
* TYPES *
************************************************************************
* Type-pool
TYPE-POOLS: slis.
* Includes
INCLUDE .
INCLUDE .
TYPES:
BEGIN OF ty_message,
msg(132),
END OF ty_message,
BEGIN OF ty_usr02,
bname TYPE usr02-bname,
ustyp TYPE usr02-ustyp,
uflag TYPE usr02-uflag,
aname TYPE usr02-aname,
erdat TYPE usr02-erdat,
trdat TYPE usr02-trdat,
ltime TYPE usr02-ltime,
pwdchgdate TYPE usr02-pwdchgdate,
END OF ty_usr02.
************************************************************************
* VARIABLE *
************************************************************************
DATA: v_repid LIKE sy-repid,
v_datum LIKE sy-datum,
v_time LIKE sy-uzeit,
v_sysid LIKE sy-sysid,
v_name LIKE sy-uname.
************************************************************************
* WORKAREA *
************************************************************************
************************************************************************
* RANGES *
************************************************************************
************************************************************************
* CLASSES *
************************************************************************
DATA: o_users TYPE REF TO zcl_co_users_ob.
*====================================================================
===
* SELECTION SCREEN
*====================================================================
===
SELECTION-SCREEN BEGIN OF BLOCK blok1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: so_bname FOR usr02-bname,
so_ustyp FOR usr02-ustyp.
SELECTION-SCREEN END OF BLOCK blok1.
*====================================================================
===
* INITIALIZATION
*====================================================================
===
INITIALIZATION.
*====================================================================
===
* AT SELECION SCREEN
*====================================================================
===
AT SELECTION-SCREEN.
*====================================================================
===
* START-OF-SELECTION
*====================================================================
===
START-OF-SELECTION.
* get data
PERFORM f_get_user.
*====================================================================
===
* END-OF-SELECTION
*====================================================================
===
END-OF-SELECTION.
*&---------------------------------------------------------------------*
*& Form F_SET_DEFAULT
*&---------------------------------------------------------------------*
* set defalt value
*----------------------------------------------------------------------*
FORM f_set_default .
* Nothing yet
SELECT bname ustyp uflag aname erdat trdat ltime pwdchgdate FROM usr02
INTO TABLE gt_usr02
WHERE bname IN so_bname
AND ustyp IN so_ustyp.
ENDFORM. " F_GET_USER
*&---------------------------------------------------------------------*
*& Form F_SEND_PROXY_USER
*&---------------------------------------------------------------------*
* Send Proxy Users
*----------------------------------------------------------------------*
FORM f_send_proxy_user .
TRY.
CREATE OBJECT o_users
* EXPORTING
* logical_port_name =
.
CATCH cx_ai_system_fault .
ENDTRY.
TRY.
LOOP AT gt_usr02.
CLEAR: gs_usdet, gs_output, gs_users, gs_user.
MOVE-CORRESPONDING gt_usr02 TO gs_usdet.
gs_user-user_detail = gs_usdet.
APPEND gs_user TO gt_user.
ENDLOOP.
gs_users-user[] = gt_user[].
gs_output-users = gs_users.
CALL METHOD o_users->users_ob
EXPORTING
output = gs_output.
CATCH cx_ai_system_fault .
ENDTRY.
IF sy-subrc NE 0.
ROLLBACK WORK.
WRITE : text-i01. "'Users data cant sent to XI'.
ELSE.
COMMIT WORK.
WRITE : text-i02. "'Users sent successfully to XI'.
ENDIF.
6. Testing
6.1. SAP ERP SEND AND MONITOR
a. Execute Program on Step 5.3
b. Check on SXI_MONITOR
There are some other way to see the message in SAP PI 7.31. One of that can be seen in
below screen shot.
this is through configuration and monitoring -> adapter engine -> Message monitoring.
6.3. FTP SERVER SIDE