Skip to Content

SAP PO/PI - Better Conversions

We are using single stack PO v 7.5 (not sure the SP level). We have setup quite a few conversion UDFs that take data from SAP and convert them into the data the customers needs. This is done at a global level in stead of each individual map for ease of update.


An Example is converting the Partner Profile number to the EDI-X12 ISA/GS ID pair (Sender/receiver). The java code is simple. Return the ISA/GS ID information based on the partner profile number given in the IDOC.

Here is an example UDF that we are using:

public void getEDI_ISA_Info(String[] customer, ResultList senderQualifier, ResultList senderID, ResultList receiverQualifier, ResultList receiverID, Container container) throws StreamTransformationException{

String sysName = getSAPSystemEnvironment(container);
//String[][] info = { {"parameter", "isa05", "06", "07", "08" }, { next set } }

if (customer == null || customer.length == 0)
{
container.getTrace().addWarning ("input: ERROR sysname: " + sysName);
return;
}

//container.getTrace().addWarning ("input: " + customer[0] + " sysname: " + sysName);

// TEST - SetUp
String[][] info = {
{"sysName-customer", "isa05","06","07","08"},
{"Test-1","12","67696876","01","876544356"},
{"Test-2","01","125679","14","123456"},
{"Test-3","12","test1234","01","abdT"} };

String name = (sysName.equals("PRD")? "Prod-": "Test-") + customer[0];
for (int i=0; i<info.length; i++)
{
//container.getTrace().addWarning ("info name = " + info[i][0] + ", name = " + name);
if (info[i][0].equals(name)) {
senderQualifier.addValue (info[i][1]);
senderID.addValue(info[i][2]);
receiverQualifier.addValue (info[i][3]);
receiverID.addValue (info[i][4]);

return;
}
}


However, I was wondering if there was a better way of doing this.

Our company is GMP and FDA regulated, so our PI/PO system is monitored. We have to submit change requests for updating these tables (because it requires a transport). However, if we keep the data external in a File or JDBC (or something else) then we can avoid this paperwork and speed up our processes.

Any advice? Thoughts?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 10 at 10:00 AM

    If you do changes in Integration Directory in Production env. Can you avoid the paperwork? Take a look to ValueMappings. If standard Value Mapping is not adjusting clearly to your requirements keep in mind that exists and API to manage it.

    In a customer's PO I've used ValueMappings with 3,4 different kind of values using separators.

    Add comment
    10|10000 characters needed characters exceeded

    • We have common use Integrated Configuration Object (ICO) objects and maps wherever possible. The Invoice ICO object is used by all customers that we send Invoices to. This includes EDI-X12, EDIFACT, cXML, IDOC, and various other formats. Even within this IDOC object we have common use messsage maps. cXML message map are common to all customers on that particular map. In that one messge map, the identities change based on the customer being sent. The map has to determine which customer and apply the correct information (this data is not stored in SAP nor is it provided in the Idoc). The UDF functions does these translations for all customers (one place to support it all).

      I do not see how value mappings can be used to handle all the situations. I have very little experience with the value mappings or API to know if there is a way to do this, but I will investigate further.

      Thanks for your response.