SAP Function Modules

BBP_SUS_CM_ASSIGNMENT SAP Function module - Erzeugung Gutschrift aus Rechnung







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

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


Pattern for FM BBP_SUS_CM_ASSIGNMENT - BBP SUS CM ASSIGNMENT





CALL FUNCTION 'BBP_SUS_CM_ASSIGNMENT' "Erzeugung Gutschrift aus Rechnung
  EXPORTING
    iv_object_type =            " crmd_orderadm_h-object_type  Geschäftsvorgangstyp
*   iv_subtype =                " bbp_pds_header-subtype  Ausprägung eines Einkaufsbelegs (z.B. Gutschrift/Rechnung)
*   is_user_info =              " bbps_sel_user_info  Übergabe der User-Information an den Search-Screen
*   iv_no_quancheck =           " xfeld         Feld zum Ankreuzen
*   is_follow_up_doc_settings =   " bbps_sus_dev  SUS Deviation und Folgebelegserzeugungs-Einstellungen
  IMPORTING
    es_header =                 " bbp_pds_susinv_header_d  Schnittstelle Kopf-Daten Rückmeldung GetDetail-Fall
    et_attach =                 " bbpt_pds_att_t  KW-Anlagen inkl. Dokument
  TABLES
    it_selection =              " bbps_object_key  Schlüsselfelder für Lean- oder Backend-Dokument
*   it_doc_values_db =          " bbp_cfiv_doc_values_db  Struktur zum Merken der Dokumentwerte auf der Datenbank
*   it_item_po =                " bbpt_pd_suspo_ui_item_d  SRM-SUS: Table type for PO items
*   et_item =                   " bbp_pds_susinv_item_d  Schnittstelle Positions-Daten Rückmeldung GetDetail-Fall
*   et_partner =                " bbp_pds_partner  Geschäftspartner
*   et_longtext =               " bbp_pds_longtext  Langtexte zum Procurement Document
*   et_limit =                  " bbp_pds_limit  Wertlimit
*   et_status =                 " bbp_pds_status_sus  Status
*   et_freight =                " bbp_pds_freight  Frachtkosten
*   et_tax =                    " bbp_pds_tax   Steuern
*   et_actual_values =          " bbp_pds_actval  Ist-Werte und Mengen
*   et_messages =               " bbp_pds_messages  Fehlermeldungen zu einer PD-Methode
*   et_hcf =                    " bbp_pds_hcf_suspo  Tabellenartige Kunden- und Solutionfelder am SUS Bestellkopf
*   et_icf =                    " bbp_pds_icf_suspo  Tab. Kunden- und Solutionfelder an der SUS Bestellposition
    .  "  BBP_SUS_CM_ASSIGNMENT

ABAP code example for Function Module BBP_SUS_CM_ASSIGNMENT





The ABAP code below is a full code listing to execute function module BBP_SUS_CM_ASSIGNMENT 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_es_header  TYPE BBP_PDS_SUSINV_HEADER_D ,
ld_et_attach  TYPE BBPT_PDS_ATT_T ,
it_it_selection  TYPE STANDARD TABLE OF BBPS_OBJECT_KEY,"TABLES PARAM
wa_it_selection  LIKE LINE OF it_it_selection ,
it_it_doc_values_db  TYPE STANDARD TABLE OF BBP_CFIV_DOC_VALUES_DB,"TABLES PARAM
wa_it_doc_values_db  LIKE LINE OF it_it_doc_values_db ,
it_it_item_po  TYPE STANDARD TABLE OF BBPT_PD_SUSPO_UI_ITEM_D,"TABLES PARAM
wa_it_item_po  LIKE LINE OF it_it_item_po ,
it_et_item  TYPE STANDARD TABLE OF BBP_PDS_SUSINV_ITEM_D,"TABLES PARAM
wa_et_item  LIKE LINE OF it_et_item ,
it_et_partner  TYPE STANDARD TABLE OF BBP_PDS_PARTNER,"TABLES PARAM
wa_et_partner  LIKE LINE OF it_et_partner ,
it_et_longtext  TYPE STANDARD TABLE OF BBP_PDS_LONGTEXT,"TABLES PARAM
wa_et_longtext  LIKE LINE OF it_et_longtext ,
it_et_limit  TYPE STANDARD TABLE OF BBP_PDS_LIMIT,"TABLES PARAM
wa_et_limit  LIKE LINE OF it_et_limit ,
it_et_status  TYPE STANDARD TABLE OF BBP_PDS_STATUS_SUS,"TABLES PARAM
wa_et_status  LIKE LINE OF it_et_status ,
it_et_freight  TYPE STANDARD TABLE OF BBP_PDS_FREIGHT,"TABLES PARAM
wa_et_freight  LIKE LINE OF it_et_freight ,
it_et_tax  TYPE STANDARD TABLE OF BBP_PDS_TAX,"TABLES PARAM
wa_et_tax  LIKE LINE OF it_et_tax ,
it_et_actual_values  TYPE STANDARD TABLE OF BBP_PDS_ACTVAL,"TABLES PARAM
wa_et_actual_values  LIKE LINE OF it_et_actual_values ,
it_et_messages  TYPE STANDARD TABLE OF BBP_PDS_MESSAGES,"TABLES PARAM
wa_et_messages  LIKE LINE OF it_et_messages ,
it_et_hcf  TYPE STANDARD TABLE OF BBP_PDS_HCF_SUSPO,"TABLES PARAM
wa_et_hcf  LIKE LINE OF it_et_hcf ,
it_et_icf  TYPE STANDARD TABLE OF BBP_PDS_ICF_SUSPO,"TABLES PARAM
wa_et_icf  LIKE LINE OF it_et_icf .


SELECT single OBJECT_TYPE
FROM CRMD_ORDERADM_H
INTO @DATA(ld_iv_object_type).


DATA(ld_iv_subtype) = some text here
DATA(ld_is_user_info) = 'Check type of data required'.
DATA(ld_iv_no_quancheck) = 'Check type of data required'.
DATA(ld_is_follow_up_doc_settings) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_selection to it_it_selection.

"populate fields of struture and append to itab
append wa_it_doc_values_db to it_it_doc_values_db.

"populate fields of struture and append to itab
append wa_it_item_po to it_it_item_po.

"populate fields of struture and append to itab
append wa_et_item to it_et_item.

"populate fields of struture and append to itab
append wa_et_partner to it_et_partner.

"populate fields of struture and append to itab
append wa_et_longtext to it_et_longtext.

"populate fields of struture and append to itab
append wa_et_limit to it_et_limit.

"populate fields of struture and append to itab
append wa_et_status to it_et_status.

"populate fields of struture and append to itab
append wa_et_freight to it_et_freight.

"populate fields of struture and append to itab
append wa_et_tax to it_et_tax.

"populate fields of struture and append to itab
append wa_et_actual_values to it_et_actual_values.

"populate fields of struture and append to itab
append wa_et_messages to it_et_messages.

"populate fields of struture and append to itab
append wa_et_hcf to it_et_hcf.

"populate fields of struture and append to itab
append wa_et_icf to it_et_icf. . CALL FUNCTION 'BBP_SUS_CM_ASSIGNMENT' EXPORTING iv_object_type = ld_iv_object_type * iv_subtype = ld_iv_subtype * is_user_info = ld_is_user_info * iv_no_quancheck = ld_iv_no_quancheck * is_follow_up_doc_settings = ld_is_follow_up_doc_settings IMPORTING es_header = ld_es_header et_attach = ld_et_attach TABLES it_selection = it_it_selection * it_doc_values_db = it_it_doc_values_db * it_item_po = it_it_item_po * et_item = it_et_item * et_partner = it_et_partner * et_longtext = it_et_longtext * et_limit = it_et_limit * et_status = it_et_status * et_freight = it_et_freight * et_tax = it_et_tax * et_actual_values = it_et_actual_values * et_messages = it_et_messages * et_hcf = it_et_hcf * et_icf = it_et_icf . " BBP_SUS_CM_ASSIGNMENT
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_es_header  TYPE BBP_PDS_SUSINV_HEADER_D ,
ld_iv_object_type  TYPE CRMD_ORDERADM_H-OBJECT_TYPE ,
it_it_selection  TYPE STANDARD TABLE OF BBPS_OBJECT_KEY ,
wa_it_selection  LIKE LINE OF it_it_selection,
ld_et_attach  TYPE BBPT_PDS_ATT_T ,
ld_iv_subtype  TYPE BBP_PDS_HEADER-SUBTYPE ,
it_it_doc_values_db  TYPE STANDARD TABLE OF BBP_CFIV_DOC_VALUES_DB ,
wa_it_doc_values_db  LIKE LINE OF it_it_doc_values_db,
ld_is_user_info  TYPE BBPS_SEL_USER_INFO ,
it_it_item_po  TYPE STANDARD TABLE OF BBPT_PD_SUSPO_UI_ITEM_D ,
wa_it_item_po  LIKE LINE OF it_it_item_po,
ld_iv_no_quancheck  TYPE XFELD ,
it_et_item  TYPE STANDARD TABLE OF BBP_PDS_SUSINV_ITEM_D ,
wa_et_item  LIKE LINE OF it_et_item,
ld_is_follow_up_doc_settings  TYPE BBPS_SUS_DEV ,
it_et_partner  TYPE STANDARD TABLE OF BBP_PDS_PARTNER ,
wa_et_partner  LIKE LINE OF it_et_partner,
it_et_longtext  TYPE STANDARD TABLE OF BBP_PDS_LONGTEXT ,
wa_et_longtext  LIKE LINE OF it_et_longtext,
it_et_limit  TYPE STANDARD TABLE OF BBP_PDS_LIMIT ,
wa_et_limit  LIKE LINE OF it_et_limit,
it_et_status  TYPE STANDARD TABLE OF BBP_PDS_STATUS_SUS ,
wa_et_status  LIKE LINE OF it_et_status,
it_et_freight  TYPE STANDARD TABLE OF BBP_PDS_FREIGHT ,
wa_et_freight  LIKE LINE OF it_et_freight,
it_et_tax  TYPE STANDARD TABLE OF BBP_PDS_TAX ,
wa_et_tax  LIKE LINE OF it_et_tax,
it_et_actual_values  TYPE STANDARD TABLE OF BBP_PDS_ACTVAL ,
wa_et_actual_values  LIKE LINE OF it_et_actual_values,
it_et_messages  TYPE STANDARD TABLE OF BBP_PDS_MESSAGES ,
wa_et_messages  LIKE LINE OF it_et_messages,
it_et_hcf  TYPE STANDARD TABLE OF BBP_PDS_HCF_SUSPO ,
wa_et_hcf  LIKE LINE OF it_et_hcf,
it_et_icf  TYPE STANDARD TABLE OF BBP_PDS_ICF_SUSPO ,
wa_et_icf  LIKE LINE OF it_et_icf.


SELECT single OBJECT_TYPE
FROM CRMD_ORDERADM_H
INTO ld_iv_object_type.


"populate fields of struture and append to itab
append wa_it_selection to it_it_selection.

ld_iv_subtype = some text here

"populate fields of struture and append to itab
append wa_it_doc_values_db to it_it_doc_values_db.
ld_is_user_info = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_item_po to it_it_item_po.
ld_iv_no_quancheck = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_item to it_et_item.
ld_is_follow_up_doc_settings = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_partner to it_et_partner.

"populate fields of struture and append to itab
append wa_et_longtext to it_et_longtext.

"populate fields of struture and append to itab
append wa_et_limit to it_et_limit.

"populate fields of struture and append to itab
append wa_et_status to it_et_status.

"populate fields of struture and append to itab
append wa_et_freight to it_et_freight.

"populate fields of struture and append to itab
append wa_et_tax to it_et_tax.

"populate fields of struture and append to itab
append wa_et_actual_values to it_et_actual_values.

"populate fields of struture and append to itab
append wa_et_messages to it_et_messages.

"populate fields of struture and append to itab
append wa_et_hcf to it_et_hcf.

"populate fields of struture and append to itab
append wa_et_icf to it_et_icf.

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