Updating action type field in infotype 0000.

Hi experts,
I have to update the action type(MASSN)field and reason for action(MASSG)field in infotype 0000 for the existing record. I am trying to use function module HR_INFOTYPE_OPERATION to update it,but i am not able to update the action type field.Below is the code.Can anybody please give me a solution for this.
DATA:ls_p0000 type p0000.
DATA : RETURN like BAPIRETURN1.
DATA : KEY like BAPIPAKEY.
DATA : RETURNE like BAPIRETURN1 .
DATA :NOCOMMIT like BAPI_STAND-NO_COMMIT.
PARAMETERS:is_pernr type pernr.
ls_P0000-SUBTY = 'IG'.
ls_P0000-PERNR = IS_pernr.
ls_P0000-BEGDA = '20100101'.
ls_P0000-ENDDA = '99991231'.
ls_P0000-MASSN = 'IG'.        "action type
ls_P0000-MASSG = '01'  .      "reason for action
CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
EXPORTING
NUMBER = IS_PERNR
IMPORTING
RETURN = RETURNE.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
INFTY = '0000'
NUMBER = ls_P0000-PERNR
SUBTYPE =   ls_P0000-SUBTY
OBJECTID = ls_P0000-OBJPS
LOCKINDICATOR = ls_P0000-SPRPS
VALIDITYEND = ls_P0000-ENDDA
VALIDITYBEGIN = ls_P0000-BEGDA
RECORDNUMBER = ls_P0000-SEQNR
RECORD = ls_P0000
OPERATION = 'INS'
TCLAS = 'A'
DIALOG_MODE = '0'
NOCOMMIT = NOCOMMIT
IMPORTING
RETURN = RETURN
KEY = KEY.
CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
EXPORTING
NUMBER = IS_PERNR
Thanks in advance.

operation "INS" is for insertion,check the FM documentation for value to be passed to operation parameter for change.
I think its "MOD"
Edited by: abapuser on Sep 15, 2010 2:02 PM

Similar Messages

  • P0000-STAT1 (Customer Specific Status) field on Infotype 0000

    Hi All,
    I have a requirement on Customer specific status field on infotype 0000,  Where I should be able to maintain that field through PA40.
    As this field is standardly delivered as output field only through SAP I am unable to force that field as input field in module pool.
    did any one used this field before as input field in IT0000? I couldn't find OSS note on this issue.
    Please let me know if any one has solution on this.
    Thanks,
    Sang

    Hello sangarshitha
    try using field symbol ,
    asssign field symbol to p0000-stat1
    like
    field-sybmbols : <fs> type p0000-stat1.
    ASSIGN ('(MP000000)PSPAR-STAT1') TO <fs>. "check table pspar in debug wether field stat1 is there else go for P0000-stat1
    <fs> = "assign what you want to here.
    write this in PBO of User Exit/Badi for IT-0000
    reward points if helpful

  • Update action type(massn) of employee in PA0000

    hi abapers
    i want to change action type(massn) of employee(pernr)
    i have two parameter in my selection screen. one is employee number (pernr) and second is action type(massn). i want that once i enter employee number and action type. it will get updated in PA0000 infotype.
    i am using FM 'HR_MAINTAIN_MASTERDATA'.
    thanks
    Sachin

    Doing an SU53 on the screen will show you what Authorization is missing on your Profile.
    However, I might add that an Action doesn't end in Infotype 0000. More often than not it is followed by changes to other infotypes via Dynamic Actions/Infogroup etc. I would rather delete the action & create a new action, instead of changing it.
    ~Suresh

  • Update Blob type field

    I don't understand why.... I can't seems to update blob field type. Is there a special type of update for blob type? I will get the value from the form, typecast it to string then update the db. All fields can be updated except the blob type field....

    It depends. Eg. Oracle requires to call its own factory classes. You cannot use standard JDBC.
    The same with DB2.

  • There's a way to add field to infotype 0000

    hi everyone !
    i would like to add field substitude position to infotype 0000.
    there's a way ?

    The "Common Tools" panel is not available by default. You're more likely to find it under Tools - Pages - Insert From File...

  • Function module to update the SPRPS field in infotypes

    Hi Guru's
         I m developed the workflow for personal data maintain in ESS with single approval. Employee can able to update his personal data and saved.
    Now the workflow will trigger to HR for approval .Before the workitem send to approval   i  need to  update the PA0002-SPRPS = X  and after getting approval i have to remove the flag.
    Is the any function module /  BAPI to upadte PA0002-SPRPS = X.
    Thanks,
    Pasumpon Karuppaiah

    Hello,
    Use BAPI_PERSDATA_CHANGE with  LOCKINDICATOR = 'X'.
    Below are call sequence,
    BAPI_EMPLOYEE_ENQUEUE
    BAPI_PERSDATA_CHANGE
    BAPI_EMPLOYEE_DEQUEUE
    Regards,
    Sameer

  • How to define action type of a personalised item

    I have an existing table in a existing OAF page.it has two column one "Quantity" and one "Amount".I have to add another column"Price" in this table.My requirement is that once "Quantity" and "Price" are entered and tabbed out from the Price field the "Amount" field should get calculated(Amount=price*quantity)and displayed.
    Now what I am doing is that I have created price column through personalization but there is no attribute where I can specify the action type or event type for the price column so that I can calculate the amount field by capturing that event.
    I have also checked the existing Quantity column if it has such action type defined or not but there is no such action type defined.
    Please tell me how it can be implemented and whether it is possible or not.
    please reply if you want more clarification.

    If there is no action type field for your bean, then You should try to create it dynamically through the controller code. There you will have access to all the properties of bean.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                           

  • Enhance Infotype 0000 (Actions) of PA30

    Dear Experts,
    I have a requirement to use the "Reserved Field/Unused Field of Length 2" of PA0000 table to store my custom data in it.
    I don't know if we can make use of these fields or not?
    I have tried to enhance this info type using PM01 transaction, but it does not allow me to enhance the info type 0000-Actions.
    I simply want a field to be added in info type "Actions" which will be displayed in PA30 and that data gets saved in PA0000 table.
    Can you please guide me with this?
    Thanks,
    Praveen

    Hi,
    Well, as I told you, infotype 0000 cannot be enhanced...
    So no you cannot do that, or you will have to repair the infotype, which is not to be adviced...
    You can however update the "unused" fields on IT0000 from other infotype/custom program but you won't be able to display it on action tab without a standard repair...
    Kr,
    m.

  • Problem with Employment Status in Actions Infotype (0000)

    Hi All
    I am trying to upload the Pernr details for Actions (0000) Infotype in PA30.
    I am facing a strange issue, where even though i am passing '1' (INACTIVE) to the employment status (STAT2)field, it still takes the status as '3' (ACTIVE). Also, even though i am not passing anything to the Special Payment (STAT3) field, it still takes it as '1' (Standard Wage Type). What may be the reason for this?
    I am using the BAPI_HRMASTER_SAVE_REPL_MULT for HR Master Upload and here are the values i am passing to the BAPIHR0000 table:
      w_bapihr0000-obj_id = '00002400'.
      w_bapihr0000-infotype = '0000'.
      w_bapihr0000-to_date = '99991231'.
      w_bapihr0000-from_date = sy-datum.
      w_bapihr0000-changed_on = sy-datum.
      w_bapihr0000-changed_by = sy-uname.
      w_bapihr0000-action_type = '01'.
    w_bapihr0000-employment_status = '1'.
      APPEND w_bapihr0000 TO t_bapihr0000.
      CLEAR w_bapihr0000.
    And this itab t_bapihr0000 i am passing into the BAPI.
    please help asap.
    Regards
    Harsh

    Action Type 01 u r passing, please check the config ACtions Table, what is the Status Maintained for that Actin Type.
    Table: T529A
    Regards.
    ...SAdhu

  • Resignation / Reliving deletion log data in actions infotype 0000

    Dear all,
    When we delete resignation/relieving entry in Pa30 in actions infotype 0000 no log is maintained.
    where i can see the deletion log please help.
    Regards,
    Gaurav sood

    You have set the indicator in Table:  T529A. for the field U0000 for the leaving action.
    If you set the indicator U0000, the personnel action type is stored in the Actions infotype (0000).

  • Infotype 0041  - Date type field in display mode always

    Hi All,
    Please help in find out solution for the below enhancement
    In infotype 0041 we have date type and date field. We need to make the date type field to be display mode always.
    Thanks for your help in advance.
    Thanks,
    Karthikeyan

    Hi Karthikeyan ,
    Please find the resolution as below :
    Userexit - EXIT_SAPFP50M_001 . In Include ZXPADU01. Write the below code .
    DATA: w_P0041 TYPE P0041.
    IF  ipsyst-massn <> space AND
      ( ipsyst-ioper = 'INS'  OR
        ipsyst-ioper = 'INSS' OR
        ipsyst-ioper = 'COP'  OR
        ipsyst-ioper = 'MOD').
    CASE innnn-infty.
    WHEN '0041'.
    *convert prelp to pnnnn structure
    CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
    EXPORTING
    PRELP = INNNN
    IMPORTING
    PNNNN = w_P0041 .
    *Here you can have more conditions like for which Action Types you want the
    IT0041 to default .
    w_P0041-dar01 = 'Z1'.
    w_P0041-dar02 = 'Z2'.
    w_P0041-dar03 = 'Z3'.
    *convert pnnnn to prelp structure
    CALL METHOD CL_HR_PNNNN_TYPE_CAST=>pnnnn_to_prelp
    EXPORTING
    PNNNN = w_P0041
    IMPORTING
    PRELP = INNNN.
    *Display mode
    LOOP AT SCREEN.
              IF screen-name = 'P0041-DAR01' OR
                 screen-name = 'P0041-DAR02'  OR
                 screen-name = 'P0041-DAR03'  .
                CLEAR screen-group2.
                screen-input = 0.
                MODIFY SCREEN.
              ENDIF.
            ENDLOOP.
    WHEN OTHERS.
      ENDCASE.
    ENDIF.
    Thanks ,
    Sucharita Das

  • How to create the sub type field in hr abap infotype

    hi ,
        how to create the sub type field in hr abap infotype.
    regards,
    venkat.

    Try like this also
    creating of infotype please follow these steps ...
    Step 1: Create Infotypes
    i. Goto Transaction PM01 – To create Infotypes:
    ii. Enter the Infotype Number and say create all.
    iii. The following message would display:
    i. PSnnnn Does not exist. How do you want to proceed?
    iv. Click
    v. A maintain Structure screen appears.
    Fill in the short text description and the PS structure of the Infotype.
    Since the fields Personnel No, Employee Begin Date, End Date, Sequential Number,Date of Last Change, Name of user who changed the object are available in the PAKEY and PSHD1 structure, define the PSnnnn structure with only the fields you required.
    vi. Once the PS Structure is created, save and activate the structure.
    vii. In the initial screen of PM01, now click on .
    Create a new entry for the infotype.
    Fill in the values as mentioned below and save.
    Infotype Characteristics:
    Infotype Name of the infotype_ Short Text: __Short Description________
    *General Attributes :
    Time constraint = 1
    Check Subtype Obligatory
    Display and Selection:
    Select w/ start = 3 “Valid record for entered data
    Select w/ end = 5 “Records with valid dates within the period entered
    Select w/o date = 6 “Read all records
    Screen header = 02 “Header ID
    Create w/o end = 1 “Default value is 31.12.9999
    Technical Data:
    Single screen = 2000
    List screen = 3000; List Entry Checked.
    viii. In the initial screen of PM01, now click on .
    Choose the infotype entry in the list.
    Fill in the values as mentioned below and save.
    Technical Attributes:
    In tab section,
    The following attribute values are given:
    Applicant DB Tab = PAnnnn “Infotype Name
    Subtype field = SUBTY
    Subtype table = T591A
    Subty.text tab. = T591S
    Time cnstr.tab. = T591A
    Prim. /Sec. = I Infotype
    Period/key date = I Interval
    and .
    ix. Infotype Screen Modification:
    Edit Screen 2000 from PM01 for the Infotype.
    ABAP Editor for the Infotype Program MPnnnn00 will be displayed.
    Click . Flow Logic will be displayed. There string coding of your own logic.
    Regards
    Pavan

  • How to Update Date data type field value in oracle

    I want to update records in a table that has a Date data type field. It's a oracle databse. I use the oracle thin drive to connect to the database. The everything works well, only when i try to update records that have date type value, something doesn't work.
    I use the following stmt to update DB:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Conn = DriverManager.getConnection("jdbc:oracle:thin:@hostname:portnumber:schname", "uid","pwd");
    stmt=Conn.createStatement();
    String updStr = "UPDATE Article SET Archive = ' Disable' WHERE ArticleDate = # " + sqlDate +"# " ;
    stmt.executeUpdate( updAStr ) ;
    But I always got the SQLException run time error, which is "ORA-00911: invalid character"
    Who can help me to find out how to write the above Update statement correctly? esp. that how to present the Date type variable in the statement.!
    BTW, sqlDate is a Java.sql.Date variable, Is it "# " + sqlDate + "# " the right way?
    Many thanks

    What do you get out of Oracle's TO_DATE that java.sql.PreparedStatement.setDate()
    won't give you? - MODWell, I don't know that I've used all capabilities of either, but when it comes to managing Date Strings my Oracle bias :) would be to code using Oracle's TO_CHAR and TO_DATE functions. Perhaps someone can tell me vendor neutral ways to do something simiilar to managing these input date/times (and hopefully just as easily, pretty much all done in a single line, single function)?
    WHERE aDATE > TO_DATE('2010','YYYY')
    WHERE aDATE > TO_DATE('2010 AUG 22','YYYY MMM DD')
    WHERE aDATE > TO_DATE( 'January 15, 1989, 11:00 A.M.', 'Month dd, YYYY, HH:MI A.M.')
    I believe most databases have something similar to this, although I have found Oracle's to be the most flexible and consistent, if not the most intuitive. Other vendors (DB2, SQL Server, Access) don't force you to always be explicit, and can accept a variety of date strings without masks. The problem is that while you might not be getting an error, it also may not be parsing your date as expected.
    One could argue that this vendor specific hodgepodge of literal date/time strings is only one program modification away from disaster. They might be right.
    Just to be clear. I'm not recommending using a vendor specific approach, but it's not a perfect world and somtimes you have to use what works easiest or best or fastest, and in some cases, that is the vendor specific alternatives.

  • Auto-update a Custum Field in a standard Infotype.

    Hi,
    Here is my problem.
    In IT0759 (Compensation Process), I added a new field 'ZZSTAT'.
    The process should be like this :
    When the standard field CSTAT (Status of  Process) = 5 Active then the custom field ZZSTAT should also be updated to 5.
    I manage to deal with this using the PBO of ZP075900 :
    MODULE MODULE_PBO_0759 OUTPUT.
      IF p0759-cstat = '5'.
        p0759-zzstat = '5'.
      ENDIF.
    ENDMODULE.                 " MOD_PBO  OUTPUT
    But there is a program 'RHECM_CHANGE_PROC_STATUS' which update the standard field CSTAT. As the PBO is not processed, my custom field is not updated.
    Does someone have a solution ?
    Thanks
    François

    Hi Francois,
    Do it through dynamic actions: SM31 -T588Z
    Add the following entries.
    0759 P P0759-CSTAT = '5'
    0759 W P0759-ZZSTAT = '5'
    Regards,
    Dilek

  • PPOME - infotype 0000 not update

    hello.
    is there any way when I change an employee from one position to another using the PPOME it generate a record in infotype 0000? He throws in infotype 0001. Thanks

    Hi Braulio,
    Unfortunately no, not in the standard system.  When a reassignment is made via PPOME, it is not an action so no IT0000 is created.  Since you have intergration between OM and PA, the IT0001 is created to reflect the move, but not an IT0000. 
    You may be able to create a program or Workflow to create the IT0000 when using PPOME, but there is nothing standard.
    Paul

Maybe you are looking for