SAP Function Modules

TPM_GENERATE_DERIVED_TRANS SAP Function module - Generate Derived Business Transactions







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

Associated Function Group: TPM_TRL_POSITION
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM TPM_GENERATE_DERIVED_TRANS - TPM GENERATE DERIVED TRANS





CALL FUNCTION 'TPM_GENERATE_DERIVED_TRANS' "Generate Derived Business Transactions
  EXPORTING
    im_tcode =                  " syst_tcode    System tcode
    im_tab_position_oid =       " tpmy_guid     Table Type Treasury Ledger Position
    im_flg_testrun = TPMCO_TRUE  " i            Flag Test Run
    im_fi_post_date =           " tpm_fi_posting_date  Different FI Posting Date
    im_fi_post_period =         " tpm_fi_posting_period  Different FI Posting Period
    im_fi_document_date =       " bldat         Document Date in Document
    im_reversal_reason =        " sstogrd       Reason for Reversal
    im_dbt_aplan_flg = TPMCO_XFALSE  " xfeld    Checkbox
    im_commit_work = TPMCO_XTRUE  " xfeld       Checkbox
*   im_show_log = TPMCO_XTRUE   " xfeld         Checkbox
  IMPORTING
    ex_tab_ph_message =         " bal_t_msg     Application Log: Table with Messages
    ev_return =                 " tpm_return_type  Return type when calling up a method
    et_alv_trl_transactions_flat =   " trly_alv_trl_transaction_flat  Type for structure TRLS_ALV_TRL_TRANSACTION_FLAT
    et_alv_created_der_flows_flat =   " trly_alv_derived_flow_flat  Type for structure TRLS_ALV_DERIVED_FLOW_FLAT
    et_alv_deleted_der_flows_flat =   " trly_alv_derived_flow_flat  Type for structure TRLS_ALV_DERIVED_FLOW_FLAT
    .  "  TPM_GENERATE_DERIVED_TRANS

ABAP code example for Function Module TPM_GENERATE_DERIVED_TRANS





The ABAP code below is a full code listing to execute function module TPM_GENERATE_DERIVED_TRANS 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_ex_tab_ph_message  TYPE BAL_T_MSG ,
ld_ev_return  TYPE TPM_RETURN_TYPE ,
ld_et_alv_trl_transactions_flat  TYPE TRLY_ALV_TRL_TRANSACTION_FLAT ,
ld_et_alv_created_der_flows_flat  TYPE TRLY_ALV_DERIVED_FLOW_FLAT ,
ld_et_alv_deleted_der_flows_flat  TYPE TRLY_ALV_DERIVED_FLOW_FLAT .

DATA(ld_im_tcode) = 'some text here'.
DATA(ld_im_tab_position_oid) = 'some text here'.
DATA(ld_im_flg_testrun) = 'some text here'.
DATA(ld_im_fi_post_date) = 'some text here'.
DATA(ld_im_fi_post_period) = 'some text here'.
DATA(ld_im_fi_document_date) = 'some text here'.
DATA(ld_im_reversal_reason) = 'some text here'.
DATA(ld_im_dbt_aplan_flg) = 'some text here'.
DATA(ld_im_commit_work) = 'some text here'.
DATA(ld_im_show_log) = 'some text here'. . CALL FUNCTION 'TPM_GENERATE_DERIVED_TRANS' EXPORTING im_tcode = ld_im_tcode im_tab_position_oid = ld_im_tab_position_oid im_flg_testrun = ld_im_flg_testrun im_fi_post_date = ld_im_fi_post_date im_fi_post_period = ld_im_fi_post_period im_fi_document_date = ld_im_fi_document_date im_reversal_reason = ld_im_reversal_reason im_dbt_aplan_flg = ld_im_dbt_aplan_flg im_commit_work = ld_im_commit_work * im_show_log = ld_im_show_log IMPORTING ex_tab_ph_message = ld_ex_tab_ph_message ev_return = ld_ev_return et_alv_trl_transactions_flat = ld_et_alv_trl_transactions_flat et_alv_created_der_flows_flat = ld_et_alv_created_der_flows_flat et_alv_deleted_der_flows_flat = ld_et_alv_deleted_der_flows_flat . " TPM_GENERATE_DERIVED_TRANS
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_ex_tab_ph_message  TYPE BAL_T_MSG ,
ld_im_tcode  TYPE SYST_TCODE ,
ld_ev_return  TYPE TPM_RETURN_TYPE ,
ld_im_tab_position_oid  TYPE TPMY_GUID ,
ld_et_alv_trl_transactions_flat  TYPE TRLY_ALV_TRL_TRANSACTION_FLAT ,
ld_im_flg_testrun  TYPE I ,
ld_et_alv_created_der_flows_flat  TYPE TRLY_ALV_DERIVED_FLOW_FLAT ,
ld_im_fi_post_date  TYPE TPM_FI_POSTING_DATE ,
ld_et_alv_deleted_der_flows_flat  TYPE TRLY_ALV_DERIVED_FLOW_FLAT ,
ld_im_fi_post_period  TYPE TPM_FI_POSTING_PERIOD ,
ld_im_fi_document_date  TYPE BLDAT ,
ld_im_reversal_reason  TYPE SSTOGRD ,
ld_im_dbt_aplan_flg  TYPE XFELD ,
ld_im_commit_work  TYPE XFELD ,
ld_im_show_log  TYPE XFELD .

ld_im_tcode = 'some text here'.
ld_im_tab_position_oid = 'some text here'.
ld_im_flg_testrun = 'some text here'.
ld_im_fi_post_date = 'some text here'.
ld_im_fi_post_period = 'some text here'.
ld_im_fi_document_date = 'some text here'.
ld_im_reversal_reason = 'some text here'.
ld_im_dbt_aplan_flg = 'some text here'.
ld_im_commit_work = 'some text here'.
ld_im_show_log = 'some text here'.

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