Skip to Content
author's profile photo Former Member
Former Member

Function Module

here is the function module I'm using the bet the benefit coverage amount for an employee.

form coverage_reg_basic.

if pnp-sw-found eq 1.

data: ee_benefit_data like rpbeneedat,

covam like T74FC-COVAM,

salary like p0008-ansal,

error_table like rpbenerr occurs 0,

rule like t74fc,

currency like t5ud3-curre,

bcove like t74fb-bcove.

  • 2. get bcove

select bcove from t74fb into bcove

where barea = p0168-barea and bplan = p0168-bplan.

endselect.

if not bcove is initial.

  • Get employee data into the structure

CALL FUNCTION 'HR_BEN_READ_EE_BENEFIT_DATA'

EXPORTING

PERNR = pernr-pernr

DATUM = v_begda

REACTION = 'N'

ENDDA = v_endda

IMPORTING

EE_BENEFIT_DATA = ee_benefit_data

TABLES

ERROR_TABLE = error_table.

CALL FUNCTION 'HR_BEN_GET_PLAN_COVERAGE'

EXPORTING

EE_BENEFIT_DATA = ee_benefit_data

BPLAN = p0168-bplan

BCOVE = bcove

ADDNO = p0168-addno

DATUM = v_begda

SALARY_OVERRIDE = p0168-salov

COVERAGE_OVERRIDE = p0168-covov

DESIRED_CURRE = 'CAD'

REACTION = 'D'

IMPORTING

COVERAGE_RULE = rule

COVERAGE_SALARY = salary

COVERAGE_AMOUNT = covam

TABLES

ERROR_TABLE = error_table.

v_cov = covam.

wa_results_totals-reg_cov = v_cov.

clear v_cov.

endif.

endif.

endform.

this works perfect in my DEV client put when I transport it to the Production client, the function module always results in 0 for the salary and covam,

anyway ideas on what could be different across instances.

thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2005 at 09:05 PM

    Dear Jamie:

    Using relevant transactions in SAP, you must first check the data in SAP whether what you are trying to retrieve is already there in production or not.

    Almost all HR tables are client specific. In your case, most likely the issue is that production does not have the data matching the conditions that you are sending via function module call.

    Check via SAP screens (in DEV and in production) the data that you want - and you will get the answer.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi,

      thanks for the reply,

      I used the debugger in a copy of prod, and in DEV

      and the data being sent to the function module is the same in both cases.

      this is why it doesn't make sense to me.

      thanks

  • Posted on May 28, 2005 at 02:52 AM

    Have you checked the contents of the error table returned by the function modules for any errors? May be it is related to authorization.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      check the contents of the error table, nothing in it, as if the function module ran fine,

      I got a feeling it is a currency issue, because the salary isn't coming back either, and this is why the coverage amount is not coming back.

      any other ideas

      thanks

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.