HR_INFOTYPE_OPERATION called inside Dynamic action

I am writing a subroutine called by dynamic action.
Where using FM 'HR_INFOTYPE_OPERATION' i have to delimit or delete the records of infotype 0167.
Although, HR_INFOTYPE_OPERATION, is executing with return is 0. but there is no change in the infotype reocrd.
The same code written independent without called from Dynamic action, infotype record is been updated.
Any help would be highly appriciated.
Regards
Manvir

Also look at thread !!
Re: Strange behavior of  FM u0093HR_MAINTAIN_MASTERDATA u0093
and
Re: Why does the NOCOMMIT parameter not work in HR_INFOTYPE_OPERATION?
I’d recommend you to write BDC program . This FM is behaving in a weird way!!!
<b>I used it only for 'INS' ...</b>
Hope this’ll give you idea!!
<b>P.S award the points.</b>
Good luck
Thanks
Saquib Khan
"Some are wise and some are otherwise"

Similar Messages

  • HR_INFOTYPE_OPERATION not working when called from Dynamic action

    Hi ,
           Senario  : I would like to execute a form from dynamic action which
    creates a record in 0015 (Additional payment IT) .
           I have writen the code as shown below am using FM HR_INFOTYPE_OPERATION
    . When i execute the program from se38 it is creating a record, however it is
    not created when it is called from dynamic action..when i debugged the code in
    inside the FM HR_INFOTYPE_OPERATION there is a FM HR_MAINTAIN_MASTERDATA where
    they are using call dialog (statement) and
    sy-oncom = 'N'   when called from Dynamic action and
    sy-oncom = 'S'   when called executed directly.
    I tried to change the sy-oncom to S while run from Dynamic action it created
    the record.
    So Can anyone explain me abt sy-oncom and how can i resolve the issue..
    code..
    REPORT ZHRPYENH01 .
    perFORM TERMIATION_9000.
    INCLUDE DBPNPMAC.
          FORM Termiation_9000                                          *
    FORM TERMIATION_9000.
    INFOTYPES : 0015.
    *data : i .
    *i ='c'.
    *break-point.
    *message i000(000) with i.
      TABLES : PRELP.
      DATA : P9000 TYPE PA9000." with header line.
      DATA : P0000 TYPE STANDARD TABLE OF  P0000 WITH HEADER LINE.
    DATA : P0015 TYPE STANDARD TABLE OF  P0015 WITH HEADER LINE.
      DATA : HIRE_DATE  LIKE SY-DATUM,
             TERM_DATE  LIKE SY-DATUM.
      DATA : MOLGA LIKE T500L-MOLGA VALUE '25',
             SEQNR LIKE PC261-SEQNR.
      DATA : RGDIR TYPE STANDARD TABLE OF PC261 WITH HEADER LINE.
      DATA : ACTUAL_PERIOD LIKE PA9000-RETENTION.
      DATA : PNP-SW-FOUND TYPE SY-SUBRC ,
             PNP-SY-TABIX TYPE SY-TABIX.
      DATA : TER_PERNR LIKE PA0001-PERNR.
      DATA : REF_PERNR LIKE PA0001-PERNR.
      data : key type BAPIPAKEY.
      data : payed_amount type p0015-BETRG.
    data : future_payment_amount type p0015-BETRG.
    data : p0002 like pa0002.
      types : begin of t_deduction ,
              deducation_date like p0015-begda,
              future_payment_amount type p0015-BETRG.
      types : end of t_deduction.
    data :  future_deduction type standard table of t_deduction with
    *header line.
      data :  future_deduction type  t_deduction .
    data : RETURN type  BAPIRETURN1.
    *data : deduction_p0015 like standard table of p0015 with header line.
    data : deduction_p0015 like p0015 .
    xxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxxxx
    ****Prepare 0015 data for deduction
    *deduction for payed amount
    clear deduction_p0015.
    *refresh deduction_p0015.
    deduction_p0015-pernr = REF_PERNR.
    *deduction_p0015-pernr = TER_PERNR.
    deduction_p0015-lgart = 'M120'.
    deduction_p0015-begda = sy-datum + 1 .
    deduction_p0015-endda = sy-datum + 1 .
    deduction_p0015-BETRG = payed_amount.
    deduction_p0015-WAERS = 'SGD'.
    deduction_p0015-ZUORD =  TER_PERNR.
    *append deduction_p0015.
    **deduction for future payment amount
    *loop at future_deduction.
    *clear deduction_p0015.
    *deduction_p0015-pernr = REF_PERNR.
    **deduction_p0015-pernr = TER_PERNR.
    *deduction_p0015-lgart = 'M120'.
    *deduction_p0015-begda = FUTURE_DEDUCTION-DEDUCATION_DATE.
    *deduction_p0015-endda = FUTURE_DEDUCTION-DEDUCATION_DATE.
    *deduction_p0015-BETRG = future_deduction-future_payment_amount.
    *deduction_p0015-WAERS = 'SGD'.
    *deduction_p0015-ZUORD =  TER_PERNR.
    *append deduction_p0015.
    *endloop.
    Create a deduction wage type in 0015 for the employee
    break-point.
    CLEAR RETURN.
    CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
      EXPORTING
        NUMBER              = REF_PERNR
        VALIDITYBEGIN       = '18000101'
    IMPORTING
       RETURN              = return
    if not return is initial.
    message E000(000) with
    'Referred Employee could not be locked for referal  payment deducation,
    please try after some time'.
    endif.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        INFTY                  = '0015'
        NUMBER                 = REF_PERNR
       SUBTYPE                = 'M120'
      OBJECTID               =
      LOCKINDICATOR          =
       VALIDITYEND            = SY-DATUM
       VALIDITYBEGIN          = SY-DATUM
      RECORDNUMBER           =
        RECORD                 = deduction_p0015
        OPERATION              = 'COPY'
      TCLAS                  = 'A'
       DIALOG_MODE            = '2'
      NOCOMMIT               =
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
    IMPORTING
       RETURN                 = return
       KEY                    = key
    break-point.
    COMMIT WORK.
    if not return is initial.
    *return-TYPE
    *ID
    *NUMBER
    *MESSAGE
    message I000(000) with return-MESSAGE.
    endif.
    CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
      EXPORTING
        NUMBER              = REF_PERNR
        VALIDITYBEGIN       = '18000101'
    IMPORTING
       RETURN              = return
    xxxxxxxxxxxxxxxxxxxx
    xxxxxxxxxxxxxxxxx
    Thanks and regards
    -Senthil Bala
    Message was edited by: senthil bala

    Hi Senthil
    Why at all U want a subroutine to create a record in IT0015 through Dynamic action.There are some standard codes available to update infotypes.
    Let me give U an example
    14     9CON     BETRG     4     2     I     INS,0015 This will create a record in IT0015 when IT0014 is updated with Wagetype 9CON
    14     9CON     BETRG     4     3     W     P0015-LGART='5400' Set wagetype for IT0015(Here U can use a subroutine call to set the wagetype)
    14     9CON     BETRG     4     4     W     P0015-BETRG=P0014-BETRG set amount for IT0015(Here U can use a subroutine call to get the amount)
    14     9CON     BETRG     4     5     W     P0015-BEGDA=P0014-ENDDA set the dates(Here U can use a subroutine call to set the dates)
    Hope this will help U.
    Please award points if helpful

  • Call a dynamic action automatically on a regular basis

    Hi,
    We have a classic report on a page which we would like to refresh automaticallly every X minutes. We have done this using setInterval and $a_report however as I understand, this is unsupported functionality... So I would like to go down the dynamic action route.
    But my question is this... how can I call the dynamic action automatically say every 3 minutes, without any user interaction?

    Hi John,
    maybe it's easier for you to get the approval because it's a plug-in we (Oracle) provide.
    You mentioned that you already had a setInterval with $a_report solution in place. Instead of the unsupported $a_report you can use the supported
    jQuery( "#static_id_of_your_report_region" ).trigger ( "apexrefresh" );to trigger a refresh of your report region. That will be identical to the "Refresh" dynamic action. But I would still suggest to go with the "Timer" dynamic action plug-in, because this will be more transparent for other developers when looking at your page.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Mail not send when subroutine is call in dynamic actions

    Hi Friends,
    I have facing a problem in sending a mail through dynamic actions . In this mail is not send to specific user mail-id.
    Suggest me . What to be exactly done .
    Regards,
    Anish

    First you have to understand what should be done...
    ask your functional consulatant where exactly the Mails need to be retrived For example...
    in infotype 0105 subtype '010'  generally we have email ids avaialable of the employeee....
    may be this helps or not give full specification some one can revert back.
    Regards
    sas

  • Using HR_INFOTYPE_OPERATION in external subroutine for Dynamic Actions

    Hi,
    I am calling an external subroutine in the Dynamic Actions of an Infotype. In this external subroutine, I am using HR_INFOTYPE_OPERATION to modify OTHER records of the same Infotype number.
    However, when I tried to trigger the Dynamic Actions in PA30, the other infotypes get modified as intended. But when I refreshed the PA30 screen, the changes were reversed back as if the HR_INFOTYPE_OPERATION were not carried out at all. I have COMMIT WORK after the HR_INFOTYPE_OPERATION, refreshed the buffer. But it doesn't seem to work.
    My question is: Can i use HR_INFOTYPE_OPERATION in an external subroutine which is called during dynamic actions? As I have some complicated logic, I do not want to embed the coding in the Dynamic Actions. Is there a way for HR_INFOTYPE_OPERATION to work in the external subroutine with the changes being committed to the database?
    Thank you.

    Hi,
    I remember the same problem being faced by some of the forum members.
    Suresh Datti had replied that "Call the subroutine in a nother program using a SUBMIT statement. This will create two sessions and will update the DB". This was working fine for the users.
    Hope you can try this.
    Just call a program using SUBMIT statement and code your form routine inside that.
    Hope this helps you.
    Regards,
    Subbu.

  • Call a routine in a dynamic action.

    Hi Experts,
    i want to write a routine in which i can give the error msg while saving the infotype 0002 incase the given condition is not fulfilled.
    Can you tell me where i can write this routine and how to call it in a dynamic action.
    i hav written other types of dynamic actions before but never called any routine before
    Plz give me the detailed info regarding writing a routine.
    regards
    TS

    Hello TS,
    You can do that using F in Indicator for step but iam not sure whether it will return an error message. We have user exits for this which might solve your issue. We have userexit PBAS0001 and in this EXIT_SAPFP50M_002 Function module, we need to write the code which ever you want to do.
    For Calling FORM in Dynamic actions.
    P - Check conditions
    I - Maintain infotype record
    W - Set default values when creating a new record
    V - Reference to another step
    F - Call routine
    M - Send mail
    Say you have a program ZTEST. In this you need to write the form that needs to be called in dynamic action and say for ex:form_test.
    You can fill only structure RP50D values, because these values you can get it back to dynamic action. ypu can check for examples in dynamic actions it self which have 'F' indicator step.
    Regards,
    Kiran I

  • How to process Dynamic Action in BDC

    Hi friends.
    We are using HR_INFOTYPE_OPERATION to update some infotypes. The problem is that dynamic action does not get triggered as SY-BINPT = 'X' when we use this FM or BDC to update.
    Now, is there any workaround so that we can process dynamic actions via our program?
    Can somehow we call the subroutine DYN_ACTION from our program? Can the values of PSAVE etc be availabe in our program?
    Thanks in adv!

    Hi
    Its kind of complicated to code dynamic actions in your BDC code. However , I would try my best to make you understand.
    1. Make a BDC recording of the source screen.
    2. Dynamic actions are stored in table: T588Z. Now during your screen processing of BDC data, you have to check the conditions yourself whether this was the condition which triggers the dynamic action.
    3, Make another BDC recording of the target screens which are called due to dynamic actions. Now if the condition in the source screen is fullfilled and you have to call a dynamic action then direct your program flow to the BDC recording of the target screen and update all the fields which would be updated by Dynamic Actions in the normal user interaction of that screen.
    In short, you have to program all those things which Dynamic action does since BDC does not support dynamic actions.
    Reward points, if helpful.
    Regards
    Waz

  • How to raise Error Message in foreground through Dynamic Action?

    Hi,
    I have a requirement where I have to raise an error message in foreground so as to stop processing whenever HR_INFOTYPE_OPERATION fails to update a record in a dynamic program. I tried using MESSAGE statement but it did not work, as the error message was not displayed properly on the Infotype screen that calls the dynamic action.
    For ex.: If infotype PA0000 is calling PA0014 through dynamic action, then I want the error message to be displayed on the Actions Screen of PA0000.
    Is there any specific way to raise error messages through dynamic action programs?
    Quick answers will be appreciated.

    HI Sanjana,
    In the Substitution exits you can create the message in the configuration it self.
    You dont't need raise message explicitly.
    Thanks,

  • Performance issues with dynamic action (PL/SQL)

    Hi!
    I'm having perfomance issues with a dynamic action that is triggered on a button click.
    I have 5 drop down lists to select columns which the users want to filter, 5 drop down lists to select an operation and 5 boxes to input values.
    After that, there is a filter button that just submits the page based on the selected filters.
    This part works fine, the data is filtered almost instantaneously.
    After this, I have 3 column selectors and 3 boxes where users put values they wish to update the filtered rows to,
    There is an update button that calls the dynamic action (procedure that is written below).
    It should be straight out, the only performance issue could be the decode section, because I need to cover cases when user wants to set a value to null (@) and when he doesn't want update 3 columns, but less (he leaves '').
    Hence P99_X_UC1 || ' = decode('  || P99_X_UV1 ||','''','|| P99_X_UC1  ||',''@'',null,'|| P99_X_UV1  ||')
    However when I finally click the update button, my browser freezes and nothing happens on the table.
    Can anyone help me solve this and improve the speed of the update?
    Regards,
    Ivan
    P.S. The code for the procedure is below:
    create or replace
    PROCEDURE DWP.PROC_UPD
    (P99_X_UC1 in VARCHAR2,
    P99_X_UV1 in VARCHAR2,
    P99_X_UC2 in VARCHAR2,
    P99_X_UV2 in VARCHAR2,
    P99_X_UC3 in VARCHAR2,
    P99_X_UV3 in VARCHAR2,
    P99_X_COL in VARCHAR2,
    P99_X_O in VARCHAR2,
    P99_X_V in VARCHAR2,
    P99_X_COL2 in VARCHAR2,
    P99_X_O2 in VARCHAR2,
    P99_X_V2 in VARCHAR2,
    P99_X_COL3 in VARCHAR2,
    P99_X_O3 in VARCHAR2,
    P99_X_V3 in VARCHAR2,
    P99_X_COL4 in VARCHAR2,
    P99_X_O4 in VARCHAR2,
    P99_X_V4 in VARCHAR2,
    P99_X_COL5 in VARCHAR2,
    P99_X_O5 in VARCHAR2,
    P99_X_V5 in VARCHAR2,
    P99_X_CD in VARCHAR2,
    P99_X_VD in VARCHAR2
    ) IS
    l_sql_stmt varchar2(32600);
    p_table_name varchar2(30) := 'DWP.IZV_SLOG_DET'; 
    BEGIN
    l_sql_stmt := 'update ' || p_table_name || ' set '
    || P99_X_UC1 || ' = decode('  || P99_X_UV1 ||','''','|| P99_X_UC1  ||',''@'',null,'|| P99_X_UV1  ||'),'
    || P99_X_UC2 || ' = decode('  || P99_X_UV2 ||','''','|| P99_X_UC2  ||',''@'',null,'|| P99_X_UV2  ||'),'
    || P99_X_UC3 || ' = decode('  || P99_X_UV3 ||','''','|| P99_X_UC3  ||',''@'',null,'|| P99_X_UV3  ||') where '||
    P99_X_COL  ||' '|| P99_X_O  ||' ' || P99_X_V  || ' and ' ||
    P99_X_COL2 ||' '|| P99_X_O2 ||' ' || P99_X_V2 || ' and ' ||
    P99_X_COL3 ||' '|| P99_X_O3 ||' ' || P99_X_V3 || ' and ' ||
    P99_X_COL4 ||' '|| P99_X_O4 ||' ' || P99_X_V4 || ' and ' ||
    P99_X_COL5 ||' '|| P99_X_O5 ||' ' || P99_X_V5 || ' and ' ||
    P99_X_CD   ||       ' = '         || P99_X_VD ;
    --dbms_output.put_line(l_sql_stmt); 
    EXECUTE IMMEDIATE l_sql_stmt;
    END;

    Hi Ivan,
    I do not think that the decode is performance relevant. Maybe the update hangs because some other transaction has uncommitted changes to one of the affected rows or the where clause is not selective enough and needs to update a huge amount of records.
    Besides that - and I might be wrong, because I only know some part of your app - the code here looks like you have a huge sql injection vulnerability here. Maybe you should consider re-writing your logic in static sql. If that is not possible, you should make sure that the user input only contains allowed values, e.g. by white-listing P99_X_On (i.e. make sure they only contain known values like '=', '<', ...), and by using dbms_assert.enquote_name/enquote_literal on the other P99_X_nnn parameters.
    Regards,
    Christian

  • Reading a session variable from a dynamic action

    I have a select list on a page and a button next to the select list. The button calls a dynamic action which opens a page and sends the value in the select list. The page is not submitted. The DA has a step with a dummy PL/SQL block that submits the select list item. Then the page is called with the select list in the URL.
    The value is not being sent. If I go into edit mode then run the page again then the correct value is sent.
    When I look at session in Administration the select list is in session and set properly but is not sent unless the page is submitted.
    Why if it is in session is it not being passed correctly? What does submitting the page do other than update session?

    Hi,
    could you share the exception trace ?
    Frank

  • HR_INFOTYPE_OPERATION within Dynamic Action

    Hello,
    I am calling HR_INFOTYPE_OPERATION from within the Dynamic Action.  I can debug through it and even have it display the screens and everything appears to work fine.  The return structure is clear of any errors and the key structure indicates that the 'MOD' was done with no problem.  The infty is 2012.
    However once the dynamic action is complete the 2012 records have not been updated.  I am passing blank for the no_commit parameter on the FM.
    Does HR_INFOTYPE_OPERATION with a 'MOD' operation work from within the dynamic action?
    Regards,
    Jeff

    Hi Jeff,
    I am not sure if I get you right. But as for DB commit, it will be triggered automatically once SUBMIT statement is executed (as work process is released). What I have in my program is as follows:
    - in T588Z table (dyn.actions) I have invoked subroutine from my custom program
    POPUP_SELECTION_FOR_IT0015((YPLPY_PRO_RE_QUOTAGEN1).
    - In this YPLPY_PRO_RE_QUOTAGEN1 program I write subroutine wherein I do some coding and submit another report (which do real update).
    form POPUP_SELECTION_FOR_IT0015.
    "some coding - in my case I am filling P0015 strcutre (as this infotype has to be udpdated) while dyn. action is triggered for IT2002
        P0015-PERNR = LS_PSKEY-PERNR = P2002-PERNR.
        P0015-SUBTY = LS_PSKEY-SUBTY = P0015-LGART = LGART = IT_RET-FIELDVAL.
        P0015-BEGDA = LS_PSKEY-BEGDA = DATUM.
        P0015-ENDDA = LS_PSKEY-ENDDA = DATUM.
        P0015-UNAME = UNAME.
        P0015-INFTY = LS_PSKEY-INFTY = '0015'.
       "before I am submiting another program I am passing this strcuture
        export P0015 = P0015 PSKEY = LS_PSKEY to memory id 'ZXPADU02_P0015'.
        submit YPLPY_PRO_RE_ZXPADU02_2002
               and return.
    - Now the below program creates my IT0015 and the same time changes to IT2002 are written (DB commit is triggered with SUBMIT)
    REPORT  yplpy_pro_re_zxpadu02_2002.
    data: p0015 like p0015.
    data: ls_return TYPE bapireturn1,
          ls_pskey like pskey.
    IMPORT p0015 = p0015 pskey = ls_pskey FROM MEMORY ID 'ZXPADU02_P0015'.
    CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
      EXPORTING
        number = ls_pskey-pernr.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        infty                  = ls_pskey-infty
        number                 = ls_pskey-pernr
        subtype                = ls_pskey-subty
        validityend            = ls_pskey-endda
        validitybegin          = ls_pskey-begda
        record                 = p0015
        operation              = 'INS'
        dialog_mode            = '2'
      IMPORTING
        return                 = ls_return.
    IF NOT ls_return IS INITIAL AND
       ls_return-type EQ 'E'.
      MESSAGE e000(38) WITH ls_return-message.
    ENDIF.
    "unlock the EE
    CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
      EXPORTING
        number = ls_pskey-pernr.
    Works fine for me.
    Regards
    Marcin

  • HR_INFOTYPE_OPERATION from dynamic action?

    hi
    plz send me the sample code for calling subroutine (using the above mentioned FM) from dynamic action ..
    Regds
    Gunjan

    It's here a little example.
    FUNCTION ZHR_INFOTYPE_OPERATION.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(ZINFTY) LIKE  PRELP-INFTY
    *"     VALUE(ZNUMBER) LIKE  P0001-PERNR
    *"     VALUE(ZSUBTYPE) LIKE  P0001-SUBTY OPTIONAL
    *"     VALUE(ZOBJECTID) LIKE  P0001-OBJPS OPTIONAL
    *"     VALUE(ZLOCKINDICATOR) LIKE  P0001-SPRPS OPTIONAL
    *"     VALUE(ZVALIDITYEND) LIKE  P0001-ENDDA OPTIONAL
    *"     VALUE(ZVALIDITYBEGIN) LIKE  P0001-BEGDA OPTIONAL
    *"     VALUE(ZRECORDNUMBER) LIKE  P0001-SEQNR OPTIONAL
    *"     VALUE(ZRECORD)   type p0014 "use the infotype number you need
    *"     VALUE(ZOPERATION) LIKE  PSPAR-ACTIO
    *"     VALUE(ZTCLAS) LIKE  PSPAR-TCLAS DEFAULT 'A'
    *"     VALUE(ZDIALOG_MODE) TYPE  C DEFAULT '0'
    *"     VALUE(ZNOCOMMIT) LIKE  BAPI_STAND-NO_COMMIT OPTIONAL
    *"     VALUE(ZVIEW_IDENTIFIER) LIKE  P0003-VIEKN OPTIONAL
    *"     VALUE(ZSECONDARY_RECORD) OPTIONAL
    *"  EXPORTING
    *"     VALUE(ZRETURN) LIKE  BAPIRETURN1 STRUCTURE  BAPIRETURN1
    *"     VALUE(ZKEY) LIKE  BAPIPAKEY STRUCTURE  BAPIPAKEY
      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = znumber.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = zinfty
          number        = zpernr
          subtype       = zsubty
          objectid      = zobjps
          lockindicator = zsprps
          validityend   = zvalidityend
          validitybegin = zvaliditybegin
          recordnumber  = zrecordnumber
          record        = zrecord
          dialog_mode   = zdialog_mode
          operation     = zmod
        IMPORTING
          return        = zreturn.
      CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
        EXPORTING
          number = znumber..
      COMMIT WORK AND WAIT.
    endfunction.
    bye
    enzo

  • Info group being not called while using Dynamic Actions

    Hi,
    I am facing a scenario that, while we execute some action from PA40 like termination, then it will call my subroutine for dynamic actions which will be calculating the last day worked and updating the same in Info Type 0041.
    For updating the IT 0041, i am using the function module HR_MAINTAIN_MASTERDATA. and IT0041 is getting updated properly. But now the problem is coming that when the control comes out of subroutine, it is going back to the PA40 Screen and not to the next screen of the Info group.
    What can be the cause for the same.
    RND I have done on my part: I have commented/uncommented the return parametre RP50D-Date1, commented/uncomented the use of function modules to lock and Unlock the pernr.
    Please give ur comments.
    Thanks in Advance.

    Hi Nisha,
    Not sure if I have understood correctly, but if you just wanted to calculate leaving date and write the same date in IT0041 then you don't need a function module:
    1. Create a small program, as follows:
    REPORT  ZHR_PY_R0008                           .
    INCLUDE MPPDAT00.
    TYPE-POOLS HRQTA.
    TABLES: P0000,
            RP50D,
            T001P.
    ROUTINE CALLED BY TABLE T588Z
    FORM CHANGE_DATE.
      RP50D-DATE1 = P0000-BEGDA - 1 .
    ENDFORM.                    " CHANGE_DATE
    This program will give you the last working day written to RP50D-DATE1
    2. Simply enter the following lines into table T588Z:
    0000 04 499*- LEAVING ACTION - Populate Infotypes with leave date -*
    0000 04 500 P T001P-MOLGA='08'
    0000 04 501 P PSPAR-TCLAS='A'
    0000 04 502 P PSPAR-MASSN='*'/X   (* equals your leaving action types)
    0000 04 503 P PSPAR-MASSN='*'/X   (* equals your leaving action types)
    0000 04 504 F CHANGE_DATE(ZHR_PY_R0008)
    0000 04 505 ******** INF.0041  ********
    0000 04 506 I COP,0041,,,(P0000-BEGDA),(P0000-ENDDA)/D
    0000 04 507 W P0041-DAR07='*'   (* equals your date type)
    0000 04 508 W P0041-DAT07=RP50D-DATE1
    or if you are simply looking to delimit IT0041 with the leave date then replace lines 506-508 with:
    0000 04 506 I MOD,0041,,,(RP50D-DATE1),(RP50D-DATE1)/D
    0000 04 507W     P0041-ENDDA=RP50D-DATE1
    This will solve your problem : - )

  • Can we call a report program or schemas in  Routine [dynamic action] ???

    Dear SAP Crew,
    In dynamic action, we can call routines through indicatiors.
    In that routine, Can we call a report program or schemas???
    Kindly clarify with some scenario.
    Thks & Rgds
    Krish Sathya

    Hi Krish,
    In the routine you should be able to SUBMIT the program/report you need to execute.
    Cheers,
    Aditya

  • HR_INFOTYPE_OPERATION and Dynamic Actions

    Does HR_INFOTYPE_OPERATION trigger Dynamic Action?
    If not, how this needs to be handled?

    your best bet would be the person who created the dynamic action.. usually the functional analyst.. you can take a look at the entries in v_t588z via SM30/31.Once you display the entires, an F1 on each field on the screen will tell you what it is for & F4 will give you the possible options..
    ~Suresh

Maybe you are looking for