How to read user details based on org structure

hi,
i want to read which user is logon sap crm 7.0 based on org structure is there any functional module or bapi. how to find out which user is logon.
jemmi.

Hi Jemmi,
Login user can be accessed by sy-uname directly. i think you are interested in finding bp's assigned to org unit of login user.
I am giving few details, check whichever is relevant for you.
To get the org unit of the login user ..
   s_logon_orgunit = CL_CRM_AUI_SERVICE=>get_logon_orgunit_of_agent( ).
To get all the bp's under that org unit
  move-corresponding ls_logon_orgunit to ls_orgunit.
  CALL METHOD CL_CRM_AUI_SERVICE=>GET_BP_DATA_FROM_ORG_UNIT
    EXPORTING
      IV_ORGUNIT   = ls_orgunit
    RECEIVING
      RV_HROBJBUPA = ls_bp.
Get all org units the user is assigned to as BP's
  CALL FUNCTION 'RH_STRUC_GET'
    EXPORTING
      act_otype       = 'US'
      act_objid       = sy-uname
      act_wegid       = gc_sms_wegid-org_4_usr
      authority_check = ' '
    IMPORTING
      act_plvar       = lv_plvar
    TABLES
      result_tab      = lt_result_tab
    EXCEPTIONS
      no_plvar_found  = 1
      no_entry_found  = 2
      OTHERS          = 3.
Cheers,
Sumit Mittal

Similar Messages

  • PDF required for How to Extend User Details

    Hi All,
    I have just started with KM. I would like to have a few tutorials. Please provide links for the same.
    Also, I am foll. the pdf "How to Extend User Details" for adding the expert area property to UME. However, I find that the pdf is for EP 6.0. I am working on EP 7.0.Can someone provide me with the relevant pdf for EP 7.0
    Regards
    Nikhil Bansal

    <u>How to Extend User details</u>
    for this you can use this link.. this will really helpful to you..
    http://help.sap.com/bp_epv170/EP_US/Documentation/How-to/KM/Extending_User_Details.pdf
    <u>Knowledge Management</u>
    http://www.wm-forum.org/files/Handbuch/An_Illustrated_Guide_to_Knowledge_Management.pdf
    reward me points...

  • How to create dynamic context based on a structure defined in the program?

    Hi Experts,
             I need to create a dynamic context based on a structure wa_struc which i have define programatically.
    When I pass wa_struc to structure_name parameter of create_nodeinfo_from_struc, i get a runtime error:
    "Parameter STRUCTURE_NAME contains an invalid value wa_struc."
    How to create dynamic context based on a structure defined in the program?
    I have written the code like this:
    TYPES: BEGIN OF t_type,
                v_carrid TYPE sflight-carrid,
                v_connid TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
             wa_struc type t_type.
      data: dyn_node   type ref to if_wd_context_node.
      data: rootnode_info   type ref to if_wd_context_node_info.
      rootnode_info = wd_context->get_node_info( ).
      clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
      parent_info = rootnode_info
      node_name = 'dynflight'
      structure_name = 'wa_struc'
      is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( name = 'dynflight' ).
    dyn_node->bind_table( i_struc ).
    Thanks
    Gopal
    Message was edited by: gopalkrishna baliga

    Hi Michelle,
              First of all Special thanks for your informative answers to my other forum questions. I really appreciate your help.
    Coming back to this question I am still waiting for an answer. Please help. Note that my structure is not in a dictionary.
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition
    I have updated my code like the following and I am getting error:
    TYPES: BEGIN OF t_type,
    CARRID TYPE sflight-carrid,
    CONNID TYPE sflight-connid,
    END OF t_type.
    Data: i_struc type table of t_type,
    dyn_node type ref to if_wd_context_node,
    rootnode_info type ref to if_wd_context_node_info,
    i_node_att type wdr_context_attr_info_map,
    wa_node_att type line of wdr_context_attr_info_map.
    wa_node_att-name = 'CARRID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
    insert wa_node_att into table i_node_att.
    wa_node_att-name = 'CONNID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
    insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
    select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
    attributes = i_node_att
    is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    But now I am getting the following error :
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    -Gopal
    Message was edited by: gopalkrishna baliga

  • How to read the details in the context node of the custom controller

    Hi friends,
        My requirement is i enhanced the component ICCMP_BP_DETAILS , now on EH_ONSAVE i want to read the details of the Context node in the Custom COntroller .
    In custom controller from ICCMP_BP_DETAIL/CuCoBPDuplicate  From this in context node CUSTOMER is there in that attributes first name last name is there i want to read those details
    so can u pls provide the logic for this how can i get the values.
      am very new to the BSP programming
    Regards
    Yogesh

    Hi Suchitha,
    when i am following the above code the lr_entity is not Bound, so can u pls suggest is there any thing is missing
    i used the below mention code but lr_entity is not bound
    DATA: lr_cuco type ref to CL_ICCMP_BP_CUCOBPDUPLICA_IMPL.
                lr_entity type ref to cl_crm_bol_entity.
    lr_cuco ?= me->get_custom_controller( 'ICCMP_BP_DETAIL/CuCoBPDuplicate') .
    CHECK lr_cuco IS BOUND.
    lr_entity ?= lr_cuco->typed_context->customer->collection_wrapper->get_current( ) .
    CHECK lr_entity IS BOUND .
    lr_entityIF_BOL_BO_PROPERTY_ACCESSGET_PROPERTY_AS_VALUE( iv_attibute =  'FIRST_NAME' ev_attribute = lv_firstname ) .
    Please correct the code if any thing is missing
    Regards,
    Yogesh

  • SAP Cloud Application Studio How to retrieve the details based on OVS in Product ID

    Hi Experts,
    I have small requirements in AdvanceListPanel. I have custom BO as mention below,
    businessObject Demo {
                   element ID : ID;
                   node Sporoduct [0,n] {
                        element P_ID : ProductID;
                        element P_DES :   SHORT_Description;
                        element P_QTY : Quantity;
                        element P_NET :  Amount;   
    I have attached the OVS on Product ID (P_ID) element.
    I want to auto-fill the details under the AdvanceListPanel ( Product Desc , Product Net value ( Price) ) 
    1) How to get the details of Product ( Prod Descr, Product Price etc ).
    Please anyone have idea about this share your thoughts.
    Many Thanks,
    Mithun

    Hi, Mithun
         What you want is to auto-fill the related details when you select a product from your OVS.
         That means you have to write your codes in Event After Modify.
         We normally use QueryByElements or some other query options given for a particular standard BO.
         It would be like that.
         var query=Product.QueryByElements;
         var selParams=query.CreateSelectionParams();
         selParams.Add(query.ProductID ,"I","EQ",this.P_ID );
         var result=query.Execute(selParams);
         for(var product in result){
         this.P_DES =product.Description;
    What I have just written is just a sample code. You have to find the exact name of the attributes of a standard BO in Repository Explorer.
    Hope this helps,
    Fred.

  • Risk Management 10: Assign users based on Org structure

    Hello,
    In GRC Risk Management 10, you can assign users to a risk in the roles tab of a risk. 
    Is it possible to be able to assign any employee in HR org structure to one of these roles such as Risk Owner?
    More specifically, would it be possible to create a link such that only the employees in the assigned organization unit in the risk are shown in the list of users to be assigned to one of these roles?
    Thanks

    we have the scenarioas below
    need to integrate the third party HR system ORG structure entity to the Role based travle management approval task.
    but the process and workflow structure for all the department are same.
    only the roles are different for each user.
    no need to disple the standard  approval role in Process initiation.
    Custom role should be populated based on the selection from the first action.
    example: if the user need cash and he should select the cash need option from
                  first action then the finace approver should appear in next action.
                  if not it should not appear.
    please advice which GP callable object is best for this process.
    i have the plan to use the webdynpros..
    regards
    Sukumar

  • How To Get User Details in Collaboration ....?

    HI,
    In collaboration i am unable to see the full User Details (Like Mobile Phone Number, E-Mail Address, etc)  ,When i was click on
    user Names. Here i will get full  User Details for some users and for some users i did not get(But getting only Last Name &  User ID )  . Here we  already having Data in User
    Profiles.

    Hi,
    Maintain the user profile information for all the users in Identity management.
    Regards,
    kiruthika

  • How to encrypt user details ?

    Hi all,
    Is it possible to encrypt user details such as first name,last name while user creation ?
    Apart from creating new UDF and encrypting it, is there any way to achieve this by modifying form metada or other properties in OIM?
    Thanks in advance.

    By encryption if you mean that it would not be visible to the admin's as clear text then yes its feasible but it would moreover be like password that even while inputting you would see it as masked.
    Like displayComponentType="PasswordField" in FormMeteData.xml
    Thanks
    Sunny

  • How to define an itab based from a structure inside a class

    Hello Experts,
    How can I define an internal table based from a structure that
    is declared inside a class?I want to define it in the START-OF-SELECTION event.
    I'll create a scenario below:
    *       CLASS lcl_main DEFINITION
    CLASS lcl_main DEFINITION ABSTRACT.
      PUBLIC SECTION.
        TYPES: BEGIN OF t_vbak,
              vbeln TYPE vbak-vbeln,
              erdat TYPE vbak-erdat,
              ernam TYPE vbak-ernam,
              auart TYPE vbak-auart,
              kunnr TYPE vbak-kunnr,
              vkgrp TYPE vbak-vkgrp,
             END OF t_vbak.
    ENDCLASS.                    "lcl_main DEFINITION
    START-OF-SELECTION.
    *Here i want to define an internal table based from the structure T_VBAK.
    Hope you could help me out here guys. Thank you and take care!

    .

  • How to take a back-up of Org.Structure?

    Hi Experts,
    I wanted to take a back - up of the current org. structure. Can you plz help me how to do that?

    Hi Dilek,
    Can you please give me more specific idea as how to do it exactly??
    Thank you
    Edited by: Manjiri Tambe on Jan 28, 2010 6:38 AM

  • Pl sql procedure to retrieve user details based on the input

    hi,
    I am looking for an example which will retrieve the data based on what he requests. I mean: the user types in an request_name, the procedure will check if the request_name already exists. If yes, then it will retrieve the request_name and other columns from the table R. Else it will create a new request by adding request_name and other details to the table.
    hope this is clear some1 could help me
    thanks

    If defaults are set for the request table fields and you can get by inserting only the request_name field, perhaps something like the below would work?
    T_REQUEST is the table, REQUEST_NAME is the field you mentioned. If the function finds the record, it returns it as a record. If it doesn't, it inserts a blank record with REQUEST_NAME populated:
    CREATE OR REPLACE FUNCTION REQUEST_LOOKUP
    ( V_REQUEST_NAME IN T_REQUEST.REQUEST_NAME%TYPE )
    RETURN T_REQUEST%ROWTYPE
    AS
        R_REQUEST T_REQUEST%ROWTYPE;
        CURSOR C_REQUEST IS
            SELECT *
            FROM T_REQUEST
         WHERE REQUEST_NAME = V_REQUEST_NAME;
    BEGIN
        OPEN C_REQUEST;
            IF C_REQUEST%NOTFOUND
            THEN
                INSERT INTO T_REQUEST (REQUEST_NAME)
                VALUES (V_REQUEST_NAME);
         ELSE
                FETCH C_REQUEST INTO R_REQUEST;
                RETURN R_REQUEST;
         END IF;
        CLOSE C_REQUEST;
    END REQUEST_LOOKUP;

  • How to read User ID from the request Form and pre populating in the AD User process form before provisioning

    I am trying to read the user Id from the submitted AD User request form( Catalogue AD User form. I need User Id,firstname and lastname inorder to prepopulate the common name as in this format - lastname,firstname (userid)  for the user to be provisioned in Active Directory.
    So after filling the AD User request form with User Id and Organization and submitting the request, I am trying to
    prepopulate the common name in the process form before the provisioning.
    The prepopulate adopter for the common name is configured to read the firstname, lastname and userid. firstname and
    lastname variables are mapped to User definition and user Id is mapped to Process Data. In this setup I am not getting the
    User Id value from process data, it is empty.
    Is this a bug with OIM 11g R2 or I need to do it differently in order to read the user Id that user has entered in the
    request form for populating the common name?
    Thanks

    Ghulam Yassen wrote:
    How to get USER_ID and IP_AddressWhy exactly do you need this data and what do you plan to do with it?
    The data is not reliable and trustworthy. IP addresses can easily be spoofed (a few seconds if you know what to do and how to do it). Also, IP addresses are not static. Users also do not use the same network device to access the database - different devices will have different IP addresses.
    The o/s user on the client is supplied by the client driver. This can also be spoofed.
    The user can also use a virtualised device - which means that recording the IP and o/s user seen from the server side, is pretty much useless and meaningless.
    So if this data is intended to be used for auditing for example - it would be pretty suspect data to use for that purpose.

  • How to read user - logon language (Urgent)

    Hi All,
    I have written the below code to display the language in english if it exists if not in french & so on, but i would like to know how i can read the language in which the user has logged on & use that as the first criteria.
    Eg: S_SPRAS = User Logon language
    SELECT SINGLE MAKTX FROM MAKT INTO Y_MAKTX
      WHERE MATNR = MARC-MATNR
        AND SPRAS IN (S_SPRAS,'EN','FR','IT',' ').
    Hope my problem is clear, await inputs.
    Vivek

    Hi,
    Let me try to explain the problem
    Mtl-A, has description in 3 languages. (En, Fr, It)
    Mtl-B, has description in 1 language only. (It)
    Mtl-C, has no description
    First i want to check for a given mtl if description exists in the user's logon lang, if it does not, then check if description is maintained in English, if not check in French, if not Italian.
    Eg1: User logs-in with En language,
    Then the description for mtl-A is displayed in english, for Mtl-b description is displayed in Italian (as only italian description is maintained) & for mtl-c no description is displayed as it is not maintained.
    Eg2: User logs-in with It language.
    Then description for Mtl-A & B is displayed in Italian & for mtl-c it is blank as no description exists
    But when i use the below code, the system by default picks up EN which is my default lang, even if i login in French or Italian lang, the description is shown in english only.
    SELECT SINGLE MAKTX FROM MAKT INTO Y_MAKTX
      WHERE MATNR = MARC-MATNR
        AND SPRAS IN (SY-LANGU, 'EN', 'FR', 'IT').
    Hope i was able to put across my problem clearly.
    Await inputs.

  • How to find user details o who are using bw reports

    Hi BW Experts,
    I want to know the details of users who are using bw reports.Your help is greatly appreciated.
    Thanks & Regards
    Pakki

    Hi,
        You can see it BW statistical reports. Once check 0BWTC* (3.5)  or 0TCT* (7.0) cubes are availble in your system or not ?
    Please check these links.
    http://help.sap.com/saphelp_nw04/helpdata/en/8c/131e3b9f10b904e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/f0/3c8c3bc6b84239e10000000a114084/plain.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5401ab90-0201-0010-b394-99ffdb15235b
    Or else you can only get this information if the query/ workbook is enabled for statistics logging in transaction RSDDSTAT.
    If it is enabled you can goto table RSDDSTAT ( 3.5) or RSDDSTAT_OLAP( 7.0 ) to see the users who executed the query . These tables store all the information per query session and you will find more than one rows per session but you can find the information you want i.e. users executing a particular query.
    Also Tcode: SU01 will give you all the user lists in the server.
    Regards
    Pcrao.

  • How to get MRP Details based on OPEN PO's

    Hi Experts,
    Could you please help me in getting details related to open purchase orders based on MRP Exceptions and MRP line items.
    I need develop a report based on plant, I have found one function module "MD_MRP_LIST_API" to get these details, but this works only with the combination of material and plant.
    kindly tell me whether we have any tables other than FM's, so that I can pull out the report based on plants.
    BR/Sathya.

    Hi Puneetb,
    If you want data directly from the 0material infoObject in BW you can do 2 things:
    1. Edit the updaterule to your destination cube and determine the values in an ABAP routine
    2. Change the attributes to navigational in both infoObject and cube so you can use them in queries (in this scenario you allways display the current attribute values instead of the values when loading the data.
    Is this what you were looking for?
    Kind regard,
    Alex

Maybe you are looking for

  • Problem in connecting to database from webdynpro for java

    Hi I have a problem in connecting to database from webdynpro application I am using oracle 10 express edition as database and was able to connect to database from a java application.But  was unable to connect from a webdynpro for java. <b>I guess web

  • Badly need help!!! installing an application that needs classic mode

    i'm totally new with mac, got mine 3 weeks ago. . . i have this CD-ROM that i need to install but it says int the instruction that it needs classic mode to install. i've been reading the "classic mode" topic int the MAC HELP. . it says there that i c

  • Error -  Could not process enrollment request. Missing or malformed KeyGen,

    While submitting a CSR this message is coming. Any idea why ? Could not process enrollment request. Missing or malformed KeyGen, pkcs10 or crmf blob.

  • Acrobat Distiller NOT Opening...

    Hello, I had Acrobat 9 Extended, the distiller of which used to work, then i downloaded the new version of Acrobat 9 Extended and installed and deleted the last one. Now the new Distiller Does NOT Run/Crashes on Runing, and thus the Adobe PDF printer

  • ITunes songs are not burning - not authorized???

    On my main menu screen, i have music that burns fine but when I go to the second menu screen the song does not play after the burn. During the steps of burning it asks several times, this song is not authorized to... please open itunes and enter your