Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

fuction module

Former Member
0 Likes
1,744

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,673

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

18 REPLIES 18
Read only

former_member582701
Contributor
0 Likes
1,673

SE37

Read only

Former Member
0 Likes
1,673

SE37

Read only

Former Member
0 Likes
1,674

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

Read only

0 Likes
1,673

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

Read only

0 Likes
1,673

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.

Read only

0 Likes
1,673

hi matrin

<b>DPR_REPLICATE_RATES</b> IT exitss in the system.

thanx

suniljawalkar

Read only

0 Likes
1,673

Is it possible you could post the part of the code in the abap dump at which the call to this Function is made.

Read only

0 Likes
1,673

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

Read only

0 Likes
1,673

<b>help</b>

thnax

sunil

Read only

0 Likes
1,673

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

Read only

0 Likes
1,673

First of all check whether this is a ordinary FM or its RFC. Then use this accordingly.

Regards

Ravi

Read only

0 Likes
1,673

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

Read only

0 Likes
1,673

Closed

Read only

0 Likes
1,673

>

> 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

Read only

Former Member
0 Likes
1,673

Hi Sunil,

We can create n check the function modules in SE37.

Assign them under Function Groups creted in SE80.

Regards,

Priyanka.

Read only

Former Member
0 Likes
1,673

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

Read only

Former Member
0 Likes
1,673

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

Read only

Former Member
0 Likes
1,673

se37

Regards,

Amruta