cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding tpz file

Former Member
0 Kudos

Hello All,

Is there any Java/ABAP program which reads the .tpz file and displays the total number of objects under tpz file

Regards,

Moorthy

Accepted Solutions (1)

Accepted Solutions (1)

former_member181985
Active Contributor
0 Kudos

Hi, there is already a blog for this on SDN.

[XI Code Sample: Understanding the TPZ file|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417500%29ID1527432650DB00502556176544057793End?blog=/pub/wlg/2798]

Former Member
0 Kudos

Hello Prateek,

I have gone thru this blog. But this is not working for PI 7.0 tpz file. Any idea why

former_member181985
Active Contributor
0 Kudos

what error it is showing when u run...Logically this should work for PI7.0 as well.

Former Member
0 Kudos

Hello Praveen,

Its not exactly error. I have executed this Java program on a tpz file which contains 2 XI objects.

But the output of the java program is returning 0 objects.

The Java program which mentioned in the blog is for 3.0. So is it not going to work for 7.0?

former_member181985
Active Contributor
0 Kudos

I just tested its not properly working for PI7.0 TPZ. May be some code changes might be required.

For me it worked partially. I am getting the output

Total Objects:1624 but not the list.

The java program throws error :

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind

ex out of range: -12

at java.lang.String.substring(String.java:1444)

at tpz_Viewer.main(tpz_Viewer.java:52)

Former Member
0 Kudos

Hello Praveen,

Nice to see your output.

I executed the java program on a tpz file which was transported using File transport.

What is the transport used for the tpz file which you tested

former_member181985
Active Contributor
0 Kudos

even I used TPZ exported using File transport mechanism.

former_member181985
Active Contributor
0 Kudos

I debugged the code. (It worked for me for PI7.0 TPZ file)

In the code, use this for (int i = 0; i < total_objs - 2; i++) instead of for (int i = 0; i < total_objs; i++)

Answers (0)