Portal role creation using the Generic Creator service
The Generic Creator is a set of methods that allow for portal role creation based on a specially formatted XML string. The documentation can be found http://help.sap.com/saphelp_nwce711/helpdata/en/44/37fc5cfe770a63e10000000a422035/frameset.htm. The idea is to build an XML string that defines your PCD object and then invoke a method to execute the XML string.
The Web Page Composer allows a portal user to build their own web page within the portal. That process is well documented, but the final step is a bit cumbersome. The user needs to select a pointer to their site and then build or maintain a portal role to link to that pointer. This requires some portal content administration skills which are beyond what an end user should need.
So, I thought I’d put together a portal component that allows a portal user to build their own role which automatically provides the link to their WPC site.
To keep it as simple as possible, I don’t allow the user to pick things like the role name or location. All they can select is the WPC site. This is provided in a drop down list which is generated by walking the KM structure under /wpccontent/Sites looking for navigation.wpc files.
At run time the user will see something like:
The XML string I build makes a PCD folder under the top level PCD with an id of user_ plus the user id. The name of the folder is the user id. Inside there I make a folder for the roles and in that folder I create the role iteself. The id of the role is the user id plus _wpc_role.
Inside the role we make an entry point folder with the name Web Page Composer and under that folder we make a folder with the external connector set to the WPC site.
The generated role might look like this in the portal content studio.
There is a wiki page which contains the code. It can be found at https://wiki.sdn.sap.com/wiki/display/Snippets/Portal+component+to+build+a+role


Nice blog. I think we can implement the same using Excel sheet with macro coding easily.
Regards,
Surya
link here.