Tuesday, February 12, 2013

Today Learning...12-02-2013 Java Package with Java mapping in SAP PI

Today Learning...12-02-2013,

Hello Folks,

Today what i am Learn is that, I asked for help from one of old my team mate regarding java mapping. what she is doing that she want to add some new field in existing  java mapping that mapping is for IDOC to Proxy from SNC to ECC,
 what I got existing java mapping from her and did some changes with reference to existing fields and  create jar file as define in my blog "http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/11/06/adding-carriage-return-or-line-feed-in-xml-file-using-java-mapping-through-command-prompt"  that looks good. but when I create Imported Archive in ID i found there is one difference b/w my jar file and existing jar file that is Path field is not populated u can see screen shot


Original Screen-shot


than I just want to try that whether it is working or not but it is not it is giving me an error class path not found like that. then I open java file the is one statement that is Package statement "package com.sap.aii.mapping.pordcr102;" that is causing the problem then i remove that line and create again jar file and it's working fine.

 And also i find how to use Package once again after a long time i did it in my Engineering . using  this link: "http://www.tutorialspoint.com/java/java_packages.htm" find on Google.

so what i did is, I create a folder like: \com\sap\aii\mapping\pordcr102


and create a java and class file in this folder that java file have that package line that i remove earlier   (package com.sap.aii.mapping.pordcr102;)
and then create jar file using that



Then i upload that new jar file in IR then it' working good .........:)
that way I Learn Old thing in New way thanks to Adi..........:)

Regards
GAGAn





No comments: