accessing b2b tpm PD information













SAP_EDI_REC_Sender_ID





-----------

import com.sap.gateway.ip.core.customdev.util.Message;

import java.util.HashMap;

import groovy.json.*;

import com.sap.it.api.pd.PartnerDirectoryService;

import com.sap.it.api.ITApiFactory;

import java.security.MessageDigest;

import java.security.NoSuchAlgorithmException;

import org.osgi.framework.FrameworkUtil;

import com.sap.gateway.ip.core.customdev.util.Message;

import com.sap.it.op.b2b.monitor.api.*;

import com.sap.it.op.b2b.monitor.api.events.*;

import java.nio.charset.StandardCharsets;

import java.time.LocalDateTime

import java.time.format.DateTimeFormatter

import com.sap.it.api.pd.BinaryData;

import groovy.json.JsonSlurper;

def Message processData(Message message) {

    def service = ITApiFactory.getApi(PartnerDirectoryService.class, null);

    if(service == null){

        throw new IllegalStateException("Partner Directory Service not found");

    }

    def headers                      =   message.getHeaders();

    def partnerID = headers.get("ACTUAL_PARTNER_ID");

    def SAP_EDI_REC_Sender_ID = service.getParameter("SAP_EDI_REC_Sender_ID", partnerID , String.class);

    message.setProperty("SAP_EDI_REC_Sender_ID", SAP_EDI_REC_Sender_ID);

    return message;

}

Popular posts from this blog

pss book : శ్రీకృష్ణుడు దేవుడా, భగవంతుడా completed , second review needed. 26th April 2024

pss book: గురు ప్రార్థనామంజరి . completed 21st july 2024

pss book: కధల జ్ఞానము read review pending. 25th june 2024