executing JCO connection dynamically with netweaver portal ID
We have netweaver portal Id and R/3 ID which are same (Ex M3232) , now I have a webdynpro java application to create SAP PR and for design time I have created JCO with CPIC user ID . When user accessing this application and executes the application , the PR gets created with CPIC user ID . However , I would like the r/3 transcations to be created with the portal logged i UserID (i,e if M3232 access the application PR should get created with R/3 userID (which is same as portal M3232) .
I know SSO is one way . Is there any otherway to implement this ? .
1 )I would like User to map his UserID and password for the R/3 system (to which JCO is connecting ) by himself
2)How to handle in code ---To tell system not to use JCO CPIC login ID but to used mapped userId and Password?
Thanks in advance