Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Kangkana
Advisor
Advisor
Make a call to the function module /AIF/SEND_WITH_PROXY with the outbound proxy details from the place where the interface  should be triggered.

The code is as shown below

Data: lt_outrecords      TYPE zdt_repair_sales_and_serv_tab3,

lwa_aif_struct     TYPE zaif_repair_sales_and_serviceo.

 

Write the logic to fill the outbound structure fields.

 

IF lt_outrecords IS NOT INITIAL.
CLEAR lt_return.
MOVE-CORRESPONDING lt_outrecords TO  lwa_aif_struct-record EXPANDING NESTED TABLES.

 

CALL FUNCTION '/AIF/SEND_WITH_PROXY'
EXPORTING
ns                       =  "<interface namespcae>" 'OTC_SM'
ifname                =  "<interface name>"    'OB_OTC_RPR'   
ifversion             =  "<interface version>"  '1'
do_commit         = abap_true
TABLES
add_return_tab   = lt_return
CHANGING
sap_struct           = lwa_aif_struct
EXCEPTIONS
persistency_error    = 1
status_update_failed = 2
missing_keys         = 3
interface_not_found  = 4
transformation_error = 5
general_error        = 6
OTHERS               = 7.

IF sy-subrc = 0.
COMMIT WORK.
ENDIF.

 

Once the program are executed that are supposed to trigger the interfaces . The following transactions can be used to check the data .

 

Useful Tips

Tcode: SXMB_MONI - To check the data for the interface. Both inbound and outbound.

Tcode: /AIF/IFMON - for monitoring interfaces messages. Correcting data  and restart the interface . Most useful for correcting  errors happening due data issues for inbound interfaces.

Back to part 1 for AIF configuration steps

https://blogs.sap.com/?p=710949&preview=true&preview_id=710949