cancel
Showing results for 
Search instead for 
Did you mean: 

Editing JAVA archives

former_member223432
Participant
0 Kudos

Hi Guys,

I have requirement to edit JAVA archive used in our mapping...

i am currently using PI 7.1 and we have imported JAVA archive for doing some additional functionality and it is working fine..

Now there is a slight chnage in the requirement and i need to edit the java archive....i have no idea about JAVA.

Can someone help in providing the steps for editing the java archiva and re importing them again.please do provide the steps in detail...its a request..

Your help would really be appreciated.

Thanks

Ayrah

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Aryah,

You cannot edit the JAVA archives. Because they will be in .class format. Instead ask the developer who has done the java mapping to the corresponding .class files.

Then you can edit your java file and re-import it to back to the IR in .class format.

Reference:

http://help.sap.com/saphelp_srm40/helpdata/en/4c/b2ad3de2d76b3be10000000a114084/frameset.htm

http://help.sap.com/saphelp_srm40/helpdata/en/4c/b2ad3de2d76b3be10000000a114084/frameset.htm

Regards

Ramesh

Edited by: Ramesh P on Dec 14, 2011 2:41 PM

former_member223432
Participant
0 Kudos

Hi Ramesh,

I clould see there are 4 entries in the existing imported archive.

sort.class

sort.java

.project

.classpath

And i need to edit the code written in sort.class...how can i edit and reimport back to my mappind...pleae let me know if you have the steps...

your help would be appreciated.

Regards

Ayrah

Former Member
0 Kudos

Hi,

First export the sort.java file and make the edit.

Once you had done editing, generate the .class file i.e., sort.class and again re-import the new class file.

Regards

Ramesh

former_member223432
Participant
0 Kudos

Hi Ramesh,

Thanks for your reply.

have few more doubts please.

i iexported the sort.class into .zip in the desktop and i could see one file GETTARGETDIRECTORY.JAVA in one of the folder which has my code.....should i edit here?

2.After editing is done, how do i generate .class file and import again in PI?

3. Is there anyway i can test my code before i could import in PI.

waiting for your reply..thanks much.

Regards

Former Member
0 Kudos
i iexported the sort.class into .zip in the desktop and i could see one file GETTARGETDIRECTORY.JAVA
 in one of the folder which has my code.....should i edit here?

>>>>>If GETTARGETDIRECTORY.java is the file you want to edit, you can open it in the java editor like eclipse and edit it.

>>>>>Make sure you have taken the backup of the archives.

>>>>>Make sure only you are editing the right file

2.After editing is done, how do i generate .class file and import again in PI?

>>>>>>If run your java file in the editor, it generates the .class file in location when you maintain your project. You can use that one.

3. Is there anyway i can test my code before i could import in PI.

>>>>>If you want to edit you java file, you have to add main() in the java file and test it. Once tested, remove the main() argument.

>>> When you re-importing back make sure all the previous .class files are there!

Regards

Ramesh

Edited by: Ramesh P on Dec 14, 2011 3:13 PM

former_member223432
Participant
0 Kudos

Thank you so much Ramesh...u were very Kind.

I am going to follow watever you ahve mentioned above...will try installing Exclips and run...

wil let you the result...

Thanks

Ayrah

anupam_ghosh2
Active Contributor
0 Kudos

Hi Ayrah,

Look into this article, steps of editing a java file has been explained here. Though the article was written for PI 7.0 , the steps remain same for PI 7.1

http://wiki.sdn.sap.com/wiki/display/XI/BeginnersguidetoJavamappingusingDOMparserinSAPXI

Regards

Anupam