SAP Function Modules

BAPI_FAMILYHK_CREATESUCCESSOR SAP Function module - Family Hong Kong: Create succeeding record







BAPI_FAMILYHK_CREATESUCCESSOR 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_FAMILYHK_CREATESUCCESSOR into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: PFAM_HK
Released Date: 11.02.2000
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM BAPI_FAMILYHK_CREATESUCCESSOR - BAPI FAMILYHK CREATESUCCESSOR





CALL FUNCTION 'BAPI_FAMILYHK_CREATESUCCESSOR' "Family Hong Kong: Create succeeding record
  EXPORTING
    employeenumber =            " bapip0021hk-employeeno  Personnel number
    validitybegin =             " bapip0021hk-validbegin  Valid from date
    validityend =               " bapip0021hk-validend  Valid to date
    membertype =                " bapip0021hk-membertype  Type of family record
*   inlockindicator =           " bapip0021hk-lockindic  Lock indicator for HR master record
*   memberid =                  " bapip0021hk-objectid  Object identification
*   firstname =                 " bapip0021hk-firstname  First name
*   lastname =                  " bapip0021hk-lastname  Last name
*   birthname =                 " bapip0021hk-birthname  Birth name
*   initials =                  " bapip0021hk-initials  Initials
*   gender =                    " bapip0021hk-gender  Gender
*   nationality =               " bapip0021hk-nationality  First nationality
*   nationality2 =              " bapip0021hk-nationality2  Second nationality
*   nationality3 =              " bapip0021hk-nationality3  Third nationality
*   dateofbirth =               " bapip0021hk-dateofbirth  Date of birth
*   placeofbirth =              " bapip0021hk-placeofbirth  Place of birth
*   stateofbirth =              " bapip0021hk-stateofbirth  State
*   countryofbirth =            " bapip0021hk-countryofbirth  Country
*   maritalstatus =             " bapip0021hk-maritalstatus  Marital status
*   separationdate =            " bapip0021hk-separationdate  Separate date
*   education =                 " bapip0021hk-education  Education
*   institute =                 " bapip0021hk-institute  Institute
*   amount =                    " bapip0021hk-amount  Amount
*   occupationcode =            " bapip0021hk-occupationcode  Occupation code
*   occupationstat =            " bapip0021hk-occupationstat  Employment percentage
*   nameofemployer =            " bapip0021hk-nameofemployer  Employer name
*   id1type =                   " bapip0021hk-id1type  Identification type 1
*   id1number =                 " bapip0021hk-id1number  Identification number 1
*   id1issueby =                " bapip0021hk-id1issueby  Issue by place 1
*   id1issuedate =              " bapip0021hk-id1issuedate  Issue date 1
*   id1expirydate =             " bapip0021hk-id1expirydate  Expiry date 1
*   countryofid1 =              " bapip0021hk-countryofid1  Which country ID1
*   countryissuei1 =            " bapip0021hk-countryissuei1  Issue by country 1
*   id2type =                   " bapip0021hk-id2type  Identification type 2
*   id2number =                 " bapip0021hk-id2number  Identification number 2
*   id2issueby =                " bapip0021hk-id2issueby  Issue by where 2
*   id2issuedate =              " bapip0021hk-id2issuedate  Issue date 2
*   id2expirydate =             " bapip0021hk-id2expirydate  Expiry date 2
*   countryofid2 =              " bapip0021hk-countryofid2  Which country ID2
*   countryissuei2 =            " bapip0021hk-countryissuei2  Issue by which country 2
*   othername1type =            " bapip0021hk-othername1type  Other name type 1
*   otherfstname1 =             " bapip0021hk-otherfstname1  Other First name 1
*   otherlastname1 =            " bapip0021hk-otherlastname1  Other last name 1
*   othername2type =            " bapip0021hk-othername2type  Other name type 2
*   otherfstname2 =             " bapip0021hk-otherfstname2  Other First name 2
*   otherlastname2 =            " bapip0021hk-otherlastname2  Other last name 2
*   coname =                    " bapip0021hk-coname  CO name
*   addressline1 =              " bapip0021hk-addressline1  Addrese line 1
*   addressline2 =              " bapip0021hk-addressline2  Addrese line 2
*   addressline3 =              " bapip0021hk-addressline3  Addrese line 3
*   districtcode =              " bapip0021hk-districtcode  District code
*   areacode =                  " bapip0021hk-areacode  Area code
*   countrycode =               " bapip0021hk-countrycode  Country code
*   contact1type =              " bapip0021hk-contact1type  Communication type 1
*   contact1number =            " bapip0021hk-contact1number  Communication number 1
*   contact2type =              " bapip0021hk-contact2type  Communication type 2
*   contact2number =            " bapip0021hk-contact2number  Communication number 2
*   contact3type =              " bapip0021hk-contact3type  Communication type 3
*   contact3number =            " bapip0021hk-contact3number  Communication number 3
*   contact4type =              " bapip0021hk-contact4type  Communication type 4
*   contact4number =            " bapip0021hk-contact4number  Communication number 4
*   contact5type =              " bapip0021hk-contact5type  Communication type 5
*   contact5number =            " bapip0021hk-contact5number  Communication number 5
*   contact6type =              " bapip0021hk-contact6type  Communication type 6
*   contact6number =            " bapip0021hk-contact6number  Communication number 6
*   referemployeenumber =       " bapip0021hk-referemployee  Reference personnel number of family member
*   employeraddress =           " bapip0021hk-employeraddr  Employer of family member
*   nocommit =                  " bapi_stand-no_commit  COMMIT control at BAPI interface
  IMPORTING
    return =                    " bapireturn1   Structure for return code
    employeenumber =            " bapip0021hk-employeeno  Personnel number
    subtype =                   " bapip0021hk-subtype  Subtype
    objectid =                  " bapip0021hk-objectid  Object identification
    lockindicator =             " bapip0021hk-lockindic  Lock indicator for HR master record
    validitybegin =             " bapip0021hk-validbegin  Valid from date
    validityend =               " bapip0021hk-validend  Valid to date
    recordnumber =              " bapip0021hk-recordnr  Number of infotype record
    .  "  BAPI_FAMILYHK_CREATESUCCESSOR

ABAP code example for Function Module BAPI_FAMILYHK_CREATESUCCESSOR





The ABAP code below is a full code listing to execute function module BAPI_FAMILYHK_CREATESUCCESSOR 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_return  TYPE BAPIRETURN1 ,
ld_employeenumber  TYPE BAPIP0021HK-EMPLOYEENO ,
ld_subtype  TYPE BAPIP0021HK-SUBTYPE ,
ld_objectid  TYPE BAPIP0021HK-OBJECTID ,
ld_lockindicator  TYPE BAPIP0021HK-LOCKINDIC ,
ld_validitybegin  TYPE BAPIP0021HK-VALIDBEGIN ,
ld_validityend  TYPE BAPIP0021HK-VALIDEND ,
ld_recordnumber  TYPE BAPIP0021HK-RECORDNR .


DATA(ld_employeenumber) = Check type of data required

DATA(ld_validitybegin) = 20210129

DATA(ld_validityend) = 20210129

DATA(ld_membertype) = some text here

DATA(ld_inlockindicator) = some text here

DATA(ld_memberid) = some text here

DATA(ld_firstname) = some text here

DATA(ld_lastname) = some text here

DATA(ld_birthname) = some text here

DATA(ld_initials) = some text here

DATA(ld_gender) = some text here

DATA(ld_nationality) = some text here

DATA(ld_nationality2) = some text here

DATA(ld_nationality3) = some text here

DATA(ld_dateofbirth) = 20210129

DATA(ld_placeofbirth) = some text here

DATA(ld_stateofbirth) = some text here

DATA(ld_countryofbirth) = some text here

DATA(ld_maritalstatus) = some text here

DATA(ld_separationdate) = 20210129

DATA(ld_education) = some text here

DATA(ld_institute) = some text here

DATA(ld_amount) = 20.50

DATA(ld_occupationcode) = some text here

DATA(ld_occupationstat) = Check type of data required

DATA(ld_nameofemployer) = some text here

DATA(ld_id1type) = some text here

DATA(ld_id1number) = some text here

DATA(ld_id1issueby) = some text here

DATA(ld_id1issuedate) = 20210129

DATA(ld_id1expirydate) = 20210129

DATA(ld_countryofid1) = some text here

DATA(ld_countryissuei1) = some text here

DATA(ld_id2type) = some text here

DATA(ld_id2number) = some text here

DATA(ld_id2issueby) = some text here

DATA(ld_id2issuedate) = 20210129

DATA(ld_id2expirydate) = 20210129

DATA(ld_countryofid2) = some text here

DATA(ld_countryissuei2) = some text here

DATA(ld_othername1type) = some text here

DATA(ld_otherfstname1) = some text here

DATA(ld_otherlastname1) = some text here

DATA(ld_othername2type) = some text here

DATA(ld_otherfstname2) = some text here

DATA(ld_otherlastname2) = some text here

DATA(ld_coname) = some text here

DATA(ld_addressline1) = some text here

DATA(ld_addressline2) = some text here

DATA(ld_addressline3) = some text here

DATA(ld_districtcode) = some text here

DATA(ld_areacode) = some text here

DATA(ld_countrycode) = some text here

DATA(ld_contact1type) = some text here

DATA(ld_contact1number) = some text here

DATA(ld_contact2type) = some text here

DATA(ld_contact2number) = some text here

DATA(ld_contact3type) = some text here

DATA(ld_contact3number) = some text here

DATA(ld_contact4type) = some text here

DATA(ld_contact4number) = some text here

DATA(ld_contact5type) = some text here

DATA(ld_contact5number) = some text here

DATA(ld_contact6type) = some text here

DATA(ld_contact6number) = some text here

DATA(ld_referemployeenumber) = some text here

DATA(ld_employeraddress) = some text here

DATA(ld_nocommit) = some text here . CALL FUNCTION 'BAPI_FAMILYHK_CREATESUCCESSOR' EXPORTING employeenumber = ld_employeenumber validitybegin = ld_validitybegin validityend = ld_validityend membertype = ld_membertype * inlockindicator = ld_inlockindicator * memberid = ld_memberid * firstname = ld_firstname * lastname = ld_lastname * birthname = ld_birthname * initials = ld_initials * gender = ld_gender * nationality = ld_nationality * nationality2 = ld_nationality2 * nationality3 = ld_nationality3 * dateofbirth = ld_dateofbirth * placeofbirth = ld_placeofbirth * stateofbirth = ld_stateofbirth * countryofbirth = ld_countryofbirth * maritalstatus = ld_maritalstatus * separationdate = ld_separationdate * education = ld_education * institute = ld_institute * amount = ld_amount * occupationcode = ld_occupationcode * occupationstat = ld_occupationstat * nameofemployer = ld_nameofemployer * id1type = ld_id1type * id1number = ld_id1number * id1issueby = ld_id1issueby * id1issuedate = ld_id1issuedate * id1expirydate = ld_id1expirydate * countryofid1 = ld_countryofid1 * countryissuei1 = ld_countryissuei1 * id2type = ld_id2type * id2number = ld_id2number * id2issueby = ld_id2issueby * id2issuedate = ld_id2issuedate * id2expirydate = ld_id2expirydate * countryofid2 = ld_countryofid2 * countryissuei2 = ld_countryissuei2 * othername1type = ld_othername1type * otherfstname1 = ld_otherfstname1 * otherlastname1 = ld_otherlastname1 * othername2type = ld_othername2type * otherfstname2 = ld_otherfstname2 * otherlastname2 = ld_otherlastname2 * coname = ld_coname * addressline1 = ld_addressline1 * addressline2 = ld_addressline2 * addressline3 = ld_addressline3 * districtcode = ld_districtcode * areacode = ld_areacode * countrycode = ld_countrycode * contact1type = ld_contact1type * contact1number = ld_contact1number * contact2type = ld_contact2type * contact2number = ld_contact2number * contact3type = ld_contact3type * contact3number = ld_contact3number * contact4type = ld_contact4type * contact4number = ld_contact4number * contact5type = ld_contact5type * contact5number = ld_contact5number * contact6type = ld_contact6type * contact6number = ld_contact6number * referemployeenumber = ld_referemployeenumber * employeraddress = ld_employeraddress * nocommit = ld_nocommit IMPORTING return = ld_return employeenumber = ld_employeenumber subtype = ld_subtype objectid = ld_objectid lockindicator = ld_lockindicator validitybegin = ld_validitybegin validityend = ld_validityend recordnumber = ld_recordnumber . " BAPI_FAMILYHK_CREATESUCCESSOR
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_return  TYPE BAPIRETURN1 ,
ld_employeenumber  TYPE BAPIP0021HK-EMPLOYEENO ,
ld_employeenumber  TYPE BAPIP0021HK-EMPLOYEENO ,
ld_validitybegin  TYPE BAPIP0021HK-VALIDBEGIN ,
ld_subtype  TYPE BAPIP0021HK-SUBTYPE ,
ld_validityend  TYPE BAPIP0021HK-VALIDEND ,
ld_objectid  TYPE BAPIP0021HK-OBJECTID ,
ld_membertype  TYPE BAPIP0021HK-MEMBERTYPE ,
ld_lockindicator  TYPE BAPIP0021HK-LOCKINDIC ,
ld_inlockindicator  TYPE BAPIP0021HK-LOCKINDIC ,
ld_validitybegin  TYPE BAPIP0021HK-VALIDBEGIN ,
ld_memberid  TYPE BAPIP0021HK-OBJECTID ,
ld_validityend  TYPE BAPIP0021HK-VALIDEND ,
ld_firstname  TYPE BAPIP0021HK-FIRSTNAME ,
ld_recordnumber  TYPE BAPIP0021HK-RECORDNR ,
ld_lastname  TYPE BAPIP0021HK-LASTNAME ,
ld_birthname  TYPE BAPIP0021HK-BIRTHNAME ,
ld_initials  TYPE BAPIP0021HK-INITIALS ,
ld_gender  TYPE BAPIP0021HK-GENDER ,
ld_nationality  TYPE BAPIP0021HK-NATIONALITY ,
ld_nationality2  TYPE BAPIP0021HK-NATIONALITY2 ,
ld_nationality3  TYPE BAPIP0021HK-NATIONALITY3 ,
ld_dateofbirth  TYPE BAPIP0021HK-DATEOFBIRTH ,
ld_placeofbirth  TYPE BAPIP0021HK-PLACEOFBIRTH ,
ld_stateofbirth  TYPE BAPIP0021HK-STATEOFBIRTH ,
ld_countryofbirth  TYPE BAPIP0021HK-COUNTRYOFBIRTH ,
ld_maritalstatus  TYPE BAPIP0021HK-MARITALSTATUS ,
ld_separationdate  TYPE BAPIP0021HK-SEPARATIONDATE ,
ld_education  TYPE BAPIP0021HK-EDUCATION ,
ld_institute  TYPE BAPIP0021HK-INSTITUTE ,
ld_amount  TYPE BAPIP0021HK-AMOUNT ,
ld_occupationcode  TYPE BAPIP0021HK-OCCUPATIONCODE ,
ld_occupationstat  TYPE BAPIP0021HK-OCCUPATIONSTAT ,
ld_nameofemployer  TYPE BAPIP0021HK-NAMEOFEMPLOYER ,
ld_id1type  TYPE BAPIP0021HK-ID1TYPE ,
ld_id1number  TYPE BAPIP0021HK-ID1NUMBER ,
ld_id1issueby  TYPE BAPIP0021HK-ID1ISSUEBY ,
ld_id1issuedate  TYPE BAPIP0021HK-ID1ISSUEDATE ,
ld_id1expirydate  TYPE BAPIP0021HK-ID1EXPIRYDATE ,
ld_countryofid1  TYPE BAPIP0021HK-COUNTRYOFID1 ,
ld_countryissuei1  TYPE BAPIP0021HK-COUNTRYISSUEI1 ,
ld_id2type  TYPE BAPIP0021HK-ID2TYPE ,
ld_id2number  TYPE BAPIP0021HK-ID2NUMBER ,
ld_id2issueby  TYPE BAPIP0021HK-ID2ISSUEBY ,
ld_id2issuedate  TYPE BAPIP0021HK-ID2ISSUEDATE ,
ld_id2expirydate  TYPE BAPIP0021HK-ID2EXPIRYDATE ,
ld_countryofid2  TYPE BAPIP0021HK-COUNTRYOFID2 ,
ld_countryissuei2  TYPE BAPIP0021HK-COUNTRYISSUEI2 ,
ld_othername1type  TYPE BAPIP0021HK-OTHERNAME1TYPE ,
ld_otherfstname1  TYPE BAPIP0021HK-OTHERFSTNAME1 ,
ld_otherlastname1  TYPE BAPIP0021HK-OTHERLASTNAME1 ,
ld_othername2type  TYPE BAPIP0021HK-OTHERNAME2TYPE ,
ld_otherfstname2  TYPE BAPIP0021HK-OTHERFSTNAME2 ,
ld_otherlastname2  TYPE BAPIP0021HK-OTHERLASTNAME2 ,
ld_coname  TYPE BAPIP0021HK-CONAME ,
ld_addressline1  TYPE BAPIP0021HK-ADDRESSLINE1 ,
ld_addressline2  TYPE BAPIP0021HK-ADDRESSLINE2 ,
ld_addressline3  TYPE BAPIP0021HK-ADDRESSLINE3 ,
ld_districtcode  TYPE BAPIP0021HK-DISTRICTCODE ,
ld_areacode  TYPE BAPIP0021HK-AREACODE ,
ld_countrycode  TYPE BAPIP0021HK-COUNTRYCODE ,
ld_contact1type  TYPE BAPIP0021HK-CONTACT1TYPE ,
ld_contact1number  TYPE BAPIP0021HK-CONTACT1NUMBER ,
ld_contact2type  TYPE BAPIP0021HK-CONTACT2TYPE ,
ld_contact2number  TYPE BAPIP0021HK-CONTACT2NUMBER ,
ld_contact3type  TYPE BAPIP0021HK-CONTACT3TYPE ,
ld_contact3number  TYPE BAPIP0021HK-CONTACT3NUMBER ,
ld_contact4type  TYPE BAPIP0021HK-CONTACT4TYPE ,
ld_contact4number  TYPE BAPIP0021HK-CONTACT4NUMBER ,
ld_contact5type  TYPE BAPIP0021HK-CONTACT5TYPE ,
ld_contact5number  TYPE BAPIP0021HK-CONTACT5NUMBER ,
ld_contact6type  TYPE BAPIP0021HK-CONTACT6TYPE ,
ld_contact6number  TYPE BAPIP0021HK-CONTACT6NUMBER ,
ld_referemployeenumber  TYPE BAPIP0021HK-REFEREMPLOYEE ,
ld_employeraddress  TYPE BAPIP0021HK-EMPLOYERADDR ,
ld_nocommit  TYPE BAPI_STAND-NO_COMMIT .


ld_employeenumber = Check type of data required

ld_validitybegin = 20210129

ld_validityend = 20210129

ld_membertype = some text here

ld_inlockindicator = some text here

ld_memberid = some text here

ld_firstname = some text here

ld_lastname = some text here

ld_birthname = some text here

ld_initials = some text here

ld_gender = some text here

ld_nationality = some text here

ld_nationality2 = some text here

ld_nationality3 = some text here

ld_dateofbirth = 20210129

ld_placeofbirth = some text here

ld_stateofbirth = some text here

ld_countryofbirth = some text here

ld_maritalstatus = some text here

ld_separationdate = 20210129

ld_education = some text here

ld_institute = some text here

ld_amount = 20.50

ld_occupationcode = some text here

ld_occupationstat = Check type of data required

ld_nameofemployer = some text here

ld_id1type = some text here

ld_id1number = some text here

ld_id1issueby = some text here

ld_id1issuedate = 20210129

ld_id1expirydate = 20210129

ld_countryofid1 = some text here

ld_countryissuei1 = some text here

ld_id2type = some text here

ld_id2number = some text here

ld_id2issueby = some text here

ld_id2issuedate = 20210129

ld_id2expirydate = 20210129

ld_countryofid2 = some text here

ld_countryissuei2 = some text here

ld_othername1type = some text here

ld_otherfstname1 = some text here

ld_otherlastname1 = some text here

ld_othername2type = some text here

ld_otherfstname2 = some text here

ld_otherlastname2 = some text here

ld_coname = some text here

ld_addressline1 = some text here

ld_addressline2 = some text here

ld_addressline3 = some text here

ld_districtcode = some text here

ld_areacode = some text here

ld_countrycode = some text here

ld_contact1type = some text here

ld_contact1number = some text here

ld_contact2type = some text here

ld_contact2number = some text here

ld_contact3type = some text here

ld_contact3number = some text here

ld_contact4type = some text here

ld_contact4number = some text here

ld_contact5type = some text here

ld_contact5number = some text here

ld_contact6type = some text here

ld_contact6number = some text here

ld_referemployeenumber = some text here

ld_employeraddress = some text here

ld_nocommit = some text here

SAP Documentation for FM BAPI_FAMILYHK_CREATESUCCESSOR


You can use this method to create a Family/Related Person record (0021 and 0344) for an employee in Hong kong. ...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_FAMILYHK_CREATESUCCESSOR or its description.