SAP Function Modules

DG08_ALE_DANGEROUSGOOD_SRM SAP Function module







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

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


Pattern for FM DG08_ALE_DANGEROUSGOOD_SRM - DG08 ALE DANGEROUSGOOD SRM





CALL FUNCTION 'DG08_ALE_DANGEROUSGOOD_SRM' "
* EXPORTING
*   i_sender =                  " bapi1078_sender  Sender
*   i_serial_id = '0'           " serial-chnum  ALE Channel Number
  TABLES
    i_dgdata_iot_tab =          " rdgmdiot
*   i_dgpack_iot_tab =          " rdgpkiot
*   i_packaging_iotab =         " ccdutpack     Packaging Code Approvals
*   i_sprov_iotab =             " ccdutsprov
*   i_carriage_iotab =          " ccdutcarr     Provisions for Carriage
*   i_transappr_iotab =         " ccduttrappr   Transport Restrictions
*   i_prodrel_iotab =           " rcbdudgrelappl  Product Release
    i_dangerousgooddata_tab =   " bapi1078_dangerousgooddata
*   i_dangerousgoodpack_tab =   " bapi1078_dangerousgoodpack
    i_dangerousgooddatax_tab =   " bapi1078_dangergooddatax  Checkbox List for Dangerous Goods Master
*   i_dangerousgoodpackx_tab =   " bapi1078_dangergoodpackx  Checkbox List for Dangerous Goods Packaging
*   i_pack_requirement_tab =    " bapi1078_pack_requirement  BAPI Structure Dangerous Goods Packing Requirement
*   i_pack_requirementx_tab =   " bapi1078_pack_requirementx  Checkbox Structure Dangerous Goods Packing Requirement
*   i_spec_pack_prov_tab =      " bapi1078_spec_pack_prov  BAPI Structure Special Packing Provisions
*   i_spec_pack_provx_tab =     " bapi1078_spec_pack_provx  Checkbox Structure Special Packing Provisions
*   i_prov_carriage_tab =       " bapi1078_prov_carriage  BAPI Structure Transport Regulations
*   i_prov_carriagex_tab =      " bapi1078_prov_carriagex  Checkbox Structure for Provisions for Carriage
*   i_transp_approval_tab =     " bapi1078_transp_approval  BAPI Structure Transport Restrictions
*   i_transp_approvalx_tab =    " bapi1078_transp_approvalx  BAPI Structure Transport Restrictions
*   i_product_release_tab =     " bapi1078_product_release  BAPI Structure Dangerous Goods Product Release
*   i_product_releasex_tab =    " bapi1078_product_releasex  Checkbox Structure for Dangerous Goods Product Release
    i_dangerousgoodrange_tab =   " bapi1078_range  Range Table for Dangerous Goods Data
    i_receivers_tab =           " bdi_logsys    Transfer Structure for Logical Systems
*   i_communication_documents_tab =   " swotobjid  Structure for Object ID
*   i_application_objects_tab =   " swotobjid   Structure for Object ID
  EXCEPTIONS
    ERROR_CREATING_IDOCS = 1    "
    .  "  DG08_ALE_DANGEROUSGOOD_SRM

ABAP code example for Function Module DG08_ALE_DANGEROUSGOOD_SRM





The ABAP code below is a full code listing to execute function module DG08_ALE_DANGEROUSGOOD_SRM 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_i_dgdata_iot_tab  TYPE STANDARD TABLE OF RDGMDIOT,"TABLES PARAM
wa_i_dgdata_iot_tab  LIKE LINE OF it_i_dgdata_iot_tab ,
it_i_dgpack_iot_tab  TYPE STANDARD TABLE OF RDGPKIOT,"TABLES PARAM
wa_i_dgpack_iot_tab  LIKE LINE OF it_i_dgpack_iot_tab ,
it_i_packaging_iotab  TYPE STANDARD TABLE OF CCDUTPACK,"TABLES PARAM
wa_i_packaging_iotab  LIKE LINE OF it_i_packaging_iotab ,
it_i_sprov_iotab  TYPE STANDARD TABLE OF CCDUTSPROV,"TABLES PARAM
wa_i_sprov_iotab  LIKE LINE OF it_i_sprov_iotab ,
it_i_carriage_iotab  TYPE STANDARD TABLE OF CCDUTCARR,"TABLES PARAM
wa_i_carriage_iotab  LIKE LINE OF it_i_carriage_iotab ,
it_i_transappr_iotab  TYPE STANDARD TABLE OF CCDUTTRAPPR,"TABLES PARAM
wa_i_transappr_iotab  LIKE LINE OF it_i_transappr_iotab ,
it_i_prodrel_iotab  TYPE STANDARD TABLE OF RCBDUDGRELAPPL,"TABLES PARAM
wa_i_prodrel_iotab  LIKE LINE OF it_i_prodrel_iotab ,
it_i_dangerousgooddata_tab  TYPE STANDARD TABLE OF BAPI1078_DANGEROUSGOODDATA,"TABLES PARAM
wa_i_dangerousgooddata_tab  LIKE LINE OF it_i_dangerousgooddata_tab ,
it_i_dangerousgoodpack_tab  TYPE STANDARD TABLE OF BAPI1078_DANGEROUSGOODPACK,"TABLES PARAM
wa_i_dangerousgoodpack_tab  LIKE LINE OF it_i_dangerousgoodpack_tab ,
it_i_dangerousgooddatax_tab  TYPE STANDARD TABLE OF BAPI1078_DANGERGOODDATAX,"TABLES PARAM
wa_i_dangerousgooddatax_tab  LIKE LINE OF it_i_dangerousgooddatax_tab ,
it_i_dangerousgoodpackx_tab  TYPE STANDARD TABLE OF BAPI1078_DANGERGOODPACKX,"TABLES PARAM
wa_i_dangerousgoodpackx_tab  LIKE LINE OF it_i_dangerousgoodpackx_tab ,
it_i_pack_requirement_tab  TYPE STANDARD TABLE OF BAPI1078_PACK_REQUIREMENT,"TABLES PARAM
wa_i_pack_requirement_tab  LIKE LINE OF it_i_pack_requirement_tab ,
it_i_pack_requirementx_tab  TYPE STANDARD TABLE OF BAPI1078_PACK_REQUIREMENTX,"TABLES PARAM
wa_i_pack_requirementx_tab  LIKE LINE OF it_i_pack_requirementx_tab ,
it_i_spec_pack_prov_tab  TYPE STANDARD TABLE OF BAPI1078_SPEC_PACK_PROV,"TABLES PARAM
wa_i_spec_pack_prov_tab  LIKE LINE OF it_i_spec_pack_prov_tab ,
it_i_spec_pack_provx_tab  TYPE STANDARD TABLE OF BAPI1078_SPEC_PACK_PROVX,"TABLES PARAM
wa_i_spec_pack_provx_tab  LIKE LINE OF it_i_spec_pack_provx_tab ,
it_i_prov_carriage_tab  TYPE STANDARD TABLE OF BAPI1078_PROV_CARRIAGE,"TABLES PARAM
wa_i_prov_carriage_tab  LIKE LINE OF it_i_prov_carriage_tab ,
it_i_prov_carriagex_tab  TYPE STANDARD TABLE OF BAPI1078_PROV_CARRIAGEX,"TABLES PARAM
wa_i_prov_carriagex_tab  LIKE LINE OF it_i_prov_carriagex_tab ,
it_i_transp_approval_tab  TYPE STANDARD TABLE OF BAPI1078_TRANSP_APPROVAL,"TABLES PARAM
wa_i_transp_approval_tab  LIKE LINE OF it_i_transp_approval_tab ,
it_i_transp_approvalx_tab  TYPE STANDARD TABLE OF BAPI1078_TRANSP_APPROVALX,"TABLES PARAM
wa_i_transp_approvalx_tab  LIKE LINE OF it_i_transp_approvalx_tab ,
it_i_product_release_tab  TYPE STANDARD TABLE OF BAPI1078_PRODUCT_RELEASE,"TABLES PARAM
wa_i_product_release_tab  LIKE LINE OF it_i_product_release_tab ,
it_i_product_releasex_tab  TYPE STANDARD TABLE OF BAPI1078_PRODUCT_RELEASEX,"TABLES PARAM
wa_i_product_releasex_tab  LIKE LINE OF it_i_product_releasex_tab ,
it_i_dangerousgoodrange_tab  TYPE STANDARD TABLE OF BAPI1078_RANGE,"TABLES PARAM
wa_i_dangerousgoodrange_tab  LIKE LINE OF it_i_dangerousgoodrange_tab ,
it_i_receivers_tab  TYPE STANDARD TABLE OF BDI_LOGSYS,"TABLES PARAM
wa_i_receivers_tab  LIKE LINE OF it_i_receivers_tab ,
it_i_communication_documents_tab  TYPE STANDARD TABLE OF SWOTOBJID,"TABLES PARAM
wa_i_communication_documents_tab  LIKE LINE OF it_i_communication_documents_tab ,
it_i_application_objects_tab  TYPE STANDARD TABLE OF SWOTOBJID,"TABLES PARAM
wa_i_application_objects_tab  LIKE LINE OF it_i_application_objects_tab .

DATA(ld_i_sender) = 'Check type of data required'.

DATA(ld_i_serial_id) = Check type of data required

"populate fields of struture and append to itab
append wa_i_dgdata_iot_tab to it_i_dgdata_iot_tab.

"populate fields of struture and append to itab
append wa_i_dgpack_iot_tab to it_i_dgpack_iot_tab.

"populate fields of struture and append to itab
append wa_i_packaging_iotab to it_i_packaging_iotab.

"populate fields of struture and append to itab
append wa_i_sprov_iotab to it_i_sprov_iotab.

"populate fields of struture and append to itab
append wa_i_carriage_iotab to it_i_carriage_iotab.

"populate fields of struture and append to itab
append wa_i_transappr_iotab to it_i_transappr_iotab.

"populate fields of struture and append to itab
append wa_i_prodrel_iotab to it_i_prodrel_iotab.

"populate fields of struture and append to itab
append wa_i_dangerousgooddata_tab to it_i_dangerousgooddata_tab.

"populate fields of struture and append to itab
append wa_i_dangerousgoodpack_tab to it_i_dangerousgoodpack_tab.

"populate fields of struture and append to itab
append wa_i_dangerousgooddatax_tab to it_i_dangerousgooddatax_tab.

"populate fields of struture and append to itab
append wa_i_dangerousgoodpackx_tab to it_i_dangerousgoodpackx_tab.

"populate fields of struture and append to itab
append wa_i_pack_requirement_tab to it_i_pack_requirement_tab.

"populate fields of struture and append to itab
append wa_i_pack_requirementx_tab to it_i_pack_requirementx_tab.

"populate fields of struture and append to itab
append wa_i_spec_pack_prov_tab to it_i_spec_pack_prov_tab.

"populate fields of struture and append to itab
append wa_i_spec_pack_provx_tab to it_i_spec_pack_provx_tab.

"populate fields of struture and append to itab
append wa_i_prov_carriage_tab to it_i_prov_carriage_tab.

"populate fields of struture and append to itab
append wa_i_prov_carriagex_tab to it_i_prov_carriagex_tab.

"populate fields of struture and append to itab
append wa_i_transp_approval_tab to it_i_transp_approval_tab.

"populate fields of struture and append to itab
append wa_i_transp_approvalx_tab to it_i_transp_approvalx_tab.

"populate fields of struture and append to itab
append wa_i_product_release_tab to it_i_product_release_tab.

"populate fields of struture and append to itab
append wa_i_product_releasex_tab to it_i_product_releasex_tab.

"populate fields of struture and append to itab
append wa_i_dangerousgoodrange_tab to it_i_dangerousgoodrange_tab.

"populate fields of struture and append to itab
append wa_i_receivers_tab to it_i_receivers_tab.

"populate fields of struture and append to itab
append wa_i_communication_documents_tab to it_i_communication_documents_tab.

"populate fields of struture and append to itab
append wa_i_application_objects_tab to it_i_application_objects_tab. . CALL FUNCTION 'DG08_ALE_DANGEROUSGOOD_SRM' * EXPORTING * i_sender = ld_i_sender * i_serial_id = ld_i_serial_id TABLES i_dgdata_iot_tab = it_i_dgdata_iot_tab * i_dgpack_iot_tab = it_i_dgpack_iot_tab * i_packaging_iotab = it_i_packaging_iotab * i_sprov_iotab = it_i_sprov_iotab * i_carriage_iotab = it_i_carriage_iotab * i_transappr_iotab = it_i_transappr_iotab * i_prodrel_iotab = it_i_prodrel_iotab i_dangerousgooddata_tab = it_i_dangerousgooddata_tab * i_dangerousgoodpack_tab = it_i_dangerousgoodpack_tab i_dangerousgooddatax_tab = it_i_dangerousgooddatax_tab * i_dangerousgoodpackx_tab = it_i_dangerousgoodpackx_tab * i_pack_requirement_tab = it_i_pack_requirement_tab * i_pack_requirementx_tab = it_i_pack_requirementx_tab * i_spec_pack_prov_tab = it_i_spec_pack_prov_tab * i_spec_pack_provx_tab = it_i_spec_pack_provx_tab * i_prov_carriage_tab = it_i_prov_carriage_tab * i_prov_carriagex_tab = it_i_prov_carriagex_tab * i_transp_approval_tab = it_i_transp_approval_tab * i_transp_approvalx_tab = it_i_transp_approvalx_tab * i_product_release_tab = it_i_product_release_tab * i_product_releasex_tab = it_i_product_releasex_tab i_dangerousgoodrange_tab = it_i_dangerousgoodrange_tab i_receivers_tab = it_i_receivers_tab * i_communication_documents_tab = it_i_communication_documents_tab * i_application_objects_tab = it_i_application_objects_tab EXCEPTIONS ERROR_CREATING_IDOCS = 1 . " DG08_ALE_DANGEROUSGOOD_SRM
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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:
ld_i_sender  TYPE BAPI1078_SENDER ,
it_i_dgdata_iot_tab  TYPE STANDARD TABLE OF RDGMDIOT ,
wa_i_dgdata_iot_tab  LIKE LINE OF it_i_dgdata_iot_tab,
ld_i_serial_id  TYPE SERIAL-CHNUM ,
it_i_dgpack_iot_tab  TYPE STANDARD TABLE OF RDGPKIOT ,
wa_i_dgpack_iot_tab  LIKE LINE OF it_i_dgpack_iot_tab,
it_i_packaging_iotab  TYPE STANDARD TABLE OF CCDUTPACK ,
wa_i_packaging_iotab  LIKE LINE OF it_i_packaging_iotab,
it_i_sprov_iotab  TYPE STANDARD TABLE OF CCDUTSPROV ,
wa_i_sprov_iotab  LIKE LINE OF it_i_sprov_iotab,
it_i_carriage_iotab  TYPE STANDARD TABLE OF CCDUTCARR ,
wa_i_carriage_iotab  LIKE LINE OF it_i_carriage_iotab,
it_i_transappr_iotab  TYPE STANDARD TABLE OF CCDUTTRAPPR ,
wa_i_transappr_iotab  LIKE LINE OF it_i_transappr_iotab,
it_i_prodrel_iotab  TYPE STANDARD TABLE OF RCBDUDGRELAPPL ,
wa_i_prodrel_iotab  LIKE LINE OF it_i_prodrel_iotab,
it_i_dangerousgooddata_tab  TYPE STANDARD TABLE OF BAPI1078_DANGEROUSGOODDATA ,
wa_i_dangerousgooddata_tab  LIKE LINE OF it_i_dangerousgooddata_tab,
it_i_dangerousgoodpack_tab  TYPE STANDARD TABLE OF BAPI1078_DANGEROUSGOODPACK ,
wa_i_dangerousgoodpack_tab  LIKE LINE OF it_i_dangerousgoodpack_tab,
it_i_dangerousgooddatax_tab  TYPE STANDARD TABLE OF BAPI1078_DANGERGOODDATAX ,
wa_i_dangerousgooddatax_tab  LIKE LINE OF it_i_dangerousgooddatax_tab,
it_i_dangerousgoodpackx_tab  TYPE STANDARD TABLE OF BAPI1078_DANGERGOODPACKX ,
wa_i_dangerousgoodpackx_tab  LIKE LINE OF it_i_dangerousgoodpackx_tab,
it_i_pack_requirement_tab  TYPE STANDARD TABLE OF BAPI1078_PACK_REQUIREMENT ,
wa_i_pack_requirement_tab  LIKE LINE OF it_i_pack_requirement_tab,
it_i_pack_requirementx_tab  TYPE STANDARD TABLE OF BAPI1078_PACK_REQUIREMENTX ,
wa_i_pack_requirementx_tab  LIKE LINE OF it_i_pack_requirementx_tab,
it_i_spec_pack_prov_tab  TYPE STANDARD TABLE OF BAPI1078_SPEC_PACK_PROV ,
wa_i_spec_pack_prov_tab  LIKE LINE OF it_i_spec_pack_prov_tab,
it_i_spec_pack_provx_tab  TYPE STANDARD TABLE OF BAPI1078_SPEC_PACK_PROVX ,
wa_i_spec_pack_provx_tab  LIKE LINE OF it_i_spec_pack_provx_tab,
it_i_prov_carriage_tab  TYPE STANDARD TABLE OF BAPI1078_PROV_CARRIAGE ,
wa_i_prov_carriage_tab  LIKE LINE OF it_i_prov_carriage_tab,
it_i_prov_carriagex_tab  TYPE STANDARD TABLE OF BAPI1078_PROV_CARRIAGEX ,
wa_i_prov_carriagex_tab  LIKE LINE OF it_i_prov_carriagex_tab,
it_i_transp_approval_tab  TYPE STANDARD TABLE OF BAPI1078_TRANSP_APPROVAL ,
wa_i_transp_approval_tab  LIKE LINE OF it_i_transp_approval_tab,
it_i_transp_approvalx_tab  TYPE STANDARD TABLE OF BAPI1078_TRANSP_APPROVALX ,
wa_i_transp_approvalx_tab  LIKE LINE OF it_i_transp_approvalx_tab,
it_i_product_release_tab  TYPE STANDARD TABLE OF BAPI1078_PRODUCT_RELEASE ,
wa_i_product_release_tab  LIKE LINE OF it_i_product_release_tab,
it_i_product_releasex_tab  TYPE STANDARD TABLE OF BAPI1078_PRODUCT_RELEASEX ,
wa_i_product_releasex_tab  LIKE LINE OF it_i_product_releasex_tab,
it_i_dangerousgoodrange_tab  TYPE STANDARD TABLE OF BAPI1078_RANGE ,
wa_i_dangerousgoodrange_tab  LIKE LINE OF it_i_dangerousgoodrange_tab,
it_i_receivers_tab  TYPE STANDARD TABLE OF BDI_LOGSYS ,
wa_i_receivers_tab  LIKE LINE OF it_i_receivers_tab,
it_i_communication_documents_tab  TYPE STANDARD TABLE OF SWOTOBJID ,
wa_i_communication_documents_tab  LIKE LINE OF it_i_communication_documents_tab,
it_i_application_objects_tab  TYPE STANDARD TABLE OF SWOTOBJID ,
wa_i_application_objects_tab  LIKE LINE OF it_i_application_objects_tab.

ld_i_sender = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_i_dgdata_iot_tab to it_i_dgdata_iot_tab.

ld_i_serial_id = Check type of data required

"populate fields of struture and append to itab
append wa_i_dgpack_iot_tab to it_i_dgpack_iot_tab.

"populate fields of struture and append to itab
append wa_i_packaging_iotab to it_i_packaging_iotab.

"populate fields of struture and append to itab
append wa_i_sprov_iotab to it_i_sprov_iotab.

"populate fields of struture and append to itab
append wa_i_carriage_iotab to it_i_carriage_iotab.

"populate fields of struture and append to itab
append wa_i_transappr_iotab to it_i_transappr_iotab.

"populate fields of struture and append to itab
append wa_i_prodrel_iotab to it_i_prodrel_iotab.

"populate fields of struture and append to itab
append wa_i_dangerousgooddata_tab to it_i_dangerousgooddata_tab.

"populate fields of struture and append to itab
append wa_i_dangerousgoodpack_tab to it_i_dangerousgoodpack_tab.

"populate fields of struture and append to itab
append wa_i_dangerousgooddatax_tab to it_i_dangerousgooddatax_tab.

"populate fields of struture and append to itab
append wa_i_dangerousgoodpackx_tab to it_i_dangerousgoodpackx_tab.

"populate fields of struture and append to itab
append wa_i_pack_requirement_tab to it_i_pack_requirement_tab.

"populate fields of struture and append to itab
append wa_i_pack_requirementx_tab to it_i_pack_requirementx_tab.

"populate fields of struture and append to itab
append wa_i_spec_pack_prov_tab to it_i_spec_pack_prov_tab.

"populate fields of struture and append to itab
append wa_i_spec_pack_provx_tab to it_i_spec_pack_provx_tab.

"populate fields of struture and append to itab
append wa_i_prov_carriage_tab to it_i_prov_carriage_tab.

"populate fields of struture and append to itab
append wa_i_prov_carriagex_tab to it_i_prov_carriagex_tab.

"populate fields of struture and append to itab
append wa_i_transp_approval_tab to it_i_transp_approval_tab.

"populate fields of struture and append to itab
append wa_i_transp_approvalx_tab to it_i_transp_approvalx_tab.

"populate fields of struture and append to itab
append wa_i_product_release_tab to it_i_product_release_tab.

"populate fields of struture and append to itab
append wa_i_product_releasex_tab to it_i_product_releasex_tab.

"populate fields of struture and append to itab
append wa_i_dangerousgoodrange_tab to it_i_dangerousgoodrange_tab.

"populate fields of struture and append to itab
append wa_i_receivers_tab to it_i_receivers_tab.

"populate fields of struture and append to itab
append wa_i_communication_documents_tab to it_i_communication_documents_tab.

"populate fields of struture and append to itab
append wa_i_application_objects_tab to it_i_application_objects_tab.

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