Bapi BAPI_GET_PAYROLL_RESULT_LIST fetches wrong sequence number

Hi,
I am using bapi BAPI_GET_PAYROLL_RESULT_LIST to get the sequence number by passing personal number and date range. This bapi instead of fetching the supplied period's sequence number, it fetches sequence number one less than expected.
This data can be viewed from transaction pc_payresult. Can anybody suggest please.
Regards,
Taj.

The infotype has to be changed to relevant.
Edited by: Mohd Tajuddin on Dec 20, 2009 8:45 AM

Similar Messages

  • Sequence Number problem.

    I have situation like this:
    I am creating text files from a procedure and i am making FILE NAME as follows.
    v_file_name := v_document_code || '_' || p_printer_id || '_' || p_quote_ref_id || '_' || v_reference_id;
    All above values i have in my procedure, now i need to insert a sequence number ( or a Auto Number thing) for a file such that everytime when any file created it should have a different number.
    I tried sequence number concept but i am not getting any result.
    I have made a sequence SEQ_DAT_FILE_NUMBER and used it as follows
    v_file_number := ' SELECT SEQ_DAT_FILE_NUMBER.NEXTVAL '
    || ' FROM DUAL ' ;
    v_file_name := v_file_number || '_' || v_document_code || '_' || p_printer_id || '_' || p_quote_ref_id || '_' || v_reference_id;
    but i didn't get any result.
    Please provide any information to solve this problem.
    Thanks in Advance.
    Regards,
    AgrawalV

    if you didn't get any result, what you have got.... i mean an error or an worng output or what....
    there seems to be no problem in the code, except the method of fetching the sequence number in the variable,
    v_file_number := ' SELECT SEQ_DAT_FILE_NUMBER.NEXTVAL '
    || ' FROM DUAL ' ; rather do like this:
    SELECT SEQ_DAT_FILE_NUMBER.NEXTVAL INTO v_file_number FROM DUAL;

  • BAPI to fetch Delivery Data for  a given delivery number

    Hi Experts,
    Is there any SAP Standard BAPI to Fetch the Delivery/Picking data.
    Just to fetch  all the Delivery/Picking related data from SAP on Providing a Delivery Doc number.
    I will be thankful to you , if u let me know how to connect VB application to SAP using BAPI to fetch the data to VB application.
    Thanks & regards,
    Prashanth

    Go thru these links
    [link1|http://help.sap.com/saphelp_nw04/helpdata/en/6f/1bd5c6a85b11d6b28500508b5d5211/content.htm]
    [link2|http://searchsap.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid21_cid417095,00.html]
    [link3|http://www.experts-exchange.com/Database/Software/ERP/SAP_ERP/Q_20693539.html]
    Regards,
    SAPient

  • BAPI to fetch equipment number from AUFNR in ISU

    Hi,
    I have a requirement to fetch the equipment details of a Work Order (from the OBJECTS tab in transaction IW33).
    Also if anybody could suggest a BAPI to fetch installation from the work order number it would be very useful.
    Thanks.

    Hi Anand,
      You can use BAPI 'BAPI_ALM_ORDER_GET_DETAIL' to fetch the equipment details from OBJECT tab of IW33 transaction.
      You can get equipment details from ET_OLIST.
      Hope this may be helpful.
    Regards,
    Sravanthi

  • Sequence number in pre-insert form trigger

    i have two tables invoice (master) inv_detail(detail) and assign the invoice number using a sequence number,
    by writing the folowing code in the pre-insert trigger
    select a.nextval into :inv_no from dual;
    ( i make the trigger at the form level becuause i have a master (invoice) and detail (inv_detail) relation at the same screen,so i must fetch the value of the
    sequence into the :invo_no in the screen,to let the 'copy value from' property at the detail block works so the value of the foreign key will be copied from
    the sequence number at the screen.
    will this method be a good one for multi user envirment(to select the a.nextval in the pre-insert trigger at the from level?)

    Kevin, thank you for the correct explanation. I was making an assumption and of course it was wrong.
    Mohannad, please do not try to link the invoice count with the sequence number. Any time you need a count, just do a select count(*). The sequence number is ONLY a unique key, and should represent nothing else.
    People have discussed this situation heavily. If you insist on trying to ensure there are no gaps, you will:
    1. Fail -- there are many scenarios where gaps will occur.
    2. Waste your time.
    3. Whatever process you build to try to prevent gaps will cause unnecessary overhead and work for the server, and in a multi-user environment, cause processing bottlenecks due to table locks.

  • Wrong Operation number(Activity  Number) showing in Production Order

    Friends
    I have created a production order.
    Wrong Operation number(Activity  Number - RESBD-VORNR) is  showing for some of the Production Order components(all are phantom components only)   where as the activity number in its  Routing components (RCM01-VORNR) is different. So we need to change the activity to correct activity manually in change production order screen(CO02)
    I found one  SAP Note 104322 - Error in reallocating phantom (When reallocating phantom components in a production order to another operation, different errors can occur:
    --  not all dependent components are allocated to the correct operation). We are on ECC 5.0 . This note already exists in our system
    This issue happened only with one BOM . Many other BOMs ( similar type) donot have this issue.
    Can some one from the group help me to resolve this issue?
    Thanks in advance
    Please let me know if you guys need more details
    Thanks
    MVSSAI

    Hi MVSSAI,
    I am just a bit confused if you are talking about wrong operation nos. or wrong activity nos. If I am correct, it should be wrong operation nos. which fetches the activities that are defined in that work center.
    If wrong operation nos. is getting selected then
    Please check if the system is configured with alternative sequence under T.Code: CA01 for a particular group & group counter (just in case you are using nos. of routings for the single material).
    If yes, then check if you have defined priority of the sequence i.e. in which order it has to taken.
    If yes, further check if you have aligned automatic routing selection depending upon the B.O.M. alternatives in routing itself.
    Just in case you have maintained any of these the routing will get automatically selected depending upon the priority that is given to work center and hence different operation nos.
    Regards,
    Pankaj

  • Fetch Sales Order number VBELN from Purchase requisition number BANFN

    Hi,
    I'm not able to find a suitable method to fetch the sales order number(VBELN) from the purchase requisition number(BANFN).
    I tried using VBEP table to fetch the data, but it is giving serious performance issues, as in for fetching one record it is taking approx 20 seconds!!!
    Kindly suggest a suitable method for this.
    I've used the query as folllows:
    select single vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
    Scenario in brief described below:
    Whenever a direct delivery sales order is created on a supply chain plant, a dummy purchase requisition without source of supply is created automatically at preferred supplying plant for the customer in the sales order. Direct Delivery Sales Orders which are still in Open status and for the associated dummy purchase requisitions with these sales order, the deletion flag set has to be unchecked.
    in this case, only one sales order is created corresponding to a preq..
    BAPI: BAPI_PR_GETDETAIL is not giving entries for the table as this is a special case of direct delivery from the production plant directly to the customer, bypassing the warehouse / distribution center...
    selection screen has input fields preq, matnr(product) and plant. we fetch entries depending on the data filled in selection screen and also they should be of document type(BSART in EBAN table) ZDD1 and deletion indicator is set(LOEKZ in EBAN).
    then we check if the sales order corresponding to the preq is in open status...
    for this i need to programmatically fetch the sales order number corresponding to the preq...
    this is causing a performance issue as i could find only one way -- fetching sales order number from VBEP table corresponding to BANFN... indexing for easier also didnt work...
    no other way i could find to fetch sales order number corresponding to the preq number....
    there is a bapi: BAPI_PR_GETDETAIL, but this is not fetching entries to the changing tables related to sales order...
    also EBKN table doesnt have any entries as this is a special case of direct delivery preq..
    Guess i couldnt find anyother way...
    Thanks.

    I'm not sure as to why the select query was still throwing performance issues. I could see that the index had been created on only BANFN in the DB. Prior to creating the index, it was taking approx 20 seconds per entry, but after creating the index, it took 13seconds approx.
    I used the select query as follows:
    select single vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
    I tried a few other combinations also, but  those also didnt work effectively:
    select vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    without using SINGLE in the select query as the select query would implicitly pickup only a single record,
    select vbeln banfn
    from vbep
    into wa_vbep
    where banfn eq wa_eban_zdd1_x-banfn.
    and another query where the INTO statement was directed directly to a workarea.
    But unfortunately, nothing seemed to be working.
    The index i had created was on BANFN alone in the VBEP table.

  • BAPI for fetching the list of scheduling agreements

    This is my first post in SDN Forums so pardon me if I commit a mistake.
    My question is: Is there a standard BAPI for fetching a list of scheduling agreements?
    I know that there are BAPIs for creating and maintaining scheduling agreements like BAPI_SAG_CREATE and BAPI_SAG_CHANGE and iBAPI_SAG_GETDETAIL but each of these require the scheduling agreement number. My requirement is to list out all the scheduling agreements that are present in the system.
    I found a BAPI named BAPI_DOCUMENT_GETLIST and BAPI_DOCUMENT_GETLIST2 but I'm not able to find out what documents it is able to display. If I don't specify any selection criteria, it is fetching just two records of document type DRW. No other document of any other type is fetched.
    Another BAPI that I found was BAPI_SALESORDER_GETLIST in which if I specify the Transaction group as "3" (for scheduling agreement), it fetches them but those are related to Sales orders and not purchase orders.
    So, if anyone has any info and can help me out, I would really appreciate it.
    Edited by: rkarthea on Jul 30, 2010 10:44 AM

    Hi Raj,
    As I had said earlier, I need the Scheduling agreements related to purchase orders and not sales orders. The ones in EKKO table (Doc category: L).Will this program fetch this info?
    Also, I need a Java app (that's being developed) to fetch this info, so I'm looking for a BAPI. Is there any or can this program (if it fetches the right Scheduling agreements) be called from an external Java app?

  • Error in mail sender channel : invalid sequence number

    Hello all,
    I'm having the following issue.
    I'm using the mail adapter to get messages from a mail server, which are attached to the mail.
    This interface is already productive, and is working fine most of the time.
    Only frequently I get the following error, which can be found in the java log.
    exception caught during processing mail message[630];
    java.io.IOException: the specified message not found: -ERR invalid sequence
    number
    This error seems only to appear when there are a lot of mails to be fetched.
    All the mail is read into PI and processed succesfully, only I also get a lot these errors.
    Does anyone know what causes this error?
    I also don't know where this sequence number is coming from, and what's the meaning of this.
    Is it possible it's trying to read the same mail more then once?
    The settings in the mail sender channel are:
    - transport protocol : POP3
    - message protocol : XIPAYLOAD
    - Use mail package : enabled
    - content encoding : none
    - Keep attachments : enabled
    - QOS : exactly once
    - Set adapter specific message attibutes : enabled
    The PI version is 7.01
    Thanks a lot in advance for the replies on this question.
    Kind regards,
    Marco van Iersel

    Hi
    Well we have used it with POP3 and it is working in the way as it should be.
    This feature is recommended  by sap when the number of emails to be read is large.
    You can set this additional parameter to restrict the number of mails fetched by sender mail adapter in one polling interval.
    Sometimes the mailbox configured for the sender mail adapter contains large number of unread mails, which exceeds the average expected number of mails in one polling interval. In such a case, processing of all the unread mails in the same polling interval by sender mail adapter degrades the system performance. To avoid this, set value of this parameter to the maximum number of mails to be fetched and processed in one polling interval. The remaining mails exceeding the limit would be processed in the next polling interval.
    That's why I have asked you to give it a try.

  • Sequence number in Trigger

    I'm trying to create an insert trigger that will do the following:
    1.) Grab the next sequence number from a sequence and use it as the value for the id_number column.
    2.) Grab the SYSDATE and use it as the value for the create_date column.
    I'm using Oracle 8.1.6 on HP-UX. Here's my syntax, so far:
    CREATE OR REPLACE TRIGGER tI_GRANT_TEST_CHILD before INSERT on GRANT_TEST_CHILD for each row
    declare curDate DATE;
    declare idNumber NUMBER;
    begin
         SELECT SYSDATE into curDate FROM DUAL;
         SELECT GRANT_TEST_SEQ.NEXTVAL into idNumber FROM DUAL;
         :new.CREATE_DATE := curDate;
         :new.ID_NUMBER := idNumber;
    end;
    I'm pretty new to Oracle, so I've probably got a syntax error. The trigger worked fine when I just had the create date functionality; but, I can't get the sequence stuff to work.
    Also, anyone know any good links for Oracle syntax standards?
    Thanks for the help.

    I don't see anything wrong with the syntax in your example, but the trigger can be simplified to:
    create or replace trigger ti_grant_test_child
    before insert on grant_test_child
    for each row
    begin
      select grant_test_seq.nextval
        into :new.id_number
        from dual;
      :new.create_date := sysdate;
    end;
    /You can type SHOW ERRORS after compiling in SQL*Plus to see the actual errors.

  • Sequence Number in File Name

    Hi All,
    I have a requirment where the Output file name should be appeneded with a sequence number which needs to be in sync with the number of records processed.
    Each time this sequence has to be started from the previous number where it ended.
    The soultion at the moment we have used it to store each time this counter in a file and read is back and update when done. Other solution is to meke use of the Tabe on ECC side
    Is there any solution with in the map it self to maintain this number.
    Any help will be appreciated.
    Thanks
    -Kulwant

    Hi Kulwant,
    Within Mapping you cannot save the counter as container and even global variables are flushed once the mapping is executed for the message, so i think we cannot do it using mapping.
    Also, dont know if you have tried OS commands feature provided by SAP for file adapter explained in link below:
    [/people/santhosh.kumarv/blog/2008/07/27/glimpse-at-os-command-yet-another-scenario]
    We can first create the file on some temporary location of the application server and then execute a batch file which would contain the code to fetch previous count(variables in OS commands can hold this value) and increment the same and copy the flie thus created by communication channel by appending the count to file name and also delete the file created by communication channel.
    Hope this helps !
    Regards,
    Amit

  • File name generation with sequence number

    Hi All,
    My scenario is, File to File.  I need to generate the filenames at the target side like File1.xml, File2.xml..File9999.xml for each file triggered from source system. The interface tiggesrs multiple times in a day.
    For example, for the first time, 5 files triggered, need to generate File1.xml,File2.xml..File5.xml. After some time the interface might trigger with 10 files, then need to generate files as File6.xml,File7.xml....File15.xml . Once the file count reaches 9999 then need to generate the files from  1 (File1.xml)again.
    Could you please suggest me the possible solutions. For this any Lookups required?
    Regards,
    Praveen Kumar

    Hi Praveen,
    Case 1: If a field in source data carries the information regarding the sequence.
                 You can map this value ( Directly .. or using some transformation ) in some temporary field in the target and then use a Variable substitution at the receiver communication channel.
    Case 2. If the source file name carries the sequence information. then you can enable the Adapter specific settings in the Sender communication channel , and then get the information of the source file name using the Container object in the mapping. Then assign the sequence number to a field in the target , use a Variable substitution at the receiver communication channel.
    Case 3 : If Case 1 and Case 2 are not applicable ... then you have to use a  Ztable  to store the sequence number , a function module to fetch the number , and then use a UDF  in which you will implement the  RFC call logic.Then the same process ....      assign the sequence number to a field in the target , use a Variable substitution at the receiver communication channel.
    BR,
    Sushil.

  • Enq: TX - row lock contention in forms 10g sequency number generation

    Iam Getting the Deadlock issue in oracle formdeveloper 10g database is 11g Acutually in our small Hospital organization using different forms generating entrying labrequest form finally save time
    one sequency number will generated i have give procedure below every save criteria form using below procedure some time iam getting lock iam using blocksession query i have find out some
    OSUSER
    MACHINE
    TERMINAL
    PROGRAM
    SQL_ID
    LOGON_TIME
    BLOCKING_SESSION_STATUS
    BLOCKING_SESSION
    EVENT
    user423
    UMCCDOM\LEVEL4-MICU
    LEVEL4-MICU
    PrjMcr.EXE
    0ccngw7dfkmgb
    23/09/2013 11:34:41 AM
    VALID
    277
    enq: TX - row lock contention
    SYSTEM
    WORKGROUP\PRIAPPSVR
    PRIAPPSVR
    frmweb.exe
    0ccngw7dfkmgb
    23/09/2013 11:32:50 AM
    VALID
    186
    enq: TX - row lock contention
    SYSTEM
    WORKGROUP\PRIAPPSVR
    PRIAPPSVR
    frmweb.exe
    0ccngw7dfkmgb
    22/09/2013 2:49:47 PM
    VALID
    277
    enq: TX - row lock contention
    SYSTEM
    WORKGROUP\PRIAPPSVR
    PRIAPPSVR
    frmweb.exe
    0ccngw7dfkmgb
    23/09/2013 7:00:22 AM
    VALID
    186
    enq: TX - row lock contention
    user290
    UMCCDOM\LEVEL2-N
    LEVEL2-N
    PrjMcr.EXE
    0ccngw7dfkmgb
    23/09/2013 10:28:06 AM
    VALID
    277
    enq: TX - row lock contention
    lock are happen after open the code i have find out used FOR UPDATE in procedure please tell me any alternative for this every labrequest form saving time using this procedure for generating prefix sequence number multiple user using with different systems
    PROCEDURE   Gsp_GenSeqNum (I_SvPrefixCd IN VARCHAR2,I_SvUserName IN VARCHAR2,
                              O_SvSeqNum OUT VARCHAR2) IS
    --This Procedure generates the sequence number
    --by retrieving the prefix based on the code
    --supllied to the procedure.
      CURSOR  crSeqGenerator IS
             SELECT Gsn_prefix_last_num, Gsn_prefix_year
                FROM G_SEQUENCE_NUMBER
             WHERE Gsn_prefix_Cd = I_SvPrefixCd
                   AND Gsn_prefix_year = TO_CHAR(SYSDATE,'YYYY')
      FOR UPDATE OF Gsn_prefix_last_num;
      udSeqNum        G_SEQUENCE_NUMBER.Gsn_Prefix_last_num%TYPE;
      udNextSeqNum    G_SEQUENCE_NUMBER.Gsn_Prefix_last_num%TYPE;
      udYear          G_SEQUENCE_NUMBER.Gsn_Prefix_year%TYPE;
      udPrefix        G_SEQUENCE_PREFIX.Gsp_Prefix_Value%TYPE;
    BEGIN
      SELECT Gsp_Prefix_Value
      INTO udPrefix
      FROM G_SEQUENCE_PREFIX
      WHERE Gsp_Prefix_Cd = I_SvPrefixCd;
      OPEN crSeqGenerator;
      FETCH crSeqGenerator
       INTO udSeqNum,
            udYear;
      IF crSeqGenerator%FOUND THEN
         udNextSeqNum  :=udSeqNum + 1;
         O_SvSeqNum     := udPrefix||'/'||TO_CHAR(SYSDATE,'YY')
                                   ||'/'||LPAD(TO_CHAR(udNextSeqNum),6,'0');
      ELSE
    INSERT INTO G_SEQUENCE_NUMBER VALUES(I_SvPrefixCd,TO_CHAR(SYSDATE,'YYYY'),0,I_SvUserName,SYSDATE);
         udSeqNum      :=0;
         udNextSeqNum  :=udSeqNum + 1;
         O_SvSeqNum:=UdPrefix||'/'||TO_CHAR(SYSDATE,'YY')
                             ||'/'||LPAD(TO_CHAR(udNextSeqNum),6,'0');
      END IF;
      UPDATE G_SEQUENCE_NUMBER
         SET Gsn_Prefix_last_num=udNextSeqNum
       WHERE Gsn_Prefix_Cd = I_SvPrefixCd
         AND Gsn_Prefix_year=TO_CHAR(SYSDATE,'YYYY');
      CLOSE crSeqGenerator;
    END Gsp_GenSeqNum;
    Thanks
    subbu

    This application is inbuit with some modules VB (cath ,cardio)and oracle forms for required sequence number generation different time used this procedure whereever required the sequence Prefix generation.If i replace the procedure sequene to oracle standard sequency if the user cannot save the form unnessary sequency generated order is missing from sequence.

  • Generating Sequence Number

    Hi,
    I have created a Query form. I had displayed the sequence number of the record displayed by selecting rownum from the table.
    Now I have added a order by clause in the query. So the rownum is not displayed in the order.
    I have created a small procedure to generate the sequence number.
    I would like to know from which trigger I should call this procedure.
    procedure resequence is
    v_cursor_record number;
    v_position number;
    begin
    v_cursor_record := to_number(:system.cursor_record);
    v_position := v_cursor_record;
    loop
    :detail.item := v_position;
    v_position := v_position + 1;
    exit when :system.last_record = 'TRUE';
    Next_record;
    end loop;
    go_record(v_cursor_record);
    end;

    Thanks for your reply. I have tried this method.It assigns value only for the first record in the block. As the post query trigger is not passing the control to other items ,though more than 10 records are fetched the sequence is generated only for the first record.
    Any other method to achieve this?

  • ALE Change pointer idocs generated in wrong sequence

    We are using the serialization group to generate the MATMAS and CLFMAS idocs with the sequence MATMAS generated first and then CLFMAS.
    Normally,this seems to work fine with the idocs generated in the right sequence.
    However, during a period of every 24hours, I could see a couple of MATMAS and CLFMAS idocs being generated in the WRONG sequence with CLFMAS generated first and not MATMAS as maintained in the serialization group.
    What could be the reason?
    I checked in the BDCP and BDCPV tables, the timestamps for the wrong sequence idocs seem to be correct with MATMAS before CLFMAS. However the actual idoc creation time is not in correct sequence.

    Hi,
    Can you check your serialization group via tcode BD44 and check the sequence number for MATMAS and CLFMAS?
    Hope this will help.
    Regards,
    Ferry Lianto

Maybe you are looking for

  • Time Machine Causes Lion to Completely Crash

    To set the scene I have been working with Macs from System 7 onwards, I recently upgraded my i5 Macbook pro 13" to Lion. I decided the other day to start using Time Machine. I have set it up before for other people and usually found it to be very str

  • BSIS and BSIK table Fields

    Dear Experts, I m coding a Vendor GL report and using bsik and bsis table. problem is when i check for a document ( say 1100000290 open document), i dont get any entry of prctr, bupla or secco in bsis and bsik tables. but when i chek same document in

  • Clear GL account - FBL3n shows net '0'

    Hello   I have a GL posting which is seen as 500,000 and 500,000 in FBl3n. Net is 0. I want to clear that out from the system. So, I went to F-03. but it says "There are no open item managed for tthis GL'. How can I clear this GL. Please help, how ca

  • Percent of total and percent of completion?

    would anyone mind helping me with which equations to use for a "percent of total" and percent of completion equations? i have a total amount and i would like to list the various items that make up this total in chronological order so i can see the pe

  • EP-635 problem - only one channel playing

    Ok, here's the deal - on the other day left channel of my EP-635 earphones sudennly stopped working. I wasn't doing anything, it just broke by itself. I touched the cable everywhere to find where's a gap and found out that the problem is inside this