2011 Apr 18 1:26 PM
Hello Abappers,
I have an SAP AII (Auto Id Infrastructure) system based on SAP Netweaver 7.0 EHP1.
Right now it integrates with a ECC system using SAP PI. For one case it calls a standard service interface from SAP AII to create a document in SAP AII.
This particular service is listed in the Enterprise Services Repository in ECC.
I have to create a report program with input parameters which acts as input for that particular service interface.
What all things need to be done to achieve this? How do i call that particular service from ABAP code.
If sample code is available too, that would be very beneficial.3
Thanks.
Warm Regards,
Yogesh Bhatia
Hello Abappers,
I have an SAP AII (Auto Id Infrastructure) system based on SAP Netweaver 7.0 EHP1.
Right now it integrates with a ECC system using SAP PI. For one case it calls a standard service interface from SAP AII to create a document in SAP AII.
This particular service is listed in the Enterprise Services Repository in ECC.
I have to create a report program with input parameters which acts as input for that particular service interface.
What all things need to be done to achieve this? How do i call that particular service from ABAP code.
If sample code is available too, that would be very beneficial.3
Thanks.
Warm Regards,
Yogesh Bhatia
2011 Apr 18 3:03 PM
Hi Yogesh,
As your service interface is listed in ECC box, The service can be viewed in SE80 --> main package --> Enterprise services. here you can see the service interface methods available to you.
You can also test the available method from here.
An Class gets created with the service interface name and the methods gets created for the available functions in the service interface.
Call the required method of the class of service interface in your program with the required parameters. This will execute the service interface in PI system.
In the example below, class YPIDEMOCO_EMPLOYEE_DATA_ECC and method EMPLOYEE_DATA_ECC are created by service interface. The employee details are passed to the service interface by the class method.
Data : proxyobj type REF TO YPIDEMOCO_EMPLOYEE_DATA_ECC.
TRY.
CREATE OBJECT proxyobj.
e_output-MT_EMPLOYEE_ECC-EMP_ID = p_pernr .
e_output-MT_EMPLOYEE_ECC-FIRST_NAME = e_eedata-firstname .
e_output-MT_EMPLOYEE_ECC-LAST_NAME = e_eedata-lastname .
e_output-MT_EMPLOYEE_ECC-DOB = e_eedata-dob .
e_output-MT_EMPLOYEE_ECC-DOJ = e_eedata-doj .
e_output-MT_EMPLOYEE_ECC-SALARY = e_eedata-salary .
CALL METHOD proxyobj->EMPLOYEE_DATA_ECC
EXPORTING
OUTPUT = e_output .
CATCH CX_AI_SYSTEM_FAULT .
ENDTRY.Hope this helps!
Regards,
Ramnivas
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |