HR ABAP Alternate manager

Hi ,
I have a requirement to find the alternate manager of an employee ,the requirement is as follows :
Get the position number from  PA0001-PLANS  (record w/ENDDA=12/31/9999). This i am doing by
RP-PROVIDE-FROM-LAST P0001 SPACE PNPBEGDA PNPENDDA.
IF PNP-SW-FOUND = '1'.
Position_number = P0001-PLANS.
ENDIF.
Then i need to look for position in HRP001  the field sobid OTYPE=S, OBJID=position number). Look for RSIGN=A and RELAT=CCA, and ENDDA=12/31/9999.
IF found then in the report i should populate 'YES' in the report
else.
Get SOBID. Look up that position in HRP1001. Repeat steps in 1) above. Continue until either Alt Manager is found, or no Reports To relationship is found (this should be the CEO's position which will not have an alt manager or a Reports To position)
       c) If no alt manager is found, input "No" in this field (without quotes)
How will i code this .
can any body provide their inputs?
regards
Prasun

I think you already have all the logic required, so you should only dress it in ABAP code.
It should go more or less like this
"alterative manager position
data l_alter_pos type plans.
"related position
data l_position type plans.
RP-PROVIDE-FROM-LAST P0001 SPACE PNPBEGDA PNPENDDA.
IF PNP-SW-FOUND = '1'.
   l_position  = P0001-PLANS.
ENDIF.
while l_alter_pos is inital.
call function 'RH_READ_INFTY_1001'
        exporting
          plvar            = '01'
          otype            = 'S'
          objid            = l_position
          istat            = '1'
          begda            = sy-datum
          endda            = '99991231'
          subty            = 'ACCA'
        tables
          i1001            = lt_1001
        exceptions
          nothing_found    = 1
          wrong_condition  = 2
          wrong_parameters = 3
          others           = 4.
      if lt_1001 is not initial.
           "related position found
           read table lt_1001 assigning <wa_1001> index 1.
           if sy-subrc = 0.
              l_alter_pos = <wa_1001>-sobid.
              exit.  "don't look further
           endif.
      else.
           "no position found, look other relationship
            "here I don't know how you want to pass SOBID, of which object?
            l_position = ....-sobid,
           "check new position to be found (go at the beginnig of the loop)
      endif.              
endwhile.
write: 'Alternative manager position' , l_alter_pos.
The only confusing thing in your logic is this point
else.
Get SOBID. Look up that position in HRP1001.
Which means if you don't find any relation to current position, look up for this position relationship? This does not make sense for me. So if you clarify more, we could help more.
Regards
Marcin

Similar Messages

  • HR-ABAP(Payroll Management)

    Hi All,
    I am new to HR-ABAP.
    I wanted to know more about HR-ABAP(Payroll Management).
    Please send me the links or documents if u have collected.
    Regards,
    Mihira

    1.http://www.atomhr.com/know_preview/Reading_Payroll_Results_with_ABAP.htm
    2.http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?track=NL-142&ad=500911#Payroll
    3. http://www.sap-press.com/product.cfm?account=&product=H967
    http://www.sapdevelopment.co.uk/hr/payres_abap.htm
    http://www.sapdevelopment.co.uk/hr/payres_tcode.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPA/PAPA.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PAPD/PAPD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/PYINT/PYINT_BASICS.pdf
    http://www.atomhr.com/training/Technical_Topics_in_HR.htm
    http://www.planetsap.com/hr_abap_main_page.htm
    you can see some Standard Program examples in this one..
    http://www.sapdevelopment.co.uk/programs/programshr.htm
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci1030179,00.html?Offer=SAlgwn12604#Certification
    These are the FAQ's that might helps you
    http://www.sap-img.com/human/hr-faq.htm
    http://www.sapgenie.com/faq/hr.htm

  • Do we need to setup traditional ABAP Transport Management System on XI?

    I was confused that do we need to setup ABAP transport Management System on XI, since the IR and ID object will use CMS or File to transport between DEV->QAS->PRD. If we still need, could you pls let me know why we need it?
    one more question is: if we maintained some parameter in XI dev, say, we maintained Integration Server patameter to let system can moniter Syn message, if we want this paramter used in XI QAS, is that the only way to maintain it mannully in QAS, or we have other way to make it? thank you for your help

    Zhang,
    You are absolutely correct. You transport all your ID and IR objects using CMS or File transports.
    But lets suppose you have developed some zprograms or abap mapping in XI. This basically reside on the ABAP stack. So for this objects to transport we will follow the procedure what we do normally to transporting the R3 objects. So what ever you develop on the ABAP stack we need to transport to QA and to Prod using ABAP transport system.
    ---Satish

  • ABAP SQL manager

    Please, advice ABAP SQL manager.
    Program which allows to execute any SQL queries.

    hi ;
    İf you want execute T-sql in sap , u can use this program ;
    Regards.
    İrfan
    << cut and paste without attribution from https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7168fa07-0b01-0010-7698-87fbfc556f1d
    removed. Points unassigned. >>
    Edited by: Rob Burbank on Mar 27, 2009 5:35 PM

  • Get Support at Logon Page for ABAP User Management.

    Hi,
    Just want know that is it possible to have Get Support feature at Portal Logon page when portal is configured as User Management of Application Server ABAP as Data Source.
    Basically, the password reset functionality should work from Get Support link when Porta UME is User Management of Application Server ABAP as Data Source.
    If Possbile, please let me know what configuration needs to be done..
    Thanks in advance.
    Regards,
    Aditya Metukul
    Message was edited by: aditya metukul

    Hi,
    Try <portalschema>.wwv_redirect.url('<portalschema>.home');
    Please replace portalschema with the name of your portal schema.
    Thanks,
    Sharmila

  • WD ABAP Travel management

    We have activated business function FIN_TRAVEL_1 in ECC in order to use ABAP WD based applications through BP for ESS 1.41.
    Based on this [online sap documentation|http://help.sap.com/erp2005_ehp_04/helpdata/en/97/7dc46839ff314f863b90e7fbd12c8e/frameset.htm] , it explains by saying - once expenses request is approved by manager, a mail will be trigerred to FI department for payment posting using background job processing program (RPRFIN00_40).
    But, it does explain how the advance section is handled whenever employee is requesting for advance via travel request once it is approved by manager. Can anybody tell how this is handled in FI ?
    Another more sceanrio, is there any option is Travel management wherein employee can only request for advance - for example employee is planned to extend his/her stay on deputaion ?
    Is tcode trip is absolute or still continued to be use in ECC ?
    Regards,
    Anil Kumar.

    Hi,
    This workflow..for If a trip with status request approved/settled or trip approved/settled is assigned the status transferred to FI by transfer program RPRFIN00_40, a workflow is started, based on template type TripTransFI.
    The configuration part for the Travel management you can get it form follwoing link
    ESS / MSS Configuration (SAP Best Practicesfor SAP HCM V2.600) (N06)
    http://help.sap.com/bp_hcmv1600/BBLibrary/Documentation/N06_BB_ConfigGuide_EN_US.do
    the senario that you r discussion is abt Workflows .................
    thre r Workflows iin the SAP system ..........that you can use for the same
    But you need to use that AS per your bussiness Requairements.......

  • Synchronous Inbound ABAP Proxy - Manage status in SXMB_MONI

    Hi Gurus!!
    I have a synchronous SOAP->PI->ABAP Proxy. This ABAP Proxy sends a response to the Sender SOAP with the result of the process execution.
    If the execution finishes with an error (by example, the material to change is locked by another user), the ABAP Proxy sends the response with this error to the SOAP Sender, in the response of the message, without exception. In SXMB_MONI the execution of the message is correct. Is there any way to set the status of the message on SXMB_MONI to other status, and continue sending the corresponding response to the SOAP Sender? If is possible without exception handling?
    Thanks and regards,
    MML001.

    Hope I understood your question. You can send the response (happy flow without exception) and fault message (application or business exception) from the inbound proxy response. But in both cases , SXMB_MONI treats the response message is success. Only in the case of system or connectivity between systems, it shows error message. You could handle even using a specific field in the payload whether the message is successful or not rather than thinking about setting status in monitoring level.

  • How to assign clients to alternate management point

    Hi Guys
    Does anyone know how to reassign clients to another management point on the same site.
    We have 3 seperate locations connected by a vpn, our main site has a primary site server with the management point role and the other 2 locations are just distribution and management point servers.
    I have built another distribution /management point server as the primary server site location as i want to take some of the roles of the primary site server as its overloaded, all my clients at this site are already assigned to the primary site server management
    point but want to assign them to the new distibution/management point at the same site.
    Was going to uninstall the management point role of the primary site server so that just my new server would have this role at this location, if i do this will the cleints automatically assign themself to the only available management point at this site
    or will they break.

    The clients always request a list of available MPs. If you deinstall a MP it will not be on that list anymore, so the clients will automatically go to another available MP.
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • ABAP - Case Management - Change Attribute on unsaved case

    Hi - how can I populate/change attributes of a case befre it is saved - I have the GUID and can get attributes by calling BAPI_CASE_GETATTRIBUTES, however if I try to set them using BAPI_CASE_CHANGE or BAPI_CASE_CHANGEATTRIBUTES it falls over when the bapi trys to open the case - any ideas anyone?

    Use the 'attribute_change' method of interface if_scmg_case_api

  • Package Management for CodeExchange ABAP projects

    Hi CodeExchange ABAP Contributors,
    according to the size of ABAP in the [https://cw.sdn.sap.com/cw/codex/projects|CodeExchange Project Directory Tag cloud] most of the Projects are ABAP based. Some of them like Twibap, ABAP JSON and ABAP OAuth depend on each other. That is also the case if you want to install packages using [SAPLink|http://code.google.com/p/saplink/], then you need in the most of the cases some [Plugin|http://code.google.com/p/saplink/wiki/pluginList] installed. That can be sometimes very cumbersome.
    As a user of Perl, PHP and Ruby I was using their package management systems like CPAN, Pear and Gems. They provide an easy command line interface to install and update packages. In addition they take care about dependencies.
    I think it's time to start working on a Package Management for CodeExchange ABAP projects. Let's call it ABAP Package Management (APM). SAPLink providing the container to exchange the package and ZAKE to handle the download and install can be a good starting point.
    Let's discuss the problem space here and perhaps we also can involve someone who has perhaps already some experience in building a package management system.
    Best regards
    Gregor

    Hi,
    an XML file to be included into the nugg that describes dependencies on a base of Plugin ID, Plugin Name and Version should be enough.
    The XML should be managed by SAPLink, the hard job is to automatically download and install the plugins.
    How to login to CodExch?
    How to download the certified version of the plugin? A project can delete an old version nugg.
    As you said we need a central instance were the plugin version are versioned and identified univocally.
    Indeed we need a page in code exchange or a tool in release page in order to register the current file as versioned.
    Regards,
    Ivan

  • SSL: How to use the same key pair for ABAP & JAVA?

    Hello,
    I want to setup an XI (3.0 on Netweaver04)installation in the way, that ABAP AS and JAVA AS use the same key pair for SSL. My problem is to define the same private key on ABAP and JAVA. With the JAVA Administrator I am able to define or import a private key. But I could not find a possibility in ABAP to manage private keys in order to use the same on as in JAVA. What is the procedure for this?
    Thanks and Regards,
    Frank Tottleben

    Hello,
    I want to setup an XI (3.0 on Netweaver04)installation in the way, that ABAP AS and JAVA AS use the same key pair for SSL. My problem is to define the same private key on ABAP and JAVA. With the JAVA Administrator I am able to define or import a private key. But I could not find a possibility in ABAP to manage private keys in order to use the same on as in JAVA. What is the procedure for this?
    Thanks and Regards,
    Frank Tottleben

  • Abap+java stack for Portal 7.0 and MI - User Data Source

    The SAP pre-requisites for Portal and MI (Mobile Infrastructure) 7.0 is an ABAP and Java Stack. If you install an AS ABAP + Java, the UME is automatically set up to use the ABAP user management of the same AS installation. What does this mean? The user store will be created in ABAP, for both the Portal and MI.
    The impact of this is portal users management is in ABAP. This configuration by design cannot be connected to LDAP Active directory for user authentication.
    Please let me know , if some body had already face similar issue and come up with the solution.  Thanks in advance.

    Hi Surya ,
    When you install portal or any NW component with ABAP stack , ABAP stack hold precidence over the JAVA Stack , refer to this link to have more idea on this .
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2b/306bb5bc98f24f8a85d489449af456/frameset.htm--
    http://help.sap.com/saphelp_nw04s/helpdata/en/12/7678123c96814bada2c8632d825443/frameset.htm
    Thanx
    Pankaj

  • Change Management & Change Transport Process in GRC AC RAR

    With RAR not being able to leverage the SAP ABAP Change Management Process (CTS) what is the best practise for controlling the changes for RAR rule set ?
    How do we acheive job segregation from
    1. Making Changes to Rules in Dev RAR
    2. Transporting (Importing) them to RAR Prod
    How do we make sure the 'Import Rules' functionality is restricted. ? (Can we remove Action 'ImportRules' from all the roles and restrict that to one role & restrict the administrator from making role assignments directly in RAR (Only from CUP) )
    Thanks

    Hi Prashanth,
                          You can restrict the access by removing the action ImportRules from the customized role that you can create in UME for RAR.
    Thanks,
    Darshan

  • Unassign Server from a Corrupted Oracle VM Manage 3.1.1 instance

    My problem is that the Oracle Database holding the metadata of the VM Manager that currently owns my VM Server died completely and I'm unable to log in to the VM Manager to manage the VMs living in the Server.
    I have no (explicit) backup from the Manager Database so I'm unable to recreate the schema to bring the Manager up again.
    I have an alternate Manager instance in a different server but cannot tke the ownership of the Server because is already owned by another VM Manager (the corrupted one). The error shown is OVMRU_000009E Server <my OVM server> is already owned by an Oracle VM Manager.
    What is the best option to unassign the VM Server from the old VM Manager?
    These are my options so far, haven't tried them yet, though:
    1) As per the an alternate thread (https://forums.oracle.com/forums/thread.jspa?messageID=10633203#10633203)
    # service ovs-agent stop
    # rm /etc/ovs-agent/db/server
    # service ovs-agent start
    2) Uninstall the corrupted VM Manager using the runInslatter.sh script from the Manager installation media.
    I appreciate your help a lot!

    I had to improvise a little bit before you answer came so I went ahead and reinstalled the Manager without taking note of the current UUID, the new Manager installation was installed using the same old UUID, though.
    My next issue was that the new Manager was not able to recognize the existen Physical Repository, this might be due the SATA Disk was not empty (of course, it was holding all my VMs). I couldn't find a way for the new Manager to mount and recognize the existen Repo so I went ahead and backed the Repository Up to an alternate partition so was able to clean the disk.
    After the backup, I wiped the SATA disk out using the command:
    +# dd if=/dev/zero of=/dev/sda bs=1M+
    But my surprise was that the Manager, under Storage > Local Storage, was still showing the SATA disk as used, as if the content was still there, so I couldn't create a new Repository on it. Not sure how the mapper/ocfs2/SATA stuff combines to provide Physical devices for the VM Server.. I'm going to have to learn more about these stuff.
    Current Status, I decided to re-install the whole VM Server and the VM Manager (in the same box) and hopefully the new manager will recognize the SATA Disk as empty and will be able to create a new Repository on it, then I'll copy the VMs from the Backup and "hopefully" the VMs will be displayed.
    Am I walking the right way?

  • CRM Users Created on ABAP Stack not visible in Portal...........

    Hello All,
            I have WAS with ABAP + JAVA  [EP7], Hence using <b> dataSourceConfiguration_abap.xml</b>. as a datasource file in UME.
    As per my knowledge i cant create users from Portal hence I have created users in ABAP Stack but I am not able to view these users from Portal ?
    I have chaecked the entry in Configtool this file is maintained as Datasource.
    Please Guide me what may be the reson for this ??
    Is it possible to add Users from portal if Datasource is ABAP Stack ??
    Waiting for reply!
    Thanks,
    Smita.

    Hi Smita,
    Please go through these links:
    UME configured to use SAP ABAP
    For the configuration using config tool : http://help.sap.com/saphelp_nw04/helpdata/en/49/9dd53f779c4e21e10000000a1550b0/frameset.htm for general remarks using this config and see http://help.sap.com/saphelp_nw04/helpdata/en/0f/bdd93f130f9115e10000000a155106/frameset.htm for changing the config.
    Check out the section "Read-Only and Read-Write Access to the ABAP User Management.
    This link would also be useful. This link talks about <b>User Management of Application Server ABAP as Data Source</b> :  http://help.sap.com/saphelp_nw2004s/helpdata/en/49/9dd53f779c4e21e10000000a1550b0/frameset.htm
    Hope this helps.
    Regards,
    Sunil

Maybe you are looking for

  • Finder Won't Launch - Can't Boot From CD's

    Gahhh! I've been trying for two days now to upgrade to 10.4, but I kept getting errors, when you get to the actual installing part. The computer has 256k of original RAM, but as per the help topic, I figured it could be a RAM issue (you need at least

  • Select List Woes

    I am trying to get my javascript function to run from a select list (for Firefox and IE). This script needs to fire before the select values are displayed. No matter what method I try one of the browsers has an issue. onactivate="get_select_list_xml1

  • Find my iphone map no longer moving and scrolling as before

    I have tried this question on another forum where someone else had the same problem, but there's been no further response, so I'll try my luck here. I regularly use Find my iPhone to keep track of my autistic son, who has an iPhone 4, when he is out

  • How to use Command f12 on MacBook Pro?

    Using someone else's setup.  How do I turn OFF the volume control F12 key ... or make it function with FCP as the Full Screen function (Command F12)?? All ears, Ben

  • Why is my DW layout looking different from the browsers?  So confused...

    Hi guys, I've been successfully struggling through my first attempt at building a website using Fireworks and DW CS4.  What has been puzzling me is that how the site looks in DW is not how it looks in my browser.  Oddly enough, all the browsers are d