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.
MOVE-CORRESPONDING lt_outrecords TO lwa_aif_struct-record EXPANDING NESTED TABLES.
CALL FUNCTION ‘/AIF/SEND_WITH_PROXY’
ns = “<interface namespcae>” ‘OTC_SM’
ifname = “<interface name>” ‘OB_OTC_RPR’
ifversion = “<interface version>” ‘1’
do_commit = abap_true
add_return_tab = lt_return
sap_struct = lwa_aif_struct
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.
Once the program are executed that are supposed to trigger the interfaces . The following transactions can be used to check the data .
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