cancel
Showing results for 
Search instead for 
Did you mean: 

Java UDF Mapping from RFC export to XSD

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

ambrish_mishra
Active Contributor
0 Kudos

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

turmoll
Active Contributor
0 Kudos

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?

Former Member
0 Kudos

Hi Jakub,

My scenario is:

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

tks.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Juan,

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

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

Former Member
0 Kudos

The calling to PI is at change of status in the workflow (via APAB Proxy)

My scenario (at high level) is :

SAP CRM (in change of status at document) -> ABAP Proxy (with a number as input) -> PI (PI does the RFC lookup) -> MQ

The CRM RFC have more or less 100 data export (grouped by structures or tables), but the "PI RFC LOOKUP" can only map a maximun of 78 .

Is a good idea create two or three "RFC LOOKUP" in my message mapping?

turmoll
Active Contributor
0 Kudos

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