function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

How to connect sfdc to sap/PI



   I want to connect SFDC to SAP/PI . My scenrio is , if i create a data in sfdc , xml will be display in SAP/PI. Do u have any idea.

please give a solution. I tried generate WSDL file in PI. set PI end point in Apex code(http request) that also not worked.


I tried following way


Apex class :


global class WebServiceCallout123 {
    @future (callout=true)
    WebService static void sendNotification(String EmployeeNo ,String Ename, String Salary) {
     //Set your username and password here
        String username = 'nreddy';
        String password = 'sappi123';
        //Construct HTTP request and response
        HttpRequest req = new HttpRequest();
        HttpResponse res = new HttpResponse();
        Http http = new Http();
         //Construct Authorization and Content header
        Blob headerValue = Blob.valueOf(username+':'+password);
        String authorizationHeader = 'Basic ' + EncodingUtil.base64Encode(headerValue);
        req.setHeader('Authorization', authorizationHeader);
         //Set Method and Endpoint and Body
        System.debug('EmployeeNo -->' + EmployeeNo); 
        try {
           //Send endpoint to JIRA
           res = http.send(req);
        } catch(System.CalloutException e) {


    public static testMethod void testMe() {




trigger InsertEcc on Employee__c (after Insert) {

for(Employee__c s:Trigger.New)
     System.debug('Emp data -->' + s);





please give a solution...


very urgent....




Move this code to the Webservice section ,you have better chances of getting some results.




can u share ur code? my problem is not reaching in SAP/PI