Process Chain Review Question: function module/ABAP program/Event

Hi,
1. Can you tell me a bit more about function modules such as RSPC_CHAIN_ACTIVATE_REMOTE
2. What are function modules in general terms. i.e.  What is their role?
3. How do I see all function module available?
4. When is function module used instead of ABAP program?
5. How do they help in the support and monitoring of Process Chains?
6. I am getting confused over the following under process chains “job”, “event”, “function module” and “ABAP Program”
Thanks

2. What are function modules in general terms. i.e. What is their role?
Function module return a value ( most of the time), they return some value either a single value of rane of value or even a table. Example: FM to return fiscal period gieven the fiscal vaeiant and system date.
3. How do I see all function module available?
Go to Se37 and this is function builder. You will find FM starting with RS* more useful. You cna also create your own in Se37.
4. When is function module used instead of ABAP program?
In addtion to answer I gave in 3 above, program is used to check some logic and update some tables or give screen output.
You may note FM is also a program.
5. How do they help in the support and monitoring of Process Chains?
As I said, for monitoring chains, use Sm37  and logs in RSPC.
6. I am getting confused over the following under process chains “job”, “event”, “function module” and “ABAP Program”
I am not clear what are you looking for.
You cna schedule a FM or a program to run in a chain. Is that what you mean?
Ravi Thothadri

Similar Messages

  • Function module & Abap Program

    Dear friends,
    I have one value in 'RSPO_CHECK_DEVICE_PERMISSION'
    function. how to use or import to abap program?
    Regards,
    Srini

    Hi,
    To Check the access permission for an output device
    call function 'RSPO_CHECK_DEVICE_PERMISSION'
        exporting
          dest                 = itcpp-tddest
        NAME                 =
        exceptions
          no_such_device       = 1
          no_permission        = 2
          others               = 3.
      if sy-subrc <> 0.
        message e460 with dest_long_name.
      endif.
    Plzz reward points i fit helps.

  • How to execute process chains using planning function

    hi, i need to execute process chains from web. i know the steps to that needs to be followed for accomplishing the task.
    1) RSPC_CHAIN_START ( function module) into which process chain has to be passed
    2) create a planning function to invoke the said function module
    3) create a function button on web and assign the planning function.
    Now the thing is how to create the planning function in BPS. plz provide me a solution with steps. And how to pass the process chain into the function module and handle it.
    Thnaks

    Hi Anand
    RSPC_CHAIN_START is the standard function module to run a process chain which i want use. Now, how to use the said FM in planning function to achive my task. Do i need to maintain any parameter in planning function inorder to execute the FM. If you know the solution plz explain in detail.
    I am very new to BPS..bare me plz
    Thank you

  • Process Chain for Consolidation Functions

    Hi Team,
                  We have created a process chain for consolidation function as required by client, but we want the process chain to check the preceding  task status and only on successfully completion it should  proceed to next task. Is there a standard program or function module which does this, please update.
    Also we would like to pass dynamic permanent parameter values for the variants of task.
    Thanks in advance.
    Kind Regards
    Sridhar

    Hi Collet,
                 We have created a process chain  as  below:
    Period Initialization - Data Collection -LDS - Calculation of RE - Validation of RFD - Interunit Elimination -COI.
    I have created the Separate variants for  each of the above functions with program UCBATCH01.and the process chain is working fine.
    But we want the process chain to check the task status before it proceed to next task execution and stop if any error occurs in the task. Also we want the  dynamic selection of parameters from Permanent Parameters of Consolidation Monitor.
    Kind Regards
    sridhar

  • Update TVARV table entries using a Function Module or Program

    Hi Gurus,
    My requirement is that I have a entry in TVARV table which has a 'low'. We would like to change this value whenever we desire. We are unable to do it via sm30 and se16 as table maintenance access is not permitted in Production environment.
    Can you please provide any Function module or program code to do it?
    Requirement - User can enter a value into TVARV table by executing a function module or program
    Thank you all, will award points,
    Priyansh

    Hi Priyansh,
    Please refer to SAP Help for more information on variant maintenance and more specifically variable values in variants. You can use t/code STVARV for maintaining the variant variables in table TVARVC (Client-Specific Variant Variables).
    Note: I suggest to use the TVARVC table instead of TVARV.
    If you are looking for Function Modules in the area of Variant Maintenance, then please have a look at Function Group SVAR (t/code SE80).
    If you are looking for Function Modules in the area of User Variables in Variants, then please have a look at Function Group SVUV (t/code SE80).
    Furthermore, if you are looking for a program to update table TVARVC, please have a look at ABAP: Dynamic Variant Processing with STVARV.
    Best eregards,
    Sander

  • Do we have standard function module or program to activate transformation?

    Hi Gurus,
    Do we have any standard function module or program to activate transformation in BI system? If yes please let me know or let me know how to proceed with to create custom program to activate transformation.
    Thanks,
    Manoj

    Hi Sven,
      Thanks for your help.
    Even I am facing the same problem, we didnt want to open the production system to activate the transformation also it take time to transport them every time from development
    can you please explain how to use these methods, what parameters to pass
    do you have a sample code, it will be of great help.
    use this methods
    cl_rstran_trfn=>factory
    cl_rsds_rsds=>if_rso_tlogo_general~get_instance
    l_rsds->if_rso_tlogo_maintain~is_active
    l_rsds->if_rso_tlogo_maintain~activate

  • Function Module or Program to get where used list

    Hi,
    I´ve been searching for Function Module or program to get where used list for an object.
    I try using the FM 'RS_TOOL_ACCESS' with parameters operation = 'CROSSREF', objectname = 'ZMYPROG', object_type = 'PROG'
    and in effect i get the list of object where the program is used, but the list is showed in standard screen.
    is there a function or program to obtain the used list for an object but in an internal table?
    I'm using version 4.6B.
    I checked the function module RS_INFOSYSTEM_CREATE_REQUEST, but i didn't obtain any result, is there a funcion or combination or FM to get the used list?
    thanks,
    Alejandro
    Message was edited by: Alejandro López

    Hi Alejandro,
    Please check this sample program.
    DATA: OBJTYPE TYPE  EUOBJ-ID.
    DATA: OBJECTS TYPE RINFOOBJ.
    APPEND P_OBJECT_NAME TO OBJECTS.
    OBJTYPE = P_OBJECT_TYPE.
    CALL FUNCTION 'RS_INFOSYSTEM_CREATE_REQUEST'
      EXPORTING
        OBJTYPE            = OBJTYPE
        ACTION             = SWBM_C_OP_WHERE_USED_LIST
      IMPORTING
        INFOSYSTEM_REQUEST = P_WB_REQUEST
      TABLES
        OBJLIST            = OBJECTS
        DEVCLASS           = p_scope_devclass
        OBJKEY             = p_scope_objkey
        I_SCOPE_OBJECT_CLS = P_SCOPE_OBJECT_TYPES
        I_SCOPE_OBJECTS    = P_SCOPE_OBJECTS
        EDITOR_SOURCE      = P_EDITOR_SOURCE
      EXCEPTIONS
        NOT_EXECUTED       = 1
        BATCH              = 2
        OTHERS             = 3.
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • What is the table contains Function module include program name

    Hi,
    What is the table contains Function module include program name
    Regards,
    Raja

    Try this FUNCTION_INCLUDE_INFO to get the include number to which function module belongs to.From this u ll get only the particular include name.
    or
    if u need the all the includes used in the function group u have use INNER JOIN on TFDIR and D010INC table
    <b>Select binclude into itab from trdir as a inner join d010inc as b on apname = bmaster where apname = fmodname.</b>
    I hope this will help u.
    Thanks & Regards
    Santhosh
    Message was edited by:
            santhosh ds

  • Function Module-ABAP Logic

    Hi Experts,
    The following is the ABAP Code used in Function Module to extract Master Data from R/3 to BW.Could please convert that into human language (Explain logic of code)
    FUNCTION MDEX_MATERIAL_MD .
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR OPTIONAL
    *"     VALUE(I_CHABASNM) TYPE  SBIWA_S_INTERFACE-CHABASNM OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SBIWA_S_INTERFACE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SBIWA_S_INTERFACE-INITFLAG OPTIONAL
    *"     VALUE(I_UPDMODE) TYPE  SBIWA_S_INTERFACE-UPDMODE OPTIONAL
    *"     VALUE(I_DATAPAKID) TYPE  SBIWA_S_INTERFACE-DATAPAKID OPTIONAL
    *"     VALUE(I_S_TIMEINT) TYPE  SBIWA_S_TIMEINT OPTIONAL
    *"     VALUE(I_RLOGSYS) TYPE  SRSC_S_INTERFACE-RLOGSYS OPTIONAL
    *"     VALUE(I_PRIVATE_MODE) OPTIONAL
    *"  TABLES
    *"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
    *"      E_T_BIW_MARA_S STRUCTURE  BIW_MARA_S OPTIONAL
    *"      E_T_BIW_MARC_S STRUCTURE  BIW_MARC_S OPTIONAL
    *"      E_T_BIW_MARD_S STRUCTURE  BIW_MARD_S OPTIONAL
    *"      E_T_BIW_MVKE_S STRUCTURE  BIW_MVKE_S OPTIONAL
    *"      E_T_BIW_MARM_S STRUCTURE  BIW_MARM_S OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    function acts as a S-API-compatible interface for the SD-extractor
    MATERIAL_DYNAM_DATA_SELECTION
      STATICS: L_FIRST_CALL TYPE SBIWA_FLAG,
               L_NO_SELECT  TYPE C.
      DATA: L_SUBRC TYPE SBIWM_SUBRC.
      DATA: L_T_CHABASCMP  LIKE RSSOSFIELD OCCURS 0 WITH HEADER LINE,
            L_S_REQUEST    TYPE RSAP_S_REQUEST,
            L_SLOGSYS      LIKE TBDLS-LOGSYS,
            L_RODCHABGEN   LIKE  RODCHABGEN,
            L_LINES        TYPE  I,
            L_TX_SELECT    TYPE  SBIWA_TX_SELECT,
            L_T_SELECT     TYPE  SBIWA_T_SELECT,
            L_S_SELECT     TYPE  SBIWA_S_SELECT.
      DATA: L_T_MARA     LIKE  MARA OCCURS 10 WITH HEADER LINE,
            L_T_MARC     LIKE  MARC OCCURS 10 WITH HEADER LINE,
            L_T_MARD     LIKE  MARD OCCURS 10 WITH HEADER LINE,
            L_T_MVKE     LIKE  MVKE OCCURS 10 WITH HEADER LINE,
            L_T_MARM     LIKE  MARM OCCURS 10 WITH HEADER LINE.
      DATA: L_S_MATNR_MATERIAL_KEYS LIKE PRE03,
            L_S_WERKS_MATERIAL_KEYS LIKE PRE01,
            L_S_LGORT_MATERIAL_KEYS LIKE PRE08,
            L_S_VTLIN_MATERIAL_KEYS LIKE PRE10.
          Variable to read compound information  "note383430 insED08052001
      DATA: i_chabasnm_cmp TYPE sbiwa_s_interface-chabasnm.
      "note383430 insED08052001
      IF I_INITFLAG = 'X'.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    Invalid second initialization call -> error exit
        IF NOT G_FLAG_INTERFACE_INITIALIZED IS INITIAL.
          IF 1 = 2. MESSAGE E008(R3). ENDIF.
          LOG_WRITE 'E'                    "message type
                    'R3'                   "message class
                    '008'                  "message number
                    ' '                    "message variable 1
                    ' '.                   "message variable 2
          RAISE ERROR_PASSED_TO_MESS_HANDLER.
        ELSE.
          G_FLAG_INTERFACE_INITIALIZED = SBIWA_C_FLAG_ON.
        ENDIF.
    Check for supported update mode
        CASE I_UPDMODE.
          WHEN SBIWA_C_UPDMODE_FULL.
          WHEN SBIWA_C_UPDMODE_DELTAINIT.
          WHEN SBIWA_C_UPDMODE_DELTA.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE E011(R3). ENDIF.
            LOG_WRITE 'E'                  "message type
                      'R3'                 "message class
                      '011'                "message number
                      I_UPDMODE            "message variable 1
                      ' '.                 "message variable 2
            RAISE ERROR_PASSED_TO_MESS_HANDLER.
        ENDCASE.
      Initialize variable to read compound information
        i_chabasnm_cmp = i_chabasnm.   "note383430 insED08052001
    **Check InfoObject validity and set IO-dependent parameters
        G_TAB1_FLG =  G_TAB2_FLG =  G_TAB3_FLG =  G_TAB4_FLG = ' '.
        g_tab5_flg = ' '.   "note417314 insED04072001
        G_NO_MARM = 'X'.
        CASE I_CHABASNM.
          WHEN '0MATERIAL'.
            G_TAB1_FLG = 'X'.
            G_TABLENAME = 'MARA'.
          WHEN '0ARTICLE'.                  "note383430 insED30042001
            G_TAB1_FLG = 'X'.               "note383430 insED30042001
            G_TABLENAME = 'MARA'.           "note383430 insED30042001
            i_chabasnm_cmp = '0MATERIAL'.   "note383430 insED08052001
          WHEN '0ME_MATERIAL'.              "note759687
            G_TAB1_FLG = 'X'.               "note759687
            G_TABLENAME = 'MARA'.           "note759687
            i_chabasnm_cmp = '0MATERIAL'.   "note759687
          WHEN '0MAT_PLANT'.
            G_TAB2_FLG = 'X'.
            G_TABLENAME = 'MARC'.
          WHEN '0ART_PLANT'.                "note383430 insED30042001
            G_TAB2_FLG = 'X'.               "note383430 insED30042001
            G_TABLENAME = 'MARC'.           "note383430 insED30042001
            i_chabasnm_cmp = '0MAT_PLANT'.  "note383430 insED08052001
          WHEN '0MAT_ST_LOC'.
            G_TAB3_FLG = 'X'.
            G_TABLENAME = 'MARD'.
          WHEN '0ART_ST_LOC'.               "note383430 insED30042001
            G_TAB3_FLG = 'X'.               "note383430 insED30042001
            G_TABLENAME = 'MARD'.           "note383430 insED30042001
            i_chabasnm_cmp = '0MAT_ST_LOC'. "note383430 insED08052001
          WHEN '0MAT_SALES'.
            G_TAB4_FLG = 'X'.
            G_TABLENAME = 'MVKE'.
         when '0ART_SALES'.      "note383430 insED30042001  "delED
           g_tab4_flg = 'x'.     "note383430 insED30042001  "delED
           g_tablename = 'MVKE'. "note383430 insED30042001  "delED
          WHEN '0ART_SALES'.      "insED
            G_TAB4_FLG = 'X'.     "insED
            G_TABLENAME = 'MVKE'. "insED
            i_chabasnm_cmp = '0MAT_SALES'.  "note383430 insED08052001
          WHEN '0MAT_UNIT'.
          G_TAB1_FLG = 'X'.     "note417314 delED04072001
            g_tab5_flg = 'X'.     "note417314 insED04072001
            G_TABLENAME = 'MARM'.
            G_NO_MARM = ' '.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE E009(R3). ENDIF.
            LOG_WRITE 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      I_CHABASNM           "message variable 1
                      ' '.                 "message variable 2
            RAISE ERROR_PASSED_TO_MESS_HANDLER.
        ENDCASE.
    ** fill parameter buffer for data extraction calls
        G_S_EXTR_IF-REQUNR    = I_REQUNR.
        G_S_EXTR_IF-CHABASNM  = I_CHABASNM.
        G_S_EXTR_IF-MAXSIZE   = I_MAXSIZE.
        G_S_EXTR_IF-INITFLAG  = I_INITFLAG.
        G_S_EXTR_IF-UPDMODE   = I_UPDMODE.
        G_S_EXTR_IF-DATAPAKID = I_DATAPAKID.
        g_s_interface-read_opt =.
        G_S_INTERFACE-MAX_MATNR = I_MAXSIZE.
        g_s_interface-max_lifnr =.
        g_s_interface-max_kunnr =.
        g_s_interface-max_werks =.
        CASE I_UPDMODE.
          WHEN SBIWA_C_UPDMODE_DELTA.
          ** settings for delta data transfer
          ** get additional information about current extraction
            CALL FUNCTION 'RSAN_LOGSYS_DETERMINE'
              EXPORTING
                I_CLIENT = SY-MANDT
              IMPORTING
                E_LOGSYS = L_SLOGSYS.
            L_S_REQUEST-SNDPRN   = L_SLOGSYS.
            L_S_REQUEST-RCVPRN   = I_RLOGSYS.
    *----- Fill Content release so get_rodchabgen will work ok -
            PERFORM GET_BWBCRL IN PROGRAM SAPLRSAP         "OSS 1054070/2000
                    USING    L_S_REQUEST-RCVPRN            "OSS 1054070/2000
                    CHANGING L_SUBRC.                      "OSS 1054070/2000
            PERFORM GET_RODCHABGEN IN PROGRAM SAPLRSAP
                      USING    L_RODCHABGEN
                               I_CHABASNM
                               L_S_REQUEST.
          ** get base characteristic information
            PERFORM DETERMINE_COMPOSITES IN PROGRAM SAPLRSAM
                      TABLES L_T_CHABASCMP
                    USING  I_CHABASNM.
                      USING  i_chabasnm_cmp.   "note383430 insED08052001
          ** Get information about modified data objects
            PERFORM FILL_MD_SELECT_ENTRYTABLE IN PROGRAM SAPLRSAP
                      TABLES   L_T_CHABASCMP
                      USING    L_RODCHABGEN-MSGTYP
                               I_CHABASNM
                      CHANGING L_TX_SELECT
                               L_SUBRC.
            DESCRIBE TABLE L_TX_SELECT LINES L_LINES.
            IF L_LINES = 0.
              L_NO_SELECT = 'X'.
            ENDIF.
          ** fill key-table for extractor
            REFRESH G_T_MATNR_MATERIAL_KEYS.
            REFRESH G_T_WERKS_MATERIAL_KEYS.
            REFRESH G_T_LGORT_MATERIAL_KEYS.
            REFRESH G_T_VTLIN_MATERIAL_KEYS.
            refresh g_t_marm_material_keys.   "note417314 insED04072001
            LOOP AT L_TX_SELECT INTO L_T_SELECT.
              CASE I_CHABASNM.
                WHEN '0MATERIAL' OR '0ARTICLE' "note383430 insED30042001
                     OR '0ME_MATERIAL'.
                  READ TABLE L_T_SELECT
                     INTO L_S_SELECT
                     WITH KEY FIELDNM = 'MATNR'.
                  L_S_MATNR_MATERIAL_KEYS-MATNR = L_S_SELECT-LOW.
                  APPEND L_S_MATNR_MATERIAL_KEYS TO G_T_MATNR_MATERIAL_KEYS.
                WHEN '0MAT_PLANT' OR '0ART_PLANT'. "note383430 insED30042001
                  READ TABLE L_T_SELECT
                     INTO L_S_SELECT
                     WITH KEY FIELDNM = 'MATNR'.
                  L_S_WERKS_MATERIAL_KEYS-MATNR = L_S_SELECT-LOW.
                  READ TABLE L_T_SELECT
                     INTO L_S_SELECT
                     WITH KEY FIELDNM = 'WERKS'.
                  L_S_WERKS_MATERIAL_KEYS-WERKS = L_S_SELECT-LOW.
                  APPEND L_S_WERKS_MATERIAL_KEYS TO G_T_WERKS_MATERIAL_KEYS.
                WHEN '0MAT_ST_LOC' OR '0ART_ST_LOC'.
                  "note383430 insED30042001
                  READ TABLE L_T_SELECT
                     INTO L_S_SELECT
                     WITH KEY FIELDNM = 'MATNR'.
                  L_S_LGORT_MATERIAL_KEYS-MATNR = L_S_SELECT-LOW.
                  READ TABLE L_T_SELECT
                     INTO L_S_SELECT
                     WITH KEY FIELDNM = 'WERKS'.
                  L_S_LGORT_MATERIAL_KEYS-WERKS = L_S_SELECT-LOW.
                  READ TABLE L_T_SELECT
                     INTO L_S_SELECT
                     WITH KEY FIELDNM = 'LGORT'.
                  L_S_LGORT_MATERIAL_KEYS-LGORT = L_S_SELECT-LOW.
                  APPEND L_S_LGORT_MATERIAL_KEYS TO G_T_LGORT_MATERIAL_KEYS.
                WHEN '0MAT_SALES' OR '0ART_SALES'. "note383430 insED30042001
                  READ TABLE L_T_SELECT
                     INTO L_S_SELECT
                     WITH KEY FIELDNM = 'MATNR'.
                  L_S_VTLIN_MATERIAL_KEYS-MATNR = L_S_SELECT-LOW.
                  READ TABLE L_T_SELECT
                     INTO L_S_SELECT
                     WITH KEY FIELDNM = 'VKORG'.
                  L_S_VTLIN_MATERIAL_KEYS-VKORG = L_S_SELECT-LOW.
                  READ TABLE L_T_SELECT
                     INTO L_S_SELECT
                     WITH KEY FIELDNM = 'VTWEG'.
                  L_S_VTLIN_MATERIAL_KEYS-VTWEG = L_S_SELECT-LOW.
                  APPEND L_S_VTLIN_MATERIAL_KEYS TO G_T_VTLIN_MATERIAL_KEYS.
              ENDCASE.
            ENDLOOP.
            IF L_SUBRC <> 0.
              IF 1 = 2. MESSAGE E009(R3). ENDIF.
              LOG_WRITE 'E'                "message type
                        'R3'               "message class
                        '009'              "message number
                        I_CHABASNM         "message variable 1
                        ' '.               "message variable 2
              RAISE ERROR_PASSED_TO_MESS_HANDLER.
              EXIT.
            ENDIF.
        ** settings for full data transfer or delta init.
    *----- Selektionsbedingungen müssen immer übernommen werden -
        WHEN sbiwa_c_updmode_full                            "DEL"TH090800
        OR   sbiwa_c_updmode_deltainit.                      "DEL"TH090800
          REFRESH g_t_sel_table.                             "DEL"TH090800
          LOOP AT i_t_select INTO l_s_select.                "DEL"TH090800
            g_s_sel_table-table  =  g_tablename.             "DEL"TH090800
            g_s_sel_table-field  =  l_s_select-fieldnm.      "DEL"TH090800
            MOVE-CORRESPONDING l_s_select TO g_s_sel_table.  "DEL"TH090800
            APPEND g_s_sel_table TO g_t_sel_table.           "DEL"TH090800
          ENDLOOP.                                           "DEL"TH090800
          WHEN OTHERS.
        ENDCASE.
    *----- Selektionsbedingungen müssen immer übernommen werden -
        REFRESH G_T_SEL_TABLE.                                 "INS"TH090800
        LOOP AT I_T_SELECT INTO L_S_SELECT.                    "INS"TH090800
          G_S_SEL_TABLE-TABLE  =  G_TABLENAME.                 "INS"TH090800
          G_S_SEL_TABLE-FIELD  =  L_S_SELECT-FIELDNM.          "INS"TH090800
          MOVE-CORRESPONDING L_S_SELECT TO G_S_SEL_TABLE.      "INS"TH090800
          APPEND G_S_SEL_TABLE TO G_T_SEL_TABLE.               "INS"TH090800
        ENDLOOP.                                               "INS"TH090800
        REFRESH G_T_FIELDS.
        APPEND LINES OF I_T_FIELDS TO G_T_FIELDS.
      ELSE.                 "Initialization mode or data extraction ?
        IF ( G_MORE_DATA_EXISTS = ' ' ) AND ( G_COUNTER_DATAPAKID NE 0 ).
          RAISE NO_MORE_DATA.
          EXIT.
        ENDIF.
        IF G_S_EXTR_IF-UPDMODE = SBIWA_C_UPDMODE_DELTA.
          IF NOT L_NO_SELECT IS INITIAL.
            RAISE NO_MORE_DATA.
          ENDIF.
        ENDIF.
        IF ( G_MORE_DATA_EXISTS = 'X' ) OR ( G_COUNTER_DATAPAKID = 0 ).
          REFRESH L_T_MARA.
          REFRESH L_T_MARC.
          REFRESH L_T_MARD.
          REFRESH L_T_MVKE.
          REFRESH L_T_MARM.
          CALL FUNCTION 'MATERIAL_DYNAM_DATA_SELECTION'
              EXPORTING
                  NO_MARM_DATA     = G_NO_MARM
                  READ_MARA_DATA   = G_TAB1_FLG
                  READ_MARC_DATA   = G_TAB2_FLG
                  READ_MARD_DATA   = G_TAB3_FLG
                  READ_MVKE_DATA   = G_TAB4_FLG
                  read_marm_data   = g_tab5_flg   "note417314 insED04072001
                JOIN_OPTION      = 'O'
                  IN_MAX_MATNR     = G_S_INTERFACE-MAX_MATNR
              TABLES
                  IN_SELECT_FIELDS = G_T_SEL_TABLE
                  IN_MATNR_KEYS    = G_T_MATNR_MATERIAL_KEYS
                  IN_WERKS_KEYS    = G_T_WERKS_MATERIAL_KEYS
                  IN_VTLIN_KEYS    = G_T_VTLIN_MATERIAL_KEYS
                  IN_LGORT_KEYS    = G_T_LGORT_MATERIAL_KEYS "insED22032001
                  in_marm_keys     = g_t_marm_material_keys  "note417314
                                                             "insED04072001
                  OUT_MARA_TAB     = L_T_MARA
                  OUT_MARC_TAB     = L_T_MARC
                  OUT_MARD_TAB     = L_T_MARD
                  OUT_MVKE_TAB     = L_T_MVKE
                  OUT_MARM_TAB     = L_T_MARM
              CHANGING
                  MORE_DATA_EXISTS = G_MORE_DATA_EXISTS
              EXCEPTIONS
                  WRONG_INPUT_DATA = 1
                  OTHERS           = 2
          IF SY-SUBRC <> 0.
            IF 1 = 2. MESSAGE E011(R3). ENDIF.
            LOG_WRITE 'E'                  "message type
                      'R3'                 "message class
                      '011'                "message number
                      SY-SUBRC             "message variable 1
                      ' '.                 "message variable 2
            RAISE ERROR_PASSED_TO_MESS_HANDLER.
          ENDIF.
          G_COUNTER_DATAPAKID = G_COUNTER_DATAPAKID + 1.
          LOOP AT L_T_MARA.
            MOVE-CORRESPONDING L_T_MARA TO E_T_BIW_MARA_S.
            APPEND E_T_BIW_MARA_S.
          ENDLOOP.
          LOOP AT L_T_MARC.
            MOVE-CORRESPONDING L_T_MARC TO E_T_BIW_MARC_S.
          provide additional attributes not contained in MARC
            PERFORM MARC_ADD_ATTRIBUTES CHANGING E_T_BIW_MARC_S
                                                 L_SUBRC.
            IF L_SUBRC <> 0.
              IF 1 = 2. MESSAGE E501(R§). ENDIF.
              "insED03082001 begin  note216922
              log_write 'W'                "message type
                        'R§'               "message class
                        '501'              "message number
                        e_t_biw_marc_s-werks "message variable 1
                        ' '.               "message variable 2
              "insED03082001 end    note216922
              "delED03082001 begin  note216922
              LOG_WRITE 'E'                "message type
                       'R§'               "message class
                       '501'              "message number
                        E_T_BIW_MARC_S-WERKS "message variable 1
                       ' '.               "message variable 2
              RAISE ERROR_PASSED_TO_MESS_HANDLER.
              "delED03082001 end   note2169222
            ENDIF.
            APPEND E_T_BIW_MARC_S.
          ENDLOOP.
          LOOP AT L_T_MARD.
            MOVE-CORRESPONDING L_T_MARD TO E_T_BIW_MARD_S.
            APPEND E_T_BIW_MARD_S.
          ENDLOOP.
          LOOP AT L_T_MVKE.
            MOVE-CORRESPONDING L_T_MVKE TO E_T_BIW_MVKE_S.
            APPEND E_T_BIW_MVKE_S.
          ENDLOOP.
          LOOP AT L_T_MARM.
            MOVE-CORRESPONDING L_T_MARM TO E_T_BIW_MARM_S.
            APPEND E_T_BIW_MARM_S.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDFUNCTION.
    Thanks

    Hi,
    This might not be the right forum for this. You can post your question in more relevant forum like Netweaver-Exchange Infrastructure.

  • Inconsistent Errors when processing  IDocs using custom Function Module

    I am encountering a most perplexing error. Here is the situation.
    We have a custom function module to update data in the EH&S system. We are having a bizarre error occurring. This is the basic processing of the function module:
    1. IDoc data is read and loaded into an internal table.
    2. Data is run through a series of checks to determine if the data is valid for entry into the system.
    3. After validation we use function module  C1F2_SUBSTANCES_READ_WITH_REF to read  characteristic data for the  substance. This data is used to validate whether current data exists to allow for loading of the IDoc data. (This is the step where the IDoc is receiving an error even if the data is valid. This only occurs if we are processing a large amount of Idocs and one IDoc contains valid data and another invalid data for the same substance. It occurs even if the Idocs are not processed in sequence.  If individually processed or reprocessed after initial failure they pass. This is what is so confusing!) If it exists, a flag is set and  the data is loaded using function module BAPI_BUS1077_CHANGE to modify the data.
    4. If the flag is set to allow further processing, the function module C1F2_SUBSTANCES_READ_WITH_REF is used again to select different characteristic data for the substance. A similar validation process occurs and if it passes, data is loaded using BAPI_BUS1077_CHANGE to update and BAPI_BUS1077_CREATE to create new data.
    Here is the situation:
    When processing one valid record for one substance, the record loads successfully.  When processing multiple valid records (all are valid) for one substance, they all load successfully.  The problem occurs when attempting to load valid and invalid records for the same substance.  Some times the program successfully loads the valid data (as expected).  Other times, it will not load any records.  It is not consistent!
    The order of IDoc processing does not have an impact on the success of the load.  Whether the valid or invalid record processes first does not have an impact on the success of the valid substance load.
    Does anyone have ANY Idea of what is going on? I am clearing all fields in the function module before processing occurs. I cannot find what is causing the error to occur.
    HELP!
    Jim Hardy

    I have some further information. It seems that if data for a substance is sent in two separate Idocs, one with valid and one with invalid data, As long as the two IDocs are processed consecutively, they process correctly. If they are separated by IDocs containing other substance information, they fail.
    thanks
    Jim

  • Function Module ABAP

    In SAP Abap which functional module is used to retrieve data from a table based on certain conditions?
    Moderator message : Vague subject lines, question. Thread locked.
    Edited by: Vinod Kumar on Jul 13, 2011 2:20 PM

    "In SAP Abap which functional module is used to retrieve data from a table based on certain conditions?"
    which table, what conditions, what data?SAP has n no of Function modules.You need to be more specific in your requirment.
    Ask better questions for better answers.

  • How to use a BAPI function module in programs?

    Hi,
    I have developed a BAPI enabled Function module & object type in 4.7. I want to use it to retrieve data from table T001 in 4.7 and display the output in 5.0. I am not able to get the data into 5.0. Please suggest me how to do this.
    A program example would be appreciated.

    Hi Prabhu,
    Firstly to say Bapis are version independent though the version is changed it does nt effect .. But as u said u want to fetch the data frm 4.7 tht too from table t005 observe tht the table data is not independent it is dependent tht is the reason why u r able to call the bapi but not able to display the data here . hope u know the procedue to call it in editor ...So now try it and check tht wether data is present in tht 5.0 version table ...t005 . thn it will be solved..if at all it is not working thn it might be problem with the bapi business object u created might be wrong check...
    Regards,
    Sana.
    reward if useful ...

  • Remote function module - stub program

    hi,
      i have created a remote function module that can be called by non-sap system (Biztalk).
    They are asking about stub program ,how to create that .please suggest.
      i searched in sap help portal , i found out that we can create that from fucntion module  -> display -> utilities -> RFC interface program , but i can't findout the option our sap version is ECC6.0

    hi!
    please checkout the link http://help.sap.com/saphelp_nw70/helpdata/en/7c/a4f1b3c59aef4f8ea3c32cda0c0486/frameset.htm
    kind regards
    Peter
    Edited by: Peter Lintner on Jul 20, 2009 12:38 PM

  • How to assign own Process code to a function module

    Hi,
      In we42.
      How to assign own Process code to a inbound idoc
    function module?
      Here function module name is not coming in the list.
    Ansar.

    Hi,
    USe transactn: WE42, define ur process code, double click and assign func module...
    To know all the transactions for ALE IDOC.. use
    WEDI.. Goto SAP easy screen there just type WEDI in command box and enter.
    Plz mark if useful..
    Regards
    Divaakr

  • PSA Deletion Process in Process Chains Transport Question

    BI Guru's
    I am working on investigating a method of deleting PSA Requests this will be a stand alone process so no loads will be done in this process chain.  My question I cannot use the Object Type of InfoPackage  or DTP since these objects wont be in the Process Chain leaving me PSA Table option but since I will be developing this in Dev and transporting through environment into prod how will this be handled since PSA tables change from system to system?  Does the system automatically translate it for me or will the value stay the same?

    Hi Alex,
    System will automatically identifies the table in quality and then in Production system. You do not have to worry. I had same question and I tested it with transporting the Process chain from developement to quality. In quality system automatically identified the table corresponding to data target/Master data.
    Regards,
    Kams

Maybe you are looking for