Joining date fetching in HR

Hi friends,
I want to fetch the joining date of an employee.iv used a code like this but it is not working.Also for fetching the designation..for certain employees the designation is also not appearing in the report.Can you please help me.
thsi code has been written for the joining date
  rp-provide-from-last p0000 space pn-begda pn-endda.
  IF p0000-MASSN = 01.
    ly_output-BEGDA = p0000-begda.
  END.
also for fetching the current designation the code has been writte as given below,but this is not workin for certain pernr
rp-provide-from-last p0001 space pn-begda pn-endda.
  ly_output-PLANS = p0001-plans.

Hi
Try this code it worked for me.
*&      Form  get_0041
      Get dates form pa0041 for u1 and u2
FORM get_0041.
  DATA: i_dates_0041 LIKE zhrx_p0041_dates OCCURS 0 WITH HEADER LINE.
  CLEAR: v_hire_date.
Move date type(Rehire) to the internal table.
  MOVE c_u2 TO i_dates_0041-darxx.                " U2 Date Type
  APPEND i_dates_0041.
  CLEAR  i_dates_0041.
Move date type(Hire) to the internal table.
  MOVE c_u1 TO i_dates_0041-darxx.                " U1 Date Type
  APPEND i_dates_0041.
  CLEAR  i_dates_0041.
  CALL FUNCTION 'Z_HRPA_UTL_GET_DATE_TYPE_0041'
       EXPORTING
            im_pernr                    = i_emp-pernr
            im_date                     = i_emp-begda
       TABLES
            t_dates                     = i_dates_0041
       EXCEPTIONS
            field_type_not_found        = 1
            pernr_not_given             = 2
            pnnnn_and_pernr_not_allowed = 3
            date_not_given              = 4
            date_not_required           = 5
            infotype_not_found          = 6
            OTHERS                      = 7.
  IF sy-subrc EQ 0.
    READ TABLE i_dates_0041 WITH KEY darxx = c_u2.               " U2
    IF sy-subrc = 0 AND NOT
       ( i_dates_0041-datxx IS INITIAL ).
      v_hire_date = i_dates_0041-datxx.
    ELSE.
      READ TABLE i_dates_0041 WITH KEY darxx = c_u1.             " U1
      IF sy-subrc = 0 AND NOT ( i_dates_0041-datxx IS INITIAL ).
        v_hire_date = i_dates_0041-datxx.
      ENDIF.
    ENDIF.
  ENDIF.
If U2 & U1 not found PA0041, taking begda of PA0000 as reference date
for further pernrs' info selections
  IF v_hire_date IS INITIAL.
    v_hire_date  = i_emp-begda.
  ENDIF.
ENDFORM.
<b>if it helps reward points</b>
Regards
Lakshmikanth.T.V

Similar Messages

  • Key Figures in Joined Data Source

    Hello,
    I have created some Key Figures for the Data Source "Sales Order Item". Reports based on this Data Source are working fine and also my Key Figures are displaying the right results.
    Now I want to create a Joined Data Source (Left Outer Join) with the Sales Order Item and Outbound Delivery Detail Line Items. The problem I have here is, that my own Key Figures based on Sales Order Item are not showing up in the list and I cannot select them.
    Does anyone know why? Do I have to create the same Key Figures again and again as soon as I want to join the Sales Order Item Data Source with any other Data Source?
    Thanks for any feedback.

    Key figure are not available in joining Data Sources, Characteristics of same type from different Data Source data element available in joining scenario.
    Regards
    Naveen

  • OBIEE 11g - Data Fetch Issue.

    Hi,
    I am facing this weird issue regarding data fetching while executing Reports in OBIEE 11.1.1.5. When I login to the BI user interface and execute any report for the first time, everything is working fine. Bt after that I am not able to execute any report later. Even the report executed for the first time, when I rebuilt and execute it I cannot see the data this time. The Results user interface says - The layout of this view combined with the data,selections,drills or prompt values choosen resulted in no data.
    Thanks in advance.
    Regards,
    Dev.

    Hi,
    I also encounter the same issue. When I view combined layout, I get the No Results message. But when I edit the table layout, I see that there are records returned. Does anyone had any luck in resolving this issue?
    Thanks!

  • Validation on Joining date

    Dear  Team,
    I would like to put validation on Joining date with actual date of Hiring ( i.e current system date ) ; and I would like to put validation between both actual joining and Hiring date and difference between both dates should not exceed 50days. If Hiring date is exceeding 50 days errors message should be populated.
    Please let me know to handle this scenario .
    Regards,
    Vamshi

    Try using an user exit or BADI.
    Please ask your ABAPer to write a code to check your requirement and generate the messages.
    There are a lot of forums which will give u details on user exits and BADI in Pers Administration.
    I dont think there is any standard config which will cater to your requirement.
    Cheers
    AJ

  • Data fetching from BSEG table

    Hi,
    I have used smartforms for generating suppler payment statement for financial department. more time duration is taken by the program when it is generating.
    I think this problem comes while data fetching from BSEG table. because, it has more records for one vendor ID.
    I want reduce this time duration.
    Please guide me.

    Have you tried this selection in se16? I'm quite sure that It will take
    a long time.
    The problem has been explained in this group before and I think you
    should search for bseg in the answers given.
    As a hint: It has to do with the selection universe. You are restricting
    only bukrs from the primary key (all the other restrictions in your
    where clause are filters that are applied on SAP's side (not on the
    database side)). The problem is that bseg isn't stored as separated
    fields in the RDBMS, but as a table with the primary key and a stream of
    bits in a raw field.
    You should review and change the logic you're using before reading bseg.
    It's the only way you'll improve the performance of this select. (for
    example, you could use one or more secondary index tables - bi or ba
    to retrieve belnr and access bseg with a better where clause).

  • ABAP OO data fetch logic

    Hi Experts,
                     I have normal report with dat fetch logic. I need to convert my normal code logic to OO abap logic using classes & methods..
    Exp:
          select knumh kotabnr vakey datab datbi knuma_bo
                 from konh
                 into corresponding fields of table i_konh
                 for all entries in i_kona
                 where knuma_bo eq i_kona-knuma.
    Is there any easy way to write the code in OO using classes & methods.
    Thanks.

    Hi Khan,
    Here is the code for your query with OO abap logic i.e. Class and methods.
    Code.
    TABLES: konh.
    data: i_konh TYPE TABLE OF konh,
          i_kona Type TABLE OF kona.
    CLASS class_name DEFINITION.
    PUBLIC SECTION.
    CLASS-METHODS get_details.
    ENDCLASS.
    CLASS class_name IMPLEMENTATION.
    METHOD get_details.
    DATA: knumh   TYPE REF TO konh-knumh,
               kotabnr  TYPE REF TO konh-kotabnr,
               vakey    TYPE REF TO konh-vakey,
               datab     TYPE REF TO konh-datab,
               datbi       TYPE REF TO konh-datbi,
              knumabo TYPE REF TO konh-knuma_bo.
    select knumh kotabnr vakey datab datbi knuma_bo
                 from konh
                 into corresponding fields of table i_konh
                 for all entries in i_kona
                 where knuma_bo eq i_kona-knuma.
    ENDMETHOD.
       ENDCLASS.
    *Global data.
      data: obj TYPE REF TO class_name.
    *Event block.
      START-OF-SELECTION.
    CREATE OBJECT: obj.
    CALL METHOD obj->get_details.
    Regards,
    Soundarya.
    Edited by: K.Soundarya Singh on Mar 24, 2010 8:42 AM
    Edited by: K.Soundarya Singh on Mar 24, 2010 8:43 AM

  • Pivot Table Data Fetching

    Greetings. I have problem with data fetching in pivot table.
    I can see only 25 rows in it. Any ideas with my problem.

    Hi,
    Try increasing the rangeSize of the iterator to some value like 150?
    -Arun

  • Data fetch problem from EBAN table

    Hi All,
    I have a problem in data fetching. My SQL statement is
            SELECT    A~BANFN
                      A~FRGDT
                      A~MATNR
                      A~MENGE
                      A~MEINS
                      A~AFNAM
                      A~EKGRP
                      A~PRIO_URG
                      A~STATU
                      A~RLWRT
                      A~EBELN
                      A~LOEKZ
                      A~EBELP
                      A~FRGKZ
              INTO CORRESPONDING FIELDS OF TABLE ITAB_DATA
              FROM EBAN AS A
              WHERE     A~STATU IN S_STATU
              AND       A~EKGRP  = S_EKGRP
              AND       A~BANPR  = '05'
              AND       AFNAM  IN P_AFNAM
              AND       BEDNR  IN P_BEDNR .
    In EBAN table data in AFNAM field is like 'Mech', 'mech' & 'Mech'
    Now in selection screen if user give Mech then system picks only that data where 'Mech' is there but requirement is it should pick all data related to ('Mech', 'mech', 'Mech') in AFNAM field. How do I do?
    Thanks and regards,
    Rajesh Vasudeva

    Hello,
    What you ask is not easy but it is feasible.
    We had the same request to make a case-insensitive search on a text field.
    As a reference for our development we took the following example:
    [http://wiki.sdn.sap.com/wiki/display/Snippets/CaseInsensitiveSearchHelpExitforMaterialGroup|http://wiki.sdn.sap.com/wiki/display/Snippets/CaseInsensitiveSearchHelpExitforMaterialGroup]
    In short : the purpose is that first of all you build up a list of all possible values in a separate internal table.
    Then use this separate internal table in the FOR ALL ENTRIES clause when you perform the select on the actual data.
    Success.
    Wim

  • Cursor tips : refresh data fetched by the cursor within run time,discussion

    Hello there,
    May be what I am asking about is kind of weird, but here is the Q:
    let us assume that I have cursor defined as follows:
    cursor emp_cursor is
            select EMPNO, ENAME, deptno
            from emp
            where deptno = 10 ;
    emp_rec  emp_cursor%rowtype;  then inside the loop through the data fetched by this cursor, I need to update some records, which might match the criteria of the cursor, by trying the following code segment:
    open emp_cursor;
          loop
            fetch emp_cursor into emp_rec;
            exit when emp_cursor%notfound;
            "PROCESS THE RECORD'S DATA "
            DBMS_OUTPUT.Put_Line('count of the records: ' || emp_cursor%rowcount);
            DBMS_OUTPUT.Put_Line('deptno: ' || emp_rec.deptno);
            DBMS_OUTPUT.Put_Line('emp no: ' || emp_rec.empno);
            update emp
            set deptno = 10
            where empno= 7566;
            commit;
            DBMS_OUTPUT.Put_Line('after the update');
          end loop;
          close emp_cursor; but the run never shows the record of employee 7566 as one record of the cursor, may be this is the execution plan of the cursor,
    but for the mentioned case, need to re-enter those updated records to the cursor data, to be processed, ( consider that the update statement is conditioned so that not executed always)
    any hints or suggestion
    Best Regards,

    John Spencer wrote:
    Justin Cave wrote:
    Not possible. You'd have to close and re-open the cursor in order to pick up any changes made to the data after the cursor was opened.Then close and re-open it to get any changes made while processing the second iteration, then close and re-open it to get any changes made while processing the third iteration ad infinitum :-)I'm not claiming there are no downsides to the process :-)
    On a serious note, though, the requirement itself is exceedingly odd. You most likely need to rethink your solution so that you remove this requirement. Otherwise, you're likely going to end up querying the same set of rows many, many, many times.
    Justin

  • Data fetch from table without Refresh and without using tab key.

    hi Friends,
    I have a problem i want to extract data from table without Refresh into text field without using Tab key. when i'll enter any value in a text field then corressponding value should come in to corressponding textfield without using Tab Key.
    eg. when i enter emp_id 101 in a text field then the first_name and last_name ,adress should come in to corressponding text fields without refresh and without using Tab key.
    How Can I do this.
    Thanks
    Manoj

    Hi Manoj,
    I assume that this is similar to: Data fetch without Refresh rather than Re: Value of one textfield should come into another textfield Without Using TAB ?
    If so, the only change you need to make on the first one is to use "onkeyup" instead of "onchange" in the item's "HTML Form Element Attributes" setting.
    Note, however, that the user must move away from the item at some point (for example, to click a button), so the onchange will be triggered anyway.
    Andy

  • Attribute handling in Sun Java Directory Proxy Server join data views

    Hi all,
    I've configured a join data view and want to get rid of the duplicated attributes that show up in the search results since they are present in the primary and the secondary data view. The documentation says that this behaviour is configurable to return only the values of the primary data view but I can't find any information how to do it.
    Can anybody shed some light on this?
    Thanks and regards
    Geli

    Hi,
    If an attribute is present on both sides and if you want to consider the value(s) from one side only, use the viewable-attr or non-viewable-attr property at the data view level. You can specify which attribute(s) are /are not exposed by that data view (policy for read and write may differ).
    For more details, have a look at [http://docs.sun.com/app/docs/doc/819-0986/non-viewable-attr-5dpconf?l=ko&a=view|http://docs.sun.com/app/docs/doc/819-0986/non-viewable-attr-5dpconf?l=ko&a=view]

  • Firefox Version 27 Reporting Services Action Menu Error. An error has occurred with the data fetch.

    Hello, since I've updated to Firefox 27.0.1 on Windows 7, I'm encountering a problem with Reporting Services on a Sharepoint site. It is a Sharepoint 2010 site with SQL Server Reporting Services 2012 Sharepoint Integrated mode. I was previously on Firefox version 26 and didn't encounter this problem.
    When a report is open and you use the Actions link on the Reporting Services toolbar, I receive the following error messages.
    An error has occurred with the data fetch. Please refresh the page and retry.
    I've tried updating to Firefox 28 beta but the same error occurs. I see another user is having the same problem here. http://sharepoint-community.net/forum/topics/reporting-service-and-firefox-27
    Any help would be appreciated. Thanks!
    Ryan

    Rachel, I did perform the Sharepoint file alteration discussed in the other article and it did stop Firefox from producing the error. I've done some testing on some other browsers and have yet to encounter any problems with the fix however I'm hesitant to perform that workaround in a production environment.
    Thanks for looking.
    Ryan

  • How to join data from SAP BW and Oracle database from Webi?

    Hi,
    Need to  create a Web Intelligence Report connecting to multiple data sources.        
    Ø SAP-BW contains the data (All units).                                                                               
    Ø Oracle db contains the access security data (respective units                                                                    
    for the user).               
    Since Universe can only connect to a single data-source we have to create two universes connecting to SAP-BW and Oracle db respectively and then create a webi report to point the two universes to retrieve the equi-join data on the report.
    May I know which layer I can join the data? What kind of data I can join?
    Can I merge dimensions from both the data sources? What about measures?
    How I can create SQL query in Webi in order to simulate the join to the two data source?
    Appreciate any info related.
    thanks and regards
    nora

    Hi Nora,
    You can use Data Federator technology to federate multi-sources such as SAP BW and Oracle.
    Las you just have to create a universe on the Data Federator data source and the universe isee the data source as a single source whereas it is not.
    Then any clainet that consume uninverses can take advantage of this solution.
    Regards;
    Didier

  • Problem in data fetching

    Hi frnds ,
    When i am testing my workflow i am able to see the values properly . I am havign a activity which is caling a standard template via method which is having some parametres for fetchign the email . so the email is also going to the proper person
    But when i am executing my workflow through the program using event fm then i am not able to see any data displayed . the workflow is triggering if i use a the email as workflow initiator . But there is some problem in data fetching when i go through the program .
    Plz help
    Thanks
    Rohit

    Change this to
    declare
    begin
         go_block('fwqrecview');
    first_record;
    loop
    if :fwqrecview.chk is null then
    clear_record;
    else
    Next_Record;
    Exit When :System.Last_Record = 'TRUE';
    end if;
    end loop;
    end;
    ------------------- End Step 1---------------
    -- fetching records from block 1 -----
    ---- Step 2
         DECLARE
              CURSOR Cur_rv IS
         --     select voucherno.nextval GlVoucher,t.* from
              select inv_no,to_char(r_date,'YYYY') Year, to_char(r_date,'MM') Period,'SRV' Vtype,
              r_date Vdate, narration
              from receipt
              where inv_no = :fwqrecview.inv_no ;
              --) t ;
    BEGIN
              OPEN Cur_rv;
              GO_BLOCK('tempVmaster');
    first_record;
              LOOPi
                   FETCH Cur_Rv INTO :VM_NO,:VM_YEAR,:VM_PERIOD,:VM_VOUCHER_TYPE,:VM_DATE,:VM_NARRATION ;
                   message ('Inv...'||:vm_no);
                   EXIT WHEN Cur_Rv%NOTFOUND;
                   NEXT_RECORD;
              END LOOP;
              CLOSE Cur_Rv;
              FIRST_RECORD;
    END;
    ---- End Step 2 -------

  • Joining Dates Check ..

    Hi Friends,
    I have a query related to the joining dates for an employee.The case is as follows:
    Emp.No:1 has joined on 07-May-07 and Emp.No:2 has joined on 14-May-07,but when the HR is entering the master data in SAP by mistake he enters Emp.No:2 first and system generates PERNR as 01 and for Emp.No:1 the PERNR generated is 02,which is wrong as per the joining dates.So in SAP how do we handle such cases,i.e the SAP system should gives us an error saying that Emp.No:2 has joined later than Emp.No:1.
    Suggessions required.
    Thanks & Regards,
    Krishna Prasad.

    From Business Process point of view, why it is a requirement to allot PERNR in accordance to joining dates? In a large organisation where HR processes are decentralised, it is not practically possible to enter all data in a specific time so that the system can check this condition before alloting PERNR.
    For example: Some employee are found with earlier joining dates to be entered after initial entry of Employee Data and allocation of PERNR. In that case how this logic will work even if code is changed to take care of the condition during initial entry?

Maybe you are looking for

  • Problems printing with HP laserjet 1018

    I'm using the hplip package. CUPS sees the printer, but I can't print diddley. I followed the wiki word for word and have googled extensively but I can't seem to figure it out. I tried printing as root, and as my user, and I am in the lp group but to

  • Using mouse wheel to zoom? (Macs)

    Hi guys, I recently made the jump to Mac from PC (had been designing almost completely on PC for 12 years).  I've discovered a wealth of shortcuts for Flash CS5 on Mac, but it's missing a significant one for me: On Flash for PC, the user can press CT

  • Ibook G4 (mid-2005)

    Please help! I have an ibook G4 that came with an airport card installed, it broke when my computer fell and I would like to replace it with the new airport exttreme card, which i have purchased. how do I do this? the manuals I have found are for the

  • Can Photo Stream be a sort of a backup?

    Can iCloud's Photo Stream feature serve as a sort of backup of the photos I take on my iPhone? For example, I take 50 photos on my iPhone and they get uploaded to Photo Stream. Then within 30 days I turn my PC on and they get downloaded to the PC. Wi

  • Enable Logging for JSF?

    Some of my JSF actions are not working correctly, and I'd like to enable logging for the faces framework, to be able to see which actions are being called, etc. Is there some way to get faces to write out to a containe rlog file, or even the console?