SAP Function Modules

BBP_PROCDOC_GETDETAIL SAP Function module







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

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


Pattern for FM BBP_PROCDOC_GETDETAIL - BBP PROCDOC GETDETAIL





CALL FUNCTION 'BBP_PROCDOC_GETDETAIL' "
* EXPORTING
*   i_guid =                    " crmd_orderadm_h-guid
*   i_src_guid =                " crmd_orderadm_h-guid
*   i_object_id =               " crmd_orderadm_h-object_id
*   i_object_type =             " crmd_orderadm_h-object_type
*   i_ref_doc_no =              " bbp_pdhgp-ref_doc_no
*   i_partner_no =              " crmd_partner-partner_no
*   i_attach_with_doc = SPACE   " xfeld
*   i_with_itemdata = 'X'       " xfeld
*   i_read_flags =              " bbps_detail_requested
*   i_read_text_flags =         " bbp_pds_read_texts
*   i_without_header_totals =   " xfeld
*   i_disp_currency =           " waers
*   i_disp_date =               " syst-datum
*   i_read_from_archive = SPACE  " xfeld
*   i_read_without_rfx_data = SPACE  " xfeld
  IMPORTING
    e_header =                  " bbp_pds_header
    et_attach =                 " bbpt_pds_att_t
    et_conditions =             " bbpt_pd_cnd
    et_dyn_attr =               " bbpt_pds_dynattribute
* TABLES
*   e_item =                    " bbpt_pd_item
*   e_account =                 " bbp_pds_acc
*   e_partner =                 " bbp_pds_partner
*   e_confirm =                 " bbp_pds_con
*   e_longtext =                " bbp_pds_longtext
*   e_limit =                   " bbp_pds_limit
*   e_orgdata =                 " bbp_pds_org
*   e_freight =                 " bbp_pds_freight
*   e_msgi =                    " bbp_pds_msgi
*   e_tax =                     " bbp_pds_tax
*   e_pridoc =                  " bbp_pds_prc
*   e_sdln =                    " bbp_pds_sdln
*   e_hcf =                     " bbp_pds_hcf
*   e_icf =                     " bbp_pds_icf
*   e_tol =                     " bbp_pds_tol
*   e_weight =                  " bbp_pds_weight
*   e_dep =                     " bbp_pds_dep
*   et_exchrate =               " bbp_pds_exr
*   e_actval =                  " bbp_pds_actval
*   e_actval_sdln =             " bbp_pds_actval
*   e_acc_actval =              " bbp_pds_actval
*   e_version =                 " bbp_pds_version_list_internal
*   e_header_rel =              " bbp_pds_hrel
*   e_itmlim_rel =              " bbp_pds_ilrel
*   e_ove_rel =                 " bbp_pds_ove_rel
*   e_status =                  " bbp_pds_status
*   e_messages =                " bbp_pds_messages
*   e_history_arch =            " bbp_pds_history_arch
    .  "  BBP_PROCDOC_GETDETAIL

ABAP code example for Function Module BBP_PROCDOC_GETDETAIL





The ABAP code below is a full code listing to execute function module BBP_PROCDOC_GETDETAIL 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_e_header  TYPE BBP_PDS_HEADER ,
ld_et_attach  TYPE BBPT_PDS_ATT_T ,
ld_et_conditions  TYPE BBPT_PD_CND ,
ld_et_dyn_attr  TYPE BBPT_PDS_DYNATTRIBUTE ,
it_e_item  TYPE STANDARD TABLE OF BBPT_PD_ITEM,"TABLES PARAM
wa_e_item  LIKE LINE OF it_e_item ,
it_e_account  TYPE STANDARD TABLE OF BBP_PDS_ACC,"TABLES PARAM
wa_e_account  LIKE LINE OF it_e_account ,
it_e_partner  TYPE STANDARD TABLE OF BBP_PDS_PARTNER,"TABLES PARAM
wa_e_partner  LIKE LINE OF it_e_partner ,
it_e_confirm  TYPE STANDARD TABLE OF BBP_PDS_CON,"TABLES PARAM
wa_e_confirm  LIKE LINE OF it_e_confirm ,
it_e_longtext  TYPE STANDARD TABLE OF BBP_PDS_LONGTEXT,"TABLES PARAM
wa_e_longtext  LIKE LINE OF it_e_longtext ,
it_e_limit  TYPE STANDARD TABLE OF BBP_PDS_LIMIT,"TABLES PARAM
wa_e_limit  LIKE LINE OF it_e_limit ,
it_e_orgdata  TYPE STANDARD TABLE OF BBP_PDS_ORG,"TABLES PARAM
wa_e_orgdata  LIKE LINE OF it_e_orgdata ,
it_e_freight  TYPE STANDARD TABLE OF BBP_PDS_FREIGHT,"TABLES PARAM
wa_e_freight  LIKE LINE OF it_e_freight ,
it_e_msgi  TYPE STANDARD TABLE OF BBP_PDS_MSGI,"TABLES PARAM
wa_e_msgi  LIKE LINE OF it_e_msgi ,
it_e_tax  TYPE STANDARD TABLE OF BBP_PDS_TAX,"TABLES PARAM
wa_e_tax  LIKE LINE OF it_e_tax ,
it_e_pridoc  TYPE STANDARD TABLE OF BBP_PDS_PRC,"TABLES PARAM
wa_e_pridoc  LIKE LINE OF it_e_pridoc ,
it_e_sdln  TYPE STANDARD TABLE OF BBP_PDS_SDLN,"TABLES PARAM
wa_e_sdln  LIKE LINE OF it_e_sdln ,
it_e_hcf  TYPE STANDARD TABLE OF BBP_PDS_HCF,"TABLES PARAM
wa_e_hcf  LIKE LINE OF it_e_hcf ,
it_e_icf  TYPE STANDARD TABLE OF BBP_PDS_ICF,"TABLES PARAM
wa_e_icf  LIKE LINE OF it_e_icf ,
it_e_tol  TYPE STANDARD TABLE OF BBP_PDS_TOL,"TABLES PARAM
wa_e_tol  LIKE LINE OF it_e_tol ,
it_e_weight  TYPE STANDARD TABLE OF BBP_PDS_WEIGHT,"TABLES PARAM
wa_e_weight  LIKE LINE OF it_e_weight ,
it_e_dep  TYPE STANDARD TABLE OF BBP_PDS_DEP,"TABLES PARAM
wa_e_dep  LIKE LINE OF it_e_dep ,
it_et_exchrate  TYPE STANDARD TABLE OF BBP_PDS_EXR,"TABLES PARAM
wa_et_exchrate  LIKE LINE OF it_et_exchrate ,
it_e_actval  TYPE STANDARD TABLE OF BBP_PDS_ACTVAL,"TABLES PARAM
wa_e_actval  LIKE LINE OF it_e_actval ,
it_e_actval_sdln  TYPE STANDARD TABLE OF BBP_PDS_ACTVAL,"TABLES PARAM
wa_e_actval_sdln  LIKE LINE OF it_e_actval_sdln ,
it_e_acc_actval  TYPE STANDARD TABLE OF BBP_PDS_ACTVAL,"TABLES PARAM
wa_e_acc_actval  LIKE LINE OF it_e_acc_actval ,
it_e_version  TYPE STANDARD TABLE OF BBP_PDS_VERSION_LIST_INTERNAL,"TABLES PARAM
wa_e_version  LIKE LINE OF it_e_version ,
it_e_header_rel  TYPE STANDARD TABLE OF BBP_PDS_HREL,"TABLES PARAM
wa_e_header_rel  LIKE LINE OF it_e_header_rel ,
it_e_itmlim_rel  TYPE STANDARD TABLE OF BBP_PDS_ILREL,"TABLES PARAM
wa_e_itmlim_rel  LIKE LINE OF it_e_itmlim_rel ,
it_e_ove_rel  TYPE STANDARD TABLE OF BBP_PDS_OVE_REL,"TABLES PARAM
wa_e_ove_rel  LIKE LINE OF it_e_ove_rel ,
it_e_status  TYPE STANDARD TABLE OF BBP_PDS_STATUS,"TABLES PARAM
wa_e_status  LIKE LINE OF it_e_status ,
it_e_messages  TYPE STANDARD TABLE OF BBP_PDS_MESSAGES,"TABLES PARAM
wa_e_messages  LIKE LINE OF it_e_messages ,
it_e_history_arch  TYPE STANDARD TABLE OF BBP_PDS_HISTORY_ARCH,"TABLES PARAM
wa_e_history_arch  LIKE LINE OF it_e_history_arch .


SELECT single GUID
FROM CRMD_ORDERADM_H
INTO @DATA(ld_i_guid).


SELECT single GUID
FROM CRMD_ORDERADM_H
INTO @DATA(ld_i_src_guid).


SELECT single OBJECT_ID
FROM CRMD_ORDERADM_H
INTO @DATA(ld_i_object_id).


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


SELECT single REF_DOC_NO
FROM BBP_PDHGP
INTO @DATA(ld_i_ref_doc_no).


SELECT single PARTNER_NO
FROM CRMD_PARTNER
INTO @DATA(ld_i_partner_no).

DATA(ld_i_attach_with_doc) = 'Check type of data required'.
DATA(ld_i_with_itemdata) = 'Check type of data required'.
DATA(ld_i_read_flags) = 'Check type of data required'.
DATA(ld_i_read_text_flags) = 'Check type of data required'.
DATA(ld_i_without_header_totals) = 'Check type of data required'.
DATA(ld_i_disp_currency) = 'Check type of data required'.

DATA(ld_i_disp_date) = 20210129
DATA(ld_i_read_from_archive) = 'Check type of data required'.
DATA(ld_i_read_without_rfx_data) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_item to it_e_item.

"populate fields of struture and append to itab
append wa_e_account to it_e_account.

"populate fields of struture and append to itab
append wa_e_partner to it_e_partner.

"populate fields of struture and append to itab
append wa_e_confirm to it_e_confirm.

"populate fields of struture and append to itab
append wa_e_longtext to it_e_longtext.

"populate fields of struture and append to itab
append wa_e_limit to it_e_limit.

"populate fields of struture and append to itab
append wa_e_orgdata to it_e_orgdata.

"populate fields of struture and append to itab
append wa_e_freight to it_e_freight.

"populate fields of struture and append to itab
append wa_e_msgi to it_e_msgi.

"populate fields of struture and append to itab
append wa_e_tax to it_e_tax.

"populate fields of struture and append to itab
append wa_e_pridoc to it_e_pridoc.

"populate fields of struture and append to itab
append wa_e_sdln to it_e_sdln.

"populate fields of struture and append to itab
append wa_e_hcf to it_e_hcf.

"populate fields of struture and append to itab
append wa_e_icf to it_e_icf.

"populate fields of struture and append to itab
append wa_e_tol to it_e_tol.

"populate fields of struture and append to itab
append wa_e_weight to it_e_weight.

"populate fields of struture and append to itab
append wa_e_dep to it_e_dep.

"populate fields of struture and append to itab
append wa_et_exchrate to it_et_exchrate.

"populate fields of struture and append to itab
append wa_e_actval to it_e_actval.

"populate fields of struture and append to itab
append wa_e_actval_sdln to it_e_actval_sdln.

"populate fields of struture and append to itab
append wa_e_acc_actval to it_e_acc_actval.

"populate fields of struture and append to itab
append wa_e_version to it_e_version.

"populate fields of struture and append to itab
append wa_e_header_rel to it_e_header_rel.

"populate fields of struture and append to itab
append wa_e_itmlim_rel to it_e_itmlim_rel.

"populate fields of struture and append to itab
append wa_e_ove_rel to it_e_ove_rel.

"populate fields of struture and append to itab
append wa_e_status to it_e_status.

"populate fields of struture and append to itab
append wa_e_messages to it_e_messages.

"populate fields of struture and append to itab
append wa_e_history_arch to it_e_history_arch. . CALL FUNCTION 'BBP_PROCDOC_GETDETAIL' * EXPORTING * i_guid = ld_i_guid * i_src_guid = ld_i_src_guid * i_object_id = ld_i_object_id * i_object_type = ld_i_object_type * i_ref_doc_no = ld_i_ref_doc_no * i_partner_no = ld_i_partner_no * i_attach_with_doc = ld_i_attach_with_doc * i_with_itemdata = ld_i_with_itemdata * i_read_flags = ld_i_read_flags * i_read_text_flags = ld_i_read_text_flags * i_without_header_totals = ld_i_without_header_totals * i_disp_currency = ld_i_disp_currency * i_disp_date = ld_i_disp_date * i_read_from_archive = ld_i_read_from_archive * i_read_without_rfx_data = ld_i_read_without_rfx_data IMPORTING e_header = ld_e_header et_attach = ld_et_attach et_conditions = ld_et_conditions et_dyn_attr = ld_et_dyn_attr * TABLES * e_item = it_e_item * e_account = it_e_account * e_partner = it_e_partner * e_confirm = it_e_confirm * e_longtext = it_e_longtext * e_limit = it_e_limit * e_orgdata = it_e_orgdata * e_freight = it_e_freight * e_msgi = it_e_msgi * e_tax = it_e_tax * e_pridoc = it_e_pridoc * e_sdln = it_e_sdln * e_hcf = it_e_hcf * e_icf = it_e_icf * e_tol = it_e_tol * e_weight = it_e_weight * e_dep = it_e_dep * et_exchrate = it_et_exchrate * e_actval = it_e_actval * e_actval_sdln = it_e_actval_sdln * e_acc_actval = it_e_acc_actval * e_version = it_e_version * e_header_rel = it_e_header_rel * e_itmlim_rel = it_e_itmlim_rel * e_ove_rel = it_e_ove_rel * e_status = it_e_status * e_messages = it_e_messages * e_history_arch = it_e_history_arch . " BBP_PROCDOC_GETDETAIL
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_e_header  TYPE BBP_PDS_HEADER ,
ld_i_guid  TYPE CRMD_ORDERADM_H-GUID ,
it_e_item  TYPE STANDARD TABLE OF BBPT_PD_ITEM ,
wa_e_item  LIKE LINE OF it_e_item,
ld_et_attach  TYPE BBPT_PDS_ATT_T ,
ld_i_src_guid  TYPE CRMD_ORDERADM_H-GUID ,
it_e_account  TYPE STANDARD TABLE OF BBP_PDS_ACC ,
wa_e_account  LIKE LINE OF it_e_account,
ld_et_conditions  TYPE BBPT_PD_CND ,
ld_i_object_id  TYPE CRMD_ORDERADM_H-OBJECT_ID ,
it_e_partner  TYPE STANDARD TABLE OF BBP_PDS_PARTNER ,
wa_e_partner  LIKE LINE OF it_e_partner,
ld_et_dyn_attr  TYPE BBPT_PDS_DYNATTRIBUTE ,
ld_i_object_type  TYPE CRMD_ORDERADM_H-OBJECT_TYPE ,
it_e_confirm  TYPE STANDARD TABLE OF BBP_PDS_CON ,
wa_e_confirm  LIKE LINE OF it_e_confirm,
it_e_longtext  TYPE STANDARD TABLE OF BBP_PDS_LONGTEXT ,
wa_e_longtext  LIKE LINE OF it_e_longtext,
ld_i_ref_doc_no  TYPE BBP_PDHGP-REF_DOC_NO ,
ld_i_partner_no  TYPE CRMD_PARTNER-PARTNER_NO ,
it_e_limit  TYPE STANDARD TABLE OF BBP_PDS_LIMIT ,
wa_e_limit  LIKE LINE OF it_e_limit,
it_e_orgdata  TYPE STANDARD TABLE OF BBP_PDS_ORG ,
wa_e_orgdata  LIKE LINE OF it_e_orgdata,
ld_i_attach_with_doc  TYPE XFELD ,
it_e_freight  TYPE STANDARD TABLE OF BBP_PDS_FREIGHT ,
wa_e_freight  LIKE LINE OF it_e_freight,
ld_i_with_itemdata  TYPE XFELD ,
it_e_msgi  TYPE STANDARD TABLE OF BBP_PDS_MSGI ,
wa_e_msgi  LIKE LINE OF it_e_msgi,
ld_i_read_flags  TYPE BBPS_DETAIL_REQUESTED ,
ld_i_read_text_flags  TYPE BBP_PDS_READ_TEXTS ,
it_e_tax  TYPE STANDARD TABLE OF BBP_PDS_TAX ,
wa_e_tax  LIKE LINE OF it_e_tax,
it_e_pridoc  TYPE STANDARD TABLE OF BBP_PDS_PRC ,
wa_e_pridoc  LIKE LINE OF it_e_pridoc,
ld_i_without_header_totals  TYPE XFELD ,
ld_i_disp_currency  TYPE WAERS ,
it_e_sdln  TYPE STANDARD TABLE OF BBP_PDS_SDLN ,
wa_e_sdln  LIKE LINE OF it_e_sdln,
ld_i_disp_date  TYPE SYST-DATUM ,
it_e_hcf  TYPE STANDARD TABLE OF BBP_PDS_HCF ,
wa_e_hcf  LIKE LINE OF it_e_hcf,
ld_i_read_from_archive  TYPE XFELD ,
it_e_icf  TYPE STANDARD TABLE OF BBP_PDS_ICF ,
wa_e_icf  LIKE LINE OF it_e_icf,
ld_i_read_without_rfx_data  TYPE XFELD ,
it_e_tol  TYPE STANDARD TABLE OF BBP_PDS_TOL ,
wa_e_tol  LIKE LINE OF it_e_tol,
it_e_weight  TYPE STANDARD TABLE OF BBP_PDS_WEIGHT ,
wa_e_weight  LIKE LINE OF it_e_weight,
it_e_dep  TYPE STANDARD TABLE OF BBP_PDS_DEP ,
wa_e_dep  LIKE LINE OF it_e_dep,
it_et_exchrate  TYPE STANDARD TABLE OF BBP_PDS_EXR ,
wa_et_exchrate  LIKE LINE OF it_et_exchrate,
it_e_actval  TYPE STANDARD TABLE OF BBP_PDS_ACTVAL ,
wa_e_actval  LIKE LINE OF it_e_actval,
it_e_actval_sdln  TYPE STANDARD TABLE OF BBP_PDS_ACTVAL ,
wa_e_actval_sdln  LIKE LINE OF it_e_actval_sdln,
it_e_acc_actval  TYPE STANDARD TABLE OF BBP_PDS_ACTVAL ,
wa_e_acc_actval  LIKE LINE OF it_e_acc_actval,
it_e_version  TYPE STANDARD TABLE OF BBP_PDS_VERSION_LIST_INTERNAL ,
wa_e_version  LIKE LINE OF it_e_version,
it_e_header_rel  TYPE STANDARD TABLE OF BBP_PDS_HREL ,
wa_e_header_rel  LIKE LINE OF it_e_header_rel,
it_e_itmlim_rel  TYPE STANDARD TABLE OF BBP_PDS_ILREL ,
wa_e_itmlim_rel  LIKE LINE OF it_e_itmlim_rel,
it_e_ove_rel  TYPE STANDARD TABLE OF BBP_PDS_OVE_REL ,
wa_e_ove_rel  LIKE LINE OF it_e_ove_rel,
it_e_status  TYPE STANDARD TABLE OF BBP_PDS_STATUS ,
wa_e_status  LIKE LINE OF it_e_status,
it_e_messages  TYPE STANDARD TABLE OF BBP_PDS_MESSAGES ,
wa_e_messages  LIKE LINE OF it_e_messages,
it_e_history_arch  TYPE STANDARD TABLE OF BBP_PDS_HISTORY_ARCH ,
wa_e_history_arch  LIKE LINE OF it_e_history_arch.


SELECT single GUID
FROM CRMD_ORDERADM_H
INTO ld_i_guid.


"populate fields of struture and append to itab
append wa_e_item to it_e_item.

SELECT single GUID
FROM CRMD_ORDERADM_H
INTO ld_i_src_guid.


"populate fields of struture and append to itab
append wa_e_account to it_e_account.

SELECT single OBJECT_ID
FROM CRMD_ORDERADM_H
INTO ld_i_object_id.


"populate fields of struture and append to itab
append wa_e_partner to it_e_partner.

SELECT single OBJECT_TYPE
FROM CRMD_ORDERADM_H
INTO ld_i_object_type.


"populate fields of struture and append to itab
append wa_e_confirm to it_e_confirm.

"populate fields of struture and append to itab
append wa_e_longtext to it_e_longtext.

SELECT single REF_DOC_NO
FROM BBP_PDHGP
INTO ld_i_ref_doc_no.


SELECT single PARTNER_NO
FROM CRMD_PARTNER
INTO ld_i_partner_no.


"populate fields of struture and append to itab
append wa_e_limit to it_e_limit.

"populate fields of struture and append to itab
append wa_e_orgdata to it_e_orgdata.
ld_i_attach_with_doc = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_freight to it_e_freight.
ld_i_with_itemdata = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_msgi to it_e_msgi.
ld_i_read_flags = 'Check type of data required'.
ld_i_read_text_flags = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_tax to it_e_tax.

"populate fields of struture and append to itab
append wa_e_pridoc to it_e_pridoc.
ld_i_without_header_totals = 'Check type of data required'.
ld_i_disp_currency = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_sdln to it_e_sdln.

ld_i_disp_date = 20210129

"populate fields of struture and append to itab
append wa_e_hcf to it_e_hcf.
ld_i_read_from_archive = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_icf to it_e_icf.
ld_i_read_without_rfx_data = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_e_tol to it_e_tol.

"populate fields of struture and append to itab
append wa_e_weight to it_e_weight.

"populate fields of struture and append to itab
append wa_e_dep to it_e_dep.

"populate fields of struture and append to itab
append wa_et_exchrate to it_et_exchrate.

"populate fields of struture and append to itab
append wa_e_actval to it_e_actval.

"populate fields of struture and append to itab
append wa_e_actval_sdln to it_e_actval_sdln.

"populate fields of struture and append to itab
append wa_e_acc_actval to it_e_acc_actval.

"populate fields of struture and append to itab
append wa_e_version to it_e_version.

"populate fields of struture and append to itab
append wa_e_header_rel to it_e_header_rel.

"populate fields of struture and append to itab
append wa_e_itmlim_rel to it_e_itmlim_rel.

"populate fields of struture and append to itab
append wa_e_ove_rel to it_e_ove_rel.

"populate fields of struture and append to itab
append wa_e_status to it_e_status.

"populate fields of struture and append to itab
append wa_e_messages to it_e_messages.

"populate fields of struture and append to itab
append wa_e_history_arch to it_e_history_arch.

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