POV in infotype

Hi,
I have created one custom infotype, i need to populate date into one field based on another field value, i have wrote POV for that, but its not triggering when value is selected in first field, i have attached f4 help in the first field. Pls help me to sort this out.
Regards,
Baiju

I  tried FM 'HR_INFOTYPE_OPERATION for infotype 27.
how does cost center and internal orders gets uploaded from this FM?
does it work for multiple cost center & internal orders?
i tried this fm using the below code but nothing happenned...Kindly guide me.
infotypes : 0027.
tables : pernr.
data: return type bapiret1.
start-of-selection.
get pernr.
rp-provide-from-last p0027 space sy-datum sy-datum.
*locks the personnel
call function 'HR_EMPLOYEE_ENQUEUE'
exporting
number = p0027-pernr
importing
return = return.
if pernr-pernr = 75.
call function 'HR_INFOTYPE_OPERATION'
exporting
infty = '0027'
number = 75
subtype = p0027-subty
objectid = p0027-objps
recordnumber = p0027-seqnr
validityend = p0027-endda
validitybegin = p0027-begda
record = p0027
operation = 'MOD'
*tclas = ''
*nocommit = ' '
importing
return = return.
endif.
*unlocks the employee
if sy-subrc = 0.
write : '27 Updated' .
endif.
call function 'HR_EMPLOYEE_DEQUEUE'
exporting
number = p0027-pernr
importing
return = return.
end-of-selection.
Edited by: Rachel on May 14, 2009 1:49 PM

Similar Messages

  • Error in creation of custom PD infotype

    Hi,
    I have a task of creating a custom PD infotype(p9xxx). I created HRI9xxx structure with all the custom fields and when I try to create the infotype using tcode PPCI(selected 'field infotype' option and create button in the 'infotype' block was pressed), it gives an error message that p9xxx-begda is not in ABAP dictionary and then it gives me list of screens, module pools and tables created. This custom infotype entry does not exist in T777I. I have tried regenerating it and same problem persists. If anyone knows the solution, please do let me know.
    Thanks in advance

    Solved.

  • Error while creating a query for my custom infotype

    Hi,
    I have created a custom infotype with fields currency amount and currency field .
    While I am creating a query for it its giving an error
    Message no. AQ_AD_HOC221 Error when generating the report(see long text )
    I tried to execute the standard program RPUMS40CCI but still I am facing same error .
    I have also maintained table T777i for my infotype but still problem exists.
    Please help.
    P

    Hi
    Check in PM01

  • Error while creating a record in a custom infotype

    hi to all experts,
    I have created a infotype with 3 screens . But one of the screen im getting this error while saving a record .The Required screen change cannot be made.

    Im defining using the table pa9005 not the structure p9005
    (is it the same)
    Please help me ....
    Edited by: mohammed  abdul hai on Sep 18, 2009 8:20 AM

  • Error while transporting modification in module pool of a specific infotype

    HI experts,
    While transporting some modifications that have be done on the PAI of a module pool of a specific infotype, we have an error with code return = 8, the error is --> Original object R3TRPROGMP900730 must not be changed!!!
    Any suggestion .
    Tanhks a lot .

    Hi ,
    Nice to know that your problem is solved. If any of the replies were usefull please acknowledge their work.
    And it would be great if you can just put in your remarks about the best  solution you had in solving that problem.
    It might be useful to other users when they encoutner such problem.
    BR,
    Vijay.

  • Error while editing an automaticlly populated record of  a custom infotype

    hi,
    a query in HR ABAP.
    i have created a custom Infotype to store the CTC details of an employee. this custom IT needs to get the records auto populated, when they are created in Infotype 0008.
    i have used the exit. EXIT_SAPFP50M_002  inside which  an include program is written  :ZXPADU02
    using this, the records made to get create automatically in the custom IT.
    but when we try to modify or delete those records thru the tcode PA30,
    it does not allow to do so and throws a standard error message. as  below.
    Specified subtype is invalid
    Message no. PG088
    please help me out to fix this issue.

    the exact point of the std error is,
    i do the folowing steps.
    1)_ for auto creating a record in custom IT Pa**** , i goto transaction, PA30, create record in IT 0008 with a basic Pay., click on save.
    on saving , the EXIT_SAPFP50M_002 is called where i ve written a Z inlcude Program, which inserts the record in custom IT PA****.  this is successful.
    2) when i try to change or delete the same record which i ve created as above, through the Tcode PA30 for custom IT, PA
    ****, i get the error.
    hope the problem is clearly mentioned

  • Problem in creation of infotype

    Hi,
    When i will try to create a custom infotype and am trying to save it ,it gives the following error "Package in non-original system only modifiable with Organizer Tools" and a default package came in the initial screen of PM01.So i cant understand it please help me to saolve this issue.
    Waiting for ur reply.....
    Thanks,
    Ali

    Ali,
    Please check the package which you are saving. per my understanding, this is routed to non original system.
    Use the valid package which is attached and routed to QAT and PRD box path, then it will resolve your issue.
    Regards,
    Raj

  • HR-ABAP Infotype Authorization issue!

    Hello Experts,
    Need your quick suggestions and inputs, which we're currently facing in our project.
    We're using the PNPCE Logical Database for processing/retrieving the records from infotypes and ALV reports are generated.
    Currently, we have an authorization control which will restrict the user roles in accessing certain infotypes. Thus, the user role is assigned with necessary infotype access in PFCG.
    Now the issue is if a particular user role donot have the authorization to infotye XXXX, which is defined in the Global Declaration (Top Include) in the INFOTYPES statement. Eg: INFOTYPES: XXXX.
    Thus, when the report is executed, the following XXXX infotype authorization is checked as it is defined in INFOTYPES statement, but since the user role is not given the XXXX infotype authorization in PFCG the report execution fails when it checks the infotype authorization when it enters GET PERAS. Thus, a blank screen is thrown with standard SAP error... "No authorization for XXXX infotype".
    Is there any way this error message which blocks the execution of the report be by-passed? If yes, please help to suggest the necessary steps to do so. Thus, the report execution should not be blocked and the ALV report should be displayed with blank values for those XXXX infotypes which donot have authorization even though defined in INFOTYPES statement in Top Include.
    Hope am much clear in describing the major issue that we're currently facing.
    Any inputs to get this issue resolved will be highly appreciated.
    Thanks in anticipation.
    Regards,
    Sundar

    Have you explored the option of using the BAdI HRPAD00AUTH_CHECK?
    ~Suresh

  • HR-ABAP-Infotypes concept

    Hi Masters,
                           Can you please let me know the perfect reason for infotypes concept in HR-ABAP.
    1 Why we are using infotypes and exactly what is purpose?
    2.Why we are using LDB's why cannot we extract data directly from database tables?
    3.Can you please give me clear explanations about these infotypes.

    Hi
    Infotype(s) are used in the Personnel Management (PA) module primarily. This is where personnel master data is stored. Data is grouped according to subject matter. The Human Resources component aims to enable the user to process employee data in an effective structure in accordance with business requirements. The data structure of infotypes mirrors a logical set of data records. Infotypes can be identified by their four-digit keys, for example, the Addresses infotype (0006). To facilitate reporting on past employee data, infotypes can be saved for specific periods.
    Some people use the term HR ABAP to describe the method of managing the infotype data. Typically HR logical databases are used which offers more secure methods of accessing the infotype data. Once the infotypes are declared, you can use standard macros to access the data. Table TRMAC holds the macro name and the code behind it. This makes developing HR programs much quicker and easy to turn around.
    HR uses INFOTYPES instead of tables.
    There are different sub modules exist in HR.
    For Personal Admn the Infotypes start with PA0000 to PA1999
    Time Related Infotypes start with PA2000 to PA2999.
    Orgn related Infotypes start with HRP1000 to HRP1999.
    All custom developed infotypes stsrat with PA9000 onwards.
    In payroll processing we use Clusters like PCL1,2,3 and 4.
    Instead of Select query we use PROVIDE and ENDPROVIDE..
    You have to assign a Logical Database in the attributes PNP.
    Go through the SAp doc for HR programming and start doing.
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    See:
    http://help.sap.com/saphelp_46c/helpdata/en/4f/d5268a575e11d189270000e8322f96/content.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/bb/bdb041575911d189240000e8323d3a/frameset.htm
    see this link you would get information about types of infotypes
    Logical databases are special ABAP programs that retrieve data and make it available toapplication programs. The most common use of logical databases is still to read data fromdatabase tables by linkin them to executable ABAP programs.
    Logical databases contain Open SQL statements that read data from the database.You do not therefore need to use SQL in your own programs. The logical database reads theprogram, stores them in the program if necessary, and then passes them line by line to theapplication program or the function module LDB_PROCESS using an interface work area .
    For further info
    check link http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/frameset.htm
    1. A logical database is in fact
    a program only.
    2. This LDB provides two main things :
    a) a pre-defined selection screen
    which handles all user inputs and validations
    b) pre defined set of data
    based upon the user selection.
    3. So we dont have to worry about from
    which tables to fetch data.
    4. Moreover, this LDB Program,
    handles all user-authorisations
    and is efficient in all respects.
    5. tcode is SLDB.
    /people/srivijaya.gutala/blog/2007/03/05/why-not-logical-databases
    <b>REward fi suefull</b>

  • Adding Custom OM infotype in Adhoc Query

    Hi All,
    I have created a custom OM  infotype . This infotype contains  only the description of job, i.e job notes . Below  is questions on this:
    1) When I am trying to add this infotype in infoset,then I am able to see this infotype in "related to object type" folder under TWO different relationship .Why its coming under relationship part. There is no relationship for this infotype .'
    To include this in infoset do I have to select this infotype under both the relationship.?
    Please find the screenshot of the relationships under which this infotype is coming:
    Thanks,
    Vaibhav

    Hi Vaibhav,
    First, your question is not so clear:
    You write that you are trying to add a custom infotype, which manages the job's description. Do you mean Infotype 1002? If so - this is not a custom Infotype - it's a standard one.
    Second,if you want to enhance the infoset, this is done by SQ01:
    Choose the relevant infoset by SQ01 and press the Change button
    Choose "Edit" menu --> choose the "Change Info-Type Selection" entry
    In the Popup window which appears, mark the checkbox for the relevant infotype
    Regards,
    Liran

  • Infotype 0120 - changes in adhoc query program

    Hi All,
    I have to make some code changes for the std infotype 0102 - Grievances NA in the adhoc query. My requirement is :-
    1) A range from 000-999 should be available for each Employee for the Grievance Number field. P0102-GRNUM.
    2) If a record already exists for the employee for a particular Grievance Number -GRNUM(e.g - 467) and Stage- GRSTG(e.g.- Stage1), the system should not allow to enter another record with the same Grievance Number and Stage for the same employee.i.e. No duplication should be allowed. i.e only 3 records for 1 Grievance Number as there are only 3 stages.
    Please advice me how to proceed for the same.
    Thanks & Regards,
    Preeti

    hi
    Its not getting clear that u want the changes for ADhoc query or in pa30.
    if u want validations in adhoc query as u have mentioned in the question
    u need not to go to a user exit.
    In adoc query itself u can incorporate these changes
    u can go to infoset of this query and write a abap code which checks the Infotype 102 for the grievance no.
    If u want the validation on while creating the record then u have to use user exit ZXPAUD01 or can use BADI's also .
    Regards
    Manish
    Award reward paoints If Useful

  • Runtime Error in Record INsertion to an Infotype

    Hi all,
    I have created an infotype PA9035.
    In that i want to insert records with value
    Data:  WA_PA9035 TYPE PA9035.
      WA_PA9035-PERNR  = P_PERNR.
      WA_PA9035-ZZKOKRS = V_KOKRS.
      WA_PA9035-ENDDA = '99991231'.
      WA_PA9035-BEGDA = SY-DATUM.
    I used the below funciton mod to insert data,
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            INFTY                  = '9035'
            NUMBER                 = P_PERNR
          SUBTYPE                =
          OBJECTID               =
          LOCKINDICATOR          =
           VALIDITYEND            = '99991231'
           VALIDITYBEGIN          = SY-DATUM
          RECORDNUMBER           =
            RECORD                 = WA_PA9035
            OPERATION              = 'INS'.
          TCLAS                  = 'A'
          DIALOG_MODE            = '0'
          NOCOMMIT               =
          VIEW_IDENTIFIER        =
          SECONDARY_RECORD       =
        IMPORTING
          RETURN                 =
          KEY                    =
    I am getting RUNTIME ERROR in that..the error is....
    The source field is too short.
    In the running program "SAPLHRMM" a field should have been assigned to a field
    symbol, which is shorter than the type of the field symbol.
    This is not possible.
    It is a statement of the form ASSIGN f TO <fs> CASTING...
    or ASSIGN f TO <fs> with a field symbol that was created with the
    STRUCTURE addition.
    Please help me...
    Regards,
    Thendral.

    Hi all,
    I have created an infotype PA9035.
    In that i want to insert records with value
    Data:  WA_PA9035 TYPE PA9035.
      WA_PA9035-PERNR  = P_PERNR.
      WA_PA9035-ZZKOKRS = V_KOKRS.
      WA_PA9035-ENDDA = '99991231'.
      WA_PA9035-BEGDA = SY-DATUM.
    I used the below funciton mod to insert data,
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            INFTY                  = '9035'
            NUMBER                 = P_PERNR
          SUBTYPE                =
          OBJECTID               =
          LOCKINDICATOR          =
           VALIDITYEND            = '99991231'
           VALIDITYBEGIN          = SY-DATUM
          RECORDNUMBER           =
            RECORD                 = WA_PA9035
            OPERATION              = 'INS'.
          TCLAS                  = 'A'
          DIALOG_MODE            = '0'
          NOCOMMIT               =
          VIEW_IDENTIFIER        =
          SECONDARY_RECORD       =
        IMPORTING
          RETURN                 =
          KEY                    =
    I am getting RUNTIME ERROR in that..the error is....
    The source field is too short.
    In the running program "SAPLHRMM" a field should have been assigned to a field
    symbol, which is shorter than the type of the field symbol.
    This is not possible.
    It is a statement of the form ASSIGN f TO <fs> CASTING...
    or ASSIGN f TO <fs> with a field symbol that was created with the
    STRUCTURE addition.
    Please help me...
    Regards,
    Thendral.

  • About to use HR_INFOTYPE_OPERATION to create customer infotype issue:

    hi
    i want to create infotype use function(HR_INFOTYPE_OPERATION).
    this infotype is customer infotype.
    the first scenario is:
      i'm be sure no data about one employee in this infotype(9004).
      to call with data upload function and put data into internal table IT_PA9004.
      and the table data as follow:
    one line: it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080201' , it_pa9004-endda = '20080930'
              it_pa9004-zzvalue = 50 (customer field).
    two line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080201' , it_pa9004-endda = '20080930'
              it_pa9004-zzvalue = 60 (customer field).
    three line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
              it_pa9004-zzvalue = 70 (customer field).
    four line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
              it_pa9004-zzvalue = 80 (customer field).
    i run the programme and get information is:
    11022887 insert ok.
    11022887 insert ok.
    11022887 insert ok.
    11022887 insert ok.
    but i use the transation PA30 to view all data:
    in database just exist one row:
    four line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
              it_pa9004-zzvalue = 80 (customer field).
    the second scenario is:
    in database the infotype have exist one row:
               pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
               pa9004-begda = '20080318' , pa9004-endda = '20080318'
               pa9004-zzvalue = X (customer field).
    and i create another row:
    line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
              it_pa9004-begda = '20080318' , it_pa9004-endda = '99991231'
              it_pa9004-zzvalue = 80 (customer field)
    i run the programme and get information is:
    11022887 insert ok.
    the three scenario is:
        set  HR_INFOTYPE_OPERATION of import parameter operation = 'MOD'
        in any scenario will get error :not exist subtype .
    what heppend about HR_INFOTYPE_OPERATION working,i had to use this function to
       create other infotype of SAP owner.
       and will create successfully.
    so i thank it may be config Constraints about customer infotype.
    is time Constraints effect?
    so i want to how to check it?
    and if i want to create one infotype for customer using PM01 what some thing
    must be taken into account.
    think you advance.
    partial source code as follow:
    FORM ACTION_INSERT .
      DATA: P_FLAG TYPE C.
      DATA: WA_LOG LIKE LINE OF DATA_LOG.
      DATA: PP_ACTION TYPE PSPAR-ACTIO.
      LOOP AT IT_PA9004.
        CLEAR P_FLAG.
        CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
        PERFORM lock_employee USING IT_PA9004-pernr CHANGING P_FLAG.
        PP_ACTION = IT_PA9004-ACTION.
        PERFORM HR_INFOTYPE_OPERATION USING IT_PA9004 PP_ACTION CHANGING P_FLAG.
        IF P_FLAG IS INITIAL.
          if test_run = space.
            COMMIT WORK.
          else.
            ROLLBACK WORK.
          endif.
          write:/ it_pa9004-pernr,'insert ok'.
        ELSE.
          ROLLBACK WORK.
          write:/ it_pa9004-pernr,'error'.
        ENDIF.
        PERFORM unlock_employee USING IT_PA9004-pernr .
      ENDLOOP.
    ENDFORM.                    " ACTION_INSERT
    FORM LOCK_EMPLOYEE  USING    P_PERNR
                        CHANGING PP_FLAG.
      CHECK PP_FLAG IS INITIAL.
      CLEAR P_RETURN.
      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = P_PERNR
        IMPORTING
          return = P_RETURN
        EXCEPTIONS
          OTHERS = 01.
      CALL FUNCTION 'HR_INITIALIZE_BUFFER'
        EXPORTING
          pernr = P_PERNR.
      IF P_RETURN IS NOT INITIAL.
        PP_FLAG = '1'.
      ENDIF.
    ENDFORM.                    " LOCK_EMPLOYEE
    FORM HR_INFOTYPE_OPERATION  USING    P_PA9004 LIKE IT_PA9004
                                         P_ACTION type PSPAR-ACTIO
                                CHANGING PP_FLAG.
      CHECK PP_FLAG  IS INITIAL.
      DATA: bapipakey type bapipakey,
            P_SUBTY TYPE P9004-SUBTY,
            PP_9004 TYPE TABLE OF  P9004 WITH HEADER LINE.
      CLEAR P_RETURN.
      REFRESH PP_9004.
      MOVE-CORRESPONDING P_PA9004 TO PP_9004.
      IF P_ACTION = 'INS'.
        PP_9004-AEDTM = SY-DATUM.
        PP_9004-UNAME = SY-UNAME.
      ENDIF.
      IF P_ACTION = 'MOD'.
        PP_9004-AEDTM = SY-DATUM.
        PP_9004-UNAME = SY-UNAME.
      ENDIF.
      APPEND PP_9004.
      P_SUBTY = P_LGART.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = '9004'
         subtype       = 'FQ03'
          subtype       = P_SUBTY
          number        = PP_9004-pernr
          validityend   = PP_9004-ENDDA
          validitybegin = PP_9004-begda
         RECORDNUMBER  = pp_9004-seqnr
          record        = PP_9004
           operation     = 'INS'
         operation     = P_ACTION
          nocommit      = 'X'
        IMPORTING
          return        = P_RETURN
          key           = bapipakey
        EXCEPTIONS
          OTHERS        = 0.
      IF P_RETURN IS NOT INITIAL.
        PP_FLAG = '9'.
      ENDIF.
    ENDFORM.                    " HR_INFOTYPE_OPERATION
    FORM UNLOCK_EMPLOYEE  USING    P_PERNR.
      CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
        EXPORTING
          number = p_pernr
        IMPORTING
          return = P_RETURN
        EXCEPTIONS
          OTHERS = 01.
    ENDFORM.                    " UNLOCK_EMPLOYEE

    hi
    i want to create infotype use function(HR_INFOTYPE_OPERATION).
    this infotype is customer infotype.
    the first scenario is:
      i'm be sure no data about one employee in this infotype(9004).
      to call with data upload function and put data into internal table IT_PA9004.
      and the table data as follow:
    one line: it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080201' , it_pa9004-endda = '20080930'
              it_pa9004-zzvalue = 50 (customer field).
    two line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080201' , it_pa9004-endda = '20080930'
              it_pa9004-zzvalue = 60 (customer field).
    three line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
              it_pa9004-zzvalue = 70 (customer field).
    four line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
              it_pa9004-zzvalue = 80 (customer field).
    i run the programme and get information is:
    11022887 insert ok.
    11022887 insert ok.
    11022887 insert ok.
    11022887 insert ok.
    but i use the transation PA30 to view all data:
    in database just exist one row:
    four line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ03',
              it_pa9004-begda = '20080101' , it_pa9004-endda = '20081031'
              it_pa9004-zzvalue = 80 (customer field).
    the second scenario is:
    in database the infotype have exist one row:
               pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
               pa9004-begda = '20080318' , pa9004-endda = '20080318'
               pa9004-zzvalue = X (customer field).
    and i create another row:
    line:it_pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
              it_pa9004-begda = '20080318' , it_pa9004-endda = '99991231'
              it_pa9004-zzvalue = 80 (customer field)
    i run the programme and get information is:
    11022887 insert ok.
    but in database just exist the first data
               pa9004-pernr = '11022887' ,it_pa9004-subty = 'FQ02',
               pa9004-begda = '20080318' , pa9004-endda = '20080318'
               pa9004-zzvalue = X (customer field).
    the three scenario is:
        set  HR_INFOTYPE_OPERATION of import parameter operation = 'MOD'
        in any scenario will get error :not exist subtype .
    what heppend about HR_INFOTYPE_OPERATION working,i had to use this function to
       create other infotype of SAP owner.
       and will create successfully.
    so i thank it may be config Constraints about customer infotype.
    is time Constraints effect?
    so i want to how to check it?
    and if i want to create one infotype for customer using PM01 what some thing
    must be taken into account.
    think you advance.
    partial source code as follow:
    FORM ACTION_INSERT .
      DATA: P_FLAG TYPE C.
      DATA: WA_LOG LIKE LINE OF DATA_LOG.
      DATA: PP_ACTION TYPE PSPAR-ACTIO.
      LOOP AT IT_PA9004.
        CLEAR P_FLAG.
        CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
        PERFORM lock_employee USING IT_PA9004-pernr CHANGING P_FLAG.
        PP_ACTION = IT_PA9004-ACTION.
        PERFORM HR_INFOTYPE_OPERATION USING IT_PA9004 PP_ACTION CHANGING P_FLAG.
        IF P_FLAG IS INITIAL.
          if test_run = space.
            COMMIT WORK.
          else.
            ROLLBACK WORK.
          endif.
          write:/ it_pa9004-pernr,'insert ok'.
        ELSE.
          ROLLBACK WORK.
          write:/ it_pa9004-pernr,'error'.
        ENDIF.
        PERFORM unlock_employee USING IT_PA9004-pernr .
      ENDLOOP.
    ENDFORM.                    " ACTION_INSERT
    FORM LOCK_EMPLOYEE  USING    P_PERNR
                        CHANGING PP_FLAG.
      CHECK PP_FLAG IS INITIAL.
      CLEAR P_RETURN.
      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = P_PERNR
        IMPORTING
          return = P_RETURN
        EXCEPTIONS
          OTHERS = 01.
      CALL FUNCTION 'HR_INITIALIZE_BUFFER'
        EXPORTING
          pernr = P_PERNR.
      IF P_RETURN IS NOT INITIAL.
        PP_FLAG = '1'.
      ENDIF.
    ENDFORM.                    " LOCK_EMPLOYEE
    FORM HR_INFOTYPE_OPERATION  USING    P_PA9004 LIKE IT_PA9004
                                         P_ACTION type PSPAR-ACTIO
                                CHANGING PP_FLAG.
      CHECK PP_FLAG  IS INITIAL.
      DATA: bapipakey type bapipakey,
            P_SUBTY TYPE P9004-SUBTY,
            PP_9004 TYPE TABLE OF  P9004 WITH HEADER LINE.
      CLEAR P_RETURN.
      REFRESH PP_9004.
      MOVE-CORRESPONDING P_PA9004 TO PP_9004.
      IF P_ACTION = 'INS'.
        PP_9004-AEDTM = SY-DATUM.
        PP_9004-UNAME = SY-UNAME.
      ENDIF.
      IF P_ACTION = 'MOD'.
        PP_9004-AEDTM = SY-DATUM.
        PP_9004-UNAME = SY-UNAME.
      ENDIF.
      APPEND PP_9004.
      P_SUBTY = P_LGART.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = '9004'
         subtype       = 'FQ03'
          subtype       = P_SUBTY
          number        = PP_9004-pernr
          validityend   = PP_9004-ENDDA
          validitybegin = PP_9004-begda
         RECORDNUMBER  = pp_9004-seqnr
          record        = PP_9004
           operation     = 'INS'
         operation     = P_ACTION
          nocommit      = 'X'
        IMPORTING
          return        = P_RETURN
          key           = bapipakey
        EXCEPTIONS
          OTHERS        = 0.
      IF P_RETURN IS NOT INITIAL.
        PP_FLAG = '9'.
      ENDIF.
    ENDFORM.                    " HR_INFOTYPE_OPERATION
    FORM UNLOCK_EMPLOYEE  USING    P_PERNR.
      CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
        EXPORTING
          number = p_pernr
        IMPORTING
          return = P_RETURN
        EXCEPTIONS
          OTHERS = 01.
    ENDFORM.                    " UNLOCK_EMPLOYEE

  • Not able to modify the data for infotype 0008 using FM

    Hi All ,
    I have got a requirement for updating the infotype 0008 data  using FM : HR_MAINTAIN_MASTER_DATA.
    While trying to modify the wagetypes data which is of blank ..unable to upload the amount for that partcular field ..
    For this am herewith the link  of o/p :
    http://i55.tinypic.com/28jfw2c.jpg for this am also posting the code...
    Please suggest me furthur in what way i can upload..
          SELECT * FROM pa0008 INTO TABLE itab_pa0008
    FOR ALL ENTRIES IN itab
        WHERE pernr = wa_data-pernr
        AND begda = wa_data-begda_out
        AND endda = wa_data-endda_out.
        DESCRIBE TABLE itab_pa0008 LINES lin.
        IF lin EQ  0.
          c_action = 'INS'.
        ELSE.
          c_action = 'MOD'.
        ENDIF.
        LOOP AT itab INTO wa_itab WHERE pernr = wa_data-pernr.
          CLEAR: wa_bapireturn, wa_bapireturn1, wa_hr_return.
          REFRESH: it_pprop[],it_modified_keys[].
          it_pprop-infty = '0008'.
          it_pprop-fname  = 'P0008-TRFAR'.                 "1
          it_pprop-fval = wa_itab-trfar.
          APPEND it_pprop.
          CLEAR it_pprop.
          it_pprop-infty = '0008'.
          it_pprop-fname  = 'P0008-TRFGB'.                 "2
          it_pprop-fval = wa_itab-trfgb.
          APPEND it_pprop.
          CLEAR it_pprop.
          it_pprop-infty = '0008'.
          it_pprop-fname  = 'P0008-TRFGR'.                  "3
          it_pprop-fval = wa_itab-trfgr.
          APPEND it_pprop.
          CLEAR it_pprop.
          it_pprop-infty = '0008'.
          it_pprop-fname  = 'P0008-TRFST'.                  "4
          it_pprop-fval = wa_itab-trfst.
          APPEND it_pprop.
          CLEAR it_pprop.
          flag = flag + 1.
    *****************************************************************************************************5
          BREAK-POINT.
          IF NOT wa_itab-lga1 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA01'.
            it_pprop-fval = wa_itab-lga1.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet1.
          ENDIF.
          IF NOT wa_itab-bet1 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET01'.
            it_pprop-fval = wa_itab-bet1.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************6
         IF NOT wa_itab-lga2 IS INITIAL.
           it_pprop-infty = '0008'.
           it_pprop-fname  = 'P0008-LGA02'.
           it_pprop-fval = wa_itab-lga2.
           APPEND it_pprop.
           CLEAR it_pprop.
           bet1 = wa_itab-bet2.
         ENDIF.
          IF NOT wa_itab-bet2 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET02'.
            it_pprop-fval = wa_itab-bet2.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************7
          IF NOT wa_itab-lga3 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA03'.
            it_pprop-fval = wa_itab-lga3.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet3 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET03'.
            it_pprop-fval = wa_itab-bet3.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************8
          IF NOT wa_itab-lga4 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA04'.
            it_pprop-fval = wa_itab-lga4.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet4 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET04'.
            it_pprop-fval = wa_itab-bet4.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************9
          IF NOT wa_itab-lga5 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA05'.
            it_pprop-fval = wa_itab-lga5.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet5 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET05'.
            it_pprop-fval = wa_itab-bet5.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************10
          IF NOT wa_itab-lga6 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA06'.
            it_pprop-fval = wa_itab-lga6.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet6 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET06'.
            it_pprop-fval = wa_itab-bet6.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************11
          IF NOT wa_itab-lga7 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA07'.
            it_pprop-fval = wa_itab-lga7.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet7 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET07'.
            it_pprop-fval = wa_itab-bet7.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************12
          IF NOT wa_itab-lga8 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA08'.
            it_pprop-fval = wa_itab-lga8.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet8 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET08'.
            it_pprop-fval = wa_itab-bet8.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************13
          IF NOT wa_itab-lga9 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA09'.
            it_pprop-fval = wa_itab-lga9.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet9 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET09'.
            it_pprop-fval = wa_itab-bet9.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************14
          IF NOT wa_itab-lga10 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-LGA010'.
            it_pprop-fval = wa_itab-lga10.
            APPEND it_pprop.
            CLEAR it_pprop.
            bet1 = wa_itab-bet2.
          ENDIF.
          IF NOT wa_itab-bet10 IS INITIAL.
            it_pprop-infty = '0008'.
            it_pprop-fname  = 'P0008-BET010'.
            it_pprop-fval = wa_itab-bet10.
            APPEND it_pprop.
            CLEAR it_pprop.
          ENDIF.
    *******************************************************************************************************15
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-LGA11'.
       it_pprop-fval = wa_itab-lga11.
       APPEND it_pprop.
       CLEAR it_pprop.
       bet1 = wa_itab-bet2.
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-BET11'.
       it_pprop-fval = wa_itab-bet11.
       APPEND it_pprop.
       CLEAR it_pprop.
    ********************************************************************************************************16
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-LGA12'.
       it_pprop-fval = wa_itab-lga12.
       APPEND it_pprop.
       CLEAR it_pprop.
       bet1 = wa_itab-bet2.
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-BET12'.
       it_pprop-fval = wa_itab-bet12.
       APPEND it_pprop.
       CLEAR it_pprop.
    ********************************************************************************************************17
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-LGA13'.
       it_pprop-fval = wa_itab-lga13.
       APPEND it_pprop.
       CLEAR it_pprop.
       bet1 = wa_itab-bet2.
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-BET13'.
       it_pprop-fval = wa_itab-bet13.
       APPEND it_pprop.
       CLEAR it_pprop.
    ********************************************************************************************************18
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-LGA14'.
       it_pprop-fval = wa_itab-lga14.
       APPEND it_pprop.
       CLEAR it_pprop.
       bet1 = wa_itab-bet2.
       it_pprop-infty = '0008'.
       it_pprop-fname  = 'P0008-BET14'.
       it_pprop-fval = wa_itab-bet14.
       APPEND it_pprop.
       CLEAR it_pprop.
    BREAK-POINT.
          CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
            EXPORTING
              number = wa_itab-pernr
            IMPORTING
              return = wa_bapireturn1.
          BREAK-POINT.
         IF c_action = 'INS'.
           CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
             EXPORTING
               pernr           = wa_itab-pernr
               actio           = 'INS'
             tclas           = 'A'
               begda           = wa_data-begda_out             "'20110401'
               endda           = wa_data-endda_out             "'99991231'
               dialog_mode     = '2'
             luw_mode        = '1'
             IMPORTING
               return          = wa_bapireturn
               return1         = wa_bapireturn1
               hr_return       = wa_hr_return
             TABLES
               proposed_values = it_pprop
               modified_keys   = it_modified_keys.
           IF NOT wa_bapireturn IS INITIAL.
             WRITE : / wa_bapireturn.
             CLEAR : wa_itab , wa_bapireturn.
           ENDIF.
         ELSEIF c_action = 'MOD'.
            CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
              EXPORTING
             infty         = '0008'
                pernr           = wa_itab-pernr
                actio           = 'MOD'
                begda           = wa_data-begda_out             "'20110401'
                endda           = wa_data-endda_out             "'99991231'
          record        =  p_record
             recordnumber  = wa_itab-SEQNR
             operation     = change
             nocommit      = nocommit
                dialog_mode     = '0'
             IMPORTING
                return          = wa_bapireturn
                return1         = wa_bapireturn1
                hr_return       = wa_hr_return
              TABLES
                proposed_values = it_pprop
                modified_keys   = it_modified_keys.
            IF NOT wa_bapireturn IS INITIAL.
              WRITE : / wa_bapireturn.
              CLEAR : wa_itab , wa_bapireturn.
            ENDIF.
         ENDIF.
          CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
            EXPORTING
              number = wa_itab-pernr
            IMPORTING
              return = wa_bapireturn1.
        ENDLOOP.
      ENDLOOP.

    Here is a sampe, and the logic you are using for wages goes in the internal table for wages (you already have the enqueue & dequeue so you don't have to worry about that, so you only have to add the BAPI_TRANSACTION_COMMIT):
    CALL FUNCTION 'BAPI_BASICPAY_CHANGE'
      EXPORTING
        employeenumber             = pa0008-pernr
        subtype                    = pa0008-subty
        objectid                   = pa0008-objps
        lockindicator              = pa0008-sprps
        validitybegin              = pa0008-begda
        validityend                = pa0008-endda
        recordnumber               = pa0008-seqnr
        payscaletype               = pa0008-trfar
        payscalearea               = pa0008-trfgb
        payscalegroup              = pa0008-trfgr
        payscalelevel              = pa0008-trfst
    *   NEXTINCREASE               =
    *   LOCALALLOWLEVEL            =
    *   PARTNERSHIP                =
    *   CURRENCY                   =
    *   COMPARISONPAYSCLTYPE       =
    *   COMPARISONPAYSCLAREA       =
    *   COMPARISONPAYSCLGRP        =
    *   COMPARISONPAYSCLLVL        =
    *   COMPNEXTINCREASE           =
    *   CAPACITYUTILLEVEL          =
    *   HOURSWORKEDPERPERIOD       =
    *   ANNUALSALARY               =
    *   CASEGROUPCATALOG           =
    *   CASEGROUP                  =
    *   CURRENCYANNUALSALARY       =
    *   REASON                     =
    *   NOCOMMIT                   =
    * importing
    *   return                     =
    TABLES
       wagetypes                  = wages.
    Regards,
    Ryan Crosby

  • How can I Update an infotype

    Hallo all,
    i have just upload a Kapro document from SAP Content repository and hang it up in a record, and i want update that record (infotype) , can anybody show me how to update an infotype,
    kind regards
    Jimy
    Edited by: jimkim on Nov 16, 2009 11:49 AM

    Hi,
    thanx for your replay,
    yes its a dicnamic infotype, but after uploading tha data, i have used some methods to hang the document in a personnal file.
    thanx a lot

Maybe you are looking for

  • Is any one else have issues with interactive PDF output from InDesign CC (2014)

    I am currently trying to produce a document with a level of interactivity I have achieved many times before. The interactivity is just a web style menu, show/hide the menu shows button set one, clicking on those shows a second set of buttons, and cli

  • Please Help -Videos won't play

    Just purchased a 30 gig 5G black Ipod. Compressed a movie in Quicktime Pro to Ipod settings. Placed movie in my Itunes program. The movies plays fine in Itunes. But when I copy it to the ipod nothing happens. I have been dragging the movie from Itune

  • Split-Reverse Pivot

    Hi All I have one question. I have source file in XML format which contains data :                     <Industry_Sector>Z;A;D;F;G</Industry_Sector> my need is to upload data as         Industry Sectors                                                 

  • "KICKED OUT" OF MY INTERNET BROWSER

    My E5 "kicks me off the internet"  for no apparent reason these days. It doesn't do it all the time so, I am certainly baffled. Also, it won't let me access some of my bookmarks at all or, it will start loading it and then just kick me off the intern

  • Just bought an iTouch and it won't sync :(

    So I got an iTouch today and it's taken me all day to install iTunes. First I had to clear my registry, then I downloaded the wrong iTunes for my PC, and now I've finally gotten the right iTunes version, the latest one, I might add and converted my l