Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Your Export Parameters

In Debug Mode, this FM carried data as follows

I_ITEM had FPAYH, FPAYHX and FPAYP structures

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_item-fpayh-zstra IS NOT INITIAL.
  o_value = lt_item-fpayh-zstra.
  c_value = lt_item-fpayh-zstra.
ELSE .
  o_value = lt_item-fpayh-zpfac.
  c_value = lt_item-fpayh-zpfac.
ENDIF.

*}   INSERT
ENDFUNCTION.

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

1 Comment