SAP Function Modules

BAPI_BEN_BUS3029_GET_OFFER SAP Function module - Define benefits offer







BAPI_BEN_BUS3029_GET_OFFER is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BAPI_BEN_BUS3029_GET_OFFER into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: HRBEN00BUS3029
Released Date: 25.09.1997
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_BEN_BUS3029_GET_OFFER - BAPI BEN BUS3029 GET OFFER





CALL FUNCTION 'BAPI_BEN_BUS3029_GET_OFFER' "Define benefits offer
  EXPORTING
    employeenumber =            " bapiben_oa-person_no  Employee's personnel number
    dateofvalidity =            " bapiben_oa-valid_date  Validity Date
*   event =                     " bapibenevt    Adjustment reason
    enrollmenttype =            " bapibenpar-enroll_typ  Type of enrollment
  IMPORTING
    employeenumber =            " bapiben_oa-person_no  Employee's personnel number
    dateofvalidity =            " bapiben_oa-valid_date  Validity Date
    emptyoffer =                " bapibenpar-emptyoffer  Offer empty
    return =                    " bapireturn1   Return
* TABLES
*   credit_offer =              " bapiben_o1    Credit plan offer
*   health_offer =              " bapiben_oa    Health plan offer
*   insurance_offer =           " bapiben_ob    Insurance plan offer
*   savings_offer =             " bapiben_oc    Savings plan offer
*   spending_offer =            " bapiben_od    FSA offer
*   miscel_offer =              " bapiben_oe    Miscellaneous plans offer
*   stockp_offer =              " bapiben_of    Stock puchase offer
    .  "  BAPI_BEN_BUS3029_GET_OFFER

ABAP code example for Function Module BAPI_BEN_BUS3029_GET_OFFER





The ABAP code below is a full code listing to execute function module BAPI_BEN_BUS3029_GET_OFFER including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_employeenumber  TYPE BAPIBEN_OA-PERSON_NO ,
ld_dateofvalidity  TYPE BAPIBEN_OA-VALID_DATE ,
ld_emptyoffer  TYPE BAPIBENPAR-EMPTYOFFER ,
ld_return  TYPE BAPIRETURN1 ,
it_credit_offer  TYPE STANDARD TABLE OF BAPIBEN_O1,"TABLES PARAM
wa_credit_offer  LIKE LINE OF it_credit_offer ,
it_health_offer  TYPE STANDARD TABLE OF BAPIBEN_OA,"TABLES PARAM
wa_health_offer  LIKE LINE OF it_health_offer ,
it_insurance_offer  TYPE STANDARD TABLE OF BAPIBEN_OB,"TABLES PARAM
wa_insurance_offer  LIKE LINE OF it_insurance_offer ,
it_savings_offer  TYPE STANDARD TABLE OF BAPIBEN_OC,"TABLES PARAM
wa_savings_offer  LIKE LINE OF it_savings_offer ,
it_spending_offer  TYPE STANDARD TABLE OF BAPIBEN_OD,"TABLES PARAM
wa_spending_offer  LIKE LINE OF it_spending_offer ,
it_miscel_offer  TYPE STANDARD TABLE OF BAPIBEN_OE,"TABLES PARAM
wa_miscel_offer  LIKE LINE OF it_miscel_offer ,
it_stockp_offer  TYPE STANDARD TABLE OF BAPIBEN_OF,"TABLES PARAM
wa_stockp_offer  LIKE LINE OF it_stockp_offer .


DATA(ld_employeenumber) = Check type of data required

DATA(ld_dateofvalidity) = 20210129
DATA(ld_event) = 'Check type of data required'.

DATA(ld_enrollmenttype) = some text here

"populate fields of struture and append to itab
append wa_credit_offer to it_credit_offer.

"populate fields of struture and append to itab
append wa_health_offer to it_health_offer.

"populate fields of struture and append to itab
append wa_insurance_offer to it_insurance_offer.

"populate fields of struture and append to itab
append wa_savings_offer to it_savings_offer.

"populate fields of struture and append to itab
append wa_spending_offer to it_spending_offer.

"populate fields of struture and append to itab
append wa_miscel_offer to it_miscel_offer.

"populate fields of struture and append to itab
append wa_stockp_offer to it_stockp_offer. . CALL FUNCTION 'BAPI_BEN_BUS3029_GET_OFFER' EXPORTING employeenumber = ld_employeenumber dateofvalidity = ld_dateofvalidity * event = ld_event enrollmenttype = ld_enrollmenttype IMPORTING employeenumber = ld_employeenumber dateofvalidity = ld_dateofvalidity emptyoffer = ld_emptyoffer return = ld_return * TABLES * credit_offer = it_credit_offer * health_offer = it_health_offer * insurance_offer = it_insurance_offer * savings_offer = it_savings_offer * spending_offer = it_spending_offer * miscel_offer = it_miscel_offer * stockp_offer = it_stockp_offer . " BAPI_BEN_BUS3029_GET_OFFER
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_employeenumber  TYPE BAPIBEN_OA-PERSON_NO ,
ld_employeenumber  TYPE BAPIBEN_OA-PERSON_NO ,
it_credit_offer  TYPE STANDARD TABLE OF BAPIBEN_O1 ,
wa_credit_offer  LIKE LINE OF it_credit_offer,
ld_dateofvalidity  TYPE BAPIBEN_OA-VALID_DATE ,
ld_dateofvalidity  TYPE BAPIBEN_OA-VALID_DATE ,
it_health_offer  TYPE STANDARD TABLE OF BAPIBEN_OA ,
wa_health_offer  LIKE LINE OF it_health_offer,
ld_emptyoffer  TYPE BAPIBENPAR-EMPTYOFFER ,
ld_event  TYPE BAPIBENEVT ,
it_insurance_offer  TYPE STANDARD TABLE OF BAPIBEN_OB ,
wa_insurance_offer  LIKE LINE OF it_insurance_offer,
ld_return  TYPE BAPIRETURN1 ,
ld_enrollmenttype  TYPE BAPIBENPAR-ENROLL_TYP ,
it_savings_offer  TYPE STANDARD TABLE OF BAPIBEN_OC ,
wa_savings_offer  LIKE LINE OF it_savings_offer,
it_spending_offer  TYPE STANDARD TABLE OF BAPIBEN_OD ,
wa_spending_offer  LIKE LINE OF it_spending_offer,
it_miscel_offer  TYPE STANDARD TABLE OF BAPIBEN_OE ,
wa_miscel_offer  LIKE LINE OF it_miscel_offer,
it_stockp_offer  TYPE STANDARD TABLE OF BAPIBEN_OF ,
wa_stockp_offer  LIKE LINE OF it_stockp_offer.


ld_employeenumber = Check type of data required

"populate fields of struture and append to itab
append wa_credit_offer to it_credit_offer.

ld_dateofvalidity = 20210129

"populate fields of struture and append to itab
append wa_health_offer to it_health_offer.
ld_event = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_insurance_offer to it_insurance_offer.

ld_enrollmenttype = some text here

"populate fields of struture and append to itab
append wa_savings_offer to it_savings_offer.

"populate fields of struture and append to itab
append wa_spending_offer to it_spending_offer.

"populate fields of struture and append to itab
append wa_miscel_offer to it_miscel_offer.

"populate fields of struture and append to itab
append wa_stockp_offer to it_stockp_offer.

SAP Documentation for FM BAPI_BEN_BUS3029_GET_OFFER


This function module is used as the basis for the BAPI method EmployeeBenefit.CreateOffer. ...See here for full SAP fm documentation

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BAPI_BEN_BUS3029_GET_OFFER or its description.