SAP Function Modules

PT_USER_EXIT_DART SAP Function module - Dart : Portugal







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

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


Pattern for FM PT_USER_EXIT_DART - PT USER EXIT DART





CALL FUNCTION 'PT_USER_EXIT_DART' "Dart : Portugal
  EXPORTING
    wa_master =                 " ptdart_items  DART Fileds : XML file
    transaction_type =          " i
*   wa_fi_hd =                  " txw_fi_hd     FI Document header
*   wa_bi_hd =                  " txw_bi_hd     SD Billing document header
*   wa_fi_hd_gl =               " bkpf          Accounting Document Header
*   wa_fi_pos_gl =              " bseg          Accounting Document Segment
*   wa_fi_hd1 =                 " bkpf          Accounting Document Header
*   i_vbeln =                   " vbrk-vbeln    Billing Document
*   i_bukrs =                   " t001-bukrs    Company Code
*   i_year =                    " bkpf-gjahr    Fiscal Year
*   i_withcode =                " wt_withcd     Withholding tax code
*   i_ldgr =                    " rldnr         Ledger
*   iv_withtyp =                " witht         Indicator for withholding tax type
  IMPORTING
    product_type =              " mtref         Reference material type
    tdgl_desc =                 " bktxt         Document Header Text
    invoice_type =              " bktxt         Document Header Text
    wa_master_export =          " ptdart_items  DART Fileds : XML file
    wrk_amount =                " kwert         Condition value
    prod_code =                 " text30        Material Number
    prod_description =          " ptdart_items-sd_arktx  Material Description
    gl_date =                   " budat         Posting Date in the Document
    sys_date =                  " cpudt         Day On Which Accounting Document Was Entered
    cputm_time =                " cputm         Time of Entry
    journal_desc =              " text60        Text Field of Length 60
    trans_desc =                " ltext         Long Text
    doc_type =                  " fkart         Document Type
    trans_desc_lines =          " text60        DART Fileds : XML file
    billing_no =                " bseg-vbeln    Assignment of Item Numbers: Material Doc. - Purchasing Doc.
    kunrg =                     " vbrk-kunrg    Payer
    ev_ext_sys =                " bktxt         Document Header Text
    ev_gv_hash =                " text200       Text for translation
    ev_hashcontrol =            " text200       Text for translation
    ev_invoice_no =             " text60        Text Field of Length 60
    ev_invoice_status =         " char1         Single-Character Indicator
    e_archive =                 " char1         Single-Character Indicator
    ev_exl_bill_doc =           " bktxt         Document Header Text
    ev_sourcebilling =          " char1         Single-Character Indicator
    ev_eac_code =               " t001z-paval   Parameter value
    ev_wth_taxtype =            " char10        Character Field Length = 10
    ev_gl_string =              " string
* TABLES
*   it_products =               " saftpt_prods  SAFT Product structure
    .  "  PT_USER_EXIT_DART

ABAP code example for Function Module PT_USER_EXIT_DART





The ABAP code below is a full code listing to execute function module PT_USER_EXIT_DART 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_product_type  TYPE MTREF ,
ld_tdgl_desc  TYPE BKTXT ,
ld_invoice_type  TYPE BKTXT ,
ld_wa_master_export  TYPE PTDART_ITEMS ,
ld_wrk_amount  TYPE KWERT ,
ld_prod_code  TYPE TEXT30 ,
ld_prod_description  TYPE PTDART_ITEMS-SD_ARKTX ,
ld_gl_date  TYPE BUDAT ,
ld_sys_date  TYPE CPUDT ,
ld_cputm_time  TYPE CPUTM ,
ld_journal_desc  TYPE TEXT60 ,
ld_trans_desc  TYPE LTEXT ,
ld_doc_type  TYPE FKART ,
ld_trans_desc_lines  TYPE TEXT60 ,
ld_billing_no  TYPE BSEG-VBELN ,
ld_kunrg  TYPE VBRK-KUNRG ,
ld_ev_ext_sys  TYPE BKTXT ,
ld_ev_gv_hash  TYPE TEXT200 ,
ld_ev_hashcontrol  TYPE TEXT200 ,
ld_ev_invoice_no  TYPE TEXT60 ,
ld_ev_invoice_status  TYPE CHAR1 ,
ld_e_archive  TYPE CHAR1 ,
ld_ev_exl_bill_doc  TYPE BKTXT ,
ld_ev_sourcebilling  TYPE CHAR1 ,
ld_ev_eac_code  TYPE T001Z-PAVAL ,
ld_ev_wth_taxtype  TYPE CHAR10 ,
ld_ev_gl_string  TYPE STRING ,
it_it_products  TYPE STANDARD TABLE OF SAFTPT_PRODS,"TABLES PARAM
wa_it_products  LIKE LINE OF it_it_products .

DATA(ld_wa_master) = 'Check type of data required'.
DATA(ld_transaction_type) = 'Check type of data required'.
DATA(ld_wa_fi_hd) = 'Check type of data required'.
DATA(ld_wa_bi_hd) = 'Check type of data required'.
DATA(ld_wa_fi_hd_gl) = 'Check type of data required'.
DATA(ld_wa_fi_pos_gl) = 'Check type of data required'.
DATA(ld_wa_fi_hd1) = 'Check type of data required'.

SELECT single VBELN
FROM VBRK
INTO @DATA(ld_i_vbeln).


SELECT single BUKRS
FROM T001
INTO @DATA(ld_i_bukrs).


SELECT single GJAHR
FROM BKPF
INTO @DATA(ld_i_year).

DATA(ld_i_withcode) = 'Check type of data required'.
DATA(ld_i_ldgr) = 'Check type of data required'.
DATA(ld_iv_withtyp) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_products to it_it_products. . CALL FUNCTION 'PT_USER_EXIT_DART' EXPORTING wa_master = ld_wa_master transaction_type = ld_transaction_type * wa_fi_hd = ld_wa_fi_hd * wa_bi_hd = ld_wa_bi_hd * wa_fi_hd_gl = ld_wa_fi_hd_gl * wa_fi_pos_gl = ld_wa_fi_pos_gl * wa_fi_hd1 = ld_wa_fi_hd1 * i_vbeln = ld_i_vbeln * i_bukrs = ld_i_bukrs * i_year = ld_i_year * i_withcode = ld_i_withcode * i_ldgr = ld_i_ldgr * iv_withtyp = ld_iv_withtyp IMPORTING product_type = ld_product_type tdgl_desc = ld_tdgl_desc invoice_type = ld_invoice_type wa_master_export = ld_wa_master_export wrk_amount = ld_wrk_amount prod_code = ld_prod_code prod_description = ld_prod_description gl_date = ld_gl_date sys_date = ld_sys_date cputm_time = ld_cputm_time journal_desc = ld_journal_desc trans_desc = ld_trans_desc doc_type = ld_doc_type trans_desc_lines = ld_trans_desc_lines billing_no = ld_billing_no kunrg = ld_kunrg ev_ext_sys = ld_ev_ext_sys ev_gv_hash = ld_ev_gv_hash ev_hashcontrol = ld_ev_hashcontrol ev_invoice_no = ld_ev_invoice_no ev_invoice_status = ld_ev_invoice_status e_archive = ld_e_archive ev_exl_bill_doc = ld_ev_exl_bill_doc ev_sourcebilling = ld_ev_sourcebilling ev_eac_code = ld_ev_eac_code ev_wth_taxtype = ld_ev_wth_taxtype ev_gl_string = ld_ev_gl_string * TABLES * it_products = it_it_products . " PT_USER_EXIT_DART
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:
it_it_products  TYPE STANDARD TABLE OF SAFTPT_PRODS ,
wa_it_products  LIKE LINE OF it_it_products,
ld_wa_master  TYPE PTDART_ITEMS ,
ld_product_type  TYPE MTREF ,
ld_transaction_type  TYPE I ,
ld_tdgl_desc  TYPE BKTXT ,
ld_wa_fi_hd  TYPE TXW_FI_HD ,
ld_invoice_type  TYPE BKTXT ,
ld_wa_master_export  TYPE PTDART_ITEMS ,
ld_wa_bi_hd  TYPE TXW_BI_HD ,
ld_wrk_amount  TYPE KWERT ,
ld_wa_fi_hd_gl  TYPE BKPF ,
ld_prod_code  TYPE TEXT30 ,
ld_wa_fi_pos_gl  TYPE BSEG ,
ld_prod_description  TYPE PTDART_ITEMS-SD_ARKTX ,
ld_wa_fi_hd1  TYPE BKPF ,
ld_gl_date  TYPE BUDAT ,
ld_i_vbeln  TYPE VBRK-VBELN ,
ld_sys_date  TYPE CPUDT ,
ld_i_bukrs  TYPE T001-BUKRS ,
ld_cputm_time  TYPE CPUTM ,
ld_i_year  TYPE BKPF-GJAHR ,
ld_journal_desc  TYPE TEXT60 ,
ld_i_withcode  TYPE WT_WITHCD ,
ld_trans_desc  TYPE LTEXT ,
ld_i_ldgr  TYPE RLDNR ,
ld_doc_type  TYPE FKART ,
ld_iv_withtyp  TYPE WITHT ,
ld_trans_desc_lines  TYPE TEXT60 ,
ld_billing_no  TYPE BSEG-VBELN ,
ld_kunrg  TYPE VBRK-KUNRG ,
ld_ev_ext_sys  TYPE BKTXT ,
ld_ev_gv_hash  TYPE TEXT200 ,
ld_ev_hashcontrol  TYPE TEXT200 ,
ld_ev_invoice_no  TYPE TEXT60 ,
ld_ev_invoice_status  TYPE CHAR1 ,
ld_e_archive  TYPE CHAR1 ,
ld_ev_exl_bill_doc  TYPE BKTXT ,
ld_ev_sourcebilling  TYPE CHAR1 ,
ld_ev_eac_code  TYPE T001Z-PAVAL ,
ld_ev_wth_taxtype  TYPE CHAR10 ,
ld_ev_gl_string  TYPE STRING .


"populate fields of struture and append to itab
append wa_it_products to it_it_products.
ld_wa_master = 'Check type of data required'.
ld_transaction_type = 'Check type of data required'.
ld_wa_fi_hd = 'Check type of data required'.
ld_wa_bi_hd = 'Check type of data required'.
ld_wa_fi_hd_gl = 'Check type of data required'.
ld_wa_fi_pos_gl = 'Check type of data required'.
ld_wa_fi_hd1 = 'Check type of data required'.

SELECT single VBELN
FROM VBRK
INTO ld_i_vbeln.


SELECT single BUKRS
FROM T001
INTO ld_i_bukrs.


SELECT single GJAHR
FROM BKPF
INTO ld_i_year.

ld_i_withcode = 'Check type of data required'.
ld_i_ldgr = 'Check type of data required'.
ld_iv_withtyp = 'Check type of data required'.

SAP Documentation for FM PT_USER_EXIT_DART


You can specify the values of some XML fields that are related to the master data of Financial Accounting and Billing. You can ...See here for full SAP fm documentation

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