‎2007 Jun 01 9:32 AM
hi
Can anyone tells the T-CODE for checking the "FUNCTION MODULE".
What its function?
actully I am facing problem when replicate cost/revenue rate from plm100 clinet to ecc 6.0 clinet that time I am getting the message " function module "DPR_REPLICATE_RATES" not found.
plz help for this
thanx
sunil
null
‎2007 Jun 01 9:37 AM
Hi
The transaction is SE37
The function is a routine can be called for every program.
If it needs an action, an operation is done by many programs it can create a function does it, in this way you can write the code only one time (in the function module) and if it need to do a modification you change only one program: the function module.
Max
‎2007 Jun 01 9:34 AM
‎2007 Jun 01 9:34 AM
‎2007 Jun 01 9:37 AM
Hi
The transaction is SE37
The function is a routine can be called for every program.
If it needs an action, an operation is done by many programs it can create a function does it, in this way you can write the code only one time (in the function module) and if it need to do a modification you change only one program: the function module.
Max
‎2007 Jun 01 9:42 AM
Thanx all
actully I am facing problem when replicate cost/revenue rate from plm100 clinet to ecc 6.0 clinet that time I am getting the message " function module <b>"DPR_REPLICATE_RATES"</b> not found.
plz help for this
thnax
sunil jawalkar
suniljawalkar@htomail.com
‎2007 Jun 01 9:46 AM
Enter the FM DPR_REPLICATE_RATES in the transcation SE37 to see if it exists. If not then I would check OSS for you SAP version.
‎2007 Jun 01 9:58 AM
hi matrin
<b>DPR_REPLICATE_RATES</b> IT exitss in the system.
thanx
suniljawalkar
‎2007 Jun 01 10:00 AM
Is it possible you could post the part of the code in the abap dump at which the call to this Function is made.
‎2007 Jun 01 1:40 PM
dear
martin
can u give me ur mail ID i send screen shot to u. In ABAP dedugger control session
<b>Exceptions
communication_failure =1
system_failure=2
</b>
*& Report DPR_REPLICATE_RATES_TO_R3 *
*& *
&----
*& replicates tables DPR_RATES, DPR_RATES_T as well as DPR_RATES_MAP *
*& to R/3 (Plug-In 4.6C) *
&----
REPORT dpr_replicate_rates_to_r3.
TYPE-POOLS: slis, icon, cgplc.
TABLES: dpr_rates, dpr_rates_map.
true/false
CONSTANTS: gc_on TYPE xflag VALUE 'X',
gc_off TYPE xflag VALUE space,
inserted, deleted, updates, no changed
gc_ins TYPE char3 VALUE 'ins',
gc_del TYPE char3 VALUE 'DEL',
gc_upd TYPE char3 VALUE 'UPD',
gc_nch TYPE char3 VALUE 'NCH',
for log
gc_log_type TYPE char1 VALUE 'O'.
TYPES: type_tt_dpr_rates TYPE STANDARD TABLE OF dpr_rates
WITH DEFAULT KEY,
type_tt_dpr_rates_t TYPE STANDARD TABLE OF dpr_rates_t
WITH DEFAULT KEY,
type_tt_dpr_rates_map TYPE STANDARD TABLE OF dpr_rates_map
WITH DEFAULT KEY,
type_tt_messages TYPE STANDARD TABLE OF bapiret2
WITH DEFAULT KEY.
DATA: gt_dpr_rates TYPE type_tt_dpr_rates,
gt_dpr_rates_t TYPE type_tt_dpr_rates_t,
gt_dpr_rates_map TYPE type_tt_dpr_rates_map,
gt_messages TYPE type_tt_messages,
gd_msg_text(80) TYPE c,
returning parameter (inserted, deleted, updated records, no change)
gt_dpr_rates_ins TYPE type_tt_dpr_rates,
gt_dpr_rates_t_ins TYPE type_tt_dpr_rates_t,
gt_dpr_rates_map_ins TYPE type_tt_dpr_rates_map,
gt_dpr_rates_del TYPE type_tt_dpr_rates,
gt_dpr_rates_t_del TYPE type_tt_dpr_rates_t,
gt_dpr_rates_map_del TYPE type_tt_dpr_rates_map,
gt_dpr_rates_upd TYPE type_tt_dpr_rates,
gt_dpr_rates_t_upd TYPE type_tt_dpr_rates_t,
gt_dpr_rates_map_upd TYPE type_tt_dpr_rates_map,
gt_dpr_rates_nch TYPE type_tt_dpr_rates,
gt_dpr_rates_t_nch TYPE type_tt_dpr_rates_map,
gt_dpr_rates_map_nch TYPE type_tt_dpr_rates_map,
log (header + item)
gt_protocol_header TYPE STANDARD TABLE OF dpr_ts_calc_protocol_h
WITH DEFAULT KEY,
gt_protocol_item TYPE STANDARD TABLE OF dpr_ts_calc_protocol_i
WITH DEFAULT KEY.
destination
SELECTION-SCREEN: BEGIN OF BLOCK destination
WITH FRAME TITLE text-004.
PARAMETERS: gp_dest LIKE rfcdes-rfcdest OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK destination.
selections
SELECTION-SCREEN: BEGIN OF BLOCK selection_criteria
WITH FRAME TITLE text-001.
the user should be able to restrict the replication
to specific rates and organizational units
SELECT-OPTIONS: gt_rate FOR dpr_rates-rate,
gt_objid FOR dpr_rates_map-objid.
SELECTION-SCREEN: END OF BLOCK selection_criteria.
additional parameter
SELECTION-SCREEN BEGIN OF BLOCK parameter
WITH FRAME TITLE text-002.
line 1: test run
SELECTION-SCREEN: BEGIN OF LINE,
POSITION 1.
PARAMETERS: gp_test TYPE xflag AS CHECKBOX
DEFAULT 'X'.
SELECTION-SCREEN: COMMENT 4(30) text-003,
END OF LINE.
SELECTION-SCREEN: END OF BLOCK parameter.
INCLUDE replicaterates_to_r3_dispf01.
INCLUDE replicaterates_to_r3_dispf02.
INCLUDE replicaterates_to_r3_fillf01.
INCLUDE replicaterates_to_r3_fillf02.
INCLUDE replicaterates_to_r3_fillf03.
INCLUDE replicaterates_to_r3_top_f01.
INCLUDE replicaterates_to_r3_userf01.
INCLUDE replicaterates_to_r3_pf_sf01.
INITIALIZATION.
initialization
CLEAR: gt_dpr_rates, gt_dpr_rates_t, gt_dpr_rates_map,
gt_messages, gd_msg_text.
CLEAR: gt_dpr_rates_ins,
gt_dpr_rates_t_ins,
gt_dpr_rates_map_ins,
gt_dpr_rates_del,
gt_dpr_rates_t_del,
gt_dpr_rates_map_del,
gt_dpr_rates_upd,
gt_dpr_rates_t_upd,
gt_dpr_rates_map_upd.
reset message log
CALL METHOD cl_cgpl_application_log=>set_log_type
EXPORTING
im_log_type = gc_log_type
EXCEPTIONS
OTHERS = 0.
CALL METHOD cl_cgpl_application_log=>messages_refresh.
START-OF-SELECTION.
get cost/revenue rates
SELECT * FROM dpr_rates
INTO TABLE gt_dpr_rates
WHERE rate IN gt_rate.
IF sy-subrc IS INITIAL.
get texts (in all languages!)
SELECT * FROM dpr_rates_t
INTO TABLE gt_dpr_rates_t
WHERE rate IN gt_rate.
get validity table
SELECT * FROM dpr_rates_map
INTO TABLE gt_dpr_rates_map
WHERE rate IN gt_rate
AND objid IN gt_objid.
ELSE.
we must proceed anyway to delete the corresponding records
in the target system
MESSAGE s007(dpr_rates).
ENDIF.
call replication function in R/3
CALL FUNCTION 'DPR_REPLICATE_RATES' DESTINATION gp_dest
EXPORTING
id_test = gp_test
TABLES
annotation: we have to process the same range of objects in
R/3 as in the CPR system; otherwise the deletion of a rate would
never be replicated
it_selopt_rate = gt_rate "#EC ENHOK
it_selopt_objid = gt_objid "#EC ENHOK
it_dpr_rates_cpr = gt_dpr_rates "#EC ENHOK
it_dpr_rates_t_cpr = gt_dpr_rates_t "#EC ENHOK
it_dpr_rates_map_cpr = gt_dpr_rates_map "#EC ENHOK
et_dpr_rates_ins = gt_dpr_rates_ins "#EC ENHOK
et_dpr_rates_t_ins = gt_dpr_rates_t_ins "#EC ENHOK
et_dpr_rates_calc_ins = gt_dpr_rates_map_ins "#EC ENHOK
et_dpr_rates_del = gt_dpr_rates_del "#EC ENHOK
et_dpr_rates_t_del = gt_dpr_rates_t_del "#EC ENHOK
et_dpr_rates_calc_del = gt_dpr_rates_map_del "#EC ENHOK
et_dpr_rates_upd = gt_dpr_rates_upd "#EC ENHOK
et_dpr_rates_t_upd = gt_dpr_rates_t_upd "#EC ENHOK
et_dpr_rates_calc_upd = gt_dpr_rates_map_upd "#EC ENHOK
et_dpr_rates_nch = gt_dpr_rates_nch "#EC ENHOK
et_dpr_rates_t_nch = gt_dpr_rates_t_nch "#EC ENHOK
et_dpr_rates_calc_nch = gt_dpr_rates_map_nch "#EC ENHOK
et_messages = gt_messages "#EC ENHOK
EXCEPTIONS
communication_failure = 1 MESSAGE gd_msg_text
system_failure = 2 MESSAGE gd_msg_text.
IF NOT sy-subrc IS INITIAL.
communication failure
MESSAGE gd_msg_text TYPE 'E'.
ENDIF.
now display the log
PERFORM display_log.
thnax
sunil jawalkar
null
‎2007 Jun 02 7:47 AM
‎2007 Jun 02 7:52 AM
Hi Sunil
Is this a Function module or a RFC. If its function module no need to use Destination, If its RFC the u should mention Destination in Call function statement.
Regards
ravi
‎2007 Jun 02 7:54 AM
First of all check whether this is a ordinary FM or its RFC. Then use this accordingly.
Regards
Ravi
‎2007 Jun 02 7:56 AM
If it is a Fm u cannot use Destionation in CALL Function statement. If its a RFC FM then only u can use Destination in Call function,
Reward me if its useful
Regards
Ravi
‎2010 Feb 25 11:36 AM
‎2010 Feb 25 11:47 AM
>
> If it is a Fm u cannot use Destionation in CALL Function statement. If its a RFC FM then only u can use Destination in Call function,
>
>
> Regards
> Ravi
Hi,
Either I don't understand you or you are mistaken. If it's an rfc fm you can actually spare the DESTINATION statement.
It's optional.
If it's not an rfc fm, you must not use the DESTINATION statement.
regards,
Chris
‎2007 Jun 01 9:40 AM
Hi Sunil,
We can create n check the function modules in SE37.
Assign them under Function Groups creted in SE80.
Regards,
Priyanka.
‎2007 Jun 01 9:41 AM
Hi,
SE37. Press f4 you will get list if fucntion modules.
Function Modules are Global ABAP programs created by SAP for reusable purpose. They have IMPORT, EXPORT and TABLE parameters, and EXCEPTIONS to through when error occurs.
Thanks,
Anitha
‎2007 Jun 01 9:43 AM
Hi,
U can test function module in SE37 itself by Providing function module & execute
then u will get another screen where u need to provide the input data to get the output data
‎2010 Feb 25 12:24 PM