How to get Portal Login User and Its Related BP in CRM?
Hi,
An ABAP Webdynpro program is called in CRM from Portal user by a portal link. How to get the user ID and its related BP in CRM? Thanks!
The portal is integrated with ECC, and all users and BPs are maintained in ECC then replicated to CRM.
Best regards,
Hao
Hi,
Try the below code
IUserFactory userfact=UMFactory.getUserFactory();
IUser user=userfact.getUserByUniqueName(request.getUser().getUserId());
String usrid=user.getUniqueName();
And also you can get the groups assigned to user by using the below code
Iterator groups = user.getParentGroups(true);
while (groups.hasNext()) {
String groupstr = (String) groups.next();
IGroup g = UMFactory.getGroupFactory().getGroup(groupstr);
response.write("Group name "g.getUniqueName()"<br>");
Regards
Suresh
Similar Messages
-
How to get Portal Login user ID and Groups using UME API in JSPDynpages
Hi Experts,
How can I get the portal logged user ID and bsed on that ID need to get his assigend groups.
For this Initially I need to get the logged user ID using UME API.
Can you drop the code to write and display using JSP Dynpages?
Thanks
Venkat.Hi,
Try the below code
IUserFactory userfact=UMFactory.getUserFactory();
IUser user=userfact.getUserByUniqueName(request.getUser().getUserId());
String usrid=user.getUniqueName();
And also you can get the groups assigned to user by using the below code
Iterator groups = user.getParentGroups(true);
while (groups.hasNext()) {
String groupstr = (String) groups.next();
IGroup g = UMFactory.getGroupFactory().getGroup(groupstr);
response.write("Group name "g.getUniqueName()"<br>");
Regards
Suresh -
How to Get the Login Window and/or Bypass Login Items?
Greetings, folks!
This is a silly question, but the old standby of “hold down the shift key” doesn’t work in 10.6.1:
What key(s) need to be pressed to get the LogIn window and then after LogIn, to bypass LogIn Items?
Thanks!!
Richard FairbanksNot here, on a fresh (erased) install.
Pressed either before or after the initial gray Mac appears, the shift key does not access the LogIn screen. It is possible to bypass the account’s LogIn items by holding down the shift key after the LogIn screen has been called and successfully commenced, but how does one call the Login screen when the Mac is normally set up for automatic login?
It used to be the shift key . . .
Thanks! -
How to get selection screen elements and its table reference of a report ?
halo experts
How can I get selection screen elements and its table reference of a report ? . I tried rs_refresh_from_select_options. But I am unable to get the table and field it is referring to
For eg if my selection screen 1000 is
parameters: p_carrid type spfli-carrid,
select-options :s-_connid type sflight-connid.
is there any Fm or method which gives me what are the screen elements( p_carrid and s_connid ) and what table( splfi and sflight ) and field ( carrid and conid )it is referring to ?The following code is an example of how you might dynamically determine all your PARAMETERS and SELECT-OPTIONS variables at run time. The PARAMETERS and SELECT-OPTIONS only point to a dictionary element--not a specific table. Even though you may say "spfli-carrid" or "sflight-connid", the data type really references the dictionary type and not a specific table/structure.
REPORT ZTEST_PROG.
TABLES sflight.
DATA:
screen_tab TYPE STANDARD TABLE OF screen,
wa_screen TYPE screen,
scrn_nm TYPE string,
scrn_leftover TYPE string,
l_type TYPE REF TO cl_abap_typedescr,
typ_nm TYPE string,
typ_pre TYPE string.
FIELD-SYMBOLS <fs_data> TYPE ANY.
PARAMETERS p_carrid TYPE spfli-carrid.
SELECT-OPTIONS s_connid FOR sflight-connid.
INITIALIZATION.
LOOP AT SCREEN.
IF screen-group3 = 'PAR'
OR screen-group3 = 'LOW'.
APPEND screen TO screen_tab.
ENDIF.
ENDLOOP.
START-OF-SELECTION.
LOOP AT screen_tab INTO wa_screen.
ASSIGN (wa_screen-name) TO <fs_data>.
l_type = cl_abap_typedescr=>describe_by_data( <fs_data> ).
IF wa_screen-group3 = 'LOW'.
SPLIT wa_screen-name AT '-' INTO scrn_nm scrn_leftover.
TRANSLATE scrn_nm TO UPPER CASE.
ELSE.
scrn_nm = wa_screen-name.
ENDIF.
SPLIT l_type->absolute_name AT '=' INTO typ_pre typ_nm.
WRITE:
/ 'Screen Name: ', scrn_nm,
/ 'DDIC Type: ', typ_nm.
ENDLOOP.
When you get into defining internal tables you can determine those at run time with cl_abap_structdescr. The following is an example of how you might do that. You can loop through the "components_table" and evaluate each field of the structure in this way.
DATA: structure_reference TYPE REF TO cl_abap_structdescr,
components_table TYPE abap_compdescr_tab,
components_structure LIKE LINE OF components_table.
structure_reference ?= cl_abap_structdescr=>describe_by_data( any_structure ).
components_table = structure_reference->components.
I don't know if this answers any of your questions but I hope that some of it is useful. -
How do I get Portal Login User Details in WD Application
Hi,
Could you please help me out as how to get the user who has logged into the portal.
Regards,
Abilash.Hi,
In you webdynpro location you can use the following code to get the logged in user details.
String strUserName = null;
try {
IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
IUser sapUser = wdClientUser.getSAPUser();
if (sapUser != null) {
IUserAccount[] acct = sapUser.getUserAccounts();
if (acct[0] != null) {
strUserName = acct[0].getDisplayName();
} catch (WDUMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
The following import statements have to be used
import com.sap.security.api.IUser;
import com.sap.security.api.IUserAccount;
import com.sap.security.api.UMException;
import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;
import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;
import com.sap.tc.webdynpro.services.sal.um.api.WDUMException;
Award points if helpful.
Regards,
Sujana -
How to Get input from User and Display it's Value
Hi ,
I need to get 2 inputs from user and to display it's Mutilple Value.
The Below Code is working fine to get 2 Input's from user,but it display a Junk value as a Result .How to
overcome this Problem. I need to display it's Mutilple(a*b) value of "a " and " b".
import java.io.*;
class Mul{
static int a=0;
static int b=0;
static int Count=0;
public static void main(String args[])throws IOException{
BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
do{
a=(char)br.read();
Count++;
b=(char)br.read();
if(Count==2)
System.out.println("The Multiplied Value is "+a*b);
}while(Count<2);
}Changed to Integer but still the problem persists.
import java.io.*;
class Mul{
static int a=0;
static int b=0;
static int Count=0;
public static void main(String args[])throws IOException{
BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
do{
a=(int)br.read();
Count++;
b=(int)br.read();
if(Count==2)
System.out.println("The Multiplied Value is "+a*b);
}while(Count<2);
} -
How to Get Input From User and Display Result
Hi ,
I need to get 2 inputs from user and to display it's Mutilple Value.
The Below Code is working fine to get 2 Input's from user,but it display a Junk value as a Result .How to
overcome this Problem. I need to display it's Mutilple(a*b) value of "a " and " b".
import java.io.*;
class Mul{
static int a=0;
static int b=0;
static int Count=0;
public static void main(String args[])throws IOException{
BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
do{
a=(char)br.read();
Count++;
b=(char)br.read();
if(Count==2)
System.out.println("The Multiplied Value is "+a*b);
}while(Count<2);
}Hi ,
I need to get 2 inputs from user and to display it's
Mutilple Value.
The Below Code is working fine to get 2 Input's from
user,but it display a Junk value as a Result .How
to
overcome this Problem. I need to display it's
Mutilple(a*b) value of "a " and " b".
import java.io.*;
class Mul{
static int a=0;
static int b=0;
static int Count=0;
public static void main(String args[])throws
IOException{
BufferedReader br =new BufferedReader(new
InputStreamReader(System.in));
do{
a=(char)br.read();This line will get you the ascii-value of the typed character.
This line will not get you the value typed in.
Try looking for Integer.parseInt()...
Count++;
b=(char)br.read();
if(Count==2)
System.out.println("The Multiplied Value is "+a*b);
}while(Count<2); -
Problem in getting Portal Mapped user and password in Web Dynpro iView
I am developing a webdynpro iview.My app need to read mapped user and password form a system in Portal runtime.
I used the following codes in my Web Dynpro java program:
IWDClientUser user = WDClientUser.getCurrentUser();
IUser iuser = user.getSAPUser();
IUserMappingService iums = (IUserMappingService)WDPortalUtils.getServiceReference(IUserMappingService.KEY );
// IUserMappingService iums = (IUserMappingService)
// PortalRuntime.getRuntimeResources().getService(IUserMappingService.KEY);
IUserMappingData iumd = iums.getMappingData (systemalias, iuser);
Map map = new HashMap ();
iumd.enrich(map);
String userid = (String)map.get( "user" );
String pwd = (String)map.get ("mappedpassword");
I've add a sharing references in project properties,the value is "PORTAL:sap.com/com.sapportals.portal.prt.service.usermapping.IUserMappingService"
But when I run the iview on my Portal, it goes wrong, the message is:
com.sap.engine.services.deploy.container.DeploymentException: Clusterwide exception: Failed to prepare application ''local/HomePage'' for startup. Reason= Clusterwide exception: Failed to start dependent library ''com.sapportals.portal.prt.service.usermapping.IUserMappingService'' of application ''local/HomePage''. Status of dependent component: STATUS_MISSING. Hint: Is the component deployed correctly on the engine?
at com.sap.engine.services.webdynpro.WebDynproContainer.prepareStart(WebDynproContainer.java:1490)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:231)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareLocal(StartTransaction.java:184)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesLocal(ApplicationTransaction.java:365)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:117)
Anybody can help me?And are there anyother methods can get mapped user and password of Portal systems in Web Dynpro JAVA.Hi Wayne,
Did you added com.sap.security.api.jar to your webdynpro project. if not follow this steps.
1. Right-click the project in Eclipse or SAP NetWeaver Developer Studio.
2. Select Properties.
3. Choose Java build path -> Libraries -> Add Variable -> Select variable WD_RUNTIME -> Extend -> com.sap.security -> lib -> com.sap.security.api.jar.
I hope this should solve your problem.
Regards, Suresh KB -
How to get profit center group and its description
According to three tables(as below), i get profit center group, how to get its description?
CEPC (Profit Center Master Data Table)
SETLEAF
SETNODE
PS:(Referrence to teh link fields in table)
For Profit centre Group ( SETLEAF-SETNAME )
Select BSEG-BUKRS / BSEG-PRCTR from BSEG.
SELECT SINGLE SETNAME INTO WA_SETNAME
FROM SETLEAF
WHERE SETCALSS = '0106'
AND SUBCLASS = BSEG-BUKRS
AND VALFROM = BSEG-PRCTR
i can get two records, why?Hi,
I am not sure of the significance of this table...
But looking at the table structure it is having LINEID as one of the key fields..
So you can have more than one record for the same combination..
Thanks,
Naren -
How to get xml Element , data and its Childs
hi,
I am trying to get entire Element and its childs depending on condition.
suppose
if(doc.element.name== "despatch"){
// here i want entire despatch element with data and childs and copy into one string like
// eg: String dsp = <despatch><name>body1</name> <value>value1<value>
</despatch>
<?xml version="1.0">
<handler>
<name>header1</name>
<value>value1</value>
</handler>
<despatch>
<name>body1</name>
<value>value1<value>
</despatch>
<gov>
<name>env</name>
<value>value1</value>
</gov>I managed to get number of elements depending on the Element name but i need to get the entire block.
nodeList = document.getElementsByTagName("despatch").item(0).getChildNodes();
for(int i=0;i<nodeList.getLength();i++){
System.out.println("i :"+document.getElementsByTagName("m:Security").item(i));
}any kind of help is appreciated.
Han.
Edited by: HANRAM on Apr 24, 2008 2:48 AMHi Kartik,
This one is similar to my question to print and email invoice at same time. I pass itcpo-tdgetotf = 'X' in order to get otfdata and send email with the attachment of otfdata.
Now I have data in otfdata, but when I call print_otf function, I clear out itcpo-tdgetotf, and passed
itcpo-tddest = device_type but I still get error message said 'Handler not valid for open spool request'.
Can you give me a working example that you have otfdata table and print data from that table. I also post my question on other thread
submit report and export to memory
thanks -
Hi,
I am Srikar,
I installed Windows Intune End Point protection in my PC (Windows 7 64bit).
I am not able to uninstall it.It is eating all the resources and my pc is getting slower down day by day.
I tried uninstalling via Control Panel->Programs and Feature->Windows Intune End point Protection.
Its uninstalled,and after some time,it is installed automatically in my PC.
Don't know whats happening.Please Please any one guide me.My PC is not even responding some times.
Regards,
Srikar Ananthula,
SrikarYes, removing a device will uninstall Windows Intune Center and its association with Windows Intune. Check this:
http://onlinehelp.microsoft.com/en-us/windowsintune.latest/hh949661.aspx [Removing a Device by Using the Windows Intune Company Portal], and
http://technet.microsoft.com/en-us/library/hh441723.aspx [Add Computers, Users, and Mobile Devices to Windows Intune].
Hope this helps..
Chaitanya( Twitter |
Blogs )
This posting is provided "AS IS" with no warranties, and confers no rights. -
How to get the login name and password
Hi,
I had installed the SAP NW2004s on Windows platform with MaxDB as backend.
The master user name and password which i used for instllation was
Username :Administrator
password:trustno1.
My SAPSID and DBSID is J2E
Now i want to login into maxdb
how should i procedd
IF i fire the following commnd
dbmcli -d J2E -u Administrator,trustno1
i get the follwoing error
C:\sapdb\programs\bin>dbmcli -d J2E-u Administrator,punadmin
Error! Connection failed to node (local) for database J2E: ERR_USRFAIL: User aut
horization failed
Please help.Hi Manoj,
You are trying to login into database using SAP level user:Administrator. Try login using <sid>adm/SAPService<SID> user or the database user. For more info on MAXDB adminsitration please check:
<a href="https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=846890">MAXDB admin</a>
Also check OSS note 143412.
Please award points accordingly.
Regards.
Message was edited by:
Ruchit Khushu -
FM to get OA/SA history and its value
hi guys,
is there any FM that can be used to get OA/SA history and its follow-on documents value ..pls adviceHi Huang,
i had a similar requirement and unfortunately i wasnt able to get any solution on this(probably there isnt).
how to get Position of cursor and its cell value in webdynpro alv
My requirement was to pick up the value from the cell and do a multi paste to all lead selected records of the same column.
Sadly, i had to do a workaround to achieve the solution.
1) user needs to click on "Enter" key with cursor on the cell
2) lead select all the records where multipaste is required
3) then click on button "Paste" on application bar to paste the values to multiple cell.
Let me know if you get anything on this (for my education).
Regards,
Tashi -
Hi
When am trying to download acrobot standard its prompting with user login password and its not getting downloaded.When you (or someone) first switched on your computer, you (or someone) had to choose a password. This protects your computer, and you need it to install most software or change the system. We can't help you if you forget it, sorry.
-
How to access Sap portal login user in ejb web service
Hi,
I wnt to access SAP Portal login user in my ejb application which resides on the same server.
I am using following code
try {
IUser user =null; IWDClientUser wdUser = WDClientUser.getCurrentUser();
user = wdUser.getSAPUser();
} catch (WDUMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Some additional jar files are required for this?
The same code works fine with webDynpro but not with ejb.
Thanks in advance
Best regards,
NileshThanks for reply.
I have already added com.sap.security.api in my EJB module project classpath. How to add the same in EJB application Project (application-j2ee-engine.xml)?
Best regards,
Nilesh
Maybe you are looking for
-
How to close JWindow and keep it front
my main opens a fullscreen jframe and then a smaller Jwindow. i called toFront but the Jwindow is always hidden behind the jframe. how do i keep jwindow in front ALWAYS. also, i have a mouselistener in the jwindow (that works fine) and im calling win
-
Issues while archiving Invoice documents
Hi all, While archiving Invoice documents using MM_REBEL(using company code only), it was found that the write job is picking up certain open Invoices also. ie the subsequent Accounting document was not cleared/archived. My understanding was the syst
-
Games on a full screen + OS 10.5
hello, ive been trying to play "the sims" on my newly installed OS X leopard. but for some reason, the game window is minimized. this did not happen with my 10.4 ed. any suggestions? ive tried preferences, views, etc. nothing is working. i just want
-
Every time I try to edit one of my photos on my iPod touch it shuts down!
-
Hi, I am using these methods; lr_config TYPE REF TO cl_salv_wd_config_table, lr_config->IF_SALV_WD_TABLE_SETTINGS~SET_EDIT_MODE () What is supposed to be written in the parenthesis in order to edit the ALV column Thanks