Skip to Content

Sample Implementation of Template DMEE_EXIT_TEMPLATE_EXTEND_ABA

Requirement for custom mapping function in our case:  Outgoing Payment File

On our BAFF (Bank of America) formats, partner (vendor) address was mandatory, in our systems though we either had a physical address or PO Box address, when physical address is empty a custom function was required to fill in the PO Box address instead.

_______________

I started with copying DMEE_EXIT_TEMPLATE_EXTEND_ABA to a customer namespace Function Module like ZZDMEE_EXIT_FOR_ADDRESS.

If you copied correctly, your import parameters will look like this

ScreenShot027.jpg

Your Export Parameters

ScreenShot028.jpg

In Debug Mode, this FM carried data as follows

ScreenShot029.jpg

I_ITEM had FPAYH, FPAYHX and FPAYP structures

ScreenShot020.jpg

So based on what is available, this snippet of code did the trick.

   FUNCTION ZZDMEE_EXIT_FOR_ADDRESS.
*”———————————————————————-
*”*”Local Interface:
*”  IMPORTING
*”     VALUE(I_TREE_TYPE) TYPE  DMEE_TREETYPE_ABA
*”     VALUE(I_TREE_ID) TYPE  DMEE_TREEID_ABA
*”     VALUE(I_ITEM)
*”     VALUE(I_PARAM)
*”     VALUE(I_UPARAM)
*”     REFERENCE(I_EXTENSION) TYPE  DMEE_EXIT_INTERFACE_ABA
*”  EXPORTING
*”     REFERENCE(O_VALUE)
*”     REFERENCE(C_VALUE)
*”     REFERENCE(N_VALUE)
*”     REFERENCE(P_VALUE)
*”  TABLES
*”      I_TAB
*”———————————————————————-
*{   INSERT         ECDK916684                                        1

* Extended template function module ———————————–*
DATA lt_item TYPE  dmee_paym_if_type.
lt_item = i_item.
IF lt_itemfpayhzstra IS NOT INITIAL.
  o_value = lt_itemfpayhzstra.
  c_value = lt_itemfpayhzstra.
ELSE .
  o_value = lt_itemfpayhzpfac.
  c_value = lt_itemfpayhzpfac.
ENDIF.

*}   INSERT
ENDFUNCTION.

If this entry was useful to you, please leave a comment. Thanks for reading.

1 Comment
You must be Logged on to comment or reply to a post.