HR Abap ques - Process Dynamic Actions in BDC mode

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?
Has someone done it before -> calling Dyn actions from your program?
Thanks in adv!

One more input -> I tried to include the MPPDAT00 in my main program and then call DYN_MEASURE in program <MPxxxx00>. But the values of PSAVE, DYNMEAS, etc don't seem to be there still.

Similar Messages

  • 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 include dynamic action in bdc

    Hi All,
    I want to update infotype 17 when an employee has joined through PA40 (Joining action).So i have written a dynamic action for this .But this dynamic ation does not get called in bdc for joining action.
    So infotype 17 is not maintained if we do joining through bdc.
    I have tried with user-exit zxpadu02 also, calling hr_infotype_operation on saving infotype 0001.But it gives return as 'Employee does not exist'.
    Since that infotype 0001 is still not saved.
    So what to do.
    Yogesh

    Hi Amit,
    For your information we can call dynamic action from BDC.
    go through this link
    how to include dynamic actions in bdc

  • Custom program for dynamic actions in BDC

    Hi all,
    Did anyone work on dynamic actions in BDC. I got a method of doing, but looking out for a simpler one.
    Thanks..

    Hi,
    Any updates that happen via dynamic actions in online mode must be explicitly included in the BDC session since dynamic actions are turned off during the execution of batch input sessions.this is a standard behavior.
    Regards,
    Manoj.

  • In HR ABAP WHAT IS DYNAMIC ACTIONS? GIVE ME ONE EXAMPLE?

    DEAR EXPERTS
    in HR ABAP WHAT IS DYNAMIC ACTIONS? GIVE ME ONE EXAMPLE?

    Dynamic actions are nothing but calling one more Infotype when trying to Create/Change or Delete a perosnnel number.
    Lets take an example company want that whenever an employee Communication data Fax/mobile no entered then immediately they want to make their email IDs depending upon VORNA NACHN of the personnel numbers data.Then at this point they will configure dynamic actions.But as a technical consultanat u will be given a Program name and the subroutine name in which u need to write the coding.
    Dynamic actions are a great tool to make infoytpe maintenance easier. When you create an infotype you can create another one automatically for example. Dynamic actions work for both master data and applicant data infotypes. It is basically a view on table T588Z you can reach via IMG - Personnel management - Personnel administration - Customize procedures - Dynamic actions.
    The table view looks like this:
    Infotype - Subtype - Field - Function code - Number - Step - Variable function part
    The infotype, subtype and field determine what should be created, filled, modified and so on. 
    The function code determines when something should happen. It can have the following values:
        * 02 - Change record
        * 04 - Create record
        * 08 - Delete record
    These values can be added so e.g. 06 means change record + create record. Remember - this only tells us when something should be done.
    The number simply tells us which step is first and which next. I recommend to go by 10's (10, 20, 30,40...), this makes it easier if you later on want to fill something in.
    The step determines what should be done. It can have 6 values:
        * P - check conditions under which something is done
        * I - maintain infotype record
        * W - set default values for new record
        * V - Reference to another step
        * F - call a routine
        * M - send mail
    Reward if found Helpful

  • Problem in calling dynamic actions in BDC

    Dear All,
    I have created a subroutine which is called when an entry is made in IT0015 for a particular wagetype. So I have used dynamic actions to serve the purpose.
    But the entries in IT0015 are made through a BDC, and I am facing in calling dynamic actions through BDC. I have tried the following code:
    DATA: opt TYPE ctu_params .
    DATA: zmode TYPE c VALUE 'N',
    zupd TYPE c VALUE 'A'.
    opt-dismode = zmode.
    opt-updmode = zupd.
    opt-defsize = 'X'.
    opt-nobinpt = 'X'.
    ******While calling transaction in BDC
    CALL TRANSACTION 'PA40' USING g_t_bdc
    OPTIONS FROM opt
    MESSAGES INTO g_t_messtab.
    But this does not work, it only calls the first screen of tcode PA30 and only populates the PERNR in that.
    Please suggest how do I rectify this problem.
    Regards,
    Kanupriya

    Hi Marcin,
    When I call PA30 without using options i.e.:
    CALL TRANSACTION 'PA30' USING BDCDATA MODE 'A' UPDATE 'S'.
    then, the BDC works perfectly and calls all the required screens correctly.
    But when I use:
    CALL TRANSACTION 'PA30' USING bdcdata
    OPTIONS FROM opt
    MESSAGES INTO messtab.
    then, it shows me only the first screen of PA30 and stops there.
    Also, if I hard code a break-point in my subroutine and save an entry in PA30, then the subroutine stops at the breakpoint. But if I call PA30 with SHDB transaction, then the code does not stop at subroutine which means the subroutine is not being called with SHDB.
    Please suggest why this is occuring.
    Regards,
    Kanupriya

  • Dynamic action in BDC session

    Hi,
    As per standard behaviour, dynamic actions are turned off during the execution of batch input sessions. 
    can anyone one me is it possible to  expicitly include dynamic actions in BDC session  as in online mode? if yes , then how can we achieve it.
    Thanks in advance!
    -Aleria

    Hi,
    I am she .
    Rgards,
    ARU

  • How to Handle Dynamic actions in batch mode???

    Hello Experts,
    We have a requirement where we need to automate PA40.  The data would be sent in csv file and we need to perform the required steps to insert data into Infotypes.
    The issue is in batch mode (background mode), the dynamic actions wouldn't be called and the business wants the dynamic actions to be considered as well. 
    Pls let me know if there is any way we can interpret the dynamic actions dynamically; meaning the prog should be able to handle the newly created dynamic actions as well.
    Any pointers to this are highly appreciated.
    Regards
    RK

    Hi.
    As far as i know, the limitation comes from the BDC execution itself, it doesn't really matter whether the execution is online or in batch mode.
    * dynamische Massnahme
        IF sy-binpt EQ space.
    *      befinden wir uns im ALE-Eingang ?
          CLEAR: ale_flag.                                   "XFYAHRK063273
          call function 'RHAP_ALE_FLG_GET'                   "XFYAHRK063273
            importing                                        "XFYAHRK063273
              ale_flg = ale_flag.                            "XFYAHRK063273
          IF ale_flag IS INITIAL.                            "XFYAHRK063273
            IF pspar-vinft NE space.  "infotype view         "XYLPH9K007065
              PERFORM dyn_measure IN PROGRAM (view_repid).   "XYLPH9K007065
            ELSE.                                            "XYLPH9K007065
              PERFORM dyn_measure.
            ENDIF.                                           "XYLPH9K007065
            PERFORM process_m
    One thing you could try to do to avoid this and get the dynamic measures executed is to use the NOBINPT variable of the OPTIONS structure in CALL TRANSACTION
      DATA opt TYPE ctu_params.
      opt-dismode = 'A'.
      opt-nobinpt = 'X'.
      CALL TRANSACTION 'PA30' USING bdcdata OPTIONS FROM opt.
      PERFORM close_group.

  • Dynamic actions and PA-PD integration a problem

    Are you aware of an update problem with MSS and PA-PD integration?  This information was made available in a presentation to us last year.  Was this issue resolved in mySAP ERP 2004?
    Dynamic actions and PA-PD integration a problem
    Dynamic actions and PA-PD integration are not
    processed on updates made from the web (but in the
    background through a batch or call transaction session)
    That’s why most standard PCRs require HR to process
    the transaction using the SAP GUI in the foreground
    This normally affects changes to infotypes 0000 &
    0001
    Then the next slide states:
    Workaround for dynamic actions
    Review dynamic actions in table T588Z (use SE16 to
    display) and document the infotypes and values that
    trigger dynamic actions
    Incorporate those infotypes into your background
    processing and web forms (if necessary)
    Workaround for PA-PD integration
    Include the integration steps for these infotypes in your
    background processing (just as in conversions)

    Hi John,
    Not sure if it is fixed.. or can be fixed.. we are still in 47  & Use custom code to account for Dynamic Actions.. the PCR processes use the function module HR_MAINTAIN_MASTERDATA to update the infotypes. This function mimics a BDC & hence cannot handle Dynamic Actions... Basically, the issue is not with MSS but it is the way Dynamic Actions work.. to quote SAP  "Dynamic actions are not correctly processed in batch input sessions since in batch input the sequence of the screens needs to be predefined correctly. To be able to process dynamic actions in batch input, the checks of the dynamic actions need to be programmed when creating the batch input session. To avoid errors when programming and running the session, the static actions  only are processed in batch input. Calls of infotypes that are triggered by dynamic actions should be realized by separate Transaction calls.
    Please take a look at OSS Note #386027 for additional info about Dynamic Actions.
    Regards,
    Suresh Datti

  • Call a transaction code in dynamic action

    Hi
    How can we call a transaction code in a dynamic action.
    TC XD01 is populated when changes is happen in IT0006 subtype 03.
    Regards
    WS

    Hi,
    Please find the below threads which may help you.
    Problem in calling dynamic actions in BDC
    Create Dynamic Action
    Triggering Dynamic actions when updating an Infotype using a FM
    Thanks & Regards,
    Sandip Biswas.

  • Reg dynamic actions in abap-hr

    Hi Gurus ,
    What is dynamic actions in abap-hr ,can any body explains it
    with an example ...
    Thanks & Regards
    Suman

    hi dynamic actions changes or create the infotype record on maintainance  of another infotype.
    like after hiring a person if u want to default joining date in 0041 infotype.
    then u will check molga.
    p too1p-molga=40
    p is used to check conditions.
    then u will insert the records in 0041
    i ins,0041,,,(p0000-begda),(p0000-endda)/d
    /d is for processing in background.
    then u will default values in 0000
    w p0041-dar01 = 'hd'
    w p0041-dat01 = p0000-begda.
    w is for defaulting value.
    go to spro-personnel management - personnel administration-customizing procedures-dynamic action .
    here u have documentation.

  • HCM Process and Forms Dynamic Actions

    Hi
    We are implementing HCM process and forms and presume that dynamic actions will have to be recreated as rules.
    Can anyone give any guidance in this area as some of our dynamic actions are quite complex.
    Many thanks
    Ian

    Hi,
    For HR forms please follow the following link
    HCM Processes and Forms (www.service.sap.com/erp:  - SAP ERP Human Capital Management -> Workforce Process Management -> HCM Processes and Forms -> Media Library)
    https://websmp205.sap-ag.de/~form/sapnet?_SHORTKEY=00200797470000081848&
    A dynamic action has the following components.
    Infotype Number (INFTY): specifies the infotype for which you want the dynamic action triggered
    Subtype (SUBTY): narrows the focus to a specific subtype
    Field Name (FIELDN): starts your action when a maintenance function is performed on a particular field
    Function (FC): specifies the various maintenance operations to which your dynamic action would respond. They are 02 (change); 04 (create); 06 (create and change); 08 (delete); 10 (change and delete); 12 (create and delete). Dynamic actions are only applicable in maintenance operations, not in display functions.
    Sequence Number (NO): refers to a sequential number.
    Step (A): specifies a particular type of action. No dynamic action is executed if the function character has a value other than one of the following:
                 P: Plausibility checks, which allow you to check certain conditions.          
                 I: Calls an infotype for processing
                 W: Called after the I statement and used to assign values to screen fields while creating or copying another infotype record through the I statement 
                  F: Calls a FORM routine (subroutines in ABAP) during your action. The routine may reside in or out the module pool MPNNNN00.
                 V: Lets you treat collectively a number of fields for which you want to define a common dynamic action
                  M: Sends SAP Office mail
    Variable function part: The variable function part along with the step indicator forms the core part of your action. It specifies the processing details when the dynamic action is triggered. For example: 
    Requirement: When the postal code or the city of an employeeu2019s permanent residence is changed in infotype 0006, an email should be sent to the administrator.
    INFTY    SUBTY    FIELDN    FC          NO.    STEP       VARIABLE FUNCTION
    0006           1             ORT01      06             001           V               PSTLZ            
    0006           1             PSTLZ      06             002           M               M0001
    The V statement on line 001 is used to link the two fields to the M statement. The statements relevant to field PSTLZ are also applicable to the ORT01 field.
    When a record is created or changed in infotype 0006 of permanent address, an email is sent using the feature M0001. Information such as the recipient address, subject, and content of the mail is derived from M0001.
    Warm REgards,
    Kapil

  • Problem setting a hidden item value when button clicked with dynamic action or pl/sql process

    Apex 4.1
    Oracle 11g
    I have a page that consists of a main region and several sub regions.  I have a pl/sql process in After Header SET_DISPLAY(:P400_DISPLAY :='MAIN';)
    Three subregions have a contional display where P400_DISPLAY = STORE.  This works in hiding the sub regions.
    Now I want to change the P400_DISPLAY value to STORE to show the subregions when I hit a button.
    I tried creating a dynamic action for on click of the add button but get the following error:
    The selected button uses a 'Button Template' that does not contain the #BUTTON_ID# substitution string
    I went to the templates and found:
    Substitution Strings
    Substitution strings are used within sub templates to reference component values. This report details substitution string usage for this template.
    Substitution String
    Referenced
    From
    Description
    #LINK#
    Yes
    Template
    To be used in an "href" attribute
    #JAVASCRIPT#
    No
    To be used in an "onclick" attribute
    #LABEL#
    Yes
    Template
    Button Label
    #BUTTON_ATTRIBUTES#
    No
    Button Attributes
    #BUTTON_ID#
    No
    Generated button ID will be either the button's Static ID if defined, or if not will be an internally generated ID in the format 'B' || [Internal Button ID]
    I then tried creating a page process, pl/sql, :P400_DISPLAY :='STORE'; when the appropriate button is pressed.  The button action is submit page. However, it does not change the P400_DISPLAY value and the subregions stay hidden.
    Suggestions please on how to fix the template or change the P400_DISPLAY value?

    The root issue is that, although you change the value of your page item, it isn't visible to other areas of the page until it is in the session. So, any other action based on the value of your page item; the visibility of a control, a report based on the item's value, etc. will all be unaffected by changing the value of the page item until it has been changed in the session. Even after this the items are stored in the session, you must thereafter do something to cause the value to be reevaluated. To see the effect of this, observe that your page loads and evaluates the value of your page item, it sees that is "MAIN" and hides the regions. However, it doesn't reevaluate them after this.
    So; your choices to get this value set in the session are to either Submit the page, or use JavaScript to set the value in the session. If you use the latter of these, you'll have to do some further work to cause the visibility tests to be re-run, So, let's stick with with the submit method.
    What you've done above sounds correct for this but, there are a lot of decisions you could have made that might have caused things not to happen in the correct sequence.
    Firstly, let's confirm that what I describe above is your problem. From the development environment, load the page, click the button to change the value and submit. Now, click the link labelled Session. Is it still set to MAIN? If so; this is your issue.
    Let's start with the your After Header computation. Did you set it to *only* run if the current value of your page item is NULL??? If not, that's your problem.
    Load Page -> Item set to 'Main' by Computation -> Click Button -> Item set to STORE -> Submit -> Load Page -> Item set to 'Main' by Computation
    See the problem?
    Assuming this isn't the issue, you created a Branch to the same page, right? What is your process point for the Branch? Is it *After* Validation, Computation etc? Because if not, you aren't changing the value before the submit happens.
    I bet it is the first issue but, take a look at these.
    Cheers,
    -Joe

  • How to clear grey loading screen and animated gif (Dynamic Action with "Show Processing" on submit)

    APEX V4.2.3
    DB 11.2
    I have a classic report on page 1.  I have a region button called "Export" (defined by a submit dynamic action with "show processing=Yes") that submits the page and then via a branch directs me to page 2 which has a slightly different version of the report on page 1 (i.e. no breaks) which I want to capture as a CSV export.  Therefore I've set the report template on page 2 to " Export:CSV".
    Now when I click on the page 1 export button the grey screen and loading gif appears indicating that the report is executing and then as expected, page 2 doesn't appear but instead the standard open/save window's dialog box appears asking to open or save the generated CSV file.  All good..but the grey loading screen remains.  How do I clear this loading screen and get back to the context of page 1 ?
    thanks in advance
    PaulP

    Hi PPlatt,
    We would love to help but you left out one crucial part of the puzzle: namely how does your CSV report get exported. With the way it is setup (a redirect to another page), I'm going to assume you do that because you have some PL/SQL on that page that prints the CSV.
    Now there are two questions that are crucial here:
    - How do we stop the icon from bugging us on the screen
    - How do we communicate with the browser that it should no longer display the loading icon
    The first question is rather easy, two simply lines of codes can do that:
    $('#apex_wait_popup').hide();
    $('#apex_wait_overlay').hide();
    But when do we use this code? Quite simple when the document is downloaded. When is it downloaded? At the end of the PL/SQL code that prints the document to the browser.
    What you could do is at the end of that code give an application item a certain value. For example :AI_PRINTED := 'Y';
    Then all you need to do is let the browser ask for the value. You could do this by using JavaScript to continuously fire AJAX to the server using a JS timing event:
    http://www.w3schools.com/js/js_timing.asp
    Better would be a Server send event, but since you left out another crucial piece of information: your browser, I will not go deeper into this.
    Start this timing event when someone asks for the document, and end it as soon as the process returns that :AI_PRINTED equals 'Y'.
    Despite the lack of information, I hope I have given, or at least inspired you to get to the solution.
    Regards,
    Joni

  • Is it possible in a before-page-submit dynamic action to cancel processing?

    I have a page where when the user submits, I check certain conditions and prompt the user with a confirmation ("are you really sure you want to submit this...?") and if they press OK (javascript true) continue to submit as normal, else (javascript false) the page should stop submitting.
    I know I can do this by putting Javascript code on whatever buttons I need to such that they're prompted from whatever appropriate button but I then thought it might be more elegant to just put it in one place in a before-page-submit DA.
    So I figured that in my DA for a before-page-submit I'd try explicitly returning true or false thinking that I returned true it would continue to submit but if false it would stop submitting. Unfortunately no dice.
    Example:
    Dynamic Action
    Before Page Submit
    Condition (Javascript Expression): (this.data=="SAVE")||(this.data=="MULTI_ROW_DELETE")
    var response=checkPbcDml();
    alert(response); //for debugging and I do properly get true or false back
    if(!response)
      return(false);
    else
      return(true);So I'd like return(false) to stop the submission process (was only guessing that it'd work, and it doesn't). Is there any other javascript command that I could execute to cancel the submission processing?
    Yes I know that I really can do this on my buttons and it'll work...
    javascript:if(checkPbcDml())apex.confirm(htmldb_delete_message,'DELETE');
    javascript:if(checkPbcDml())apex.submit('SAVE');...but was just hoping to do something in the DA as a matter of elegance to put code in one place rather than two places.
    Edited by: gti_matt on Jun 14, 2012 10:30 AM

    trent wrote:
    Personally, I'd just try to utilise the confirm action - probably achieved by incorporating the checkPbcDml() function into the dynamic action condition, at the sime time you are checking the request value.Aha! That's it.
    The "Confirm" DA action's OK/Cancel response is evaluated by the "Before Page Submit" and cancels the processing.
    What I did was:
    1. Looked at my old function's conditions:
    function checkPbcDml()
      if (($v('P265_FREEZE_FLAG')=='Y') && ($v('P265_PUR_MFG')=='M'))
        return(true);
      else
        return(confirm("Part Bid Categories information will only be saved from this page for frozen &F182_MAKE_TEXT. parts.\nDo you want to continue with this action anyway?"));
    }2. Appended them to the existing DA conditions that were evaluating the save or multi-row-delete request:
    ((this.data=="SAVE")||(this.data=="MULTI_ROW_DELETE")) && (!(($v('P265_FREEZE_FLAG')=='Y') && ($v('P265_PUR_MFG')=='M')))3. And created a Confirm action with that message text and removed my checkPbcDml() function.

Maybe you are looking for