XI – Reverse Engineering #2 – Dependencies in SWC & adding a namespace
You can find how to create / modify a Software Component outside Integration Builders in my previous blog, XI – Reverse Engineering #1 – Software Component. You better have a look at it before reading this blog below because it is a continuity of the previous blog.
Jar Dependencies
The only jar file required for using this java API is ojdbc14.jar which can be downloaded from https://download.oracle.com/otn/utilities_drivers/jdbc/9208/ojdbc14.jar for database connectivity.
Table Dependencies for SWC
There are 7 ids (like guids) generated which should be unique throughout XI.
They are as follows (same names used in source code in previous blog):
- ownerrepid
- relationid
- objectid
- versionid
- versionsetid
- versionsetid_2_dev
- versionsetid_1_cons
(Technically swcguid is equal to objectid since the object we are dealing with is SWC)
Below table gives you the complete information for primary key / foreign key relationships in SAP database tables.
Table Name |
Field No |
‘ownerrepid’ is used in the following tables |
|
xi_pdevline |
3 |
‘relationid’ is used in the following tables |
|
xi_pverrelation |
1 |
xi_pversion |
3 |
‘objectid’ is used in the following tables |
|
xi_dircacheevent |
2 |
xi_dircacherclview |
1,3,4(swcguid) |
xi_pverrelation |
4 |
xi_pversion |
2 |
xi_pversionedobj |
1 |
xi_pvsetelement |
2 |
xi_pvsetelemhist |
3 |
xi_repcacheevent |
1 |
xi_repchangelist |
2 |
xi_repdataadmin |
2 |
xi_repkeyswc |
1 |
‘versionid’ is used in the following tables |
|
xi_pverrelation |
8 |
xi_pversion |
1 |
xi_pvsetelement |
3 |
xi_pvsetelemhist |
4 |
xi_repdataadmin |
1,7 |
xi_repdataswcibrep |
1 |
xi_reptexthead |
1 |
xi_reptextshort |
1 |
xi_reptextshort_tx |
1 |
‘versionsetid’ is used in the following tables |
|
xi_pchangelist |
1 |
xi_pverrelation |
2 |
xi_pversionset |
1 |
xi_pvsetelement |
1 |
xi_pvsintegration |
2 |
xi_repchangelist |
1 |
‘versionsetid_2_dev’ (and) ‘versionsetid_1_cons’ is used in the following tables |
|
xi_pdevline |
1 |
xi_pverrelation |
3 |
xi_pversionset |
1 |
xi_pvsetelement |
1 |
xi_pvsetelemhist |
1 |
xi_pvsintegration |
1 |
xi_repswc_fixeddef |
3 (versionsetid_2_dev), 4 (versionsetid_1_cons) |
Screenshot
(Items rounded in red are input parameters for java API and items rounded in blue are generated internally in java API)
Adding a namespace in a SWC
Just add a record in the xi_repdataswc2ns table with the following field values.
- versionid (used in SWC creation)
- order (sequence number)
- namespace (text of namespace)
Hence the app-Implementation code looks like,
(Note: The sequence number starting from ‘0’ just increments for every object created in that SWC)
The API ‘addNamespace’ is provided with the source code in my previous blog
The next blog would be creating a Message Interface. So keep watching…
Disclaimer: This is just for an understanding of how XI objects creation works from Integration builder (to build an alternative for Integration Builder ;-)). Tested and works on XI 3.0 SR1 but using these Java classes will purely be at your own risk.
New NetWeaver Information at SAP.com
Very Helpfull