FM for delimit the infotype record

Hi
I'm new to HR-ABAP.I need to develop function modules to delimit the some infotype records (eg: 0167,0168,0014,2006 etc)
Presently i developed the function module that has following source code.
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
    EXPORTING
      number        = empno
CALL FUNCTION 'HR_READ_INFOTYPE'
    EXPORTING
     tclas                 = 'A'
      pernr                 = empno
      infty                 = '0167'
      begda                 = delimitdate
      endda                 = delimitdate
  BYPASS_BUFFER         = ' '
  LEGACY_MODE           = ' '
IMPORTING
  SUBRC                 =
    TABLES
      infty_tab             = itab "itab is of the structure p0167
enddate = itab-endda.
MOVE delimitdate TO itab-endda.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
      infty                  = '0167'
      number                 = empno
      subtype                = itab-subty
      objectid               = itab-objps
      lockindicator          = itab-sprps
      validityend            = enddate
      validitybegin          = itab-begda
      recordnumber           = itab-seqnr
      record                 = itab
      operation              = 'LIS9'
      tclas                  = 'A'
      dialog_mode            = '0'
  NOCOMMIT               =
  VIEW_IDENTIFIER        =
  SECONDARY_RECORD       =
   IMPORTING
     return                 = return
  KEY                    =
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
    EXPORTING
      number        = empno
when i use 'MOD' operation in FM 'HR_INFOTYPE_OPERATION' that FM runs perfectly.it changes the enddate to delimit date in the table PA0167.
But, when i use 'LIS9' (delimiting) operation FM is throwing following error message
"E PG  428 A complex application error has occurred".
I need help regarding this error statement.can i use 'MOD' operation to delimit the records (time constraint of most of the infotype record to be delimited is 2).In which case we use 'LIS9'??
Also any SAP function modules for delimiting IT2006 infotypes????
Pls suggest.
Thank u,
shrinivas
Message was edited by: Shrinivas

For 167 & 168 have you looked at HR_BEN_TERMINATE_HEALTH_PLAN & HR_BEN_TERMINATE_INSURE_PLAN?
The error message you got is actually mapped to (00)344 ie "No batch input data for screen & &"
For the delimit operation, you probably,need to pass the delimit date separately..
I have a feeling this function call cannot be used for the delimit operation le 'LIS9'.AS the delimit date is usually entered on a pop-up box when you do it via PA30.
~Suresh

Similar Messages

  • Position 1000001 not available for the start date of the infotype record

    Dear Experts/Gurus,
    I am getting the following error message "Position 1000001 not available for the start date of the infotype record" while trying to upload employees HR Master data in PA40.
    I know the reason why because the position is created on 01.05.2009 & employee DOJ is 01.02.2006 both are mismatch & the position date has to be changed earlier date than DOJ but i don't know how to do.
    Please let me know how to sort out this issue asap.
    Rgds,
    Vikrant

    Dear Friend,
    Use  PP02, select the position no, select infotype 1000 (Object), select planning status & validity(date) and then use the copy function to change the start date.
    Regards,
    Aks

  • Infotype screen headers needs to be changed for all the infotypes

    Hi Guys,
    This would be for a global implementation question.
    For the US for a particular region, the screen header needs to be changed for all the infotypes.
    The existing field (in the infotype header) is Employee Group which needs to be replaced with employment status.
    The know how to change the headers but my question is STAT2 exists in IT 0000 but does not exist in 0001, 0002 0007.........etc
    When i go to Table T588J to add an entry , Screen Header 42......,
    I get an error " No Field STAT2 exists for infotype 0001"
    No field STAT2 exists for infotype 0001.
    Message no. PG811
    Diagnosis
    No STAT2 field exists for infotype 0001.
    Procedure
    Please contact your system administrator.
    Procedure for System Administration
    In Customizing, determine the incorrect entry in Personnel
    Administration in the Header structure per infotype view, step " Determine infotype header and correct it
    I would like to have some inputs from you guys ..... Any Suggessions...
    Thanks,
    Aastha

    Hi Aastha,
    Correct me if I am wrong.
    First you need to maintain the header in T588J.
    Screen header of an infotype is defined in view V_582A_B. We can define one screen header for employee and another for applicant in view V_T588I. The header modifier selected from view V_T588I has a definition in table T588J, which finally gets shown on the screen.
    Depending on the transaction class (A = Personnel Administration, B = Recruitment) and the country grouping, a header modifier is assigned to the infotype header in the u201CHeader Modificationu201D view V_T588I.
    For example like
    Screen Header / Tr. Class / Header modifier
    00                    /        A      /  60
    In the view u201CHeader Structure per Infotypeu201D (V_582A_B), a header has been assigned to every infotype. It also determines whether the data is valid from the system date or the start date of the infotype record
    Hope this is useful.
    Regards
    RK

  • Inbound IDoc(HRMD_A07) problem in delimiting the infotype records

    Hi All,
    I am using Inbound IDoc (HRMD_A07) approach to update infotypes. I found that I am able to create a record in an infotype, but there is a problem in delimiting the infotype.
    Please help me out in case I am missing something.
    Thanks,
    ABAP_DEV

    Hi,
    Did you get this resolved. Even i'm facing this issue. Is it a config or do we have to do something in the IDOC.
    Thanks,
    Jilly

  • Bapi or FM for uploading the condition records

    HI,
    i wanted know that is there any way to uplaod the condition records to sap by using any BAPI or FM or any standard program.
    this is urgent.
    thankx in advance
    regards,
    hpp

    Hi,
    Use the BAPI BAPI_PRICES_CONDITIONS to load the pricing conditions..
    Check this link for a sample code..
    Re: Sample code for  BAPI_PRICES_CONDITIONS
    Thanks,
    Naren

  • 4-eye principle for Deletion of Infotype records

    Hello,
    Can anyone let me know if we can implement the 4-eye principle to delete Infotype records ?
    Regards
    Jai

    Hi,
    Yes possible through Asymmentric authorization principle.
    Good Luck.
    Om.

  • Plz help me for checking the Header record exists or not

    Hi
    How we check the whether the Header record exists or not.. if it is not exists i have raise an exception.. i wanna do this using UDF
    Plz help me  its urgent..
    venkat

    Maybe you should read all the responses in your earleir threads and read the rules of engagement also,
    /thread/117188 [original link is broken]
    Regards
    Bhavesh

  • How to set authorization for only Create infotype record

    How can I set the authorization so that the user can only create Infotype 14,15,2010,2001,2006 but cannot change and delete the record for these infotypes.
    But user has the authorization to create,change and delete other infotypes.

    Hi irene,
    1. For this we have to use the
       authorisation object
      P_ORGIN
    2. It has got the following fields, on which authorisations can be controlled.
    AUTHC     Authorization level
    INFTY     Infotype           
    PERSA     Personnel Area     
    PERSG     Employee Group     
    PERSK     Employee Subgroup  
    SUBTY     Subtype            
    VDSK1     Organizational Key 
    regards,
    amit m.

  • ABAP Code in Start Routine for restricing the data records from ODS1 - ODS2

    Hi
    I need small ABAP Code in Start Routine Of Update rules Of ODS . Im in BW 3.5 .
    I have records like below in first layer ODS and i want to restrict some records while going to second layer ODS ..
    ODS1 :-
    DocNO   EventType    Date
    123         001             08/08/2008
    123         003             08/08/2008
    123         011              09/08/2008
    I want one record in ODS2 for this document number whose EventType = 001 only and date of third record ... like below
    Doc NO     EventType      From Date          Todate
    123              001               08/08/2008         09/08/2008
    So how can i get like this record in the ODS2 which will get data from ODS1 . So i need to write the code in the start routine of the ODS2 .
    So please give the me the code for start routine ....
    Regards
    Suresh

    Its difficult in BW 3.5 to include this logic in START_ROUTINE as you cannot add the extra to_date field to the DATA_PACKAGE table.
    You need to create a new global internal table with the same structure of DATA_PACKAGE with additional field to_date. then use the logic to fill in the global internal table
    define a internal table new_data_package with the required structure like (docno, eventtype, fromdate todate)
    data: l_w_datapkg_001 type data_package,
    data: l_w_newdatapkg type new_data_package,
    data: l_w_datapkg_011 type data_package
    LOOP AT DATA_PACKAGE INTO l_w_datapkg_001 WHERE event_type = '001'.
    l_w_newdatapkg-docno = l_w_datapkg_001-docno.
    l_w_newdatapkg-event_type = l_w_datapkg_001-event_type.
    l_w_newdatapkg-fromdate = l_w_datapkg_001-date.
    MOVE CORRESPONDING FIELDS OF l_w_datapkg_001 INTO l_w_newdatapkg.
    READ TABLE data_package INTO l_w_datapkg_011
    WITH KEY docno = l_w_datapkg_001-docno
                     event_type = '011'.
    l_w_newdatapkg-to_date = l_w_datapkg_011-date.
    APPEND l_w_newdatapkg TO new_data_package          
    ENDLOOP.
    Now the new datapackage contains the ODS2 data that u needed

  • Adding read infotype records to payroll

    Dear ,
    i 've used the code mentioned in this link to read the infotype records .
    Use SAP defined methods instead of Logical Database(LDB)
    now i want to add this record to the tree in the payroll . could u plz tell me how to add it to a node in the additional payment tree node.
    Edited by: Kathy_Adam on May 22, 2010 3:40 PM

    Hi,
    1. Create new payroll function code in payroll driver exist. Starts with FU<custom name>.
    2. Create new function via PE04 with custome name.
    3. Add custom function to payroll schema.
    Custom name should start with special character, e.g. %, &, :, etc.
    User exit is special for every country driver, check payroll driver program and figure out its name.
    Cheers

  • Infotype records not saving when action is performed.

    Hello all-
    We have an action named: personnel information changes which is having Infotype 0002, 0006, 0105 to show up one after the other.
    When we perform the action and click on save, its saving the data and moving to next infotype, but after the action is completed, the infotype records in PA20 or the table pa0002, pa0006 etc does not contain any data.
    Please advice!
    The employee is having a reference personnel number.
    Thanks,
    Chakri.

    Hi Chakri,
    Go to SPRO> Personnel Management>Personnel Administration--> Customizing Procedure -->Actions --> Define Infogroups and then click the Infogroup.
    Give your action number "same used for Personnel Information Changes"
    Check the following items,
    1. check the Reference User Group... is it similar to your required one?
    2. Check the "operation" column....it should be COP, INS or MOD.
    Please check it ...hopefully it will work...Award points if you think so....
    Regards
    Rao

  • PA30 Create for Residence Status Infotype 0048

    Residence Status Infotype 0048
    Using TCode PA30, I have entered infotype 0048 and clicked on create.
    I am unable to use the Create Icon without entering the Subtype.
    I am getting this message 'Residence Status (0048)' not permitted Message no. PG628 Diagnosis
    Infotype Residence Status (0048) cannot be maintained for this personnel number.
    Procedure
    The authorization of a country grouping for an infotype and type is specified in table T582L Infotypes - Country-Specific Settings. Make the
    missing entry or contact your administrator.
    I have seen the table T582L and Infotype 0048 and the required subtypes are present for the  country grouping.
    However I can use the Create button , if I enter the subtype in the initial screen for Infotype maintenance.
    Is there any step I can perform , so I can create the infotype directly without entering  the subtype in the initial screen , rather I could select the subtype from next screen or even from the Infotype screen.
    Many thanks
    DP

    Hi ya ,
    That was really helpful. I can create the Infotype record without selecting the Subtype.
    But now  It wont give me the Input Help (F4) for the Subtype field when I am inside the Infotype.
    It gives the F4 Input help at the very front screen to choose the subtype.
    Do you know , why ?
    Many thanks
    Desy

  • Deletion HR - Infotype records using BAPI

    Hi experts,
    I sucessfully added infotype crecords in HR-ABAP using function module HR_INFOTYPE_OPERATION.   For deleting the same record using the same function module (operation = 'DEL'), i got error message as <b>009No data stored for 0008 in the selected period</b>.  What is the problem...?
    Can any one pls solve it.
    <b><REMOVED BY MODERATOR></b>
    Thank u.
    Regards,
    Murugan Arumugam
    Message was edited by:
            Alvaro Tejada Galindo

    HI Murugan,
            Following is the sample code for deletion of a record using the FM...'HR_INFOTYPE_OPERATION'
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
           EXPORTING
               INFTY            = '4002'
               NUMBER           = RECORD_4002-PERNR
               SUBTYPE          = RECORD_4002-SUBTY
               OBJECTID         = RECORD_4002-OBJPS
               LOCKINDICATOR    = RECORD_4002-SPRPS
               VALIDITYEND      = WENDDA
               VALIDITYBEGIN    = WBEGDA
               RECORDNUMBER     = RECORD_4002-SEQNR
               RECORD           = RECORD_4002
               OPERATION        = 'DEL'
               TCLAS            = 'B'
               DIALOG_MODE      = '0'
          IMPORTING
               RETURN           = RETLIST.
    Regards,
    Ranganathan.

  • FM to know opeartion performed on infotype record...

    Hi Friends,
    In my requirement i have to display the infotype change logs for each pernr. i.e the infotype records that are changed or deleted or inserted. can you please suggest me the function module or table which gives these details. i.e operation performed on infotype record ( insert or delete or change).
    Thanks in advance,
    Phani Shankar.K

    Try  the  FMs     <b>HR_INFOTYPE_LOG_GET_LIST</b> , <b>HR_INFOTYPE_LOG_GET_DETAIL</b>    ,they might be Helpful . Also try the Report<b> RPUAUD00</b>

  • How to write the new records not with existing records.

    hi,
    I have a script.If i execute the script it writes the records.but its writing with the exisiting records.It writes not only the new records but also the old records.
    for eg: the exisiting records are:
    1111115-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111116-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111117-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111118-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111119-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    but now what happend is the new records such as
    1111116-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111117-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111118-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111119-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    it gets appended with the old existing records,
    1111117-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111118-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111119-2,USD,DINESH,1,1,,,,9,,,,123456184001,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111113-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111114-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111115-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111116-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111117-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111118-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    1111119-2,USD,DINESHBABU,1,1,,,,9,,,,123456184003,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,9999,,,,
    there will be some problem happens when we are going to upload a bulk data of say 25000 records.if its gonna update 20000 records,rest 5000 records i have to do it in next step,if this is going to happen then the first 20000 records will be displayed forever.because it have the capacity to write 20000 records.thenext 500 records will not be written.so there is a chance of redundancy.how to avoid this redundancy while running this script
    my script is
    create or replace procedure input_tables(table1 in varchar2)
    is
    str varchar2(32767);
    cnt number(2);
    cursor c1(tname in varchar2)
    is
    select column_name
    from all_tab_columns
    where table_name = tname
    order by column_id;
    rec c1%rowtype;
    begin
    cnt:= 1;
    str:= 'declare '||
    'cursor c2 '||
    'is '||
    'select ';
    open c1(table1);
    loop
    fetch c1 into rec;
    exit when c1%notfound;
    if cnt = 1 then -- Added New
    str:= str||rec.column_name; -- Added New
    cnt:= cnt + 1; -- Added New
    else -- Added New
    str:= str||'||'',''||'||rec.column_name; -- Added New
    end if; -- Added New
    end loop;
    close c1;
    str:= str||' SRC from '||table1||';'||
    ' r2 c2%rowtype;'||
    ' ft UTL_FILE.file_type;'||
    ' str2 varchar2(200);'|| --Added New
    ' begin '||
    ' ft := UTL_FILE.fopen(''SAMPLE'',''OUTPUT.csv'',''w'');'||
    ' for r2 in c2'||
    ' loop '||
    ' UTL_FILE.put_line(ft,r2.SRC);'||
    ' end loop;'||
    ' UTL_FILE.fclose(ft);'||
    ' end;';
    execute immediate(str);
    end;
    thanks,
    Ratheesh.

    Hi!
    U can check the following script --
    create or replace procedure input_tables(table1 in varchar2,start_col in number,last_col in number)
    is
         str varchar2(32767);
         cnt number(2);
         cursor c1(tname in varchar2)
         is
           select column_name
           from all_tab_columns
           where table_name = tname
           order by column_id;
         rec c1%rowtype;
    begin
         cnt:= 1;
         str:= 'declare '||
         'cursor c2 '||
         'is '||
         'select ';
         open c1(table1);
         loop
              fetch c1 into rec;
              exit when c1%notfound;
                   if cnt = 1 then -- Added New
                        str:= str||rec.column_name; -- Added New
                        cnt:= cnt + 1; -- Added New
                   else -- Added New
                        str:= str||'||'',''||'||rec.column_name; -- Added New
                   end if; -- Added New
         end loop;
         close c1;
         str:= str||' SRC from '||table1||
         ' where rownum between '||start_col||' and '||last_col||';'|| -- Added New
         ' r2 c2%rowtype;'||
         ' ft UTL_FILE.file_type;'||
         ' str2 varchar2(200);'|| --Added New
         ' begin '||
         ' ft := UTL_FILE.fopen(''SAMPLE'',''OUTPUT.csv'',''w'');'||
         ' for r2 in c2'||
         ' loop '||
         ' UTL_FILE.put_line(ft,r2.SRC);'||
         ' end loop;'||
         ' UTL_FILE.fclose(ft);'||
         ' end;';
         execute immediate(str);
    end;
    / To print first ten rows --
    exec input_tables('EMP',1,10);  --first 10 rowsTo print next remain rows --
    exec input_tables('EMP',11,15);N.B: No tested....
    Regrads.
    Satyaki De.

Maybe you are looking for

  • HD Video Playback performance in LR 4.3 - help!

    Colleagues, I'm a new LR user but experienced video editor.  I am exporting video from Final Cut Pro 7 and importing these files into LR4.3, renaming and applying metadata during import.  I'm not doing any develop work on the videos, that's all been

  • Regarding Dunning PO -MAHN

    Hi MM Guru's I have maitained MAHN as an output type for PO dunning I have got Problems 1- MAHN should pop up automatically in Messege as i have already maintained the condition record via MN04 2-when I run ME9F  select MAHN and click on Output Messe

  • Is DVD Studio Pro dead?

    (I posted this at the Final Cut areas as well) So Final Pro X has been released and there's not a word about DVD Studio Pro anywhere. Does this mean it has been dropped, or won't be updated anymore? My suggestion is for Apple to sell DVD Studio Pro a

  • How to move all pictures, albums & tags from 1 computer to another.

    Bought a new computer and don't want to lose all the work I did cataloging etc in Elements.  Need to copy all pictures (17,000) over as well as all the tags & albums etc in Element to the new computer.  Also, I am going from Elements 5 (Vista) on my

  • Can i save app. to memory card.

    how can you save applications to memory card...when you choose option move to memory card...the application move from phone to phone internal sd(sd 0)...not external memory card.am i donig something wrong.