Skip to Content
avatar image
Former Member

Java UDF Mapping from RFC export to XSD

Hi experts! (excuseme for my non good english)

I have a RFC ( the RFC is imported in PI ) and i need to create a mapping for a XSD imported in PI:

I make a RFC lookup in PI, and i see the import / export from the RFC.

The source

(these are a struture example from the RFC in the RFC Lookup)

The target XSD:

if i do the mapping over the "E_CLIENTE" export from the RFC i have the next result:

But i don't need the E_CLIENTE tag name, the xml result go to a MQ and the other system is seeking for cliente and the information, not for cliente->E_CLIENTE ...

Seeking in the web i found the best result must be do a UDF for the mapping...

Can you helpme with links of examples about how to make a java mapping from RFC to XSD or similar?

thanks in advanced.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Jul 13, 2016 at 12:57 AM

    Hi Juan,

    You need to have a mapping for E_CLIENTE. See the example below except that the node is called item

    Graphical RFC Lookup and How you can design lookups for multiple values to be retrieved in a single call

    Even if you use a JCo call via UDF, the request rfc XML still needs E_CLIENTE otherwise it will not work e.g

    <Cliente>

    <E_CLIENTE>

    <FIRSTNM/>

    </E_CLIENTE>

    </Cliente>

    The reason for this is that to use FIRSTNM, CODIGOPOSTAL etc, E_CLIENTE has to exist first. If you really don't want to map E_CLIENTE, change the definition of the RFC in the backend for E_CLIENTE to be mandatory and maxOccurs = 1. You would also lose the functionality to have multiple values retrieved though.

    Regards,

    Mark

    Add comment
    10|10000 characters needed characters exceeded

    • I see.

      If I were you I would change the design a bit (a lot) 😊

      in high level, in the place that you call outbound proxy (on CRM side) I would call the function module you use for RFC lookup and feed outbound proxy with returned data by RFC (so outbound proxy should contain (more or less) same/similar structure as export parameters of your RFC lookup).

      So instead of RFC lookup in message mapping, you will receive already data "after lookup" then your mapping will be simple ...

      Regards,

      /k

  • Jul 13, 2016 at 01:57 AM

    Juan,

    I'm slightly confused about your scenario ...

    Is it

    • RFC -> PI -> MQ (XSD)

    or it is

    • sth -> PI (RFC lookup) -> MQ (XSD)

    ?


    How does your XSD target structure look like?

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 13, 2016 at 08:47 PM

    hi Jaun,

    Are you making the RFC call from PI to CRM or ECC ? If it is CRM, why can't the data be enriched while sending from CRM?

    Ambrish

    Add comment
    10|10000 characters needed characters exceeded