How to trigger Listfind function

Hi all
If the form field is empty this code sets the variable nxtstep depending on the day of the week checking if the form field "is not date" and works fine in this case.
If the form field is not empty then it sets the variable nxtstep as the date that is selected which it does, however, it is not checking to see if it is a holiday. It should trigger the listfind function and check to see if the entered date is a holiday but it is just entering the date without going through this check.
Why is this not working? Thank you
<!--- UPDATE QUERY --->
<cfif isDefined("form.UPDATEADDBTN")>
<cfif FORM.ENTID GTE 1>
<cfset isCOMPANYNull = iif(len(trim(form.COMPANY)) EQ 0, true, false)>
<cfset isCOMMENTSNull = iif(len(trim(form.COMMENTS)) EQ 0, true, false)>
<!--- SET DATE AS FORM FIELD --->
<cfset nxtstep = trim(form.ABUNDANCE)>
<!--- SET DATE IF NO DATE ENTERED --->
<cfif not isDate(nxtstep)>
<cfif DayOfWeek(Now()) eq 2>
<cfset nxtstep = dateAdd("d", 2, now())>
<cfelseif DayOfWeek(Now()) eq 3>
<cfset nxtstep = dateAdd("d", 2, now())>
<cfelseif DayOfWeek(Now()) eq 4>
<cfset nxtstep = dateAdd("d", 2, now())>
<cfelseif DayOfWeek(Now()) eq 5>
<cfset nxtstep = dateAdd("d", 4, now())>
<cfelseif DayOfWeek(Now()) eq 6>
<cfset nxtstep = dateAdd("d", 3, now())>
<cfelseif DayOfWeek(Now()) eq 7>
<cfset nxtstep = dateAdd("d", 2, now())>
<cfelseif DayOfWeek(Now()) eq 1>
<cfset nxtstep = dateAdd("d", 1, now())>
</cfif>
<!--- IF A DATE IS ENTERED CHECK TO SEE IF IT IS A HOLIDAY --->
<cfelse>
<!--- CHECK TO SEE IF ENTERED DATE IS A HOLIDAY AND ADD DAYS--->
<cfif ListFind(ValueList(hols.holiday), nxtstep)>
<cfif DayOfWeek(nxtstep) eq 2>
<cfset nxtstep = dateAdd("d", 2, nxtstep)>
<cfelseif DayOfWeek(nxtstep) eq 3>
<cfset nxtstep = dateAdd("d", 5, nxtstep)>
<cfelseif DayOfWeek(nxtstep) eq 4>
<cfset nxtstep = dateAdd("d", 2, nxtstep)>
<cfelseif DayOfWeek(nxtstep) eq 5>
<cfset nxtstep = dateAdd("d", 4, nxtstep)>
<cfelseif DayOfWeek(nxtstep) eq 6>
<cfset nxtstep = dateAdd("d", 6, nxtstep)>
<cfelseif DayOfWeek(nxtstep) eq 7>
<cfset nxtstep = dateAdd("d", 2, nxtstep)>
<cfelseif DayOfWeek(nxtstep) eq 1>
<cfset nxtstep = dateAdd("d", 1, nxtstep)>
</cfif>
</cfif>
</cfif>

You are doing several things that might contribute to the problem.  In your first block of code, you are using dateadd to set nxtstep to a datetime variable.  In the next block of code, you are checking to see if this datetime variable appears in a list.
Since a list is just a delimited string, looking for datetime variables is bound to fail unless you convert those variables to a string.  You can use dateformat for that.  Choosing the correct format should also solve your other problem of your datetime variables including a time portion while your list of holidays probably does not.
I vaguely remember similar questions from you.  You should re-read the answers you got.  You might be disregarding some of them.

Similar Messages

  • How-to trigger a function module after user logs on

    Dear All,
    We would like to trigger a function module after a user connects to our BW system.
    The user exit SUSR0001 works, but only when the user is connecting via the SAP GUI --> it is not called if the user connects via the Business Explorer or the WEB
    Any thoughts on how to achieve this?
    Any help appreciated
    Thank you
    Ioan

    Hi Ioan,
    I would recommend to post this thread in the abap forum.
    Siggi

  • How to use trigger file functionality in File Adapters - Match file names

    Hi,
    I am using trigger file functionality in File adapters to pick up data files as:-
    <property name="TriggerFilePhysicalDirectory" value="/pub/Dev/eastern/brs/"/>
    <property name="TriggerFile" value="*.trg"/>
    Here any file with .trg extension is taken as a trigger file and File adapter randomly picks up one of the data files.
    My requirement is that the trigger file will be of the same name as that of the data file like:- <data_file>.data <data_file>.trg
    How to implement this feature using trigger file functionality of File adapters??

    The trigger file is any file that indicates(triggers) that the actual data file has been put in ftp location, i.e- determines the state when data file should be read.
    This helps usually when a large data file is being transferred and at that incomplete state the FTP adapter tries to read it(which is not desirable)
    It is configured when you create the ftp adapter service in your process(in wizard) or u can manually configure that in the JCA file for the FTP Adapter service as below:-
    <?xml version="1.0" encoding="UTF-8"?>
    <adapter-config name="FlatStructureIn" adapter="File Adapter" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
    <connection-factory location="eis/FileAdapter" UIincludeWildcard="*.txt" adapterRef=""/>
    <endpoint-activation operation="Read">
    <activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
    <property.../>
    <property name="*TriggerFilePhysicalDirectory*" value="/tmp/flat/ArchiveDir"/>
    </activation-spec>
    </endpoint-activation>
    </adapter-config>
    Reference: http://download.oracle.com/docs/cd/E12839_01/integration.1111/e10231/adptr_file.htm#CIAJCBGI

  • BODS 3.1 : How to trigger an email alert for the jobs on BODS server ?

    Hi All.
    I have this request.
    BODS 3.1 : How to trigger an email alert for the jobs on BODS server ?
    We have jobs scheduled on BODS running smoothly and absolutely fine.
    But to check, i am logging into the admin console and check for the jobs status.
    I would like to have an email to be received from BODS after each job is finished.
    It could succuessful. Or it could fail.
    Whatsoever, i wish to receive an email alert as soon as a job is finished.
    Can anyone advise me as to whether this could be made possible.
    And if yes, how this could be done.
    Thanks for your help in advance.
    In BOE CMC / for webi / schedule / we find an option to send email for a job success or a job failure.
    Is there any option similar to that in BODS ?
    Also would like to know :
    how to use the smtp_to or mail_to functions ?
    how to set up the smtp server for this ?
    thanks
    REgards
    indu
    Edited by: Indumathy Narayanan on May 31, 2011 3:47 PM

    Hi.
    Since am new to this BODS. I need some help.
    I already have many jobs which are running absolutely fine.
    And when a job runs, and finishes, am able to see the trace saying
    e.g. :
    Job_abc is completed successfully.
    We got the smtp service activated for our test server.
    and we hae a group email id.
    I have put the details of the smtp server / ip address / and said apply restarted.
    The i created a simple test script as below :
    print (' Before email ' );
    smtp_to('abc@company_name.com', 'Job ' || job_name() ||' on ' || host_name() || ' has FAILED',
    ' the job has failed', 0, 0);
    print('After Email ');
    It does send a email to as per smtp_to whatever email is specified.
    But how to differentiate between a job success
    And a job which has failed.
    I wish to have a mail which says on the subject :
    'Job ' || job_name() ||' on ' || host_name() || ' has completed successfully'
    ==> IF it is a success
    OR
    'Job ' || job_name() ||' on ' || host_name() || ' has failed'
    ==> if it has failed
    How to make the system identify, whether
    to send a success message or a error message whatever
    Could anyone advise.
    thanks
    indu

  • How to trigger standard task manually in Process controlled workflow?

    Hi All,
    I would like to trigger a task mannually in BRF, process controlled workflow. My requirement is to send an approval notification to the approvers at the current approval level, at any instance by the requestor of the shopping cart. In that case, will it be possible to trigger the standard task 40007953 (SRM Shopping Cart Approval (1)) with the workitem of Shopping cart under consideration?
    I have tried searching for the same in SDN and other forums but most of the information was regarding application controlled workflows. None of those function modules seems to be working in PCW.
    Any pointers on how to trigger a standard task (using FM or code) in BRF(process controlled workflow) environment is also highly appreciated.
    Thanks,
    S.H@ri

    Hi,
    Use this FM [SAP_WAPI_START_WORKFLOW|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/bb9100f8-0c01-0010-ac8e-e017351f3fc1].
    Regards,
    Surjith

  • How to trigger creation of collective orders

    Hi,
    How to trigger the creation of Collective orders.
    regards

    Hi,
    Collective Orders
    Use
    In a collective order, planned orders or production orders are linked to one another over several production levels. Each order in the collective order has its own order number. If subassemblies are produced directly for superior orders within a production process, without physically entering the warehouse, it is useful to have a representation via collective orders.
    The components for which separate production orders are created in the collective order are called directly produced components (see Creating Collective Orders)
    Prerequisites
    A collective order cannot be created for components that have one of the following indicators set:
    · Co-product
    · By-product
    · Alternative item with strategy 2
    · Alternative item with usage probability 0
    · Discontinued
    · Follow-up material
    · Intra material
    Features
    Collective orders offer the following advantages:
    · Integrated view of a production process
    Collective orders make it possible to represent different levels of the production process together in the system. The production process can be viewed as an integrated whole.
    · Separate order number for every order
    Every level in a collective order represents a separate production order/planned order. Every production order/planned order has its own order number. This enables you to process the entire collective order, a subtree in the collective order or an individual order.
    · No placements in storage or removals from storage between production levels
    Within a collective order stock movements only take place for the leading order (that is, the order that is at the highest production level) and not for directly produced components. This makes it easier to maintain the collective order in comparison with several individual orders. A further advantage is a more realistic representation of the costs of the production process, since subordinate orders can be directly assigned and settled to superior orders.
    · Business functions simultaneously for several orders
    Certain business transactions can be carried out simultaneously for several orders. Releasing an order that belongs to a collective order has the effect that all the hierarchically subordinate orders are released simultaneously.
    · Automatic change to dependent orders
    Changes to an order automatically affect dependent orders / components affecting orders. For example, if you change the order quantity in an order then
    ¡ the relevant quantity changes are automatically made to dependent orders
    ¡ the requirements quantity of the directly produced component is automatically changed.
    In the collective order, you also have the option of manufacturing directly produced material in a different plant to the planning plant.
    · Set status in leading order
    If you make changes in subordinate orders that have an affect on the status, then the system sets the corresponding status in the order header of the leading order in the collective order as follows:
    u2013 CFCO Confirmation in collective order
    u2013 GMCO Goods movements in collective order
    u2013 RLNE Release taken place in network
    In this way you are informed about changes in the whole collective order.
    · Reading master data
    You can copy the routing data and BOM data to the order again. You can find more information in Read master data.
    Example
    You want to produce a pump. The BOM for the pump contains a pressure regulating valve and a spiral casing. You want to enter these two components in separate production orders, but you do not want them to be posted to stock.
    You set the special procurement type to direct production in the material master record for the pressure regulating valve and the spiral casing, so that production occurs using a collective order.
    When you create a production order for the pump, a collective order is automatically created, which contains subordinate production orders for the pressure regulating valve and the spiral casing.
    Creation of Collective Orders
    Use
    Collective orders are only created if the special procurement type is set to direct production in the components for which the separate production orders are to be created (materials planning area in the material master).
    In the standard system, 52 is the special procurement type for direct production (that is, for components that are produced within a collective order).
    To create a collective order, you must use an order type with internal number assignment.
    Hope this helps.
    Regards,
    Tejas

  • How to trigger FI Standard Workflows

    Hi,
    I have never worked on FI Standard Workflows . As far as I knpow there is a std WF available  WS00400012 with Object type BSEG. For Vendor Down Payment Request, Vendor Payment Request Against Invoice, Vendor Down Payment Posting,Vendor Payment Posting, Vendor Invoice FI, Vendor Invoice Logistics Posting, Vendor Credit Memo, Vendor Debit Memo, Cash Payments, Asset Posting what are the Standard Workflows available and how to trigger these workflows. I have checked with SWELS but WS00400012  is not getting triggered. Is there any SPRO config required for this, POlease help me out with the solution.
    THanks
    Edited by: Saujanya GN on Sep 16, 2008 8:23 AM

    Hello Munish,
    As Venugopal has mentioned, you have to find the relevant BTE for the process and use it to raise an event and in turn trigger the workflow.
    The following is the process to find a BTE and implementing it.
    (1)Goto transction FIBF .Execute it with Attribute type = 'A' and then menu Environment->Info System (P/S ).
    Choose the relevant BTE using the descriptions provided.
    (2)Select the BTE you want to implement.
    (3)Press button Sample function module
    (4)This brings you to SE37 - Copy the sample function module to a Z-function module (First create a new function group for the function module) . Note: The name of the Z-functionmodule is not important
    (5)Edit the code in the new function module
    (6)Go back to transaction FIBF - Menu Settings->Products -> Of a customer and create a new product whicj identifies the new product . Remember to mark the Active field.
    (7)Go back to FIBF menu Settings->P/S function modules->of a customer - Create an entry that links the BTE and Product with the new function module
    Hope this will help.
    Regards,
    Samson

  • CL_SALV_TABLE - how to trigger Double_Click question

    I am trying to find how to trigger an event on double click similar to  using Event Double_Click in Class CL_GUI_ALV_GRID   I am fresh out of the ABAP OO class and everything is a blur.  This is what I did.  I created a program that  with
    Data: r_grid TYPE REF TO cl_salv_table.
    CALL  METHOD CL_SALV_TABLE=>FACTORY
      Importing R_SALV_TABLE   = r_grid 
      Changing ITAB.
    I then tried to create an Include program to define a Local Class
    *&  Include           ZSD_DISPLAY_CUSTOMER
    class lcl_event_handler definition.
    PUBLIC SECTION.
      METHODS: on_double_click for event double_click of cl_gui_alv_grid
    METHODS: on_double_click for event double_click of cl_salv_table
                 IMPORTING es_row_no e_column.
    ENDCLASS.
    class lcl_event_handler IMPLEMENTATION.
    METHOD on_double_click.
    Data: IT_CUSTHIER type ZSD11_CUST_HIER_TABLE_TYPE.
    Data: WK_CUSTHIER LIKE LINE OF IT_CUSTHIER.
    types: BEGIN OF custhier_x,
            custhier like WK_CUSTHIER,
            number TYPE int4,
            quantity type MENGE_D,
            dollars_n_cents type DMBTR,
           END OF   custhier_x.
    data: it_custhier_x type STANDARD TABLE OF custhier_x.
    data: wk_custhier_x like LINE OF it_custhier_x.
        read table it_custhier_x into wk_custhier_x
         index es_row_no-row_id.
    data: wk_vkorg type vkorg.
    data: wk_vtweg type vtweg.
    data: wk_spart type spart.
    wk_vkorg = '3290'.
    wk_vtweg = '00'.
    wk_spart = '00'.
    SET PARAMETER ID: 'KUN' field wk_custhier_x-custhier-kunnr.
    SET PARAMETER ID: 'VKO' field wk_vkorg.
    SET PARAMETER ID: 'VTW' field wk_vtweg.
    SET PARAMETER ID: 'SPA' field wk_spart.
    call TRANSACTION 'VD03' AND SKIP FIRST SCREEN.
    ENDMETHOD.
    ENDCLASS.
    When I try to do a syntax check I get this error 
    The Handler Method ON_DOUBLE_CLICK is only defined for trigger objects of CL_GUI_ALV_GRID, but the system tried to register a trigger object of CL_SALV_TABLE
    Any suggestions on what I need to do in order to trigger a event for double click ?
    Thanks
    Edited by: Bob Ackerman on Sep 22, 2010 11:25 AM

    I am not getting anything to happen on double click.   In debug mode, I see that it calls program SAPLSLVC_FULLSCREEN and gets to FORM  SELFIELD_GET  which gets the row, column, and value of the field that was double clicked.  But, nothing seems to be returned to my program.  I am fresh out of the ABAP OO class and everything is a blur.  My test program is listed below, if you would be so kind as to take a look and maybe see what I am missing.
    Include program   ZSD_DISPLAY_CUSTOMER
    class lcl_event_handler definition.
    PUBLIC SECTION.
    **  METHODS: on_double_click for event double_click of cl_gui_alv_grid
    **             IMPORTING es_row_no e_column.
    METHODS:
          on_DOUBLE_CLICK
            FOR EVENT DOUBLE_CLICK OF cl_salv_events_table
              IMPORTING
                row
                column  .
    ENDCLASS.
    class lcl_event_handler IMPLEMENTATION.
    METHOD on_double_click.
    **    data: it_sflight type TABLE OF sflight,
    **          wa_spfli  type spfli.
    Data: IT_CUSTHIER type ZSD11_CUST_HIER_TABLE_TYPE.
    Data: WK_CUSTHIER LIKE LINE OF IT_CUSTHIER.
    types: BEGIN OF custhier_x,
            custhier like WK_CUSTHIER,
            number TYPE int4,
            quantity type MENGE_D,
            dollars_n_cents type DMBTR,
           END OF   custhier_x.
    data: it_custhier_x type STANDARD TABLE OF custhier_x.
    data: wk_custhier_x like LINE OF it_custhier_x.
      data: ls_row_id type lvc_s_row.
      data: ls_col_id type lvc_s_col.
      data: l_value type lvc_s_data-value.
      data: ls_selfield type lvc_s_self.
      data: ls_fieldcat type slis_fieldcat_alv.
      data: ls_fieldcat_lvc type lvc_s_fcat.
    data: wk_vkorg type vkorg.
    data: wk_vtweg type vtweg.
    data: wk_spart type spart.
    wk_vkorg = '3290'.
    wk_vtweg = '00'.
    wk_spart = '00'.
    SET PARAMETER ID: 'KUN' field wk_custhier_x-custhier-kunnr.
    SET PARAMETER ID: 'VKO' field wk_vkorg.
    SET PARAMETER ID: 'VTW' field wk_vtweg.
    SET PARAMETER ID: 'SPA' field wk_spart.
    call TRANSACTION 'VD03' AND SKIP FIRST SCREEN.
    ENDMETHOD.
    ENDCLASS.
    In the main program :
    CREATE OBJECT CUST_HIER
      EXPORTING
        IM_HIERARCHY_TYPE = 'A'
    *    IM_CUSTOMER_NUMBER =
        IM_SALES_ORG = '3290'
        IM_DIST_CHANNEL = '00'
        IM_DIVISION = '00'
        IM_VALIDITY_DATE = '99991215'.
       CALL METHOD CUST_HIER->GET_CUSTHIER_NODES
         IMPORTING EX_CUSTHIER = IT_CUSTHIER.
       it_custhier_x = IT_CUSTHIER.
    TRY.
      CALL METHOD CL_SALV_TABLE=>FACTORY
    *    EXPORTING
    *      LIST_DISPLAY   = IF_SALV_C_BOOL_SAP=>FALSE
    *      R_CONTAINER    =
    *      CONTAINER_NAME =
        IMPORTING
          R_SALV_TABLE   = r_grid
        CHANGING
          T_TABLE        = IT_CUSTHIER_X.
       CATCH CX_SALV_MSG .
      ENDTRY.
    *... §3 Functions
    *... §3.1 activate ALV generic Functions
      data: lr_functions type ref to cl_salv_functions_list.
      lr_functions = r_grid->get_functions( ).
      lr_functions->set_default( abap_true ).
    *... set the columns technical
      data: lr_columns type ref to cl_salv_columns.
      lr_columns = r_grid->get_columns( ).
      lr_columns->set_optimize( abap_true ).
      perform set_columns_technical using lr_columns.
      r_grid->display( ).
    lr_events = r_grid->get_event( ).
      create object gr_events.
      set handler gr_events->on_double_click for lr_events.
    Edited by: Bob Ackerman on Sep 22, 2010 5:30 PM
    Edited by: Bob Ackerman on Sep 22, 2010 5:35 PM
    Edited by: Bob Ackerman on Sep 22, 2010 5:37 PM

  • How to trigger an existing background job in ABAP program?which fm?

    Hi experts,
        how to trigger an existing background job( defined in SM36 ) in ABAP program?which fm?
        seems that FM 'JOB_OPEN' / 'JOB_SUBMIT' / 'JOB_CLOSE' can only create a new job.

    Hi,
        now my requirement is that sap has generated one job automatically, and then i will have a job name
    'XXX'. and then i want to schedule the job in abap program,. which function module could i use ?
    my expected fm is that the system will trigger the job after i give the job name and start condition.
    i have tried job_open, but it seems just to create a new job. any advice ?

  • How to trigger top-of-page in ALV Grid

    How to trigger Top-Of-Page in ALV Grid...
    can any one plese send the sample code...
    thanks.

    here is sample code. try this. u need to build an internal table and then call function commentary write and pass that internal table.
    *&      Form  TOP_OF_PAGE
          Top_of_page
    FORM top-of-page.                                           "#EC CALLED
    *ALV Header declarations
      DATA: lit_header TYPE slis_t_listheader,
            lwa_header TYPE slis_listheader.
    Title
      lwa_header-typ  = 'H'.
      lwa_header-info = text-013.
      APPEND lwa_header TO lit_header.
      CLEAR lwa_header.
    BOM Number
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
        EXPORTING
          input  = p_matnr
        IMPORTING
          output = gv_matnr.
    Pass BOM number
      lwa_header-typ  = 'S'.
      lwa_header-key = text-014.
      lwa_header-info = gv_matnr .
      APPEND lwa_header TO lit_header.
      CLEAR: lwa_header ,
             gv_matnr .
    BOM description
      lwa_header-typ  = 'S'.
      lwa_header-key = text-015 .
      lwa_header-info = gv_maktx .
      APPEND lwa_header TO lit_header.
      CLEAR: lwa_header.
    start/end date format MM/DD/YY
      lwa_header-typ  = 'S'.
      lwa_header-key = text-016 .
      CONCATENATE s_erdat-low+4(2) '/'
                  s_erdat-low+6(2) '/'
                  s_erdat-low(4) ' - '
                  s_erdat-high+4(2) '/'
                  s_erdat-high+6(2) '/'
                  s_erdat-high(4)
                  INTO lwa_header-info.
      APPEND lwa_header TO lit_header.
      CLEAR: lwa_header.
    Run Date of Report format MM/DD/YY
      lwa_header-typ  = 'S'.
      lwa_header-key = text-017 .
      CONCATENATE  sy-datum+4(2) '/'
                   sy-datum+6(2) '/'
                   sy-datum(4) INTO lwa_header-info .
      APPEND lwa_header TO lit_header.
      CLEAR: lwa_header.
    call function REUSE_ALV_COMMENTARY_WRITE to use TOP_OF_PAGE event.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = lit_header.
    ENDFORM .                              " FORM top-of-page.

  • How-to trigger a process chain using ABAP?

    Does anybody know how to trigger a process chain using ABAP code?
    Any help would be appreciated!
    Thanks
    Ioan

    Hi Ioan,
    try this in your ABAP:
        CALL FUNCTION 'BP_EVENT_RAISE'
          EXPORTING
            eventid         = 'Your Event'
            eventparm       = 'START'
            target_instance = ' '
          EXCEPTIONS
            OTHERS          = 01.
    and schedule your process chain, waiting for 'Your Event'.
    regards
    Siggi

  • HOW TO TRIGGER AN WORKFLOW FROM A PROGRAM ?

    HELLO THERE ,
    CAN ANYBODY PLZ TELL ME HOW TO TRIGGER AN WORKFLOW FROM AN PROGRAM AND TO PAS THE VALUE TO THE CONTAINER ?

    Hello Neon,
    If you want to trigger the workflow directly, use the FM, SWU_START_WORKFLOW
    CALL FUNCTION 'SWU_START_WORKFLOW'
      EXPORTING
        task                  =
    *   LANGUAGE              = SY-LANGU
        user                  =
    *   SENDER_ID             =
    * IMPORTING
    *   RETURN_CODE           =
    *   WORKITEM_ID           =
      tables
    *   CONTAINER             =
    *   MESSAGE_LINES         =
        attachment_list       =
    A workflow can also be triggered by and event which is in turn triggered by a program.
    By the FM, SWE_CREATE_EVENT
    Example:
    w_key = 'Connie'.
      w_creator-otype = 'US'.
      w_creator-objid = 'SAPDEV02'.
      CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype                       = 'YH_BUDDIES'
          objkey                        = w_key
          event                         = 'event'
         creator                        = w_creator
    *     TAKE_WORKITEM_REQUESTER       = ' '
    *     START_WITH_DELAY              = ' '
    *     START_RECFB_SYNCHRON          = ' '
    *     NO_COMMIT_FOR_QUEUE           = ' '
    *     DEBUG_FLAG                    = ' '
    *     NO_LOGGING                    = ' '
    *     IDENT                         =
    *   IMPORTING
    *     EVENT_ID                      =
    *   TABLES
    *     EVENT_CONTAINER               =
       EXCEPTIONS
         objtype_not_found              = 1
         OTHERS                         = 2
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        WRITE: / 'EVENT TRIGGERED'.
      ENDIF.
      COMMIT WORK.
    Hope it helps you.
    Regards
    Indu.

  • How to use Check Function Module???

    Hi Friends,
    How to use Check Function Module in Workflow???
    My requirement is to trigger the workflow at the last line item of the Material Document.
    Rewards for sure for helpful answer.
    -Satish

    Hi Satish,
    You know, the real power of forums like these is the search functionality. First you locate the correct forum, you succeeded in that and then you locate the search field and type in your question. In your case "check function module"
    I suggest you do this right away and be amazed at all of the answers about his topic. Maybe you'll even find some topic about exactly the same issue with a different solution than check function modules and on top of that you learn something this way. Talk about win-win situation
    Kind regards, Rob Dielemans

  • How to trigger an event in the program

    Hi,
    I have a program. The purpose of the program is to retrieve the data matching the selection criteria and downlod the same to a file.
    In the selection screen, I have a parameter called 'EVENT'. Here, user enters some event name. Generally, they enter the 'Background job processing events'.
    So, my requirement is... once the files are successfully downloaded, the program should trigger the 'EVENT' specified in the selection screen at run time.
    Can someone help me in this regard. How to trigger an EVENT in the program. Is there any Function Module or Method available in SAP which triggers the EVENT at runtime.
    And is there any table available in SAP which stores all the events available in SAP. Because, whenever the user enters an EVENT in the selection screen, we should check whether the event is valid or not. So, if there is any table available which has all the events then, it will be easy I guess. or is there any other way to validate the EVENT name.
    Please help me. Thanks in advance,
    Best Regards,
    Paddu.

    Hello Paddu,
    have a look at tables
    - btcsev, btcsed (system events)
    - btcuev, btcued (user events)
    and use function BP_EVENT_RAISE.
    kind regards
    Walter Habich

  • How to trigger the automated row fetch process and open modal window by javascript api?

    Hi,
    I would like to click the one row of column of IR report, to open the modal window of current page.  <----------------it is ok. I can use "javascript:openModal('windowID')"  to do it.
    There is one form in this modal window, Meanwhile, I would like to pass column data to this form.    <--------------------- it is ok also. I can use " $s('P7_ID','column_value');" to do it.
    But I don't know how to trigger the "automated row fetch" process of this form to retrieve other field's value in this form.   
    I tried to use following 2 ways. But failed.
    First method:
    add one ajax process of "automated row fetch" in "page processing" block, named "get_fetch_data"
    when click IR column , call "openModal", and call  "apex.server.process ( "get_fetch_data", {}, { success: function( pData ) { }  } );"  , I tried to call above ajax process to refresh form. It is failed.
    Second method:
    add one process of  "automated row fetch" in "page rendering" block, named "get_fetch_data"
    when click IR column, call javascript api "apex.submit" to submit current page , then call "openModal".
    such as :  javascript:apex.submit({request:'MODIFY',set:{'P7_ID': #ID#}}); openModal('trade');
    But it is failed also. the modal page is showed firstly. then page refresh. but modal window will not open again.
    I am not sure if my thinking is right. Could you please provide any suggestion?
    Thanks in advance,
    Ping

    Hi Ping,
    You can try to set the session state of your modal page's primary key before opening the modal page. Use one dynamic action (on click of IR row) with two true actions. First one to set session state of modal page pk, second on to open modal page.
    Or you can add the modal page url as link in your report by extending your query:
    select ...
    ,         apex_util.prepare_url( 'f?p='||:APP_ID||':7:'||:APP_SESSION||'::'||:DEBUG||':7:P7_ID'||COLUMN_VALUE ) as link
    from ...
    This will give you the url of the modal page, with set primary key.
    Regards,
    Vincent Deelen
    http://vincentdeelen.blogspot.com

Maybe you are looking for