SAP Function Modules

BBP_CHANGE_ORGANIZATION SAP Function module - SAP-GP. Ändern Organisation







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

Associated Function Group: BBP_PARTNER_MAINT
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM BBP_CHANGE_ORGANIZATION - BBP CHANGE ORGANIZATION





CALL FUNCTION 'BBP_CHANGE_ORGANIZATION' "SAP-GP. Ändern Organisation
  EXPORTING
    iv_partner =                " bu_partner    Geschäftspartnernummer der zu ändernden Organisation
*   is_data =                   " bapibus1006_central  Zentrale Daten, Geschäftsparter-Typ unabhängig
*   is_data_x =                 " bapibus1006_central_x  Änderungsinfo zu Zentrale Daten, Geschäftsparter-Typ unabhängig
*   is_data_organ =             " bapibus1006_central_organ  Zentrale Daten, Organisations spezifisch
*   is_data_organ_x =           " bapibus1006_central_organ_x  Änderungsinfo zu Zentrale Daten, Organisations spezifisch
*   is_address =                " bapibus1006_address  Adresse zur Organisation
*   is_address_x =              " bapibus1006_address_x  Änderungsinfo zu Adresse zur Organisation
*   is_frg0010_ins =            " bbpt_bus_frg0010  Geschäftspartner (Flags), neue Einträge
*   is_frg0010_chg =            " bbpt_bus_frg0010  Geschäftspartner (Flags), geändetre Einträge
*   is_frg0030_del =            " bbpt_bus_frg0030  Zu löschendes Qualitätsmanagementsystem
*   is_frg0030_chg =            " bbpt_bus_frg0030  Zu änderndes Qualitätsmanagementsystem
*   iv_sendmedium_chg =         " bbp_metype    Zu änderndes Sendemedium (ohne Einkaufs.-Org-Bezug)
*   iv_xxs_check = SPACE        " xfeld         'X' bedeutet dass XXS-Überprüfung laufen soll
*   iv_no_commit = SPACE        " xfeld         Bei IV_NO_COMMIT = 'X' wird vom Baustein kein COMMIT WROK ausgelöst
*   iv_release = SPACE          " xfeld         Nur für ROS: Lieferant freigeben
*   is_central_customer_ext =   " bupa_centr_cust_ext  EEW Extension of BUT000
*   is_central_customer_ext_x =   " bupa_centr_cust_ext_x  SAP BP: BAPI Structure for EEW Data; Update Toolbar
*   iv_subnode =                " objektid      Object ID
*   iv_assign_bp_to_vg = SPACE  " xfeld         Assign BP to VG
* TABLES
*   it_adtel =                  " bapiadtel     Telefonnummern der Organisation
*   it_adtel_x =                " bapiadtelx    Änderungsinfo zu Telefonnummern der Organisation
*   it_adfax =                  " bapiadfax     Faxnummern der Organisation
*   it_adfax_x =                " bapiadfaxx    Änderungsinfo zu Faxnummern der Organisation
*   it_adsmtp =                 " bapiadsmtp    Email-Adressen der Organisation
*   it_adsmtp_x =               " bapiadsmtx    Änderungsinfo zu Email-Adressen der Organisation
*   it_aduri =                  " bapiaduri     URI-Adressen der Organisation
*   it_aduri_x =                " bapiadurix    Änderungsinfo zu URI-Adressen der Organisation
*   it_roles_del =              " bbps_bupa_roles  Zu löschende Rollen/Rollentypen
*   it_roles_ins =              " bbps_bupa_roles  Hinzuzufügende Rollen/Rollentypen
*   it_industries_del =         " bapibus1006_industrysector  Zu löschende Branchen
*   it_industries_ins =         " bapibus1006_industrysector  Einzufügende Branchen
*   it_identification_del =     " but0id        Zu löschende Identifikationsnummern
*   it_identification_ins =     " but0id        Einzufügende Identifikationsnummern
*   it_taxnum_del =             " dfkkbptaxnum  Zu löschende Steuernummern
*   it_taxnum_ins =             " dfkkbptaxnum  Einzufügende Steuernummern
*   it_taxclass_del =           " bapibus1006_tax_class  Zu löschende Steuerklassifikation
*   it_taxclass_ins =           " bapibus1006_tax_class  Einzufügende Steuerklassifikation
*   it_banks =                  " bapibus1006_bankdetails  Bankdaten der Organisation
*   it_bank_x =                 " bapibus1006_bankdetail_x  Änderungsinfo zu Bankdaten der Organisation
*   it_relations_chg =          " but050        Zu ändernde Beziehungen
*   it_relations_del =          " but050        Zu löschende Beziehungen
*   it_relations_ins =          " but050        Einzufügende Beziehungen
*   it_frg0061_chg =            " bbpm_but_frg0061  Update auf Einkaufsdaten
*   it_frg0061_del =            " bbpm_but_frg0061  Delete auf Einkaufsdaten
*   it_frg0061_ins =            " bbpm_but_frg0061  Insert auf Einkaufsdaten
*   it_frg0040_del =            " bbpt_bus_frg0040  Delete auf Einkäuferkarten
*   it_frg0040_ins =            " bbpt_bus_frg0040  Insert auf Einkäuferkarten
*   it_frg0030_del =            " bbpt_bus_frg0030  Delete auf QM-Systeme
*   it_frg0030_ins =            " bbpt_bus_frg0030  Insert auf QM-Systeme
*   it_frg0020_del =            " bbpt_bus_frg0020  Delete auf Bieter-Status
*   it_frg0020_ins =            " bbpt_bus_frg0020  Insert auf Bieter-Status
*   it_bidcc_del =              " bidcc         Delete auf Kategorien
*   it_bidcc_ins =              " bidcc         Insert auf Kategorien
*   it_venmap_ins =             " venmap        Delete auf Lieferanten-Mapping
*   it_venmap_del =             " venmap        Insert auf Lieferanten-Mapping
*   it_locmap_ins =             " bbp_locmap    Delete auf Standort-Mapping
*   it_locmap_del =             " bbp_locmap    Insert auf Standort-Mapping
*   it_sendmedium_del =         " bbpt_sendmedium  Zu Löschend: Sendemedium am Partner
*   it_sendmedium_ins =         " bbpt_sendmedium  Einzufügen: Sendemedium am Partner
*   et_return =                 " bapiret2      Error/Messages Return Struktur
  EXCEPTIONS
    COMPANY_NOT_VALID = 1       "               Der in IV_PARTNER übergebene Wert ist nicht gültig
    PARTNER_TYPE_NOT_VALID = 2  "               Der in IV_PARTNER übergebene Geschäftspartner ist keine Organisation
    ERROR_MESSAGE_PASSED = 3    "               Message liegt in RETURN Struktur vor
    ERROR_CHANGING_ORG_NAMES = 4  "             Fehler beim Ändern der Namen der zugeordneten Organisationseinheit
    ERROR_READING_ADDRESS = 5   "               Fehler beim Lesen der Adresse zur Organisation
    ERROR_CHANGING_ORG_ADDRESS = 6  "           Fehler beim Ändern der Adresse der zugeordneten Organisationseinheit
    ERROR_CHANGING_TAXINFO = 7  "               Fehler beim Ändern von Steuernummer/klassifikation
    ERROR_CHANGING_VEN_MAPPING = 8  "           Fehler beim Ändern des Lieferanten-Mappings
    INCONSISTENT_BANK_CHANGEINFO = 9  "         Die Angaben in IT_BANKS und IT_BANK_X passen nicht zueinander
    ERROR_LINKING_BUPA_TO_ORGUNIT = 10  "       Error in FM HR_OBJECTBUPA_INSERT
    .  "  BBP_CHANGE_ORGANIZATION

ABAP code example for Function Module BBP_CHANGE_ORGANIZATION





The ABAP code below is a full code listing to execute function module BBP_CHANGE_ORGANIZATION 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:
it_it_adtel  TYPE STANDARD TABLE OF BAPIADTEL,"TABLES PARAM
wa_it_adtel  LIKE LINE OF it_it_adtel ,
it_it_adtel_x  TYPE STANDARD TABLE OF BAPIADTELX,"TABLES PARAM
wa_it_adtel_x  LIKE LINE OF it_it_adtel_x ,
it_it_adfax  TYPE STANDARD TABLE OF BAPIADFAX,"TABLES PARAM
wa_it_adfax  LIKE LINE OF it_it_adfax ,
it_it_adfax_x  TYPE STANDARD TABLE OF BAPIADFAXX,"TABLES PARAM
wa_it_adfax_x  LIKE LINE OF it_it_adfax_x ,
it_it_adsmtp  TYPE STANDARD TABLE OF BAPIADSMTP,"TABLES PARAM
wa_it_adsmtp  LIKE LINE OF it_it_adsmtp ,
it_it_adsmtp_x  TYPE STANDARD TABLE OF BAPIADSMTX,"TABLES PARAM
wa_it_adsmtp_x  LIKE LINE OF it_it_adsmtp_x ,
it_it_aduri  TYPE STANDARD TABLE OF BAPIADURI,"TABLES PARAM
wa_it_aduri  LIKE LINE OF it_it_aduri ,
it_it_aduri_x  TYPE STANDARD TABLE OF BAPIADURIX,"TABLES PARAM
wa_it_aduri_x  LIKE LINE OF it_it_aduri_x ,
it_it_roles_del  TYPE STANDARD TABLE OF BBPS_BUPA_ROLES,"TABLES PARAM
wa_it_roles_del  LIKE LINE OF it_it_roles_del ,
it_it_roles_ins  TYPE STANDARD TABLE OF BBPS_BUPA_ROLES,"TABLES PARAM
wa_it_roles_ins  LIKE LINE OF it_it_roles_ins ,
it_it_industries_del  TYPE STANDARD TABLE OF BAPIBUS1006_INDUSTRYSECTOR,"TABLES PARAM
wa_it_industries_del  LIKE LINE OF it_it_industries_del ,
it_it_industries_ins  TYPE STANDARD TABLE OF BAPIBUS1006_INDUSTRYSECTOR,"TABLES PARAM
wa_it_industries_ins  LIKE LINE OF it_it_industries_ins ,
it_it_identification_del  TYPE STANDARD TABLE OF BUT0ID,"TABLES PARAM
wa_it_identification_del  LIKE LINE OF it_it_identification_del ,
it_it_identification_ins  TYPE STANDARD TABLE OF BUT0ID,"TABLES PARAM
wa_it_identification_ins  LIKE LINE OF it_it_identification_ins ,
it_it_taxnum_del  TYPE STANDARD TABLE OF DFKKBPTAXNUM,"TABLES PARAM
wa_it_taxnum_del  LIKE LINE OF it_it_taxnum_del ,
it_it_taxnum_ins  TYPE STANDARD TABLE OF DFKKBPTAXNUM,"TABLES PARAM
wa_it_taxnum_ins  LIKE LINE OF it_it_taxnum_ins ,
it_it_taxclass_del  TYPE STANDARD TABLE OF BAPIBUS1006_TAX_CLASS,"TABLES PARAM
wa_it_taxclass_del  LIKE LINE OF it_it_taxclass_del ,
it_it_taxclass_ins  TYPE STANDARD TABLE OF BAPIBUS1006_TAX_CLASS,"TABLES PARAM
wa_it_taxclass_ins  LIKE LINE OF it_it_taxclass_ins ,
it_it_banks  TYPE STANDARD TABLE OF BAPIBUS1006_BANKDETAILS,"TABLES PARAM
wa_it_banks  LIKE LINE OF it_it_banks ,
it_it_bank_x  TYPE STANDARD TABLE OF BAPIBUS1006_BANKDETAIL_X,"TABLES PARAM
wa_it_bank_x  LIKE LINE OF it_it_bank_x ,
it_it_relations_chg  TYPE STANDARD TABLE OF BUT050,"TABLES PARAM
wa_it_relations_chg  LIKE LINE OF it_it_relations_chg ,
it_it_relations_del  TYPE STANDARD TABLE OF BUT050,"TABLES PARAM
wa_it_relations_del  LIKE LINE OF it_it_relations_del ,
it_it_relations_ins  TYPE STANDARD TABLE OF BUT050,"TABLES PARAM
wa_it_relations_ins  LIKE LINE OF it_it_relations_ins ,
it_it_frg0061_chg  TYPE STANDARD TABLE OF BBPM_BUT_FRG0061,"TABLES PARAM
wa_it_frg0061_chg  LIKE LINE OF it_it_frg0061_chg ,
it_it_frg0061_del  TYPE STANDARD TABLE OF BBPM_BUT_FRG0061,"TABLES PARAM
wa_it_frg0061_del  LIKE LINE OF it_it_frg0061_del ,
it_it_frg0061_ins  TYPE STANDARD TABLE OF BBPM_BUT_FRG0061,"TABLES PARAM
wa_it_frg0061_ins  LIKE LINE OF it_it_frg0061_ins ,
it_it_frg0040_del  TYPE STANDARD TABLE OF BBPT_BUS_FRG0040,"TABLES PARAM
wa_it_frg0040_del  LIKE LINE OF it_it_frg0040_del ,
it_it_frg0040_ins  TYPE STANDARD TABLE OF BBPT_BUS_FRG0040,"TABLES PARAM
wa_it_frg0040_ins  LIKE LINE OF it_it_frg0040_ins ,
it_it_frg0030_del  TYPE STANDARD TABLE OF BBPT_BUS_FRG0030,"TABLES PARAM
wa_it_frg0030_del  LIKE LINE OF it_it_frg0030_del ,
it_it_frg0030_ins  TYPE STANDARD TABLE OF BBPT_BUS_FRG0030,"TABLES PARAM
wa_it_frg0030_ins  LIKE LINE OF it_it_frg0030_ins ,
it_it_frg0020_del  TYPE STANDARD TABLE OF BBPT_BUS_FRG0020,"TABLES PARAM
wa_it_frg0020_del  LIKE LINE OF it_it_frg0020_del ,
it_it_frg0020_ins  TYPE STANDARD TABLE OF BBPT_BUS_FRG0020,"TABLES PARAM
wa_it_frg0020_ins  LIKE LINE OF it_it_frg0020_ins ,
it_it_bidcc_del  TYPE STANDARD TABLE OF BIDCC,"TABLES PARAM
wa_it_bidcc_del  LIKE LINE OF it_it_bidcc_del ,
it_it_bidcc_ins  TYPE STANDARD TABLE OF BIDCC,"TABLES PARAM
wa_it_bidcc_ins  LIKE LINE OF it_it_bidcc_ins ,
it_it_venmap_ins  TYPE STANDARD TABLE OF VENMAP,"TABLES PARAM
wa_it_venmap_ins  LIKE LINE OF it_it_venmap_ins ,
it_it_venmap_del  TYPE STANDARD TABLE OF VENMAP,"TABLES PARAM
wa_it_venmap_del  LIKE LINE OF it_it_venmap_del ,
it_it_locmap_ins  TYPE STANDARD TABLE OF BBP_LOCMAP,"TABLES PARAM
wa_it_locmap_ins  LIKE LINE OF it_it_locmap_ins ,
it_it_locmap_del  TYPE STANDARD TABLE OF BBP_LOCMAP,"TABLES PARAM
wa_it_locmap_del  LIKE LINE OF it_it_locmap_del ,
it_it_sendmedium_del  TYPE STANDARD TABLE OF BBPT_SENDMEDIUM,"TABLES PARAM
wa_it_sendmedium_del  LIKE LINE OF it_it_sendmedium_del ,
it_it_sendmedium_ins  TYPE STANDARD TABLE OF BBPT_SENDMEDIUM,"TABLES PARAM
wa_it_sendmedium_ins  LIKE LINE OF it_it_sendmedium_ins ,
it_et_return  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_et_return  LIKE LINE OF it_et_return .

DATA(ld_iv_partner) = 'Check type of data required'.
DATA(ld_is_data) = 'Check type of data required'.
DATA(ld_is_data_x) = 'Check type of data required'.
DATA(ld_is_data_organ) = 'Check type of data required'.
DATA(ld_is_data_organ_x) = 'Check type of data required'.
DATA(ld_is_address) = 'Check type of data required'.
DATA(ld_is_address_x) = 'Check type of data required'.
DATA(ld_is_frg0010_ins) = 'Check type of data required'.
DATA(ld_is_frg0010_chg) = 'Check type of data required'.
DATA(ld_is_frg0030_del) = 'Check type of data required'.
DATA(ld_is_frg0030_chg) = 'Check type of data required'.
DATA(ld_iv_sendmedium_chg) = 'Check type of data required'.
DATA(ld_iv_xxs_check) = 'Check type of data required'.
DATA(ld_iv_no_commit) = 'Check type of data required'.
DATA(ld_iv_release) = 'Check type of data required'.
DATA(ld_is_central_customer_ext) = 'Check type of data required'.
DATA(ld_is_central_customer_ext_x) = 'Check type of data required'.
DATA(ld_iv_subnode) = 'Check type of data required'.
DATA(ld_iv_assign_bp_to_vg) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_adtel to it_it_adtel.

"populate fields of struture and append to itab
append wa_it_adtel_x to it_it_adtel_x.

"populate fields of struture and append to itab
append wa_it_adfax to it_it_adfax.

"populate fields of struture and append to itab
append wa_it_adfax_x to it_it_adfax_x.

"populate fields of struture and append to itab
append wa_it_adsmtp to it_it_adsmtp.

"populate fields of struture and append to itab
append wa_it_adsmtp_x to it_it_adsmtp_x.

"populate fields of struture and append to itab
append wa_it_aduri to it_it_aduri.

"populate fields of struture and append to itab
append wa_it_aduri_x to it_it_aduri_x.

"populate fields of struture and append to itab
append wa_it_roles_del to it_it_roles_del.

"populate fields of struture and append to itab
append wa_it_roles_ins to it_it_roles_ins.

"populate fields of struture and append to itab
append wa_it_industries_del to it_it_industries_del.

"populate fields of struture and append to itab
append wa_it_industries_ins to it_it_industries_ins.

"populate fields of struture and append to itab
append wa_it_identification_del to it_it_identification_del.

"populate fields of struture and append to itab
append wa_it_identification_ins to it_it_identification_ins.

"populate fields of struture and append to itab
append wa_it_taxnum_del to it_it_taxnum_del.

"populate fields of struture and append to itab
append wa_it_taxnum_ins to it_it_taxnum_ins.

"populate fields of struture and append to itab
append wa_it_taxclass_del to it_it_taxclass_del.

"populate fields of struture and append to itab
append wa_it_taxclass_ins to it_it_taxclass_ins.

"populate fields of struture and append to itab
append wa_it_banks to it_it_banks.

"populate fields of struture and append to itab
append wa_it_bank_x to it_it_bank_x.

"populate fields of struture and append to itab
append wa_it_relations_chg to it_it_relations_chg.

"populate fields of struture and append to itab
append wa_it_relations_del to it_it_relations_del.

"populate fields of struture and append to itab
append wa_it_relations_ins to it_it_relations_ins.

"populate fields of struture and append to itab
append wa_it_frg0061_chg to it_it_frg0061_chg.

"populate fields of struture and append to itab
append wa_it_frg0061_del to it_it_frg0061_del.

"populate fields of struture and append to itab
append wa_it_frg0061_ins to it_it_frg0061_ins.

"populate fields of struture and append to itab
append wa_it_frg0040_del to it_it_frg0040_del.

"populate fields of struture and append to itab
append wa_it_frg0040_ins to it_it_frg0040_ins.

"populate fields of struture and append to itab
append wa_it_frg0030_del to it_it_frg0030_del.

"populate fields of struture and append to itab
append wa_it_frg0030_ins to it_it_frg0030_ins.

"populate fields of struture and append to itab
append wa_it_frg0020_del to it_it_frg0020_del.

"populate fields of struture and append to itab
append wa_it_frg0020_ins to it_it_frg0020_ins.

"populate fields of struture and append to itab
append wa_it_bidcc_del to it_it_bidcc_del.

"populate fields of struture and append to itab
append wa_it_bidcc_ins to it_it_bidcc_ins.

"populate fields of struture and append to itab
append wa_it_venmap_ins to it_it_venmap_ins.

"populate fields of struture and append to itab
append wa_it_venmap_del to it_it_venmap_del.

"populate fields of struture and append to itab
append wa_it_locmap_ins to it_it_locmap_ins.

"populate fields of struture and append to itab
append wa_it_locmap_del to it_it_locmap_del.

"populate fields of struture and append to itab
append wa_it_sendmedium_del to it_it_sendmedium_del.

"populate fields of struture and append to itab
append wa_it_sendmedium_ins to it_it_sendmedium_ins.

"populate fields of struture and append to itab
append wa_et_return to it_et_return. . CALL FUNCTION 'BBP_CHANGE_ORGANIZATION' EXPORTING iv_partner = ld_iv_partner * is_data = ld_is_data * is_data_x = ld_is_data_x * is_data_organ = ld_is_data_organ * is_data_organ_x = ld_is_data_organ_x * is_address = ld_is_address * is_address_x = ld_is_address_x * is_frg0010_ins = ld_is_frg0010_ins * is_frg0010_chg = ld_is_frg0010_chg * is_frg0030_del = ld_is_frg0030_del * is_frg0030_chg = ld_is_frg0030_chg * iv_sendmedium_chg = ld_iv_sendmedium_chg * iv_xxs_check = ld_iv_xxs_check * iv_no_commit = ld_iv_no_commit * iv_release = ld_iv_release * is_central_customer_ext = ld_is_central_customer_ext * is_central_customer_ext_x = ld_is_central_customer_ext_x * iv_subnode = ld_iv_subnode * iv_assign_bp_to_vg = ld_iv_assign_bp_to_vg * TABLES * it_adtel = it_it_adtel * it_adtel_x = it_it_adtel_x * it_adfax = it_it_adfax * it_adfax_x = it_it_adfax_x * it_adsmtp = it_it_adsmtp * it_adsmtp_x = it_it_adsmtp_x * it_aduri = it_it_aduri * it_aduri_x = it_it_aduri_x * it_roles_del = it_it_roles_del * it_roles_ins = it_it_roles_ins * it_industries_del = it_it_industries_del * it_industries_ins = it_it_industries_ins * it_identification_del = it_it_identification_del * it_identification_ins = it_it_identification_ins * it_taxnum_del = it_it_taxnum_del * it_taxnum_ins = it_it_taxnum_ins * it_taxclass_del = it_it_taxclass_del * it_taxclass_ins = it_it_taxclass_ins * it_banks = it_it_banks * it_bank_x = it_it_bank_x * it_relations_chg = it_it_relations_chg * it_relations_del = it_it_relations_del * it_relations_ins = it_it_relations_ins * it_frg0061_chg = it_it_frg0061_chg * it_frg0061_del = it_it_frg0061_del * it_frg0061_ins = it_it_frg0061_ins * it_frg0040_del = it_it_frg0040_del * it_frg0040_ins = it_it_frg0040_ins * it_frg0030_del = it_it_frg0030_del * it_frg0030_ins = it_it_frg0030_ins * it_frg0020_del = it_it_frg0020_del * it_frg0020_ins = it_it_frg0020_ins * it_bidcc_del = it_it_bidcc_del * it_bidcc_ins = it_it_bidcc_ins * it_venmap_ins = it_it_venmap_ins * it_venmap_del = it_it_venmap_del * it_locmap_ins = it_it_locmap_ins * it_locmap_del = it_it_locmap_del * it_sendmedium_del = it_it_sendmedium_del * it_sendmedium_ins = it_it_sendmedium_ins * et_return = it_et_return EXCEPTIONS COMPANY_NOT_VALID = 1 PARTNER_TYPE_NOT_VALID = 2 ERROR_MESSAGE_PASSED = 3 ERROR_CHANGING_ORG_NAMES = 4 ERROR_READING_ADDRESS = 5 ERROR_CHANGING_ORG_ADDRESS = 6 ERROR_CHANGING_TAXINFO = 7 ERROR_CHANGING_VEN_MAPPING = 8 INCONSISTENT_BANK_CHANGEINFO = 9 ERROR_LINKING_BUPA_TO_ORGUNIT = 10 . " BBP_CHANGE_ORGANIZATION
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 10. "Exception "Add code for exception here 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:
it_it_adtel  TYPE STANDARD TABLE OF BAPIADTEL ,
wa_it_adtel  LIKE LINE OF it_it_adtel,
ld_iv_partner  TYPE BU_PARTNER ,
it_it_adtel_x  TYPE STANDARD TABLE OF BAPIADTELX ,
wa_it_adtel_x  LIKE LINE OF it_it_adtel_x,
ld_is_data  TYPE BAPIBUS1006_CENTRAL ,
ld_is_data_x  TYPE BAPIBUS1006_CENTRAL_X ,
it_it_adfax  TYPE STANDARD TABLE OF BAPIADFAX ,
wa_it_adfax  LIKE LINE OF it_it_adfax,
ld_is_data_organ  TYPE BAPIBUS1006_CENTRAL_ORGAN ,
it_it_adfax_x  TYPE STANDARD TABLE OF BAPIADFAXX ,
wa_it_adfax_x  LIKE LINE OF it_it_adfax_x,
it_it_adsmtp  TYPE STANDARD TABLE OF BAPIADSMTP ,
wa_it_adsmtp  LIKE LINE OF it_it_adsmtp,
ld_is_data_organ_x  TYPE BAPIBUS1006_CENTRAL_ORGAN_X ,
it_it_adsmtp_x  TYPE STANDARD TABLE OF BAPIADSMTX ,
wa_it_adsmtp_x  LIKE LINE OF it_it_adsmtp_x,
ld_is_address  TYPE BAPIBUS1006_ADDRESS ,
ld_is_address_x  TYPE BAPIBUS1006_ADDRESS_X ,
it_it_aduri  TYPE STANDARD TABLE OF BAPIADURI ,
wa_it_aduri  LIKE LINE OF it_it_aduri,
it_it_aduri_x  TYPE STANDARD TABLE OF BAPIADURIX ,
wa_it_aduri_x  LIKE LINE OF it_it_aduri_x,
ld_is_frg0010_ins  TYPE BBPT_BUS_FRG0010 ,
it_it_roles_del  TYPE STANDARD TABLE OF BBPS_BUPA_ROLES ,
wa_it_roles_del  LIKE LINE OF it_it_roles_del,
ld_is_frg0010_chg  TYPE BBPT_BUS_FRG0010 ,
it_it_roles_ins  TYPE STANDARD TABLE OF BBPS_BUPA_ROLES ,
wa_it_roles_ins  LIKE LINE OF it_it_roles_ins,
ld_is_frg0030_del  TYPE BBPT_BUS_FRG0030 ,
ld_is_frg0030_chg  TYPE BBPT_BUS_FRG0030 ,
it_it_industries_del  TYPE STANDARD TABLE OF BAPIBUS1006_INDUSTRYSECTOR ,
wa_it_industries_del  LIKE LINE OF it_it_industries_del,
ld_iv_sendmedium_chg  TYPE BBP_METYPE ,
it_it_industries_ins  TYPE STANDARD TABLE OF BAPIBUS1006_INDUSTRYSECTOR ,
wa_it_industries_ins  LIKE LINE OF it_it_industries_ins,
it_it_identification_del  TYPE STANDARD TABLE OF BUT0ID ,
wa_it_identification_del  LIKE LINE OF it_it_identification_del,
ld_iv_xxs_check  TYPE XFELD ,
it_it_identification_ins  TYPE STANDARD TABLE OF BUT0ID ,
wa_it_identification_ins  LIKE LINE OF it_it_identification_ins,
ld_iv_no_commit  TYPE XFELD ,
it_it_taxnum_del  TYPE STANDARD TABLE OF DFKKBPTAXNUM ,
wa_it_taxnum_del  LIKE LINE OF it_it_taxnum_del,
ld_iv_release  TYPE XFELD ,
ld_is_central_customer_ext  TYPE BUPA_CENTR_CUST_EXT ,
it_it_taxnum_ins  TYPE STANDARD TABLE OF DFKKBPTAXNUM ,
wa_it_taxnum_ins  LIKE LINE OF it_it_taxnum_ins,
ld_is_central_customer_ext_x  TYPE BUPA_CENTR_CUST_EXT_X ,
it_it_taxclass_del  TYPE STANDARD TABLE OF BAPIBUS1006_TAX_CLASS ,
wa_it_taxclass_del  LIKE LINE OF it_it_taxclass_del,
it_it_taxclass_ins  TYPE STANDARD TABLE OF BAPIBUS1006_TAX_CLASS ,
wa_it_taxclass_ins  LIKE LINE OF it_it_taxclass_ins,
ld_iv_subnode  TYPE OBJEKTID ,
it_it_banks  TYPE STANDARD TABLE OF BAPIBUS1006_BANKDETAILS ,
wa_it_banks  LIKE LINE OF it_it_banks,
ld_iv_assign_bp_to_vg  TYPE XFELD ,
it_it_bank_x  TYPE STANDARD TABLE OF BAPIBUS1006_BANKDETAIL_X ,
wa_it_bank_x  LIKE LINE OF it_it_bank_x,
it_it_relations_chg  TYPE STANDARD TABLE OF BUT050 ,
wa_it_relations_chg  LIKE LINE OF it_it_relations_chg,
it_it_relations_del  TYPE STANDARD TABLE OF BUT050 ,
wa_it_relations_del  LIKE LINE OF it_it_relations_del,
it_it_relations_ins  TYPE STANDARD TABLE OF BUT050 ,
wa_it_relations_ins  LIKE LINE OF it_it_relations_ins,
it_it_frg0061_chg  TYPE STANDARD TABLE OF BBPM_BUT_FRG0061 ,
wa_it_frg0061_chg  LIKE LINE OF it_it_frg0061_chg,
it_it_frg0061_del  TYPE STANDARD TABLE OF BBPM_BUT_FRG0061 ,
wa_it_frg0061_del  LIKE LINE OF it_it_frg0061_del,
it_it_frg0061_ins  TYPE STANDARD TABLE OF BBPM_BUT_FRG0061 ,
wa_it_frg0061_ins  LIKE LINE OF it_it_frg0061_ins,
it_it_frg0040_del  TYPE STANDARD TABLE OF BBPT_BUS_FRG0040 ,
wa_it_frg0040_del  LIKE LINE OF it_it_frg0040_del,
it_it_frg0040_ins  TYPE STANDARD TABLE OF BBPT_BUS_FRG0040 ,
wa_it_frg0040_ins  LIKE LINE OF it_it_frg0040_ins,
it_it_frg0030_del  TYPE STANDARD TABLE OF BBPT_BUS_FRG0030 ,
wa_it_frg0030_del  LIKE LINE OF it_it_frg0030_del,
it_it_frg0030_ins  TYPE STANDARD TABLE OF BBPT_BUS_FRG0030 ,
wa_it_frg0030_ins  LIKE LINE OF it_it_frg0030_ins,
it_it_frg0020_del  TYPE STANDARD TABLE OF BBPT_BUS_FRG0020 ,
wa_it_frg0020_del  LIKE LINE OF it_it_frg0020_del,
it_it_frg0020_ins  TYPE STANDARD TABLE OF BBPT_BUS_FRG0020 ,
wa_it_frg0020_ins  LIKE LINE OF it_it_frg0020_ins,
it_it_bidcc_del  TYPE STANDARD TABLE OF BIDCC ,
wa_it_bidcc_del  LIKE LINE OF it_it_bidcc_del,
it_it_bidcc_ins  TYPE STANDARD TABLE OF BIDCC ,
wa_it_bidcc_ins  LIKE LINE OF it_it_bidcc_ins,
it_it_venmap_ins  TYPE STANDARD TABLE OF VENMAP ,
wa_it_venmap_ins  LIKE LINE OF it_it_venmap_ins,
it_it_venmap_del  TYPE STANDARD TABLE OF VENMAP ,
wa_it_venmap_del  LIKE LINE OF it_it_venmap_del,
it_it_locmap_ins  TYPE STANDARD TABLE OF BBP_LOCMAP ,
wa_it_locmap_ins  LIKE LINE OF it_it_locmap_ins,
it_it_locmap_del  TYPE STANDARD TABLE OF BBP_LOCMAP ,
wa_it_locmap_del  LIKE LINE OF it_it_locmap_del,
it_it_sendmedium_del  TYPE STANDARD TABLE OF BBPT_SENDMEDIUM ,
wa_it_sendmedium_del  LIKE LINE OF it_it_sendmedium_del,
it_it_sendmedium_ins  TYPE STANDARD TABLE OF BBPT_SENDMEDIUM ,
wa_it_sendmedium_ins  LIKE LINE OF it_it_sendmedium_ins,
it_et_return  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_et_return  LIKE LINE OF it_et_return.


"populate fields of struture and append to itab
append wa_it_adtel to it_it_adtel.
ld_iv_partner = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_adtel_x to it_it_adtel_x.
ld_is_data = 'Check type of data required'.
ld_is_data_x = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_adfax to it_it_adfax.
ld_is_data_organ = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_adfax_x to it_it_adfax_x.

"populate fields of struture and append to itab
append wa_it_adsmtp to it_it_adsmtp.
ld_is_data_organ_x = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_adsmtp_x to it_it_adsmtp_x.
ld_is_address = 'Check type of data required'.
ld_is_address_x = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_aduri to it_it_aduri.

"populate fields of struture and append to itab
append wa_it_aduri_x to it_it_aduri_x.
ld_is_frg0010_ins = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_roles_del to it_it_roles_del.
ld_is_frg0010_chg = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_roles_ins to it_it_roles_ins.
ld_is_frg0030_del = 'Check type of data required'.
ld_is_frg0030_chg = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_industries_del to it_it_industries_del.
ld_iv_sendmedium_chg = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_industries_ins to it_it_industries_ins.

"populate fields of struture and append to itab
append wa_it_identification_del to it_it_identification_del.
ld_iv_xxs_check = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_identification_ins to it_it_identification_ins.
ld_iv_no_commit = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_taxnum_del to it_it_taxnum_del.
ld_iv_release = 'Check type of data required'.
ld_is_central_customer_ext = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_taxnum_ins to it_it_taxnum_ins.
ld_is_central_customer_ext_x = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_taxclass_del to it_it_taxclass_del.

"populate fields of struture and append to itab
append wa_it_taxclass_ins to it_it_taxclass_ins.
ld_iv_subnode = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_banks to it_it_banks.
ld_iv_assign_bp_to_vg = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_bank_x to it_it_bank_x.

"populate fields of struture and append to itab
append wa_it_relations_chg to it_it_relations_chg.

"populate fields of struture and append to itab
append wa_it_relations_del to it_it_relations_del.

"populate fields of struture and append to itab
append wa_it_relations_ins to it_it_relations_ins.

"populate fields of struture and append to itab
append wa_it_frg0061_chg to it_it_frg0061_chg.

"populate fields of struture and append to itab
append wa_it_frg0061_del to it_it_frg0061_del.

"populate fields of struture and append to itab
append wa_it_frg0061_ins to it_it_frg0061_ins.

"populate fields of struture and append to itab
append wa_it_frg0040_del to it_it_frg0040_del.

"populate fields of struture and append to itab
append wa_it_frg0040_ins to it_it_frg0040_ins.

"populate fields of struture and append to itab
append wa_it_frg0030_del to it_it_frg0030_del.

"populate fields of struture and append to itab
append wa_it_frg0030_ins to it_it_frg0030_ins.

"populate fields of struture and append to itab
append wa_it_frg0020_del to it_it_frg0020_del.

"populate fields of struture and append to itab
append wa_it_frg0020_ins to it_it_frg0020_ins.

"populate fields of struture and append to itab
append wa_it_bidcc_del to it_it_bidcc_del.

"populate fields of struture and append to itab
append wa_it_bidcc_ins to it_it_bidcc_ins.

"populate fields of struture and append to itab
append wa_it_venmap_ins to it_it_venmap_ins.

"populate fields of struture and append to itab
append wa_it_venmap_del to it_it_venmap_del.

"populate fields of struture and append to itab
append wa_it_locmap_ins to it_it_locmap_ins.

"populate fields of struture and append to itab
append wa_it_locmap_del to it_it_locmap_del.

"populate fields of struture and append to itab
append wa_it_sendmedium_del to it_it_sendmedium_del.

"populate fields of struture and append to itab
append wa_it_sendmedium_ins to it_it_sendmedium_ins.

"populate fields of struture and append to itab
append wa_et_return to it_et_return.

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 BBP_CHANGE_ORGANIZATION or its description.