TRIGGERING DYNAMIC ACTIONS THROUGH PROGRAM

Hi Experts ,
I would like to know is it possible to trigger the dynamic actions through program.
Please explain me the details.
Thank you.

As far as i know ,Dynamic Actions dont trigger in Batch Input Session. So what you can do is modify your batch input program so that it handles the same checks and logic that you configured in the T588z table.
This is the documentation from SAP.
Note on creating a batch input session:
Dynamic actions are not processed in a batch input session.
In batch input, you must specify the exact sequence of the screens. To ensure this is the case, you must have already programmed the dynamic action checks before you create the batch input session.
To avoid errors only the static actions are processed when you program and process a session. Infotypes that usually only appear in the system as a result of a dynamic action should be updated by calling up the transaction separately.

Similar Messages

  • Triggering Dynamic actions when updating an Infotype using a FM

    Hi all,
    This is the scenario.
    I am trying to run a Transfer action, (80), which updates the Infotype 0000 and Infotype 0001. When the entry in the Infotype 0001 is saved, a dynamic action is triggered and a custom infotype is updated automatically. I need to find a FM that takes care of any dynamic actins associated to an Infotype.
    I tried using a BDC, but I was not successful. While using the FM HR_INFOTYPE_OPERATION, I am able to update the data into the infotyes 0000 and 0001 but the dnamic action is not triggered. Can someone please suggest a solution.
    Thanks,
    Amar

    Hi,
       Thanks for you r reply. Well I am new to dynamic actions, but this is the Dynamic action that has been written.
    GET_DU(ZHRDUDYNCALL)
    COP,9009,,,(P0001-BEGDA),(P0001-ENDDA)/D
    ----P9009-SEQNR=P0001-SEQNR ---***
    P9009-AEDTM=P0001-AEDTM
    P9009-UNAME=P0001-UNAME
    P9009-DU_CD=RP50D-FIELD1
    --END OF ENTRY IN TABLE PA9009--
    --CREATE ENTRY IN TABLE PA9009----
    SY-DATUM=SY-DATUM
    GET_DU(ZHRDUDYNCALL)
    DEL,9009,,,(P0001-BEGDA),(P0001-ENDDA)/D
    P9009-DU_CD=RP50D-FIELD1
    --END OF ENTRY IN TABLE PA9009--
    The FM that I am using goes like this:
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        infty                  =  '0001'
        number                 =  lv_pernr
      SUBTYPE                =   wa_0000-MASSN
      OBJECTID               =
      LOCKINDICATOR          =
       VALIDITYEND            = lc_endda
       VALIDITYBEGIN          = wa_source_data-begda
      RECORDNUMBER           = 1
        record                 =  wa_0001
        operation              = 'COP'
       TCLAS                  = 'A'
       DIALOG_MODE            = '0'
      NOCOMMIT               =
      VIEW_IDENTIFIER        =
       SECONDARY_RECORD       = proposed_values0001
    IMPORTING
      RETURN                 = return
      KEY                    =
    Please let me know if there is anything more I need to do?
    Thanks,
    Amar

  • ESS - Dynamic action

    Hi,
    I have dynamic action which works in  PA30 how ever when I am trying thru ESS then it is not triggered.
    when ever I enter phone number in IT0006 then it will update in IT0105**
    Is there any other settings  I need to do to work dynamic action thru ESS(portal)
    Regards,
    Ravi

    Hello,
    The portal does not trigger dynamic actions, you can use function module or user exits.
    Please refer to:
    Dynamic Action through ESS
    BR,
    Bentow.

  • 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

  • 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.

  • 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

  • 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,

  • Trigger actions through a program

    Hi experts,
      Here is my business functionality.
      I have to implement a badi for a customer request in crm. this would check the product against the reason code entered. If both match then i need to trigger action (actions are already defined) otherwise i have to collect error message in application log. I am through with the later half but dont know how to proceeed to action triggering.
      Can somebody pls help me out. Thanks in advance

    Hi Manuel,
    I have already seen that blog but when i copied the program , it gave me the error when the method for triggering the action is called. it gave me a short dump sayin
    Access via 'NULL' object reference not possible.
    The reason for the exception is:
    You attempted to use a 'NULL' object reference (points to 'nothing')
    access a component (variable: "LV_ACTION").
    An object reference must point to an object (an instance of a class)
    before it can be used to access components.
    Either the reference was never set or it was set to 'NULL' using the
    CLEAR statement.
    at line CALL METHOD lv_action->set_is_inactiv( space )..  "
    and since i have never used this method, i dont know how to solve this error. so can you please help me out with this

  • Re: Dynamic Action is not triggering in LSMW Recording

    Hello All,
    In SAP HRMS personnel actions if i do using LSMW Recording it is not triggering  the dynamic actions.
    Is there any mechanism to Trigger dynamic action in LSMW Recording ?
    How to find the differences in process with and with out recording ?
    Small help is also highly appreciated.
    With Regards,
    Sunil,
    +91-9903695384.

    Yes. Do one  thing. First study the dynamic action. Try to understand what the dynamic action is doing. Is it creating data in other infotype or is it updating some other table. Once it is clear what the dynamic action is doing then you can try to implement the same logic in LSMW. In LSMW there is a provision to add more than one recording and this recording can be called based on some logic..
    Thanks & Regards,
    Sandip

  • Triggering of dynamic actions in infotypes!

    Hi Experts,
    I have Query regarding the triggering of dynamic actions. Have a scenario where I create a record in infotype 21
    with subtype 'XX".
    On save of this record I need the dynamic actions to be triggered , where I will write the logic to modify the end date of an  existing infotype 21 record with subtype 'YY'.
    How can I achieve this?
    Please help!!!!

    Hi,
    Just try this.
    Goto V_T588Z.
    INFTY     SUBTY      FIELDN      FC NO.      STEP VARIABLE FUNCTION
    0021     XX          I     INS,21,(P0021-ENDDA)
    Regards,
    Srini

  • Custom program for Dynamic Actions

    Iam using BDC’s for Actions and Org.Assignment infotypes. The dynamic actions are planned to be carried out by using separate function modules.
    My query is, On the plausibility check conditions lots of structures are referred (eg: PSPAR,RP50D etc). How do i perform this condition check in the custom program (for dynamic actions) as these structures do not have any data?
    Thanks
    Message was edited by: SShenoy

    1. PSAVE-FIELDNAME will use the old values in the FIELD. It will be used in cases when we have to do plausibility checks on the basis of new as well as old value, eg, we want to use dynamic action for employees whose status changes from 'inactive' to 'active'
    2. Sequence no represents sequence no. If for a particular Infotype and FCode, we have to specify which step has to be performed first. Sequence no tells the system exactly this thing.
    Regards
    Lincoln

  • Access to triggering element in a Dynamic Action from PL/SQL ?

    Hi,
    I have a form that is used to calculate the volume of a (large) number of tanks based on entered tank heights.
    I have a PL/SQL procedure that performs the calculation - it is given the name of the tank and the height and calculates the volume (each tank may have different physical characteristics).
    I didn't want to create a Dynamic Action per tank (I'm lazy and the number of tanks is large!). I currently have a Dynamic Action that is triggered whenever any of the tank heights on the form change. The action PL/SQL calls the calculation for each tank. E.G.
    :P1_TANK1_VOL := tank.vol('TANK1', :P1_TANK1_HEIGHT);
    :P1_TANK2_VOL := tank.vol('TANK2', :P1_TANK2_HEIGHT);
    :P1_TANK50_VOL := tank.vol('TANK50', :P1_TANK50_HEIGHT);
    This works but involves performing 50 calculations whenever a single one is required and can appear to be slow.
    Is there a way to identify the triggering element from the PL/SQL action? E.G.
    IF TriggeringElement = 'P1_TANK1_HEIGHT' THEN
    :P1_TANK1_VOL := tank.vol('TANK1',:P1_TANK1_HEIGHT);
    END IF;
    Any ideas?

    Very neat, many thanks.
    I now have a 'Set Value' 'Javascript Expression' action of 'this.triggeringElement.id;' to set a hidden *but unprotected* page item. This is followed by the 'Execute PL/SQL' action which simply calls a package procedure and passes the name of the triggering item. The procedure then sets the session state(s) as required.
    Thank you!

  • Dynamic Action not being triggered in Batch

    Hi Gurus,
    We have the below Dynamic Action that is not getting triggered when we run a Batch to Create IT2010. We are using TCode PTE1 to create the batch.
    2010                   4     5     P     T001P-MOLGA='10'
    2010                   4     10     P     PSPAR-TCLAS='A'
    2010                   4     12     P     P2010-LGART='4023'
    2010                   4     15     I     INS,2001,,,(P2010-BEGDA),(P2010-ENDDA)/D
    2010                   4     20           **P2001-AWART='0100'
    2010                   4     21     W     P2001-AWART='1300'
    2010                   4     25     W     P2001-STDAZ=P2010-ANZHL
    I have read a few posts on how this can be done, but not very clear as to whether it can even be achieved.
    This Dynamic Action works fine when we manually Create an IT2010 record via PA30, it creates the IT2001 in the background.
    Cheers,
    Anil

    Hello Anil,
    Please check the following note, I think note should be helpful in this case.
    386027   Dynamic actions
    1564499  Processing initial values which are not valid in
    Best Regards,
    Deepak.

  • Send mail through dynamic action, but the subject line and content is blank

    Hi all,
    I'm facing one problem on sending mail throught dynamic action.
    Whenever a new employee is hired, the system will trigger a mail to the administrator.
    The mail can successfully reach the email address. But the title and the content of the mail are missing. I can receive an email with a PDF attchment. But when I open this PDF file, it's blank inside.
    In t-code "SO10", I created a new mail text with name of Z_MAIL, for my mail, insteading of using the SAP standard one.
    When I using the SAP standard mail text, it works and I can see the content. But even I copy and paste the exact the content of the standard one to my own new mail text, it will not work.
    And I have to use my own customized mail text. So, is there any one knows about this issue? Any more setting I should do? Or is there some tricks?

    Hi,
       I feel that something will be misiing in the coding.Even i faced the same problem earlier.for me it was text file as an attachment ,file was receiving but no data...the problem was i forget to add one option in objpack-head.
       R u using the FM - SO_NEW_DOCUMENT_ATT_SEND_API1??
    If so pls C the below codes for text file as an attachment.
    DATA: objpack LIKE sopcklsti1 OCCURS  2 WITH HEADER LINE.
      DATA: objhead LIKE solisti1   OCCURS  1 WITH HEADER LINE.
      DATA: objbin  LIKE solisti1   OCCURS 10 WITH HEADER LINE.
      DATA: objtxt  LIKE solisti1   OCCURS 10 WITH HEADER LINE.
      DATA: reclist LIKE somlreci1  OCCURS  5 WITH HEADER LINE.
      DATA: doc_chng LIKE sodocchgi1.
      DATA: tab_lines LIKE sy-tabix.
    Creating the document to be sent
      doc_chng-obj_name = 'MESSAGE'.
      doc_chng-obj_descr = 'ZHRI_GARN_EPC_COMM'.
      objtxt = 'Program ZHRI_GARN_EPC_COMM has been executed successfully'.
      APPEND objtxt.
      objtxt = 'Error records passed to BDC session XPHRGARN01'.
      APPEND objtxt.
      DESCRIBE TABLE objtxt LINES tab_lines.
      READ TABLE objtxt INDEX tab_lines.
      doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    Creating the entry for the compressed document
      CLEAR objpack-transf_bin.
      objpack-head_start = 1.
      objpack-head_num   = 0.
      objpack-body_start = 1.
      objpack-body_num   = tab_lines.
      objpack-doc_type   = 'RAW'.
      APPEND objpack.
    Entering names in the distribution list
      LOOP AT se_tech.
        reclist-receiver = se_tech-low.
        reclist-rec_type = 'U'.
        APPEND reclist.
      ENDLOOP.
    Sending the document
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = doc_chng
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = objpack
          object_header              = objhead
          contents_bin               = objbin
          contents_txt               = objtxt
          receivers                  = reclist
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          OTHERS                     = 99.
    Hope this will help u.
    Regards,
    Manoj.

  • "Dialog region" plugin - triggering OK dynamic action

    Hi all,
    I'm attempting to utilise the "Dialog region" plug-in found here
    http://www.apex-plugin.com/oracle-apex-plugins/region-plugin/dialog-region_30.html
    It's appearing ok, but I initially had trouble associating a dynamic action with the "OK [Dialog Region]" event.
    Someone asked the question back in 2011, but didn't provide details on how they implemented the dynamic action.
    jQuery ids in Apex dialog region plug-in
    I initially issues is because the DA definition still asks for a "Selection type". After trying a few variations, I modified the plug-in to associate an ID with the OK button, and attempted to use "#btn-ok" for a jQuery selector, but this still didn't fire the DA.
    At the time my button rendered as
    <button type="button" id="btn-ok" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"><span class="ui-button-text">Ok</span></button>I ended up succeeding using "DOM Object" of "document" (I thought I had already tried this...), the same way I implemented "Manual Close" for the Skillbuilders modal, but I was wondering if there was a different/more elegant solution?
    Scott

    Refreshing a region through javascript can be done like this:
    $("#region_or_item_id").trigger('apexrefresh');So ideally you would specify 1 attributes for your dynamic action for entering region ids. You'd then need a little parsing for the provided string.
    For example, i'd expect a comma-separated list.
    -- change the region list into a list of jquery selectors
    l_regions := REPLACE(p_dynamic_action.attribute_01, ',', ',#');
    -- jquery will fire the refresh for each selector
    l_result.javascript_function := 'function(){$("'||l_regions||'").trigger("apexrefresh");};';However, refreshing items... Items mostly get their value from the automated row fetch process, and have no individual refresh. You'd need to actually query the table again for the newest value and put this in the item value (keeping in mind that protected items would also need altered checksums). To do this dynamically, you'd also need an ajax callback. Here you'd need to run provided sql which retrieves a value, and put this in the provided item. If that is a route you want to explore, then you can use apex_plugin.util.get_data and its friends to assist you with that!

Maybe you are looking for

  • Adobe Bridge - Photoshop Album

    Kann Adobe Bridge die Daten aus Photoshop Album importieren? Danke

  • New 27" has only 1 800 Fire Wire

    I am considering buying a new iMac 27". I see that it has only 1, 800 Fire Wire port and no 400 FW port. I use my computer for editing video via FCS3. One of the cameras I have is a Canon XHA1 it's output is Fire Wire 400. I import footage to a exter

  • Need to update corresponding columns in details table

    Hi, I have a header and lines table. In header table we have a comments field, requirement is whenever someone is updating comments in header it should update lines comment column as well. I tried using fire action on Comments field like as soon as u

  • No Dock - Frozen Desktop... Please Help!

    Hey. Alright well I have searched and searched this forum and many others and can't seem to find a solution. The Problem: Yesterday the dock just quit popping up, so I shutdown and restarted this morning. This morning same problem plus i can't select

  • Making a playlist...

    Is there a way to make a playlist from the songs currently stored on my ipod? I loaded the songs manually from my library without using any playlists (I dragged each song directly to ipod). Now, I regret doing it that way because I like the song sele