VirtualProvider with Function module problem !

I implemented virtualprovider with function module. Unfortunately  when I run query i get message error :
u201CFunction call of ZT0X failed; the obligatory parameter CHARACTERISTICS
An exception with the type CX_SY_DYN_CALL_PARAM_MISSING occurred, but was
I>> Row: 67 Inc: READ_DATA Prog: CL_RSDRV_VPROV_LOC_NOSIDu201D
Any suggestions ?
Below source code:
u201CFUNCTION ZT0X.
""Lokalny interfejs:
*"  IMPORTING
*"     VALUE(INFOCUBE) LIKE  BAPI6200-INFOCUBE DEFAULT 'ZT03'
*"     VALUE(KEYDATE) LIKE  BAPI6200-KEYDATE OPTIONAL
*"  EXPORTING
*"     VALUE(RETURN) LIKE  BAPIRET2 STRUCTURE  BAPIRET2
*"  TABLES
*"      SELECTION STRUCTURE  BAPI6200SL
*"      CHARACTERISTICS STRUCTURE  BAPI6200FD
*"      KEYFIGURES STRUCTURE  BAPI6200FD
*"      DATA STRUCTURE  BAPI6100DA
DATA:
    l_r_srv              TYPE ref to CL_RSDRV_REMOTE_IPROV_SRV,
    l_th_mapping         TYPE CL_RSDRV_REMOTE_IPROV_SRV=>TN_TH_IOBJ_FLD_MAPPING.
*  break-point ID ZRSDRV_RC1.
* break DEVELOPER.
  perform build_mapping_table
    changing l_th_mapping.
  create object l_r_srv
    exporting
      i_tablnm              = '/BIC/PZPRD_ID'
      i_th_iobj_fld_mapping = l_th_mapping.
  l_r_srv->open_cursor(
    i_t_characteristics = characteristics[]
    i_t_keyfigures      = keyfigures[]
    i_t_selection       = selection[] ).
   l_r_srv->fetch_pack_data(
    importing
      e_t_data = data[] ).
  return-type = 'S'.
ENDFUNCTION.
&---- <
*&        Form  build_mapping_table
&---- <
Form build_mapping_table
  changing
    c_th_mapping TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_TH_IOBJ_FLD_MAPPING.
  DATA:
    l_s_map TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_S_IOBJ_FLD_MAPPING.
  l_s_map-iobjnm = 'ZPRD_ID'.
  l_s_map-fldnm  = '/BIC/ZPRD_ID'.
  insert l_s_map into table c_th_mapping.
  l_s_map-iobjnm = 'ZWARTOSC'.
  l_s_map-fldnm  = '/BIC/Z_CEN_W'.
  insert l_s_map into table c_th_mapping.
+endform.u201D

Hello
I experienced the same issue. Were u able to solve it? If yes , kindly ask you to make posting here so that others can benefit as well.
Huge thanks

Similar Messages

  • VirtualProvider with Function Module

    Hi,Experts
    Can anyone tell me how to create a VirtualProvider with Function Module?
    I have read the How to guide"How to Implement a VirtualProvider with service",but I can't go throw the source code.
    Please give me a sample test code of yours!
    Thanks a lot!
    My Email:[email protected]

    Hi Jin
    This question does not belong to this forum, close it and post it in the appropriate one.
    Also, please remove your email address from the thread as it violates the forum guidelines.

  • Delta extraction(date) with Function module problem

    Hi All,
    FUNCTION zrsax_biw_get_data_pr_d.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR
    *"     VALUE(I_ISOURCE) TYPE  SBIWA_S_INTERFACE-ISOURCE 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_PRIVATE_MODE) OPTIONAL
    *"     VALUE(I_CALLMODE) LIKE  ROARCHD200-CALLMODE OPTIONAL
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZPR_ST OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    * The input parameter I_DATAPAKID is not supported yet !
    * Example: InfoSource containing TADIR objects
    *  TABLES: tadir.
    *DATA: BEGIN OF zpr_st_copy,
    *        banfn TYPE zpr_st-banfn,
    *        bnfpo TYPE zpr_st-bnfpo,
    *        zebkn TYPE zpr_st-zebkn,
    *        knttp TYPE zpr_st-knttp,
    *        vbeln TYPE zpr_st-vbeln,
    *        ps_psp_pnr TYPE zpr_st-ps_psp_pnr,
    *        gsber TYPE zpr_st-gsber,
    *        werks TYPE zpr_st-werks,
    *        statu TYPE zpr_st-statu,
    *        ekgrp TYPE zpr_st-ekgrp,
    *        menge TYPE zpr_st-menge,
    *        frgdt TYPE zpr_st-frgdt,
    *        meins TYPE zpr_st-meins,
    *         loekz TYPE zpr_st-loekz,
    *      END OF zpr_st_copy.
    * Auxiliary Selection criteria structure
      DATA: l_s_select TYPE sbiwa_s_select.
    * Maximum number of lines for DB table
      STATICS: l_maxsize TYPE sbiwa_s_interface-maxsize.
    * Select ranges
    *  RANGES: l_r_pgmid  FOR tadir-pgmid,
    *          l_r_object FOR tadir-object,
        RANGES: PRNO for zpr_st-banfn,
                DATE1 FOR zpr_st-frgdt.
    * Parameter I_PRIVATE_MODE:
    * Some applications might want to use this function module for other
    * purposes as well (e.g. data supply for OLTP reporting tools). If the
    * processing logic has to be different in this case, use the optional
    * parameter I_PRIVATE_MODE (not supplied by BIW !) to distinguish
    * between BIW calls (I_PRIVATE_MODE = SPACE) and other calls
    * (I_PRIVATE_MODE = X).
    * If the message handling has to be different as well, define Your own
    * messaging macro which interprets parameter I_PRIVATE_MODE. When
    * called by BIW, it should use the LOG_WRITE macro, otherwise do what
    * You want.
    * 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
    * The input parameter I_DATAPAKID is not supported yet !
    * 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.
        ENDIF.
    * Check InfoSource validity
        CASE i_isource.
          WHEN 'ZPR_ST_DS_D' OR ''.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE e009(r3). ENDIF.
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      i_isource            "message variable 1
                      ' '.                 "message variable 2
            RAISE error_passed_to_mess_handler.
        ENDCASE.
    * Check for supported update mode
        CASE i_updmode.
          WHEN 'F' OR ''.
          WHEN 'C'.
          WHEN 'R'.
          WHEN 'S'. " DELTA INITIALIZATION
          WHEN 'I'. "DELTA INITIALIZATION FOR NON CUMULATIVE
          WHEN 'D'. "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.
    BREAK-POINT.
    * Check for obligatory selection criteria
    *    READ TABLE i_t_select INTO l_s_select WITH KEY fieldnm = 'ZPR_ST-FRGDT'.
    *    IF sy-subrc <> 0.
    *      IF 1 = 2. MESSAGE e010(r3). ENDIF.
    *      log_write 'E'                    "message type
    *                'R3'                   "message class
    *                '010'                  "message number
    *                'PGMID'                "message variable 1
    *                ' '.                   "message variable 2
    *      RAISE error_passed_to_mess_handler.
    *    ENDIF.
        APPEND LINES OF i_t_select TO g_t_select.
    * Fill parameter buffer for data extraction calls
        g_s_interface-requnr    = i_requnr.
        g_s_interface-isource   = i_isource.
        g_s_interface-maxsize   = i_maxsize.
        g_s_interface-initflag  = i_initflag.
        g_s_interface-updmode   = i_updmode.
        g_s_interface-datapakid = i_datapakid.
        g_flag_interface_initialized = sbiwa_c_flag_on.
    * 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 g_t_segfields.
    *   Start tracing of extraction
    *    bice_trace_open g_r_tracer i_t_fields.
      ELSE.                 "Initialization mode or data extraction ?
    * Data transfer: First Call      OPEN CURSOR + FETCH
    *                Following Calls FETCH only
    * First data package -> OPEN CURSOR
        IF g_counter_datapakid = 0.
    * Fill range tables for fixed InfoSources. In the case of generated
    * InfoSources, the usage of a dynamical SELECT statement might be
    * more reasonable. BIW will only pass down simple selection criteria
    * of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
    *      LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'PGMID'.
    *        MOVE-CORRESPONDING l_s_select TO l_r_pgmid.
    *        APPEND l_r_pgmid.
    *      ENDLOOP.
    *      LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'OBJECT'.
    *        MOVE-CORRESPONDING l_s_select TO l_r_object.
    *        APPEND l_r_object.
    *      ENDLOOP.
    LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'ZPR_ST-FRGDT'.
                MOVE-CORRESPONDING l_s_select to DATE1.
                DATE1-sign = 'I'.
                DATE1-option = 'GE'.
                clear DATE1-high.
                APPEND DATE1.
          ENDLOOP.
    * Determine number of database records to be read per FETCH statement
    * from input parameter I_MAXSIZE. If there is a one to one relation
    * between InfoSource table lines and database entries, this is trivial.
    * In other cases, it may be impossible and some estimated value has to
    * be determined.
          l_maxsize = g_s_interface-maxsize.
          OPEN CURSOR WITH HOLD g_cursor FOR
    *      SELECT (g_t_fields) FROM tadir
    *                               WHERE pgmid  IN l_r_pgmid AND
    *                                     object IN l_r_object.    "#EC CI_GENBUFF
    *@ CODE FOR THE STRUCTURE TO FILL IN FROM EBAN AND EBKN@*
                SELECT a~banfn a~bnfpo k~zebkn a~knttp k~vbeln k~ps_psp_pnr k~gsber a~werks a~statu a~ekgrp a~menge a~menge a~frgdt a~meins
    * INTO CORRESPONDING FIELDS OF TABLE IT1
                FROM  eban AS a INNER JOIN ebkn AS k ON ( a~banfn = k~banfn AND a~bnfpo = k~bnfpo )
                WHERE a~banfn GE '2000000000' AND a~banfn LE '2999999999' and a~loekz eq ' ' and a~frgdt ge '20130401' and a~FRGKZ eq '2'.
    *BREAK-POINT.
        ENDIF.                             "First data package ?
    * Fetch records into interface table. There are two different options:
    * - fixed interface table structure for fixed InfoSources have to be
    *   named E_T_'Name of assigned source structure in table ROIS'.
    * - for generating applications like LIS and CO-PA, the generic table
    *   E_T_DATA has to be used.
    * Only one of these interface types should be implemented in one API !
        FETCH NEXT CURSOR g_cursor
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE e_t_DATA
                   PACKAGE SIZE l_maxsize.
        IF sy-subrc <> 0.
          CLOSE CURSOR g_cursor.
    *      bice_trace_close g_r_tracer.
          RAISE no_more_data.
        ENDIF.
    *    bice_collect_table g_r_tracer e_t_data.
        g_counter_datapakid = g_counter_datapakid + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    in the above I_t_fields and I_T_select structures  are not getting data .....
    can any one pleasee let me know what mistake i hvae done with my code?
    and i m unbale to change data source value to F1 if i am trying to change my function module and extract structure are disappearing....
    i m not getting why it is happening .......
    thank you
    vijay

    Hi yasemin,
       I m bit confused here with the line below
                                     IF i_initflag = sbiwa_c_flag_on.(if we pass 'X' then it will enter loop and checks for F or D and then assigns values to I_T_SELECT and I_T_Fields structure)
          accordfing to my code i feel it will work for any one not both(F or D).
    one more doubt rsax_biw_get_data extraction method is F2 few of them are asking to change to F1.
    so tried running a code then in RSO2 extact structure and FM both dissapeared i did not get why it happened ?
    can you please let me know why it happend
    thanks
    vijay

  • How to copy a generic extractor with function module into a new system?

    Dear Gurus,
    i would like to know how i can copy a gneric datasource with function module from one system to the target system.
    Thank you
    Cheers

    Hi Anesh,
    thank you for replying.
    Since the Datasource will have a new new in the new system, i will create a new one.
    Create a generic datasource base on the table is not the problem.
    My problem is how could i copy the FM in the new system?
    If you can help me on that, it will be fine.
    Thanks

  • Hierarchial Layout Saving with function modules

    Hai to all
    i am facing a problem while saving layout in Hierarchial list display with function module.
    below error message is coming when i am going save my layout.
      210     if l_def_variant-variant eq rs_variant-variant.                
      211       l_default = 'X'.                                             
      212     endif.                                                         
      213   endif.                                                           
      214                                                                    
      215   call function 'LT_FC_SAVE'                                       
      216        exporting                                                   
      217 *           I_TOOL            = 'LT'                               
      218             i_tabname         = r_tabname                          
      219             i_tabname_slave   = r_tabname_slave                    
      220             is_variant        = rs_variant                         
      221             it_fieldcat       = rt_fieldcat[]                      
      222             it_sort           = rt_sort[]                          
      223             it_filter         = rt_filter[]                        
      224             is_layout         = rs_layout                          
      225             i_default_variant = l_default                          
      226        exceptions                                                  
      227             fc_not_complete = 1                                    
      228             others          = 2.                                   
      229   case sy-subrc.                                                   
      230     when '0'.                                                      
      231       message s018(0k).                                            
      232     when '1'.                                                      
    >>>>>       message x000(0k) with 'LT_FC_SAVE' sy-subrc                  
      234               raising fc_not_complete.                             
      235   endcase.                                                         
    it is very urgent...
    Subhash.M

    data: ls_vari      type disvariant.
    DATA: w_repid      TYPE sy-repid.
      ls_vari-report      = w_repid.
      ls_vari-username    = sy-uname.
      CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
        EXPORTING
      I_INTERFACE_CHECK              = ' '
         i_callback_program             = w_repid
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = ' '
         is_layout                      = wa_layout
          it_fieldcat                    = i_fcat[]
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
       it_sort                        = i_sort[]
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
         i_default                      = 'X'
         i_save                         = 'X'
       IS_VARIANT                     = ls_vari
       it_events                      = i_event[]
      IT_EVENT_EXIT                  =
          i_tabname_header               = 'I_FINAL1'
          i_tabname_item                 = 'I_FINAL2'
      I_STRUCTURE_NAME_HEADER        =
      I_STRUCTURE_NAME_ITEM          =
          is_keyinfo                     = wa_key
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                =
      IR_SALV_HIERSEQ_ADAPTER        =
      IT_EXCEPT_QINFO                =
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
        TABLES
          t_outtab_header                = i_final1
          t_outtab_item                  = i_final2
    EXCEPTIONS
       PROGRAM_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.
    i have passed the parameters
    but i am getting same dump again..
    Subhash.M

  • To update Employee Data with Function module

    Hi
    CRM employee master and HR employee master need to be mapped
    for the labor cost posting function to work.
    In BP transaction (Change in BP role : Employee),
    I could update "Personnel number" and "User Name"
    under Identification Tab
    now I need to do same job with Function module in report program.
    Anybody knows that what Function module should I use ?
    I tryed to do it with Function "CRMXIF_PARTNER_SAVE"
    but I only succesed to update imformations under Adress tab in BP transaction.
    thank you.

    Use FM BAPI_BUPA_CREATE_FROM_DATA.
    Rg,
    Harshit

  • Generic Data Source with Function Module data mismatch in BI

    Hi All,
    I'm using Generic Data Source with Function Module, When I execute the Function Module (Which I have Created), I'm getting 16000 records and when run extractor(in RSA3) im getting different no.of records(infact they are more no.).
    when I run the InfoPackage in BI im Getting more no. of records than what i got executing the function module..
    and single record is divided into 2 records in BI side(not all the records), how can it be possible???
    is there anything Im missing to explain you my issue???
    if understood please help me out.
    Thanks n Regards,
    ravi.

    the datasource frame work starts the function module several times.
    1. the initialization
    2. the serval times, until you "raise no_more_data".
    check you coding: have you refreshed necessary internal tables.
    Sven

  • Generic Data Source with Function Module data mismatch

    Hi All,
    I'm using Generic Data Source with Function Module, When I execute the Function Module (Which I have Created), I'm getting 16000 records and when run extractor(in RSA3) im getting different no.of records(infact they are more no.).
    when I run the InfoPackage  in BI im Getting more no. of records than what i got executing the function module..
    and single record is divided into 2 records in BI side(not all the records), how can it be possible???
    is there anything Im missing to explain you my issue???
    if understood please help me out.
    Thanks n Regards,
    ravi.

    HI rkiranbi,
    1. FIrst you excute function module according to your paramers, you will get some records. then goto tcode RSA3 --> excute
    Provide your Data source name and under setting we have options like Data records/calls, Display extractor calls and selections --> fields .
    in that options you have to increase the values. and then you have to pass paramers in RSA3 according to your function module
    selections in SE37. Now you will get equal values in both functin module selection and RSA3 Selection. if it fail means  you need to
    check coding logic in function module. 
    2. if your  are getting wrong values in BI System then check with
                  1. compare with PSA data and data target data (here you need to check with characterstic as well as keyfigures)
                  if you find any mistake you need change the coding in function module according to client requirement.
                  2. compare data with RSA3 and bi report data or data target data.
                                 check it properly above steps, you will get solution.
    thanks and regards,
    malli

  • Problem while working with function module RFC_READ_TABLE

    Dear Experts,
                     I am facing a problem while working on the FM RFC_READ_TABLE, in which there is a tables parameter options which is of table type, to which I am passing the condition of selection.  In the debugg mode I found the select quiry in the source code of function module is not executing the condition passed in the options parameter.
    My actual requirement is to fetch all the custom programs in a remote server, the code I have written is below.
    TYPES :
             BEGIN OF ty_tadir,
               pgmid  TYPE pgmid,
               object TYPE  trobjtype,
               obj_name  TYPE  sobj_name,
             END OF ty_tadir.
    DATA : it_tadir TYPE STANDARD TABLE OF ty_tadir,
            wa_tadir TYPE ty_tadir.
      data: stmp_dokhl  like TAB512       occurs 100000 with header line.
      data: options1    like rfc_db_opt occurs     10 with header line.
    data: wa_options1 like line of options1.
      data: nametab1    like rfc_db_fld  occurs     10 with header line.
    START-OF-SELECTION.
    DATA : W_VALUE(5)  TYPE C,
           W_VALUE1(20) TYPE C.
    W_VALUE1 =  'OBJ_NAME like'.
    W_VALUE = 'z*'.
    CONCATENATE 'OBJ_NAME LIKE' ' ''' W_VALUE '''' INTO OPTIONS1-TEXT.
    CONCATENATE W_VALUE1 W_VALUE INTO wa_OPTIONS1-TEXT SEPARATED BY SPACE.
    APPEND wa_OPTIONS1 to OPTIONS1.
    CLEAR wa_OPTIONS1.
        call function 'RFC_READ_TABLE'
             destination                'zard'
             exporting
                  query_table          = 'TADIR' "'ZBANK_GUARANTEE'
             tables
                  options              = options1
                  fields               = nametab1
                  data                 = stmp_dokhl
             exceptions
                  table_not_available  = 1
                  table_without_data   = 2
                  option_not_valid     = 3
                  field_not_valid      = 4
                  not_authorized       = 5
                  data_buffer_exceeded = 6
                  others               = 7 .
    Please give me some inputs on this,
    With warm regards,
    Murthy.
    Edited by: pr murthy on Sep 18, 2008 1:49 PM
    Edited by: pr murthy on Sep 18, 2008 2:14 PM

    Hi
    I have tried this and with small change this is working fine.
    TYPES :
    BEGIN OF ty_tadir,
    pgmid TYPE pgmid,
    object TYPE trobjtype,
    obj_name TYPE sobj_name,
    END OF ty_tadir.
    DATA : it_tadir TYPE STANDARD TABLE OF ty_tadir,
    wa_tadir TYPE ty_tadir.
    data: stmp_dokhl like TAB512 occurs 100000 with header line.
    data: options1 like rfc_db_opt occurs 10 with header line.
    data: wa_options1 like line of options1.
    data: nametab1 like rfc_db_fld occurs 10 with header line.
    START-OF-SELECTION.
    DATA : W_VALUE(5) TYPE C,
    W_VALUE1(20) TYPE C.
    W_VALUE1 = 'OBJ_NAME LIKE ''Z%'''.
    wa_options1-text = w_value1.
    APPEND wa_OPTIONS1 to OPTIONS1.
    CLEAR wa_OPTIONS1.
    call function 'RFC_READ_TABLE'
    *destination 'zard'
    exporting
    query_table = 'TADIR' "'ZBANK_GUARANTEE'
    tables
    options = options1
    fields = nametab1
    data = stmp_dokhl
    exceptions
    table_not_available = 1
    table_without_data = 2
    option_not_valid = 3
    field_not_valid = 4
    not_authorized = 5
    data_buffer_exceeded = 6
    others = 7 .

  • Problem with function module calling

    Hi,
    I have two questions here
    i have a function moduel 'Z_GET_MATL_BALANCE'
    in my code it called in the below said way
    CALL FUNCTION 'Z_GET_MATL_BALANCE'
        DESTINATION 'NONE'
        STARTING NEW TASK 'A'
        PERFORMING f_back ON END OF TASK
        EXPORTING
          ref_dte    = s_datum-low
          str_dte    = s_datum-high
          end_dte    = s_datum-high
          i_werks    = p_werks
          i_past     = 'X'
          i_future   = 'X'
          verselem   = p_mrpver
          plscn      = p_scenar
          r_outrec   = r_outrec
          supstk     = p_supstk
          days_ahead = w_days_ahead
          shipnt     = p_shipnt
        TABLES
          mat_bals   = w_zmat_bals_a
          i_zdatum   = i_datum
          mat_movmts = w_mat_movmts_a
          mat_ship   = i_mat_ship_a.
      IF sy-subrc NE 0.
        MESSAGE e005(ZMIM) WITH
       text-009 text-166 text-054 sy-subrc.
      ENDIF.
    FORM f_back USING task.
      CASE task.
        WHEN 'A' .
          RECEIVE RESULTS FROM FUNCTION 'Z_GET_MATL_BALANCE'
         TABLES
              mat_bals                     = w_zmat_bals_a
              mat_movmts                   = w_mat_movmts_a
              mat_ship                     = i_mat_ship_a
           EXCEPTIONS
                call_material_lesen_fail     = 1
                call_t450n_fail              = 2
                call_t399d_fail              = 3
                call_aufbauen_mdpsx_fail     = 4
                call_mdezx_aufbauen_fail     = 5
                call_t001w_fail              = 6
                call_zmrpelem_failed         = 7
                call_aufbauen_mdpsx_sim_fail = 8
                OTHERS                       = 9.
          IF SY-SUBRC NE 0.
           RET_CODE1 = SY-SUBRC.
          ENDIF.
    now my first question is what is the difference between function modules calling normally and in the above said way
    and the second question is
    under tables parameter i have four internal tables defined where as while calling the same function module using recive results i have three internal tables. is this correct?
    i am asking this because i am getting an error message while using this funciton module
    please do not give generic answers, all the helpful answers will get a def reward

    Call function starting new task is used to make Asynchronus RFC Call. In this case your function module will be called in a NEW SESSION and it will exceute independently from the Main program which is calling the FM. Also, the main program will continue its own processing and it will not wait for the RFC FM to complete.
    Its not mandatory to have all the TABLES parameters in the RETURN Perform (..Receive results from ...)

  • Problem with Function module PTRA_WEB_ADVANCES_SAVE

    Hi Friends,
    We are posting advaces to this function module: PTRA_WEB_ADVANCES_SAVE thru ASP.Net developed application.
    while calling this function module thru RFC saying error is ' RFC called failed. RFC error status19 '.
    what might me the reason for this error. I am getting this error for this Function module only. i tried with other function module, then it is working fine. but i want to use function module to post advances..
    Any suggestions please.
    Thanks,
    Naveen

    Must be an error in data submitted to the FM via the RFC...the FM is remote enabled, so check your data values AND FORMATS very carefully... are you getting the return table back?  If so, what's in it?

  • Problem with  Function Modules

    Hi.
    can anybody tell me how can i calculate
    cost depreciation for an asset.
    I have used one function module DEPR_RECALCULATE.
    but it will allow only one date and it will calculate depreciation for total year .
    As per my
    I want to pass the two dates  and need to  calculate the  depreciation between two periods.

    Hi Nitin.
    Thank you for u r  quick reply.
    I have tried all  these function modules but as per our requirement
    They are not support.
    Issue:
    I need to calculate the cost depreciation between APRIL and MARCH
    but DEPR_RECALCULATE    Fm   will calculate  between  JAN  and  the date which is specified in the parameter field on the  selection screen .
    so how can calculate the depreciation cost between two dates( I want to pass the  select-options).
       Thanking you,
        Regards
        sateesh

  • How to use fieldtab with Function Module F4IF_INT_TABLE_VALUE_REQUEST

    Hi,
    I'm using the function module F4IF_INT_TABLE_VALUE_REQUEST to build a matchcode in a selection screen parameter.
    The internal table that I use have 3 fields:
            GROUPID like APQI-GROUPID,
            CREDATE like APQI-CREDATE,
            STATE type  string.
    STATE is not in ABAP dictionary, so the function doesn't show this field. I need this field having field label 'STATUS'
    I have tried to use table FIELDTAB, but I cannot resolv the problem.
    Can anyone help me?
    Kind Regards

    Hi
    See the following ex:
    TYPES: BEGIN OF TY_MBLNR,
    MBLNR LIKE MKPF-MBLNR,
    END OF TY_MBLNR.
    DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
    data: it_ret like ddshretval occurs 0 with header line.
    At selection-screen on value-request for s_mat-low.
    Select MBLNR from mkpf into table it_mblnr.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'MBLNR'
    PVALKEY = ' '
    DYNPPROG = ' '
    DYNPNR = ' '
    DYNPROFIELD = ' '
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
    TABLES
    VALUE_TAB = IT_MBLNR
    FIELD_TAB =
    RETURN_TAB = IT_RET
    DYNPFLD_MAPPING =
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF SY-SUBRC = 0.
    read table it_ret index 1.
    move it_ret-fieldval to S_mat-low.
    ENDIF.
    Go through the test program.
    REPORT Ztest_HELP .
    TABLES : MARA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_MATNR(10) TYPE C.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR TYPE MATNR,
    END OF ITAB.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
    SELECT MATNR
    FROM MARA
    INTO TABLE ITAB
    UP TO 10 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'MATERIAL NUMBER'
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_MATNR'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = ITAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3. 
    Regards
    Anji

  • Remote Function Module problem

    Hi Experts,
    I have written a Se38 progarm to execute a remote function module, so as to send some data out of the system. The receiving system is an XI system. Pls see below the code and the load at the XI end, I donno why and what mistake am I doing in the se38 program part, as a result of which, only part of the data is getting send to XI.
    REPORT ZRFC_ADAPTER.
    Data: it_final1 type standard table of zrfc_str with header line .
    it_final1-NAME = 'ARNAB'.
    it_final1-ADDRESS = 'ADDRESS'.
    it_final1-EMAIL = 'EMAIL'.
    it_final1-ID = 'ID'.
    CALL FUNCTION 'ZRFC_XI'
    IN BACKGROUND TASK DESTINATION
    'R32XIRFC'
    EXPORTING
    username = sy-uname
    tables
    it_final = it_final1 .
    break-point.
    COMMIT WORK.
    Clear it_final1.
    I have seen in debugging mode, after removing the "
    IN BACKGROUND TASK DESTINATION
    'R32XIRFC'", that the internal table " it_final1 " is working fine......
    The structure used in remote Function Module is
    IT_FINAL LIKE ZRFC_STR -- in tables parameter. and the structure of ZRFC_STR is as follows!
    NAME ZNAME CHAR 14
    ADDRESS ZADDRESS CHAR 40
    TELEPHONE ZTEL CHAR 20
    EMAIL ZEMAIL CHAR 40
    ID ZID CHAR 10
    Note that , apart from a COMMIT WORK statement, there is no other coding done in the SOURCE CODE part of the remote Function Module.
    The load in XI is showing as
    <?xml version="1.0" encoding="UTF-8" ?>
    <rfc:ZRFC_XI xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
    <USERNAME>RETAILDEV</USERNAME>
    <IT_FINAL>
    <item>
    <NAME>ARNAB</NAME>
    <ADDRESS>EMAIL</ADDRESS>
    <EMAIL />
    <ID />
    </item>
    </IT_FINAL>
    </rfc:ZRFC_XI>
    Note that EMAIL is actually a content of field EMAIL and not ADDRESS. But I donno why, it is behaving like this,,
    Pls note, this RFC has been imported completely in integration repository of XI, so we dont have to worry about any settings change or activities, left pending in XI.
    I am very sure, something is missing in the se38 code, pls suggest!!
    Regards,
    Arnab .

    Hi Arnab,
    I am having really doubt that there is problem in field mapping.
    COuld you please check the following.
    In the FM structure contains 5 fields as follows,
    NAME ZNAME CHAR 14
    ADDRESS ZADDRESS CHAR 40
    TELEPHONE ZTEL CHAR 20
    EMAIL ZEMAIL CHAR 40
    ID ZID CHAR 10
    In the Internal Table it has got 4 fields. Check the Mapping properly
    and data on each field.
    t_final1-NAME = 'ARNAB'.
    it_final1-ADDRESS = 'ADDRESS'.
    it_final1-EMAIL = 'EMAIL'.
    it_final1-ID = 'ID'.
    Thanks & Regards,
    Nagaraj Kalbavi

  • XI-- IDOC scenario, how to link process code with function module

    Hi Forum,
    I have a XI--->IDOC (R/3) scenario,
    where i m creating a IDOC in XI and sending it to R/3,
    i have done all settings to send the IDOC from XI to the R/3,
    i also have the function module to process that IDOC in R/3,
    the problem is:
    I want to know in details (step by step) how to make a Idoc Inbound process code, link it with the function module and use the process code in the Partner Profile in R/3,
    pls help

    HI,
    FOr this u need to go to transaction WE41 for inbound and WE40 for outbound there u assign the function module.
    Now u go to WE20 transaction for partner profile and u can assign the proces code to the inbound message.
    Go to the below help for more information:
    http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
    Inbound process code:
    http://help.sap.com/saphelp_nw04/helpdata/en/72/c18ee5546a11d182cc0000e829fbfe/frameset.htm
    Thnx
    Chirag

Maybe you are looking for

  • In an attempt to configure Linksys PAP2 VOIP adapter, I a...

    In an attempt to configure Linksys PAP2 VOIP adapter, I am constantly receiving this message, "Your phone may be plugged into incorrect phone port. Please try the other port." Manual reboot did not solve the problem. Can anyone help?

  • Preview.app Scrolling Issue

    Since updating I've been having a problem with Preview while scrolling through PDFs of all sizes. The scrolling will stop randomly and the app will become unresponsive to my touch pad movements for 1-2 seconds. Anyone else having this issue? I'm on a

  • Email sent when printer was offline = no print?

    Hello I have sent an email to my printer when it was off, but now that it is online it still doesn't print. Do I have to click somewhere to start the printing? I can see my document in the ePrint Center with status "pending", but there is nothing els

  • A very annoying froms issue

    Hi Guys I have set up a fresh Oracle R12 installation on RHEL 5.5. As soon as I start the applications (./adstrtal.sh) everything starts up without any errors except for the jtffmctl.sh. You are running jtffmctl.sh version 120.3 .end std out. /u01/or

  • Ipod classic 40gb 4th generation problems

    ipod classic 4th generation error 1429, can't reset via ipod itself, yet when itunes regonized ipod, it freezes when trying to restore it. ipod also have a folder with explanation mark icon. Windows 7 also wants to format the drive on ipod. Help as I