How to get all records of 0041 for a given PERNR

I have to display Most Recent Hire and Original Hire date.
So I am using this below code:
  0041 - Date Specifications
    rp_provide_from_last p0041 space pn-begda pn-endda.
    IF pnp-sw-found EQ '1'.
      MOVE: p0041-dat01 TO wa_final-dat01,
            p0041-dat03 TO wa_final-dat03,
            p0041-dat02 TO wa_final-dat02.
But for few PERNRs we are having wrong data and below is the explanation from my functional guy:
I figured out the above when I ran the report for all employees and noticed some dates were out of sequence.  The reason for the code change is because Payroll has to input NR in the P0041-DAR** field (used in payroll calculations to allow additional contributions to Savings Plans for employees who are near retirement) and it automatically places this future retirement date in P0041-DAT01.
So if I see at PA0041 for a given few PERNRS, am having couple of records and the last record is for the retirement calculations and hence am getting wrong dates into my display. I need the first record for this kind.
Thanks
Kiran

Hi,
here is the piece of code using field symbols for accessing dates from pa0041....
  FIELD SYMBOLS
FIELD-SYMBOLS:<f_dar01> TYPE ANY,
                        <f_dat01> TYPE ANY,
                         <f>       TYPE ANY.
form read_pa0041 .
  DATA:    l_date               TYPE dardt,
           l_date_type          TYPE datar.
  CLEAR : v_data  ,
          v_date  ,
          v_days  .
  v_cnt = 1.
  DO 12 TIMES.
    CONCATENATE 'p0041-dar' v_cnt INTO v_data.
    CONDENSE v_data NO-GAPS.
    ASSIGN (v_data) TO <f_dar01>.
    IF <f_dar01> = 'U5'.
      CONCATENATE 'p0041-dat' v_cnt INTO v_data.
      CONDENSE v_data NO-GAPS.
      ASSIGN (v_data) TO <f_dat01>.
      v_date = <f_dat01>.
      EXIT.
    ENDIF.
    v_cnt = v_cnt + c_1.
  ENDDO.
then you can use the date fetched in v_date  as per your requirement..
  IF NOT v_date IS INITIAL.
I hope u will get some help
Thanks & Regards
Ashu SIngh

Similar Messages

  • How to get all the approver list for a particular transaction in iExpense

    Is there any API to get all the approver list for a particular transaction in iExpense workflow after submitting an expense report?

    Hi All,
    Could anyone please let me know API to get all AME approvers in one go.
    I am currently using below API to get approver list.
    ame_api.getallapprovers (applicationidin => 201 , -- PO
    transactionidin => l_document_id , -- req header id
    transactiontypein => 'PURCHASE_REQ'
    ,approversout => l_appr_list
    But if any of the approver is INACTIVE then API is going into exception and not showing all approvers. Requirement is like to show all approvers with their statuses (ACTIVE / INACTIVE).
    Reply ASAP.

  • How to get the date of Friday for the given week

    HI,
    I have a requirement to get the date of Friday for the given week.
    Eg: I have an input of 200722 (Yearweek), From this I need to get the Date of the friday for this week 22 of Year 2007.
    Plz let me know how to get this..
    Thanks in advance..
    Sridhar.

    Hi,
    Thanks for your reply...
    I have implemented your logic but not getting exact output as required.
    Suppose, If i give the input as 200720, I am getting an output as 18 (friday of week 20 of year 2007), but i need to get an output of 18.05.2007
    Plz let me know how to do thdi.
    Thanks in advance..

  • How to get all records created this month?

    Ok I'm trying to write a query that would get records that were created this month or later but not in the past.
    So today is Nov 16th 2009
    I need to look for all records created from 11/2009 and onward (>11/2009)
    Any ideas?

    Do you have any field like "create_date" on that table ? Here is simple qry
    with t as ( select 1 as id,to_date('01-OCT-2009','DD-MON-YYYY') as create_date from dual
    UNION
    select 2,to_date('11-OCT-2009','DD-MON-YYYY') from dual
    UNION
    select 3, to_date('02-NOV-2009','DD-MON-YYYY') from dual
    UNION
    select 4, to_date('01-NOV-2009','DD-MON-YYYY') from dual
    UNION
    select 5, to_date('13-DEC-2009','DD-MON-YYYY') from dual)
    select * From t
    where CREATE_DATE >= trunc(sysdate,'MON')Edited by: rkolli on Nov 16, 2009 1:23 PM

  • How to get all records using Invoke-webrequest?/Why Invoke-webrequest returns only first 2000 Records?

    invoke-webrequest content returning only 2000 records though it has around 4000 records in web api.
    The same url if I give in excel oData Data feed I am getting all the records.
    See the below script
    Script:
    $QueryResult= (Invoke-WebRequest -Uri $ODataURI -UseDefaultCredentials)
    [xml]$xmlResult=$QueryResult.content
    foreach($obj in $xmlResult.feed.entry.content.properties)
    $Name=$obj.Name;
    $IsAvail=$obj.isAvail.'#text';
    $PGroup=$obj.PGroup
    I am exporting the above result as a CSV file and my CSV file contains only 2000 records. 
    But,  $xmlResult.feed.Count --> it Shows 4000 Records.
    The same Odata url if I give in excel oData Data feed I am getting all the 4000 records.
    So Please help me how can I get all the records using power shell.
    Thanks
    A Pathfinder..
    JoSwa
    If a post answers your question, please click &quot;Mark As Answer&quot; on that post and &quot;Mark as Helpful&quot;
    Best Online Journal

    Hi Jo Swa(K.P.Elayaraja)-MCP,
    Would you please also post code which is used to export the records?
    In addition, to use the cmdlet invoke-RestMethod to work on ODate feeds, please refer to this article:
    Interacting with TechEd NA 2012 Schedule using PowerShell v3
    I hope this helps.

  • Using a waveform graph, how to get all recorded data graphed?

    I record data from 6 channels using DAQmx with simulated channels and write to measurement file.  Then using read from measurement file, and waveform graph, I am trying to graph the data that has been recorded.  I am only getting a small amount graphed.  The same graph appears whether I have let the measure and record program run for 1 minute or for ten minutes.  It also displays a time at the end of the graph that is in the future.  What am I doing wrong?  Please help.
    Hillis Pratt, Jr.

    I am attaching the two VIs I have been trying to use.  I started with examples from NI and didn't go far from that.  Any assistance would be appreciated. 
    Attachments:
    Measure and Record Six Voltages with Express1.vi ‏119 KB
    Graph Measurement Files1.vi ‏89 KB

  • How to get the record count printed for the report in the Dashboards

    Hi,
    I would like to get the record count printed at the bottom of every dashboard report like:
    < 1 - 25 of 6300 > instead of < 1 - 25 >
    Any help is appreciated
    Regards
    B

    I have tried the following formula which identifies the lowest grain but it does not seem to give me correct result.. I am not getting the correct count. I am getting as 3.A work order can be updated only once at one point of time.hence the formula
    MAX(RCOUNT(CAST("SR Wo Fact"."Crm Wo Number" AS CHAR) ||CAST("SR Wo Fact"."PSC Timestamp" as char)))
    I tried only MAX(RCOUNT(1)), but I was able to get the record count as corect for Administrator but not for other users.
    Has anyone come across this scenario.
    Thanks Shravan
    Edited by: 786443 on Aug 19, 2010 10:22 AM

  • How to get ALL values as default for  a drop down box in JSF

    Hi,
    I have a drop down box in JSF page which retrieves values from LOVCache.java. I have values like Company, Client, User, ALL in the drop down box.
    By default blank value is selected for the drop down box. I want to make ALL(which retrieves data for all the values) as default value for the drop down box.
    Could any body help me? Any help must be appreciated.
    Thanks,
    Aseet

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • How to discover all available font styles for a given family?

    I'm using InDesign CS3 and need to discover all of the available styles for any given font. I've found Application.Fonts.itemByName(), but this only returns a single font by the full name. Using ExtentScript in CS3 How can I ask for ALL font styles for any given font family (as displayed in the styles drop-down?)
    Thanks!

    hey,
    I was just searching the web trying to find why this piece of code:
    for (var i = 0; i <app.fonts.length;i++) {
         app.fonts[i]..... some other code
    take 4+ minutes to execute.
    app.fonts.everyItem().getElements(); did the trick, sweet!!
    However, I would like to ask you whether you know if there is some handout or some guide (possibly online page) for such advanced scripting...
    or how did you find this solution?
    thank you very much for this post, anyway
    regards
    jenda

  • How to get all the line items for each Purchasing Document ?

    Hi,
    There are multiple purchase orders (EBELN) in PSA with different line items (EBELP). But, when loaded into ODS from PSA, I am getting purcahse orders with only one Line item.
    Eg.,If the EBELN has a Record# 4000005 and has 3 line items in it (10,20, 30), I am receiving 10 or 20 or 30 Line item.
    As there are more than one line item per PO, how can I retreive all of them?
    Also, there are no conditions / routines in transfer structure and update rules.
    Please let me know

    problem solved.
    I moved the EBELP field from Data fields to Key Fields in ODS.

  • How to get all records from department wise having max salary?

    i have a Employee table which consist
    id | name | dept_id | Salary
    1 A 1 20
    2 B 1 25
    3 C 2 30
    4 D 2 25
    Search max salary department wise with all details like below result.
    id | name | dept_id | Salary
    2 B 1 25
    3 C 2 30

    Could you try this?
    create table employee (id int, name varchar(10), dept_id int, salary int)
    insert into employee values (1,'A',1,20)
    insert into employee values (2,'B',1,25)
    insert into employee values (3,'C',2,30)
    insert into employee values (4,'D',2,25)
    select e.* from employee e inner join
    (select a.dept_id , max (a.salary) as 'max_salary' from employee a
    group by a.dept_id ) b
    on e.dept_id = b.dept_id
    and e.salary = b.max_salary
    order by e.dept_id
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • How get all record from master and matching record from detail

    hi master
    sir i have master detail table
    i have many record in master table but some record in detail table how i get
    all record from master and matching record from detail
    such as
    select m.accid,m.title,d.dr,d.cr from master m, detail d where m.accid=d.accid
    this query not work that get only related record i need all record from master
    please give me idea
    thanking you
    aamir

    hi master
    sir i have master detail table
    i have many record in master table but some record in
    detail table how i get
    all record from master and matching record from
    detail
    such as
    select m.accid,m.title,d.dr,d.cr from master m,
    detail d where m.accid=d.accid
    this query not work that get only related record i
    need all record from master
    please give me idea
    thanking you
    aamir
    select m.accid,m.title,d.dr,d.cr
    from master m, detail d
    where m.accid=d.accid (+)The outer join operator (+) will get you all the details from master and any details from the detail if they exist, but the master details will still be got even if there are not details.
    Note: Oracle 10g now supports ANSI standard outer joins as in:
    select m.accid,m.title,d.dr,d.cr
    from master m LEFT OUTER JOIN detail d on m.accid=d.accid

  • Hierarchical query - How to get all parent records - Duplicate post

    Hi,
    In Oracle, START WITH, CONNECT BY commands will give all the direct and indirect child records. Other way round, is they are command which gives all the parent records till the root? Please let me know. I am working on Oracle 9i Release 2.
    Thanks a lot for your help.
    Edited by: skv on Nov 21, 2008 11:05 AM

    Duplicate post.
    Hierarchical query - How to get all parent records
    Please edit this post heading to duplicate post.
    Regards.
    Satyaki De.

  • My dad and I have shared an iTunes account for years and I just created a new apple id but I have no Idea how to get all those purchases to this new account. Help please?

    My dad and I have shared an iTunes account for years and I just created a new apple id but I have no Idea how to get all those purchases to this new account. Help please?

    The old Apple ID (presumably your dads) owns those songs and your new Apple ID does not.  However, your dad can authorize your iD to use the songs by going to Store > Authorize This Computer from your iTunes menu and entering his Apple ID and password.

  • Have an ipod and then got the wife an iphone4. all passwords are screwed up. she can not access playstore cuz she doesn't have password. i can not get find any help on how to get or update a password for the ipod. and then get her a separate password for

    have an ipod and then got the wife an iphone4. all passwords are screwed up. she can not access playstore cuz she doesn't have password. i can not get find any help on how to get or update a password for the ipod. and then get her a separate password for her iphone. we need to save her photos, music, etc to ? icloud and the phone stuff to verizon cloud? so when she gets her new Iphone6 she can have all her "stuff" back on the new phone. hope this makes sense. please offer suggestions here or at [email protected] thanks for your help!

    Oh no! I'm sorry to see there's a lot of confusion here and data shared, x-rayDon. We can definitely work to fix. This happens when two devices share the same Apple ID, so she will need to reset hers. She can do so by assessing this link Apple - My Apple ID. You will need to decide who will keep the account if want separate Apple IDs since purchases cannot be shared unless you do Family Sharing.
    RobinD_VZW
    Follow us on twitter @VZWSupport

Maybe you are looking for

  • BI objects for Physicial Inventory

    Hi Bi Experts Any idea if Sap standard data sources exist for Physcial Inventory aplication. I need create queries with information about Physcial Inventory Documents in Inventory Mangement and in Warehouse Management. Those are ISEG and LINV tables

  • Show Front Panel form VGA output of CVS

    I have built a stand-alone Real-Time Application on my CVS by following the method in 'RT_Getting_Started.pdf' file, and I think it is successful (because the 'startup.rtexe' file is already created in the startup folder in CVS). I was set the applic

  • Buffer acquisitio​n with NI-IMAQ 1394

    I would like to be sure that the acquisition frame rate is constant despite some image processing. It's why i need to use a buffer (with more than one image) as it seems possible to do with standard NI-IMAQ. I didn't find such options with IMAQ 1394

  • Can i make all inboxes the default that opens each time i open mail

    Can I make "all inboxes" the default that opens each time I check mail?

  • Blank Grey Screen on start up cannot access MAC OSX frozen up

    Blank grey screen on start up Cannot get into the Mac osx side, even if I do not hold down the option key it goes to the Windows side but key boad / mouse does not work. I want to get into the mac side so I can delete the windows partition. HELP PLEA