Populating supervisor based on position

Hi friends,
I have an issue while making changes in the custom.pll code. The requirement is when the organization and position are entered in the assignment screen I should populate the supervisor accordingly based on the org and position.(we have a package to get this). I am trying to write this code but somehow it does not populate after the position is enterd. Can some one help.
Following is the code
IF ((event_name = 'WHEN-NEW-ITEM-INSTANCE')and (field_name = 'ASSGT.POSITION_NAME')) THEN
IF(name_in('ASSGT.SUPERVISOR_NAME') IS NULL) THEN
IF ( name_in('ASSGT.POSITION_NAME') IS NOT NULL AND name_in('ASSGT.ORGANIZATION_NAME') IS NOT NULL ) then
     l_sup := pop_sup.getPersonHierarchy(name_in('ASSGT.PERSON_ID'), name_in('ASSGT.ORGANIZATION_NAME'), name_in('ASSGT.POSITION_NAME'));
     fnd_message.set_string(l_sup );
     fnd_message.show;
     copy(l_sup,'ASSGT.SUPERVISOR_NAME');
     END IF;
END IF;     
END IF;

Kiran,
Note: if you are creating a VO just so you can turn around and use it in a data control, you could use the URL data control for your CSV data files.
Otherwise, http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcadvvo.htm#sm0341, or if a JDBC driver exists for XLS, you could treat the XLS file like a database.
No, I don't have any examples ;)
John

Similar Messages

  • Need to show Counter at report level based on Position

    Chaps,
    one of my HR report requires a counter value based on Position. exactly what i required is want to show the no. of positions count based on Resource type. ( Resource type is a navig. attr of Position). How to define counter for this?
    Thanks.
    Rgds,
    ST.

    Hi Sathish,
       Create a formula variable with replacement with position and attribute resource type. Here write formula.
       Example: (formula variable >= 0)*1+0
    Regards
    Prasad

  • WF based on "Positions" instead of "Users" ?

    Hi guys,
    Is somebody using any WF in SRM that is based on positions instead of users ? 
    For example, if the user A leaves the company, I delete his/her user but not his/her position.
    After, I move the user B (object) into the Position A and this user (b) inherit the pending authorization tasks.
    Thanks for you help guys !!!! =)
    Kind regards,
    Diego

    Hello Diego,
    It is technically correct SAP Business Workflow works with Positions but it is difficult to maintain the Org. objects in SRM and CRM applications. Because SRM and CRM have enhanced objects BP: Business Partner and CP: Central Person objects.
    You can check object relationship with infotype 1001 in PP02 transaction.
    Organization Unit - O 50000608
       -> Position - S 50000621
            -> Central Person - CS50006622
                -> Business Partner BP0000000111
                -> User USPURCHASER
    Regards,
    Masa

  • Find  job  descp  based on  position

    Hi ,
      In  HR  ,  I  want to find  Job  Desp  based on Position.
    Thanks,
    Asha

    Hi
    Check this FM
    HR_HCP_SEL_POSITION_OF_PERSON
    HR_HCP_GET_EMPL_FOR_POSITION
    HR_HCP_GET_JOB_FOR_POSITION
    HR_HCP_GET_ORGA_FOR_POSITION
    HR_HCP_GET_POSITION_FOR_EMPL

  • Position based approvals Vs Employee/Supervisor based Approvals

    Has anyone used Employee/Supervisor relationship for approving documents in Self Service Purchasing (SSP). The Oracle Education document of SSP states that a position is required for every user to route documents.
    Any thoughts, experiences would be appreciated.
    We are implementing SSP 4.0 on 10.7 Apps.
    Thanks
    Chandra

    Has anyone used Employee/Supervisor relationship for approving documents in Self Service Purchasing (SSP). The Oracle Education document of SSP states that a position is required for every user to route documents.
    Any thoughts, experiences would be appreciated.
    We are implementing SSP 4.0 on 10.7 Apps.
    Thanks
    Chandra

  • Default SC Plant Company code and Storage location Based on Position

    Hi All,
    We are on version SRM 7.02.
    We are using SAP ECC R/3 EHP7 based system as a back end FI and HR system.
    Org structure in SRM is replicated fromm HR system.
    We have case of concurrent employment in the HR org structure , which means one USER can be assigned to multiple Positions in an org structure.
    We have a user A , who is created in Two different org units say O1 , O2 occupying positions P1 and P2, belonging to company code C1 and C2.
    Whenever a SC is created a custom enhancement shows all the user positions to him and he has to choose one from the list of positions.
    Now based on the selected position(P1) , i have to default plant(PL1), storage location(SL1) and Company code(C1).
    Even after defaulting attributes based on the position, user gets an error "company code C1 is not valid for user"
    This error (Message class : /SAPSRM/CLL ; # 135) is thrown from method : /SAPSRM/CL_CH_WD_DODM_SC_I_BD /SAPSRM/IF_CLL_MAPPER~UPDATE
    after getting user's Company code using following method.
    /sapsrm/cl_pdo_shared_user=>/sapsrm/if_pdo_shared_user~get_company_code
    This gets Company code as C2 ; Based on Users Attributes and not based on User Position attributes.
    If i overwrite values fetched by this method in Implicit enhancement, then plant(PL1), storage location(SL1) are not getting fetched.
    Does anyone have any solution for this problem?
    Regards,
    Ashish Shah

    Hi MURUGESAN !
          Can you give me some information more in Special Procument Configure in plant 2000 like:
              -  Procurement type (maybe F)
              -  Special procurement (Maybe U)
              -  Plant (Maybe 1000).
              - Issuing plant (maybe 2000)
           We will check together.
           Regards,
          Tony

  • Identify Supervisor if current Position has more than one A012-assignment

    Hello experts,
    I wonder if you could help me with this "challenge" please:
    Starting point is a non-vacant position that owns more than one A012-assignment.
    For example:
    Position-ID: 00000001
    01.01.2006     31.12.9999     A012     O     004712
    01.01.2007     31.12.9999     A012     O     004711*
    01.01.2006     31.12.9999     A008     P     101010
    *The second A012-assignment is needed because the person leads the O 004712 as well as O 004711 (general manager).
    If I am using the standard function RH_GET_LEADING_POSITION, I get a sy-subrc = 1 (which means that there was no leading position found). But there is a position owned by the supervisor of the person 101010 that should be determinated:
    O 004711
    ___S 00000002
    _____P 101020
    _______|O 004712
    _________S 00000001
    ____________P 101010
    If I delete the first A012-assignment of position 00000001 it works fine: P101020 is shown as Supervisor of P 101010.
    Does anyone know how to solve this problem, if there is more than one A012-assignment?
    Thanks in advance.
    Greetings,
    Dirk vdH

    Hi Ronny,
    According to your description, the lookup column would render incorrectly when adding more than one datasheet view in the Enterprise Wiki page.
    I tested the same scenario per your post, and I got the same results as you got.
    We will help to submit the issue to proper pipeline for you.
    Again, thank you for your report which will definitely make SharePoint a better products. There might be some time delay. 
    Appreciate your time and patience.
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • User access based on positions

    Hi,
    Can you throw me some hints on handling following requirement on CRM 2007, User A plays himself 2 roles say e.g. Marketing and Sales professional, assigned to 2 different position (different business roles, configured with 2 different PFCG roles).  Marketing profession do not have edit access for master data in PFCG but it triggeres from Sales Professional PFCG role.
    How can I control techanical authorizations defined in PFCG based on BR selection:
    Thanks in advance.
    Bob

    Not sure if  undestand you properly, but if you mean that when user logs in in marketing bus.role, that he should get only privileges of pfcg role assigned to marketing bus.role and not also from sales pfcg role, then this is not possible.
    All pfcg roles are alwaysconsidered.
    Regards.

  • Billing based on Position Payer  (re-posted again)

    Hello,
    Let me explain my doubt.
    Our customer, the way of working, after creating sales order with documents flow, is modify de Payer at position level and later create again the Proforma billing, and the final billing.
    This crash with the standard way of billing, for example:
    Sales order A
    Header payer: n1
    10 Position payer: n1
    20 Position payer: n3
    30 Position payer: n1
    Sales order B
    Header payer: n2
    10 Position payer: n2
    20 Position payer: n3
    30 Position payer: n2
    Final billing by standard:
    Billing number 1: against payer n1 (OK)
    Billing number 2: against payer n2 (OK)
    The problem is against payer n3, system generate 2 differents billing documents instead of one per the same payer.
    Is it posible on VTFA- Billing based upon Order, item level 'Data VBRK/VBRP' , create a routine with a ZUKRI in order to billing by positions payers??
    Another solution, on VOPA,delete PY for header billing partner procedure and add PY to position billing partner procedure?
    I would be pleased if you can help us?
    I have created this 9XX rutine and now system is splitting by WE instead of RG:
    DATA: BEGIN OF ZUK,
    MODUL(3) VALUE '902',
    VBELN LIKE VBPA-VBELN,
    POSNR LIKE VBPA-POSNR,
    PARVW LIKE VBPA-PARVW,
    END OF ZUK.
    ZUK-VBELN = VBPA-VBELN.
    ZUK-POSNR = VBPA-POSNR.
    ZUK-PARVW = VBPA-PARVW.
    VBRK-ZUKRI = ZUK.
    Any idea
    Thanks in advance

    Hello,
    I have created this new routine and now system is splitting by WE instead of RG:
    DATA: BEGIN OF ZUK,
              MODUL(3) VALUE '902',
              VBELN LIKE VBPA-VBELN,
              POSNR LIKE VBPA-POSNR,
              PARVW LIKE VBPA-PARVW,
            END OF ZUK.
      ZUK-VBELN = VBPA-VBELN.
      ZUK-POSNR = VBPA-POSNR.
      ZUK-PARVW = VBPA-PARVW.
      VBRK-ZUKRI = ZUK.
    Any idea?

  • Billing based on Position Payer

    Hello,
    Let me explain my doubt.
    Our customer, the way of working, after creating sales order with documents flow, is modify de Payer at position level and later create again the Proforma billing, and the final billing.
    This crash with the standard way of billing, for example:
    Sales order A
    Header payer: n1
    10 Position payer: n1
    20 Position payer: n3
    30 Position payer: n1
    Sales order B
    Header payer: n2
    10 Position payer: n2
    20 Position payer: n3
    30 Position payer: n2
    Final billing by standard:
    Billing number 1: against payer n1 (OK)
    Billing number 2: against payer n2 (OK)
    The problem is against payer n3, system generate 2 differents billing documents instead of one per the same payer.
    Is it posible on VTFA- Billing based upon Order, item level 'Data VBRK/VBRP' , create a routine with a ZUKRI in order to billing by positions payers??
    Another solution, on VOPA,delete PY for header billing partner procedure  and add PY to position billing partner procedure?
    I would be pleased if you can help us?
    Thanks in advance

    Hello,
    I have created this new routine and now system is splitting by WE instead of RG:
    DATA: BEGIN OF ZUK,
              MODUL(3) VALUE '902',
              VBELN LIKE VBPA-VBELN,
              POSNR LIKE VBPA-POSNR,
              PARVW LIKE VBPA-PARVW,
            END OF ZUK.
      ZUK-VBELN = VBPA-VBELN.
      ZUK-POSNR = VBPA-POSNR.
      ZUK-PARVW = VBPA-PARVW.
      VBRK-ZUKRI = ZUK.
    Any idea?

  • Split without delimiter based on position

    Hi,
    I am having a query i need to split the query based on the position i specify
    Say
    string is 123456789101112
    am having position as 1,1,2,5,4,2
    i need as
    1
    2
    34
    56789
    1011
    12
    I need to insert this in to my table
    create test table (col1 number(10),col2 number(10),col3 number(10),col4 number(10),col5 number(10),col6 number(10));
    col1,col2,col3,col4,col5,col6
    1,2,34,56789,1011,12
    Thanks

    i'm having some 80 columns in my table how to do for 80 columns Will data inserted into all 80 columns ?
    Will there any change in order of insertion i.e. suppose data will be in col1,col2,col10,col11,col15,col23,col45,col80,col14,col68,col5... ?
    How you will calculate the number of columns in which that number string is going to inserted ?
    If there are fix 80 columns then rather than writing block of code for 80 times, you can use varray type variable and then proceed ahead. Since, in the above code, I have not handled exception(s), so exception handling will be another part of code to make it smooth.
    Between, at the moment, I am not getting why there is error which is in the end :
    create type np_type is varray(80) of number
    create type cn_type is varray(80) of number;
    create type cxn_type is varray(80) of varchar2(100)
    I created TEST table by below pl/sql block :
    declare
    execstr varchar2(2000) :='create table test(';
    begin
    for i in 1..80 loop
    execstr:=execstr || 'col' || to_char(i) || ' number,';
    end loop;
    execstr:=substr(execstr,1,length(execstr)-1);
    execstr:=execstr || ')';
    dbms_output.put_line(execstr);
    execute immediate execstr;
    end;
    create or replace procedure myproc1
    strx in varchar2, delarray in np_type)
    as
    execstr varchar2(200);
    cn cn_type;
    cxn cxn_type;
    xpos number:=1;
    begin
    for i in 1..80 loop
    select Delimiterlength into cn(i) from sp_table where Splitid = delarray(i);
    select substr(strx,xpos,cn(i)) into cxn(i) from dual;
    execstr:='insert into test values(' || cxn(i) || ',';
    xpos:=length(cxn(i));
    end loop;
    execstr:=substr(execstr,1,length(execstr)-1);
    execstr:=execstr || ')';
    dbms_output.put_line(execstr);
    --execute immediate execstr;
    end;
    /SQL> declare
    2 v np_type:=np_type(4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4);
    3 begin
    4 dbms_output.put_line(v(80));
    5 --exec myproc1('11111111111111111111111111111111111111111111111111111111111111111111111111111111',v);
    6 end;
    7 /
    4
    PL/SQL procedure successfully completed.
    SQL>
    SQL> declare
    2 v np_type:=np_type(4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4);
    3 begin
    4 --dbms_output.put_line(v(80));
    5 exec myproc1('11111111111111111111111111111111111111111111111111111111111111111111111111111111',v);
    6 end;
    7 /
    exec myproc1('11111111111111111111111111111111111111111111111111111111111111111111111111111111',v);
    ERROR at line 5:
    ORA-06550: line 5, column 6:
    PLS-00103: Encountered the symbol "MYPROC1" when expecting one of the
    following:
    := . ( @ % ;
    The symbol ":=" was substituted for "MYPROC1" to continue.
    SQL>
    Try to remove this error. Here '1111...' is the string which is going to be entered and '44444...' is the Splitid of sp_table.
    Now, its your turn to help me.... :)
    Regards
    Girish Sharma

  • Fetch based on Position?

    Hi Experts,
    i want to fetch the SD consultant & enduser based on the Position. how can i fetch those persons. plzz givve me some sample code. plz ?

    want to fetch their mail id's by using position by coding in BO .
    later i want to send outlook?
    Anyways you have decided to code in the BOR method, so try to call the FM HR_HCP_GET_EMPL_FOR_POSITION from the bor which will rertun you the respective positions pernr and then try to use the FM HR_READ_INFOTYPE by passing the infotype parameter as PA0105
    the SD Consultant & end user by using their position
    But make sure that you have the respective Sd consultants Position ID in the workflow container, and export this to task and from task to BOR method and pass this position ID to the first mentioned fm and then you get the pernr and then read that respective pernrs communication infotype.. to get his email ID the subtype for the email ID is 0010...

  • Populating fields based on list box values

    I have created an application based off of a table and so the 1st page is the actual report and the 2nd page is the data entry form. I have changed the form elements (like text box to select list) etc.
    I need to have (2) text box fields populated based on the value from the 2nd select list box. I created a pl/sql page process that will check the value of the select list and assign values to the text boxes. This is triggered when a POPULATE button is pressed.
    When I select a truck number in the select list - nothing happens and the original select list values get reset back to original. There is another button used in order to insert the data so that's why I figured I needed to add another button to trigger the population of the text boxes from a table. Here is my pl/sql page process used to populate:
    BEGIN
    SELECT dr1_name, dr2_name
    INTO
    :P2_DRIVER_1, :P2_DRIVER_2
    FROM
    active_drivers a
    WHERE
    :P2_DRIVER_CODE = a.code;
    END;
    It is set to fire on submit - before computations and validations.
    Regards,
    Jeff

    Not sure if this is the best way but it works for me……
    Make P2_DRIVER_CODE be a form element of Select List with Submit
    Create 2 items, P2_DRVR1 and P2_DRVR2, of form element Hidden
    Edit the P2_DRIVER_1 item. In the source region enter :P2_DRVR1 in Post Calculation Computation.
    Edit the P2_DRIVER_2 item. In the source region enter :P2_DRVR2 in Post Calculation Computation.
    Create a page rendering computation for item: P2_DRVR1.
    Type: SQL Query
    Computation Point: Before Header
    Computation: SELECT dr1_name FROM active_drivers a WHERE a.code = :P2_DRIVER_CODE
    Create a page rendering computation for item: P2_DRVR2.
    Type: SQL Query
    Computation Point: Before Header
    Computation: SELECT dr2_name FROM active_drivers a WHERE a.code = :P2_DRIVER_CODE
    When an item is selected in P2_DRIVER_CODE the page will submit/refresh, causing the computations to be fired. P2_DRIVER_1 and P2_DRIVER_2 will be populated by the return of the queries in the computations respectively.
    P2_DRIVER_1 and P2_DRIVER_2 are still editable by the user (unless you define them as read only) but if you have another select list with submit on the form, if used, the page will refresh and the computation will run again overwriting what the user has entered.
    Suppose I want the user to be able to change the defaults and keep from losing them (changed back to default) in case another item submits/refreshes the page.
    Create a hidden item P2_DRIVER_CODE_CHANGE with the source of: Static Text. For the Default Value enter &P2_DRIVER_CODE. (include the period after &P2_DRIVER_CODE)
    Edit the P2_DRVR1 and P2_DRVR2 computations and in the Conditional Computations region set:
    Condition Type: Text in Expression 1 != Expression 2 (include &ITEM substitutions)
    Expression1: &P2_DRIVER_CODE.
    Expression2: &P2_DRIVER_CODE_CHANGE.
    Hope this works for you,
    Jeff

  • Auto-populating fields based on another field (must access dif record type)

    This is a long one. I basically want to know if it's possible to have several fields auto-populated based on the data in another. It gets a little tricky here, because the information I want to auto-populate will have to be searched for in another record type. An example will hopefully make my request clear:
    I have 10's of thousands of records of the "Product" record type that each have a product number. Well, let's say I have several fields to enter into an "Opportunity" record type, based on the information for this product number in the "Products" record type. I want to know if I can enter the product number on the "Opportunity" record, and have OnDemand go look up this product number in the "Product" record type, pull information from that record, and auto-populate that additional information in certain fields back on the "Opportunity" record that I am entering information for.
    I know a workflow can do this on simple things where you have a few different part numbers and can create a workflow for each, but I literally have 40k part numbers, and I can't very well create that many workflows. If there was a way to dynamically script the workflow to use the part number in the field on the "Opportunity" record and go fetch the data to auto-populate, that would be nice.
    I also can't use a cascading picklist because, again, there are around 40k products records and picklists have a limit to how many choices you can have.
    My think tank has run empty, and I am out of ideas. I was wondering if there is any other way to get this done, or if it's even possible?
    Thanks,
    B
    Edited by: user10885599 on Feb 5, 2009 11:54 AM

    As I read this, I am wondering if you would be able to use the new JoinFieldValue() function to update the fields. The problem is that the Opportunity record does not have a direct link to products. The Revenue table does however, so you should be able to do this from Revenue, if that is how you are using the application.
    The process would be to create a workflow that watches for new Revenue records, and updates the new fields in the Revenue object using the JoinFieldValue function to pull the data.

  • Want to setup supervisor based security profile in comp workbench(critical)

    We are trying to setup a security profile based on supervisor hierarchy for the cwb switch manager function but that is
    not seems to work.
    we want HR managers to switch to any managers within thier security profile to allocate compensation on behalf of managers .But the HR
    managers should have exactly the same access as the managers they are switching
    to for this reason i have created some custom responsibilities and assigned it
    to HR managers with the securtiy profile setup but i might be making a mistake
    in creating a security profile that doesnt seem to work .
    please help me on this issue because this issue is of a very high importance to us.

    We are trying to setup a security profile based on supervisor hierarchy for the cwb switch manager function but that is
    not seems to work.
    we want HR managers to switch to any managers within thier security profile to allocate compensation on behalf of managers .But the HR
    managers should have exactly the same access as the managers they are switching
    to for this reason i have created some custom responsibilities and assigned it
    to HR managers with the securtiy profile setup but i might be making a mistake
    in creating a security profile that doesnt seem to work .
    please help me on this issue because this issue is of a very high importance to us.

Maybe you are looking for