SAP Function Modules

BBP_WS_IMPORT_SC_DATA SAP Function module







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

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


Pattern for FM BBP_WS_IMPORT_SC_DATA - BBP WS IMPORT SC DATA





CALL FUNCTION 'BBP_WS_IMPORT_SC_DATA' "
* EXPORTING
*   iv_webservice_id =          " bbp_ws_service_id
*   iv_sc_header_id =           " crmt_object_id_db
*   iv_sc_header_guid =         " bbp_pguid
*   iv_agent_search =           " xfeld
*   iv_requestor =              " sy-uname
*   iv_category_guid =          " comt_category_guid
*   iv_ignore_partnerdata =     " xfeld
*   iv_ignore_orgdata =         " xfeld
*   io_bsp_runtime =            " if_bsp_runtime
*   io_http_server =            " if_http_server
  IMPORTING
    et_sc_attachments =         " bbp_pds_att_tt
* TABLES
*   it_form_fields =            " savwctxt
*   et_sc_item_data =           " bbp_pds_sc_item_d
*   et_sc_accounting =          " bbp_pds_acc
*   et_sc_partner =             " bbp_pds_partner
*   et_sc_orgdata =             " bbp_pds_org
*   et_sc_longtext =            " bbp_pds_longtext
*   et_enr_item_data =          " bbp_oci_enritem
*   et_enr_acct_data =          " bbp_oci_enracct
*   et_enr_longtext =           " wsi_oci_longtext_s
*   et_enr_errors =             " bbp_oci_errors
*   et_messages =               " bapiret2
  EXCEPTIONS
    WS_NOT_FOUND = 1            "
    NO_DATA = 2                 "
    .  "  BBP_WS_IMPORT_SC_DATA

ABAP code example for Function Module BBP_WS_IMPORT_SC_DATA





The ABAP code below is a full code listing to execute function module BBP_WS_IMPORT_SC_DATA 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_et_sc_attachments  TYPE BBP_PDS_ATT_TT ,
it_it_form_fields  TYPE STANDARD TABLE OF SAVWCTXT,"TABLES PARAM
wa_it_form_fields  LIKE LINE OF it_it_form_fields ,
it_et_sc_item_data  TYPE STANDARD TABLE OF BBP_PDS_SC_ITEM_D,"TABLES PARAM
wa_et_sc_item_data  LIKE LINE OF it_et_sc_item_data ,
it_et_sc_accounting  TYPE STANDARD TABLE OF BBP_PDS_ACC,"TABLES PARAM
wa_et_sc_accounting  LIKE LINE OF it_et_sc_accounting ,
it_et_sc_partner  TYPE STANDARD TABLE OF BBP_PDS_PARTNER,"TABLES PARAM
wa_et_sc_partner  LIKE LINE OF it_et_sc_partner ,
it_et_sc_orgdata  TYPE STANDARD TABLE OF BBP_PDS_ORG,"TABLES PARAM
wa_et_sc_orgdata  LIKE LINE OF it_et_sc_orgdata ,
it_et_sc_longtext  TYPE STANDARD TABLE OF BBP_PDS_LONGTEXT,"TABLES PARAM
wa_et_sc_longtext  LIKE LINE OF it_et_sc_longtext ,
it_et_enr_item_data  TYPE STANDARD TABLE OF BBP_OCI_ENRITEM,"TABLES PARAM
wa_et_enr_item_data  LIKE LINE OF it_et_enr_item_data ,
it_et_enr_acct_data  TYPE STANDARD TABLE OF BBP_OCI_ENRACCT,"TABLES PARAM
wa_et_enr_acct_data  LIKE LINE OF it_et_enr_acct_data ,
it_et_enr_longtext  TYPE STANDARD TABLE OF WSI_OCI_LONGTEXT_S,"TABLES PARAM
wa_et_enr_longtext  LIKE LINE OF it_et_enr_longtext ,
it_et_enr_errors  TYPE STANDARD TABLE OF BBP_OCI_ERRORS,"TABLES PARAM
wa_et_enr_errors  LIKE LINE OF it_et_enr_errors ,
it_et_messages  TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM
wa_et_messages  LIKE LINE OF it_et_messages .

DATA(ld_iv_webservice_id) = 'Check type of data required'.
DATA(ld_iv_sc_header_id) = 'Check type of data required'.
DATA(ld_iv_sc_header_guid) = 'Check type of data required'.
DATA(ld_iv_agent_search) = 'Check type of data required'.
DATA(ld_iv_requestor) = 'some text here'.
DATA(ld_iv_category_guid) = 'some text here'.
DATA(ld_iv_ignore_partnerdata) = 'some text here'.
DATA(ld_iv_ignore_orgdata) = 'some text here'.
DATA(ld_io_bsp_runtime) = 'some text here'.
DATA(ld_io_http_server) = 'some text here'.

"populate fields of struture and append to itab
append wa_it_form_fields to it_it_form_fields.

"populate fields of struture and append to itab
append wa_et_sc_item_data to it_et_sc_item_data.

"populate fields of struture and append to itab
append wa_et_sc_accounting to it_et_sc_accounting.

"populate fields of struture and append to itab
append wa_et_sc_partner to it_et_sc_partner.

"populate fields of struture and append to itab
append wa_et_sc_orgdata to it_et_sc_orgdata.

"populate fields of struture and append to itab
append wa_et_sc_longtext to it_et_sc_longtext.

"populate fields of struture and append to itab
append wa_et_enr_item_data to it_et_enr_item_data.

"populate fields of struture and append to itab
append wa_et_enr_acct_data to it_et_enr_acct_data.

"populate fields of struture and append to itab
append wa_et_enr_longtext to it_et_enr_longtext.

"populate fields of struture and append to itab
append wa_et_enr_errors to it_et_enr_errors.

"populate fields of struture and append to itab
append wa_et_messages to it_et_messages. . CALL FUNCTION 'BBP_WS_IMPORT_SC_DATA' * EXPORTING * iv_webservice_id = ld_iv_webservice_id * iv_sc_header_id = ld_iv_sc_header_id * iv_sc_header_guid = ld_iv_sc_header_guid * iv_agent_search = ld_iv_agent_search * iv_requestor = ld_iv_requestor * iv_category_guid = ld_iv_category_guid * iv_ignore_partnerdata = ld_iv_ignore_partnerdata * iv_ignore_orgdata = ld_iv_ignore_orgdata * io_bsp_runtime = ld_io_bsp_runtime * io_http_server = ld_io_http_server IMPORTING et_sc_attachments = ld_et_sc_attachments * TABLES * it_form_fields = it_it_form_fields * et_sc_item_data = it_et_sc_item_data * et_sc_accounting = it_et_sc_accounting * et_sc_partner = it_et_sc_partner * et_sc_orgdata = it_et_sc_orgdata * et_sc_longtext = it_et_sc_longtext * et_enr_item_data = it_et_enr_item_data * et_enr_acct_data = it_et_enr_acct_data * et_enr_longtext = it_et_enr_longtext * et_enr_errors = it_et_enr_errors * et_messages = it_et_messages EXCEPTIONS WS_NOT_FOUND = 1 NO_DATA = 2 . " BBP_WS_IMPORT_SC_DATA
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 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_form_fields  TYPE STANDARD TABLE OF SAVWCTXT ,
wa_it_form_fields  LIKE LINE OF it_it_form_fields,
ld_et_sc_attachments  TYPE BBP_PDS_ATT_TT ,
ld_iv_webservice_id  TYPE BBP_WS_SERVICE_ID ,
it_et_sc_item_data  TYPE STANDARD TABLE OF BBP_PDS_SC_ITEM_D ,
wa_et_sc_item_data  LIKE LINE OF it_et_sc_item_data,
ld_iv_sc_header_id  TYPE CRMT_OBJECT_ID_DB ,
it_et_sc_accounting  TYPE STANDARD TABLE OF BBP_PDS_ACC ,
wa_et_sc_accounting  LIKE LINE OF it_et_sc_accounting,
ld_iv_sc_header_guid  TYPE BBP_PGUID ,
ld_iv_agent_search  TYPE XFELD ,
it_et_sc_partner  TYPE STANDARD TABLE OF BBP_PDS_PARTNER ,
wa_et_sc_partner  LIKE LINE OF it_et_sc_partner,
ld_iv_requestor  TYPE SY-UNAME ,
it_et_sc_orgdata  TYPE STANDARD TABLE OF BBP_PDS_ORG ,
wa_et_sc_orgdata  LIKE LINE OF it_et_sc_orgdata,
ld_iv_category_guid  TYPE COMT_CATEGORY_GUID ,
it_et_sc_longtext  TYPE STANDARD TABLE OF BBP_PDS_LONGTEXT ,
wa_et_sc_longtext  LIKE LINE OF it_et_sc_longtext,
ld_iv_ignore_partnerdata  TYPE XFELD ,
it_et_enr_item_data  TYPE STANDARD TABLE OF BBP_OCI_ENRITEM ,
wa_et_enr_item_data  LIKE LINE OF it_et_enr_item_data,
ld_iv_ignore_orgdata  TYPE XFELD ,
it_et_enr_acct_data  TYPE STANDARD TABLE OF BBP_OCI_ENRACCT ,
wa_et_enr_acct_data  LIKE LINE OF it_et_enr_acct_data,
ld_io_bsp_runtime  TYPE IF_BSP_RUNTIME ,
it_et_enr_longtext  TYPE STANDARD TABLE OF WSI_OCI_LONGTEXT_S ,
wa_et_enr_longtext  LIKE LINE OF it_et_enr_longtext,
ld_io_http_server  TYPE IF_HTTP_SERVER ,
it_et_enr_errors  TYPE STANDARD TABLE OF BBP_OCI_ERRORS ,
wa_et_enr_errors  LIKE LINE OF it_et_enr_errors,
it_et_messages  TYPE STANDARD TABLE OF BAPIRET2 ,
wa_et_messages  LIKE LINE OF it_et_messages.


"populate fields of struture and append to itab
append wa_it_form_fields to it_it_form_fields.
ld_iv_webservice_id = 'some text here'.

"populate fields of struture and append to itab
append wa_et_sc_item_data to it_et_sc_item_data.
ld_iv_sc_header_id = 'some text here'.

"populate fields of struture and append to itab
append wa_et_sc_accounting to it_et_sc_accounting.
ld_iv_sc_header_guid = 'some text here'.
ld_iv_agent_search = 'some text here'.

"populate fields of struture and append to itab
append wa_et_sc_partner to it_et_sc_partner.
ld_iv_requestor = 'some text here'.

"populate fields of struture and append to itab
append wa_et_sc_orgdata to it_et_sc_orgdata.
ld_iv_category_guid = 'some text here'.

"populate fields of struture and append to itab
append wa_et_sc_longtext to it_et_sc_longtext.
ld_iv_ignore_partnerdata = 'some text here'.

"populate fields of struture and append to itab
append wa_et_enr_item_data to it_et_enr_item_data.
ld_iv_ignore_orgdata = 'some text here'.

"populate fields of struture and append to itab
append wa_et_enr_acct_data to it_et_enr_acct_data.
ld_io_bsp_runtime = 'some text here'.

"populate fields of struture and append to itab
append wa_et_enr_longtext to it_et_enr_longtext.
ld_io_http_server = 'some text here'.

"populate fields of struture and append to itab
append wa_et_enr_errors to it_et_enr_errors.

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

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