How to get Currently used Business Role

Hi Experts,
I need to get the business role currently being used by the user (i.e. SALESPRO). I've come across the method calls
  Data: lr_ui_profile type ref to IF_CRM_UI_PROFILE,
        lv_profile    TYPE CRMT_IC_CONFIGPROF.
  lr_ui_profile = cl_crm_ui_profile=>get_instance( ).
  lv_profile = lr_ui_profile->get_profile( ).
and so I tried it on an ABAP report being called from the WebUI via Transaction Launcher. However in my case after executing the method LV_PROFILE doesn't yield a value (but SY-SUBRC was 0).  Can anyone kindly provide a reason behind this? Or are there any other ways to retrieve the current login business role of the user?
Regards,
Marc
Edited by: imdiko24 on Nov 12, 2010 8:51 AM

Hi Marc,
Please try once, as exactly what i said in my earlier repl..
Assign any business role like for eg. "SALESPRO" in SU3 to parameter CRM_UI_PROFILE and test with the following code if lv_value holds the business roles?
*DATA: lv_value TYPE tpara-partext.*
*GET PARAMETER ID 'CRM_UI_PROFILE' FIELD lv_value.*
lv_value will hold the current business role..If you get correct business role in lv_value, that means you have not assigned business role correctly in the org model.
Cheers,
Sumit Mittal

Similar Messages

  • Check how many licenses currently used - Business Objects 11

    Hi there,
    We are coming up against the "all your licenses are currently used" problem from time to time so we're trying to narrow down some of the possibilities..
    Is there any way through the central management console to check (after a report has just been run through the RAS) how many licenses are currently used? Like I can see, how many sessions are open, how many documents are open, connections etc. but do any of these correlate to licenses?
    Any help appreciated.
    Thanks,
    J,

    Adobe Licensing Website | Serial numbers | Orders | Accounts

  • How to get current rowindex of clicked object in cr2008 preview control

    hi
    i want to get selected raw data when user click on crystal report 2008 preview control.
    i can achieve using following code for particular row no.
    Dim repReport as new ReportDocument
    repReport.Rows(RowIndex).Item(ColumnIndex)
    how to get current rowindex ? 
    Thanks
    Sanjiv Sharma

    Only way I can think of is to use the rowset controller from the InProc RAS SDK. Here is a snippet of a sample code on how to:
    //Load the report
    if (clientDoc != null) {
    //create metadata structure
    RowsetMetaData rowSetMetaData = new RowsetMetaData();  rowSetMetaData.setDataFields
    (clientDoc.getDataDefinition().getResultFields());
           Fields fields = rowSetMetaData.getDataFields();
           String colName,colTypeName;
           int colType, len;
           Field field;
           HashMap colNames = new HashMap();
           HashMap colTypes = new HashMap();
           for (int i = 0; i < fields.size(); i++) {
                   field = (Field) fields.get(i);
                   colName =field.getDisplayName(FieldDisplayNameType.description, Locale
    .ENGLISH);
                   colNames.put("COL"+i,colName);
           colType = getColTypeFromVariant(field.getType().toVariantTypeString());
           len=field.getLength();
                  //Placeholder
            //add column metadata to data structure or XML
            Object colValue;
            int rowCount=0;
            if (getMaxRows() != 0) {
                   RowsetCursor rowsetCursor = clientDoc.getRowsetController(). createCursor
    (null, rowSetMetaData);
                  //Setting the batch size to make sure that you get back all the
                  //rows by setting the batch size.
                        clientDoc.getRowsetController().setRowsetBatchSize (rowsetCursor
    .getRowset().getTotalRecordCount());
               //Getting the Results back starting from the first row
               RowsetCursor resultCursor = clientDoc.getRowsetController(). createCursor(null,
    rowSetMetaData);
               resultCursor.moveTo(0);
                  while (!resultCursor.isEOF()) {
                      for (int i = 0; i < fields.size(); i++) {
                               colName=(String)colNames.get("COL"+i);
                               colTypeName=(String)colTypes.get("COL"+i);
    colValue=record.getValue(i);
                                //Placeholder
    //add row data to data structure or XML
    resultCursor.moveNext();
    For more details, consult the Report Application Server .NET SDK Developer Guide
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • How to get Current row of ViewObject in the DoDML methode

    Hi all
    I have two ViewObject EmplyesView and DeptView
    How to get Current row of ViewObject DeptView in the DoDML methode of EmplyesView

    OK, we can play this game on and on...
    I'll ask for a use case (http://en.wikipedia.org/wiki/Use_case) and you don't give any info we don't already know. After an other 10 posts we probably know what you real problem is and can give you the advice which you could have gotten in the fist place.
    So please take some time and describe the problem as if you would ask your mother for help. Tell us how the data model is build and how the VO are related. Is there any input from an user involved? Which information from the other view do you need? How do you get to the doDML method? Is there a button in the ui involved?
    Timo

  • How to get current month and last month dynamically??

    how to get current month and last month dynamically
    like
    month = getCurrentMonth();
    lastmonth = getcurrentMonth() -1;
    please help
    thanks

    hi :-)
    /* depracated but can be still useful */
    java.util.Date dtCurrent = new java.util.Date();
    int month = dtCurrent.getMonth();
    int lastmonth = dtCurrent.getMonth() - 1;
    System.out.println("* " + month);
    System.out.println("* " + lastmonth);
    /* better to use this one */
    Calendar cal = new GregorianCalendar();     
    int imonth = cal.get(Calendar.MONTH);
    int ilastmonth = cal.get(Calendar.MONTH) - 1;
    System.out.println("*** " + imonth);
    System.out.println("*** " + ilastmonth);
    regards,

  • How to get current assigned participant id?

    Hi mates,
    This might be a basic questions, but useful for me :)
    How to get current assigned participant id from screenflow? Or How to pass it as an argument from interactive activity?
    Below is what I tried.
    Participant.id or Instance.participant.id - returns login user id
    Thanks

    Hi,
    Please correct me if I understood wrong.
    You want to know whether an instance is assigned or not and if assigned then you want to fetch the assigned participant id.
    If this is your requirement then please find the code below and make the necessary changes into it.
    Write the following code in screen flow automatic activity but before that you need to pass the instanceid as argument to the screen flow.
    In the process as well as screen flow layer make an instance variable instanceid as Int.
    Then make an argument variable instanceidArg as Int in both the screenflow and process layer and map accordingly so that it will take the instanceid from process layer to the screen flow layer.
    Assign instanceid = id.number; in process layer automatic activity but before the global interactive activity where you have maped the screen flow.
    Write the following code in screen flow automatic activity.
    logMessage("============= instanceid ==============" + instanceid); //instanceid is the id of the instance that you have passed from process layer.
    ProcessService ps;
    InstanceFilter instF = InstanceFilter();
    ps.connectTo(url : Fuego.Server.directoryURL, user : "<userid>", password : "<password>"); //In studio the userid and password will be same
    logMessage("Connected");
    instF.create(processService : ps);
    instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL, statusScope : StatusScope.ONLY_INPROCESS);
    //<ProessId Name> is the id of the process where you want to know the assighed participant id
    instF.addAttributeTo(variable : VarDefinition.processid, comparator : Comparison.CONTAINS, value : "/" + "<ProessId>");
    instF.addAttributeTo(variable : VarDefinition.INSTANCE_NUMBER, comparator : Comparison.IS, value : Int(instanceid));
    Fuego.Papi.Instance[] instances = getInstancesByFilter(ps, filter : instF);
    foreach (instance in instances) {
    logMessage("Assigned ?: " + instance.participantId.empty);
    logMessage("instance.participantId: " + instance.participantId);
    ps.disconnectFrom();
    Bibhu

  • How to get current date for posting date

    hi,
    how to get current date for posting date ? any sample code ?
    Thanks

    Hi......
    Use
    Select getdate()
    for current date.......
    Regards,
    Rahul

  • Urgent : How to get current user id

    Hello,
    fnd_global.user_id returns -1
    fnd_profile.get('user_id',x_user_id) return null
    can anyone help how to get current logged in user to apps.
    Regards,
    Dinesh.

    Hi Dinesh,
    You must also make sure you have initialised the app.
    If you run this from sqlplus then it will return -1.
    If however you run this from within a concurrent program then the user id will be returned.
    Try using this from sqlplus fnd_global.apps_initialize
    Eg.
    begin
    dbms_output.put_line(fnd_global.user_id);
    fnd_global.apps_initialize(user_id => 3551,
    resp_id => 1,
    resp_appl_id => 1);
    dbms_output.put_line(fnd_global.user_id);
    end;
    /

  • How to get current time and date??

    How to get current time and date from my PC time and date to the java application??
    i use java.util.* package but got error, that is:
    - java.util.* and java.sql.* class are match
    - abstract class cannot be instantiated
    so what can i do, pls guide...thanks...

    There is a method in the System class that will return the current system time. You could also instantiate a Date, Time, Timestamp, or Calendar object, all of which get created with the system time by default.
    Don't import *. Import the specific classes you need.
    Next time, post the actual text of the exceptions/compile errors. If you make people guess, most just won't bother.

  • How to get current view name on clicking device back button?

    Hi,
    iam wriing a function for handling device back button(in android) press in my app.controller.js .How to get current viewname when clicking device back button.
    code samples will be helpful.
    my app.controller.js looks like below
    sap.ui.controller("com.opensap.App", {
      onInit : function() {
      document.addEventListener("deviceready", onDeviceReady, false);
      onBeforeShow : function(evt) {
      navButtonTap : function(evt) { 
    function onBackKeyDown(){
      //alert("hai");
      //sap.ui.getCore().byId("SalesDetail").app.backToPage("ProductList");
      //sap.ui.getCore().byId("ProductList").app.backToPage("Dashboard");
      //sap.ui.getCore().byId("SupplierDetail").app.backToPage("Dashboard");
    function onDeviceReady(){
       document.addEventListener("backbutton", onBackKeyDown, false);

    I somehow managed to find the solution
    function onBackKeyDown(){
      var app = sap.ui.getCore().byId("LoginDetail").app;
      app.back();

  • How to get current row data in table control

    Hi , expert ,
       I am professional in oracle ,  but  now I am a new guy in SAP ABAP .
    I  have a question in UI
    How to get current row data and click pushbutton  in table control  to open next screen ?
    I want to get the current data and open next screen to carry out detail detail .
    Thansk for all your suggestion .

    GET CURSOR LINE SY-CUROW .
      READ TABLE internal_table index SY-CUROW.

  • In ABAP HR how to get job using position

    In ABAP HR how to get job using position (Using Infotype 1001)

    Hi anilkumar,
    1. u have the position
       u want the Job
    2. In hrp1001 table
       OTYPE = 'S' (for position)
       OBJID  = POSITION (AS ABOVE)
       SCLAS = 'C' (for finding job)
    <b>   SOBID = XXXXXX (here u will get the JOB)</b>
    regards,
    amit m.

  • How to get the list of roles assigned to a user in all the child systems

    how to get the list of roles assigned to a user in all the child systems from CUA SYSTEM

    Try transaction SUIM in your CUA system. Go to user, cross-system information, users by roles. If you run it wide open, you'll get all users and all roles assigned for all systems managed in your CUA.
    Krysta

  • How to get current version of safari. without having safari browser?

    how to get current version of safari. without having safari browser?

    I don't understand the question. Safari is a browser.
    Can you elaborate on what your are trying to do that initiated the question? People may be able to come up with some other option that gets you working the away you want.
    When you respond, please post the version of the Mac OS and the version of Safari you currently have. Otherwise, people are guessing and the quailty of help you get plummets.

  • How are you currently using video with marketing automation?

    I manage an educational site through Brightcove called Video Marketing Academy. I would like to create a course to tackle the challenges of using video with a marketing automation platform. I’d love to know how you are currently using video with marketing automation, what your results have been, and what are some of the challenges that you are running into?
    I understand some of this maybe platform specific, but I would like to understand the challenges and help from a strategy and best practice perspective.
    videomarketingacademy.brightcove.com

    Well you certainly hit some good ones. When it comes to marketing automation I'm always game for more flexibility with anything, for instance I would love to have more conditional options on form processing conditions, and I know that has nothing to do with video but it goes to your answer, anyway that you can give a marketer more flexibility with filters or conditions or what not the better when it comes to lead scoring, campaign options, and reporting the better.
    If one could integrate Video reporting into Eloqua I think that would be cool, I know that would be very challenging because of how Eloqua reporting works, but it would make it a one stop shop which isn't bad, 

Maybe you are looking for

  • Help please with debugging program (simple error i think)

    This code will compile/execute fine, but when I run it through an automatic marking system which forces it to read lines from a text file, it runs into errors. It seems as if it reads in the first line fine, and does what it has to do it to it, but i

  • HOW TO RUN ABAP SERVER PROXY IN BACKGROUND?

    Hi All, I have a ABAP Server Proxy running in WAS 6.20. This Server Proxy runs as a foreground Process when the scenario is executed. if we run a scenario with huge load or run scenarios with continuous load, due to the fact that the server proxy run

  • Does Apple Fix Cracked Screens or just give you a replacement?

    Basically I dropped my iPhone 4 from a few floors. The back and front are all smashed. When I connect it to the computer iTunes seems to recognise it but I can't see anything because LCD is damaged. I heard Apple can repair this but do they actually

  • URL that open Self Service Submit Request page with parameters

    Hello, I have a concurrent program on Oracle APPS that generate an output in HTML. I want to have a link in the data that, when click, it takes the information for this line (account_number, header_id etc) and open the web page for submitting request

  • CANNOT OPEN iPHOTO LIBRARY AFTER UPGRADE

    I had a routine upgrade message last night so hit Install.  My iPhoto logo changed from the yellow with palm tree to a new one with a blue background and a flower.  There was an error message during the update of my library (24000 images) and now say