Function module to trigger Infopackages

Hi,
Need your help to clarify certain doubts,
Std. Infopackage name (0PAK*) will be same for each and every master data object through out all the systems ??
Means suppose 0MATERIAL_ATTR has infopackage 0PAKXXX that is been installed by system from BC .
Will it be the same if i will install for another system ?
And also if there is any function module to trigger infopackage schedule , pls let me know.
Regards
Nimesh

Hi,
I am not sure whether you can directly trigger the infopackage through function module. But there is an alternative way.
You can create an event in the transaction sm62 and in the infopackage scheduler you can give that event name.
You can trigger this event by using the function module "RSSM_EVENT_RAISE" and subsequently you can trigger the infopackage.
Hope this will be somewhat helpful to you.
Regards,
K.Manikandan

Similar Messages

  • Is there any function module to trigger workflow template

    Hi,
    I have created a workflow template in tcode PFTC, which i am using to send email, this workflow needs to be triggered once the document is posted, there are no events being triggered at that stage, My query is 'Is there any function module to trigger this workflow template from the user exit'?.
    Thanks in Advance
    Santosh

    Use FM
    SAP_WAPI_START_WORKFLOW.
    or if you have triggering event for the wflow use
    SWE_EVENT_CREATE
    SAP_WAPI_CREATE_EVENT
    Thanks
    Arghadip

  • How to write the custom Function Module to trigger the Alert.

    Hi all,
    I have developed a custom alert category in Tx - alrtcatdef. Now i want to trigger it from my custom function module. what should i do or what is the procedure to trigger the alert from my custom function module.
    Arul Jothi

    hi arul,
    try this program.
    RSALERTTEST.
    check out this link...
    <a href="/people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts:///people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts
    regs,
    jaga

  • Exceptions in Function Modules

    Hi
    How can I create an Exception in a Function Module and Raise that based on some condition? Plz help

    Hi Santo,,,,
    Look into this link ,, where u will get  a clear information on exceptions,,,,,
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
    http://abapprogramming.blogspot.com/2007/06/lesson-24-function-groups-and-function.html
    In the function module, you can create your own local types and data objects, and call subroutines or other function modules.
    You can make a function module trigger exceptions .
    To do this, you must first declare the exceptions in the interface definition, that is, assign each one a different name.
    In the source code of your function module, you program the statements that trigger an exception under the required condition. At runtime, the function module is terminated when an exception is triggered.
    The changes to exporting and changing parameters are the same as in subroutines. There are two statements that you can use to trigger an exception. In the forms given below, stands for the name of an exception that you declared in the interface. The system reacts differently according to whether or not the exception was listed in the function module call:
    RAISE .
    If the exception is listed in the calling program, the system returns control to it directly. If the exception is not listed, a runtime error occurs.
    MESSAGE () RAISING .
    If the exception is listed in the calling program, the statement has the same effect as RAISE . If it is not listed, the system sends message from message class with type , and no runtime error occurs.
    Function modules differ from subroutines in that you must assume that they will be used by other programmers. For this reason, you should ensure that you complete the steps listed here.
    Documentation (can be translated)
    You should document both your parameters and exceptions with short texts (and long texts if necessary) and your entire function module. The system provides a text editor for you to do this, containing predefined sections for Functionality, Example Call, Hints, and Further Information.
    Work list
    When you change an active function module, it acquires the status active (revised). When you save it, another version is created with the status inactive . When you are working on a function module, you can switch between the inactive version and the last version that you activated. When you activate the inactive version, the previous active version is overwritten.
    Function test
    Once you have activated your function module, you can test it using the built-in test environment in the Function Builder. If an exception is triggered, the test environment displays it, along with any message that you may have specified for it. You can also switch into the Debugger and the Runtime Analysis tool. You can save test data and compare sets of results.
    When you insert a function module call in your program, you should use the Pattern function. Then, you only need to enter the name of the function module (input help is available). The system then inserts the call and the exception handling (MESSAGE statement) into your program.
    You assign parameters by name. The formal parameters are always on the left-hand side of the expressions:
    Exporting parameters are passed by the program. If a parameter is optional, you do not need to pass it. Default values are displayed if they exist.
    Importing parameters are received by the program. All importing parameters are optional.
    Changing parameters are both passed and received. You do not have to list optional parameters.
    Default values are displayed if they exist.
    The system assigns a value to each exception, beginning at one, and continuing to number them sequentially in the order they are declared in the function module definition. You can assign a value to all other exceptions that you have not specifically listed using the special exception OTHERS.
    If you list the exceptions and one is triggered in the function module, the corresponding value is placed in the return code field sy-subrc. If you did not list the exception in the function call, a runtime error or a message occurs, depending on the statement you used in the function module to trigger the exception.
    When you create a function module, you must assign it to a function group. The function group is the main program in which a function module is embedded.
    A function group is a program with type F, and is not executable . The entire function group is loaded in a program the first time that you call a function module that belongs to it.
    The system also triggers the LOAD-OF-PROGRAM event for the function group.
    The function group remains active in the background until the end of the calling program. It is therefore a suitable means of retaining data objects for the entire duration of a program. All of the function modules in a group can access the group's global data.
    Please reward if found helpful,,,,,,,,,,,,,,,,
    Thanks And Regards ,,,,
    Sreekar.Kadiri.

  • Function Module not extracting records when InfoPackaged is executed

    Hi,
    I'm using a Function module for extracting data. The DataSource is working fine in RSA3 with a selection criteria. But when i schedule the infopackage with the same selections in the data selection tab, Its not getting me any records into BW. In the Details Tab i get the message "Error occurred in the data selection" . I guess there is a problem with the data selection. Pasted below is the code i'm using for extraction. Can anyone please let me know if there is any issue with the code.
    Also how do we pass on the value of I_MAXSIZE into the function module, the remaining parameters get the values from BW. And can anyone please explain me the concept of the "s_counter_datapakid" and when it should be incremented and where it should be located in the code?
    Thanks,
    AM
    Auxiliary Selection criteria structure
      DATA: l_s_select TYPE srsc_s_select.
    Maximum number of lines for DB table
      STATICS: s_s_if TYPE srsc_s_if_simple,
    counter
              s_counter_datapakid LIKE sy-tabix,
    cursor
              s_cursor TYPE cursor.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF i_initflag = sbiwa_c_flag_on.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    Check DataSource validity
        CASE i_dsource.
          WHEN 'XXXXX'.
          WHEN OTHERS.
    this is a typical log call. Please write every error message like this
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      i_dsource   "message variable 1
                      ' '.                 "message variable 2
            RAISE error_passed_to_mess_handler.
        ENDCASE.
        APPEND LINES OF i_t_select TO s_s_if-t_select.
    Fill parameter buffer for data extraction calls
        s_s_if-requnr    = i_requnr.
        s_s_if-dsource = i_dsource.
        s_s_if-maxsize   = i_maxsize.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
        APPEND LINES OF i_t_fields TO s_s_if-t_fields.
      ELSE.
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
        IF s_counter_datapakid = 0.
          g_first = 'X'.
    Fill range tables BW will only pass down simple selection criteria
    of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
          LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'BWLVS'.
            IF l_s_select-low <> '101' AND
               l_s_select-low <> '109'.
              RAISE invalid_movement_type.
            ELSE.
              MOVE-CORRESPONDING l_s_select TO r_im_bwlvs.
              APPEND r_im_bwlvs.
            ENDIF.
          ENDLOOP.
          LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'BEGDA'.
            MOVE-CORRESPONDING l_s_select TO r_im_begda.
            r_im_begda-low0(4) = l_s_select-low6(4).
            r_im_begda-low4(2) = l_s_select-low0(2).
            r_im_begda-low6(2) = l_s_select-low3(2).
            APPEND r_im_begda.
          ENDLOOP.
          LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'ENDDA'.
            MOVE-CORRESPONDING l_s_select TO r_im_endda.
            r_im_endda-low0(4) = l_s_select-low6(4).
            r_im_endda-low4(2) = l_s_select-low0(2).
            r_im_endda-low6(2) = l_s_select-low3(2).
            APPEND r_im_endda.
          ENDLOOP.
    *Select from table ltak into internal table i_ltak the following fields.
    *Condition: where bwlvs = import bwlvs & endat is >= import begda and
    <= import endda.
          READ TABLE r_im_begda INDEX 1.
          IF sy-subrc NE 0.
            RAISE blank_date_invalid.
          ELSE.
            IF r_im_begda-low IS INITIAL.
              RAISE blank_date_invalid.
            ENDIF.
          ENDIF.
          READ TABLE r_im_endda INDEX 1.
          IF sy-subrc NE 0.
            RAISE blank_date_invalid.
          ELSE.
            IF r_im_endda-low IS INITIAL.
              RAISE blank_date_invalid.
            ENDIF.
          ENDIF.
          IF NOT r_im_endda-low IS INITIAL
            AND r_im_begda-low > r_im_endda-low.
            RAISE invalid_date.
          ENDIF.
          r_endat-sign = 'I'.
          r_endat-option = 'BT'.
          r_endat-low = r_im_begda-low.
          r_endat-high = r_im_endda-low.
          APPEND r_endat.
    *-- Get data from the tables
          PERFORM get_data.
    *-- Populate the extract structure with data
          PERFORM write_data.
    *-- Fill Export able with the extracted data
          e_t_data[] = i_zbipicprd2[].
        ENDIF.                             "First data package ?
        IF g_first EQ 'X'.
          CLEAR g_first.
        ELSE.
    *-- This is important to prevent endless loop.
          RAISE no_more_data.
        ENDIF.
    s_counter_datapakid = s_counter_datapakid + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.

    The load is running successfully but its not fetching any records into BW.
    In the Status tab, Step by Step Analysis the following three steps are red:
    Does selectable data exist in the source system? (Red)
    Data selection successfully started ? (Red)
    Data selection successfully finished ? (Red)
    and the below is the Analysis
    Diagnosis
        The data request was a full update.
        o   In this case, the corresponding table in the source system does not
                contain any data.
        o   System Response
                Info IDoc received with status 8.
                Procedure
    Check the data basis in the source system.
    But i have data in R/3 and i'm able to extract it using RSA3

  • What is the function module which is used to trigger email

    Hi ALL,
    can u send me the function module which has to trigger email when sales order was saved.
    kindly send me the inputs
    thanks & regards
    naveen
    Moderator Message: Basic Question. Thread locked.
    Edited by: kishan P on Nov 11, 2010 10:56 AM

    Hi,
    This needs to coded in the Save User Exit of the Sales Order Include MV45AFZZ (USEREXIT_SAVE_DOCUMENT) and use the Function Module "SO_DOCUMENT_SEND_API1" to trigger a mail.
    Please try this and let me know if any.
    Regards,
    Srinivas
    Moderator Message: Do not answer Basic Question.
    Edited by: kishan P on Nov 11, 2010 10:58 AM

  • Function Module to update the file path/name into Infopackage

    Hi Experts,
    I have some flat files which will be loaded to the directly daily. My requirement is to update the file name into the infopackage dynamically. Please suggest any function module or program for it.
    Thanks,
    Kittu

    In Higher versions, we can use the below code:
    call method CL_GUI_FRONTEND_SERVICES=>ENVIRONMENT_GET_VARIABLE
        exporting
          VARIABLE   = 'TEMP'
        importing
          VALUE      = LV_TMP
        exceptions
          CNTL_ERROR = 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.
      endif.
      call method CL_GUI_CFW=>FLUSH
        exceptions
          CNTL_SYSTEM_ERROR = 1
          CNTL_ERROR        = 2
          others            = 3.
      if SY-SUBRC <> 0.
    Error handling
      endif.
      concatenate lv_tmp '\' into folder_path.
    But need to know in the lower versions like 3.1h and 4.0,

  • Trigger point of function module EXIT_SAPMV45A_002

    Who can tell me the trigger point of function module EXIT_SAPMV45A_002?
    It is the one of user exits of T-CODE VA01.But it didn't be executed all the time during I executed the T-CODE: VA01 as well as finished the sales document.

    HI,
    Go to transaction CMOD.
    Enter project name and select the button Create
    we want to create a project to enahance trasnaction VA01 .
    - Create a project called ZVA01
    - Choose the Enhancement assign radio button and press the Change button
    In the first column enter V45A0002 Predefine sold-to party in sales document.
    Note that an enhancement can only be used in 1 project. If the enhancement is already in use, and error message will be displayed
    Press Save Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002. Double click on the exit.
    Now the function module is displayed. Double click on include ZXVVAU04 in the function module
    Insert the following code into the include: E_KUNNR = '1000'.
    Activate the include program. Go back to CMOD and activate the project.
    Goto transaction VA01 and craete a salesorder.
    Note that Sold-to-party now automatically is "1000"
    Reward points pls.
    Regards,
    Govind.

  • Possible to trigger output type through Function module?

    Hi,
    Is it possible to trigger output type through Function modules or through some codings or any standard FM's?
    Regards
    Bala.

    You did not specify what area you need to retrigger an output type for, but here is a sample to retrigger a delivery output.
      CALL FUNCTION 'BAPI_LIKP_PROCESS_MSG_DIRECT'
        EXPORTING
      DYNAMICOUTPUTDEVICE       =
          processing                       = PROCESSING
      SORTMESSAGE               = 1
        TABLES
          deliverynumber                 = delnbrs
          outputtype                       = outputs
          messageprotocol              = bapimsgprot
          return                              = bapiret2.
    Thanks

  • 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

  • Problem to trigger breakpoint in function module of idoc

    Hi,
    We have requirement to write the additional code in function module in IDOC to fulfill the one of business requirement.  To write the code in the function module we put the breakpoint in function module but the function module is not triggering the breakpoint after saving the billing document.
    IDOC we are using is INVOIC02
    Function Module we are using is IDOC_OUTPUT_INVOIC
    i found the relevant for answer for my question in above link -
    [[http://blog.csdn.net/xyfchris/archive/2007/10/04/1811389.aspx]e]
    I process the same way as explained in the above link, but still the function module is not triggering the breakpoint and showing the information message as -
    0 number of outputs were processed in total  and zero are successfully, zero are incorrectly
    Please help in this
    Regards
    Goutham
    Edited by: goutham p on Dec 30, 2008 8:00 AM

    Hi,
    Please ask the ABAPer to just use P0105-PERNR within Z-report.
    It should work.
    Please refer to the following WIKI page for reference:
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/HowtoCreateaDynamic+action
    Regards,
    Dilek

  • How to use function module SALRT_CREATE_API to trigger alert in XI?

    Hi experts,
             I have read that alert can be triggered in BPM or through a FM SALRT_CREATE_API. Now how to use this FM?
    In what XI scenario I can use this FM and how?
    Any example will be really appreciated.
    Thanks
    Gopal

    Hi Gopal,
    I am not sure if any function module like SALRT_CREATE_API is used to create ALERTS.
    If you want to <b>create alerts</b>, just check this blog,
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    Next , after you have done this to <b>test your configuration</b>,
    go to T code - SE38.
    In the program , type RSALERTTEST and then click on EXECUTE button ( F8 ). In the next window, it will ask you for your ALERTCATEGORY. Just give the name of your ALERT CATEGORY and click EXECUTE.
    If you have configured your alerts correctly, you will receive a message that tells ALERT IS GENERATED and will give the ALERT ID.
    Now, go to your Run TIme workbench and then select ALERT INBOX and see if you have got the ALERT message in your ALERT INBOX.
    Finally if you are on <b>SP14 or above</b> , check this note <b>913858</b>
    and if <b>below SP14</b>, just check this blog,
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
    And. to use this alerts in your BPM,
    /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    Regards,
    Bhavesh
    Message was edited by: Bhavesh Kantilal

  • Trigger Idoc by using the Output type in Z function module

    My requirement is when I run Z function module then  Idoc should be send which is configured in Output Type.
    Means when ever i run the Functional module that Output type should be triggered.?
    Does any one have solution??

    Hi,
    Remove the Material Class from Importing Tab and Place the same under Tables Parameter.
    Regards,
    SRinivas

  • How to trigger inbound custom function module?

    Hello Experts,
    Could someone help me with my dilemma?
    I have created a custom process code which is linked to a custom function module for processing inbound IDocs. I have tested the function module successfully and I have set up the partner profile accordingly. The IDocs are coming in but get stuck at status "64". My function module never gets triggered even though in the partner profile it is set up to be triggered immediately. Any idea what I am missing?
    Thanks,
    Marlin

    Hi marlin ,
    just go for these checks and let us know the status ..
    1.Check here .
    Bd51 – assignment of Inbound function module. Present or not
    Check here .
    2.Bd67 –assignment of process code to inbound function module /present or not.
    3.
    Check here.
    In the object for the message type u need to give the BUS object as the application object.
    like bus2032
    4.
    Now place a break-point in ur function module and run it in debugging mode ..
    Now check whether this one is getting  into ur function module , next check the status record of the document number .
    regards,
    vijay.
    take an idoc , populate it from we19 and then there call the function module in debugging mode in back ground ..
    we'll see if this is actually picking the Fm or not.
    Message was edited by: Vijay

  • How to create IDOC from Function module or RFC

    Hi all,
            I have tested one inbound IDOC for Time Upload to CAT2 using basic type "CATS_INSERT01"  in WE19 through function module BAPI_IDOC_INPUT1 .It works well.
    Now i need to create this IDOC once the sale order gets created thru BAPI.
    For creation of Sale order i wrote one RFC in which i will call the Standard Sale Order Bapi.My question is once the Sale order gets created in that RFC How do i trigger the IDOC for CATS upload.

    Hi,
    Which SAP product of wich release of which SP are you using ?
    The procedure is documented in help.sap.com and in blogs and SDN forum messages.
    It means that the use of the SEARCH button should give plenty of answers...
    >When I check "Local object" checkbox I get a message "Test objects cannot be created in foreign >namespaces"
    As usual, begin your choosen name with an "Z".
    Regards,
    Olivier

Maybe you are looking for

  • How to retrieve Delivery address when entered manually in PO

    Hi All, I am trying to print PO through Smartform. I am retrieving the delivery address based on the adrnr number/Customer number/Vendor Number from EKPO table. Now when the user manually changed the address with out adrnr/Customer number/Vendor Numb

  • Exporting various languages to PDF

    1.  I've been reading some of the posts about the lack of font embedding support and not being able to support all languages exporting into PDF.  Is this still the case?  This is a huge problem, especially the lack of Simplified Chinese.  Is there an

  • How can I save and reload existing BIOS on a T61?

    Have a T61 with a back level BIOS version. Plan to upgrade HD from 250GB to 500GB. If I have to upgrade BIOS want to save existing BIOS in case any problems with new BIOS.  Lenovo site does not have existing level available for download. Downloaded 2

  • After flat file what next - beggining with BI

    Hi I am sure my question might sound silly but I am just beginning my journey with SAP BI.. I have access to system, I can do in it whatever I want - just without messing too much..First steps- I went thru flat file upload. i would like to start prac

  • Storing image files (.gif)  into database from sql plus

    dear all I have to store image files into a table with BLOB attribute. What will be the insert command to insert a .gif file into the database. thanks.