Professional Documents
Culture Documents
Products Industries
Industries Support
Support Training
Training Community
Community Developer
Developer
Partner
Partner About
About
Bohdan Petrushchak
more by this author
FIN (Finance)
share
0 share
0 tweet share
1
Follow
Hello SAPers!
As promised earlier in some of my posts, here is an article on usage
of exit modules in DME engine. I hope this post would be of interest
for you and will give some new insights on this functionality. This post
contains a lot of technical details, if you have any questions or need
some clarification, feel free to post them as comments.
As you can see, the only difference between templates with extended
interfaces is in component types, whereas their internal structures are
the same. From history point of view, template
DMEE_EXIT_TEMPLATE_EXTENDED was introduced earlier.
Starting from release 500 of SAP_APPL component template
DMEE_EXIT_TEMPLATE_EXTEND_ABA was added.
FUNCTION Z_DMEE_COMPANY_TAX_NUMBER.
*"
*"*"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
*"
data:
ls_item type dmee_paym_if_type,
lv_stcd1 type stcd1.
ls_item = i_item.
if sysubrc is initial.
c_value = lv_stcd1.
endif.
ENDFUNCTION.
You can solve it by creating two nodes referencing the same exit
module besides one technical node with reference ID
“VEND_COUNTRY” that will store the reference to country of vendor.
Source code might look as follows:
FUNCTION Z_DMEE_COMPANY_NAME.
*"
*"*"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
*"
data:
ls_item type dmee_paym_if_type,
ls_ref_node type dmee_node_if_aba,
lv_name1 type text40.
ls_item = i_item.
c_value = lv_name1.
when 'N_5409292630'.
select single name1 title
from adrc into lv_name1
where addrnumber = ls_itemfpayhxadrnr
and nation = 8. " Ukrainian version
c_value = lv_name1.
endcase.
ENDFUNCTION.
As you can see, usage of exit modules with extended interface allows
you to populate DMEE nodes dynamically (based on their ID) and
also allows you to read the values of other nodes (i.e. node with
reference ID “VEND_COUNTRY”) and link some logic to these
values. This approach might be useful when you have several nodes
with similar purpose – then you can create one FM that centralizes
their logic. However, major drawback of this approach is that by
linking values to node IDs, you loose the advantage of flexibility i.e.
your exit module becomes dependent on one DMEE tree and cannot
be re-used without modifications in another DMEE for similar
purpose.
I hope this post was useful! Your suggestions and comments are
welcome!
Regards,
Bohdan Petrushchak
P.S. Examples in this post might seem quite trivial, but they are
provided for demonstration purposes only and are intended to deliver
the basic idea behind this functionality.
Alert Moderator
7 Comments
You must be Logged on to comment or reply to a post.
Abdul Hakim
Very useful blog. Thanks for sharing this with the community.
Thanks,
Hakim
Hi Abdul,
Regards,
Bohdan
Len Spinelli
Leo
Hi Len,
Regards,
Bohdan
Sergey Chumakov
Hi Bohdan.
Recently I’ve found out that DMEE exits now have different interface for
the incoming files.
*” IMPORTING
*” REFERENCE(I_INTERFACE) TYPE
DMEE_EXIT_INTERFACE_INCOM_ABA
*” EXPORTING
*” REFERENCE(E_VALUE)
Regards,
Bohdan
Bobby Johnson
Excellent article Bohdan! This was very enlightening, thank you for sharing!
Share & Follow
Privacy Terms of Use Legal Disclosure Copyright Trademark Sitemap Newsletter