cancel
Showing results for 
Search instead for 
Did you mean: 

Java Mapping

Former Member
0 Kudos

Hi all,

I have so far used Message Mapping. I want to explore the options of Java Mapping.

Can someone please point me to a document that can be a starting point for Java Mapping.

I have read the documents available in help.sap.com

Looking forward to a Tutorial type of document.

Thank you in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member192798
Active Contributor
0 Kudos

Hi Sabbir,

Go thro' these blogs:-

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii

/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii

/people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping

http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm

I hope this helps.

Praveen

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sabbir,

This is chandrasekhar,I have done few Mapping Scenarios using java mapping.

Steps:

1)you need to use any parsing Technique either DOM Or SAX.

2)Develop your java class with out main method in Netweaver Developer stdio.

3)Need to create a jar file in the Cmd(commond line promot.

Commond for creation of jar cf name.jar filename.class

4)import your jar file in to IR.you can see Imported Objects under software component.Right click on the Imported Object and select New and enter the name and browse your jar file and select the corresponding jar file which you created and click save and activate.

5)when you are doing Interface Mapping you need to select as Java calass and select the Mapping program and after the process is same as normal.

If you have any doubts please let me know I can very welcome to receive your queries.

Thanks and Regards,

Chandu

Former Member
0 Kudos

Dear Chandrasekhar,

Your instructions are very clear and helpful.

I am transfering data from R3 (RFC Adapter) to BW (XI Adapter).

The followings are the source and target XML format.

This is a simple one to one mapping.

So, message mapping works fine for us.

Just out of curiousity and for learning,I want to do a Java Mapping for the same task.

Now, would you have any example (source code) suitable for such a simplified scenario.

Thank you in advance.

-


Source -


<?xml version="1.0" encoding="UTF-8" ?>

- <rfc:Z_XI_ZACR24 xmlns:rfc="urn:sap-com:document:sap:rfc:functions">

- <XI_ZACR24>

- <item>

<DATETIMESTAMP>20061106051010.6148680</DATETIMESTAMP>

<SEQUENCE>001</SEQUENCE>

<TABNAME>ZACR24</TABNAME>

<RECORD_INDICATOR>U</RECORD_INDICATOR>

<RECORD_STATUS>S</RECORD_STATUS>

<MANDT>100</MANDT>

<TREATMENTSTATUS>REG</TREATMENTSTATUS>

<TREATSTATUSTEXT>Registered</TREATSTATUSTEXT>

<REPORTONLY />

</item>

- <item>

<DATETIMESTAMP>20061106051010.6148680</DATETIMESTAMP>

<SEQUENCE>002</SEQUENCE>

<TABNAME>ZACR24</TABNAME>

<RECORD_INDICATOR>U</RECORD_INDICATOR>

<RECORD_STATUS>S</RECORD_STATUS>

<MANDT>100</MANDT>

<TREATMENTSTATUS>APPR</TREATMENTSTATUS>

<TREATSTATUSTEXT>Approved</TREATSTATUSTEXT>

<REPORTONLY />

</item>

</XI_ZACR24>

</rfc:Z_XI_ZACR24>

-


Traget----


<?xml version="1.0" encoding="UTF-8" ?>

- <ns0:_-BI0_-QI6AXC_D0001_RFC xmlns:ns0="urn:sap-com:document:sap:rfc:functions">

<DATASOURCE>6AXC_D0001</DATASOURCE>

- <DATA>

- <item>

<_-BIC_-X_DTSTAMP>200611060652380000680</_-BIC_-X_DTSTAMP>

<_-BIC_-X_SEQ_NO>001</_-BIC_-X_SEQ_NO>

<_-BIC_-X_TBL_NAM>ZACR24</_-BIC_-X_TBL_NAM>

<_-BIC_-X_XRP_IND>U</_-BIC_-X_XRP_IND>

<_-BIC_-X_XRT_STA>S</_-BIC_-X_XRT_STA>

<_-BIC_-XSCLIENT>100</_-BIC_-XSCLIENT>

<_-BIC_-XCGTR_STA>REG</_-BIC_-XCGTR_STA>

<_-BIC_-XCGTRTXTM>Registered</_-BIC_-XCGTRTXTM>

<_-BIC_-XCGTR_SRO />

</item>

- <item>

<_-BIC_-X_DTSTAMP>200611060652380000680</_-BIC_-X_DTSTAMP>

<_-BIC_-X_SEQ_NO>002</_-BIC_-X_SEQ_NO>

<_-BIC_-X_TBL_NAM>ZACR24</_-BIC_-X_TBL_NAM>

<_-BIC_-X_XRP_IND>U</_-BIC_-X_XRP_IND>

<_-BIC_-X_XRT_STA>S</_-BIC_-X_XRT_STA>

<_-BIC_-XSCLIENT>100</_-BIC_-XSCLIENT>

<_-BIC_-XCGTR_STA>APPR</_-BIC_-XCGTR_STA>

<_-BIC_-XCGTRTXTM>Approved</_-BIC_-XCGTRTXTM>

<_-BIC_-XCGTR_SRO />

</item>

</DATA>

</ns0:_-BI0_-QI6AXC_D0001_RFC>

Sabbir

Former Member
0 Kudos

Sabbir,

Give me your mail id. I have some good docs. on that.

Regards,

Jai Shankar.

Former Member
0 Kudos

Hi Jai,

Thank you very much for the offer.

My email is sabbir.ahmed@watercorporation.com.au

Thank you again.

Sabbir

Former Member
0 Kudos

Sabbir,

Check your mail. The doc will contain all you need to know(including sample program).

Let me know if you need more help on this.

Regards,

Jai Shankar.

Former Member
0 Kudos

Sorry Jai,

I did not get the docs. Can you please email me the docs again.

My email is : Sabbir.Ahmed@watercorporation.com.au

Alternative email is: nawrin.shefa@gmail.com

Thank you very much.

Sabbir

Former Member
0 Kudos

Sabbir,

Check it now...

Regards,

Jai Shankar.