Examples of customer enhancement
Storage from MailCenter Outlook for supplier inquiry – transaction ME43
Customer requirement: Is it possible to send to the request and the quotation at the same time when sending to the supplier request (transactions ME43 and ME48)? Depending on the progress of the request, it would be desirable at the request or the offer and there came the idea: why not at the same time to both …
Lösung: BADi /MESERP/OL_MCPOSTDOCUMENT - Methode: /MESERP/OL_IF_MCPOSTDOCUMENT~ARCHIV_POSTED METHOD /meserp/ol_if_mcpostdocument~archiv_posted. * DATA: l_zt604 TYPE t604. * l_zt604-land1 = 'ZZ'. * l_zt604-stawn = 'ZZ1'. * MODIFY t604 FROM l_zt604. *IM_ARCHIV_ID Importing Type TOAV0-ARCHIV_ID Content Repository Identification *IM_ARC_DOC_ID Importing Type TOAV0-ARC_DOC_ID SAP ArchiveLink: Document ID *IM_AR_OBJECT Importing Type TOAOM-AR_OBJECT Document type *IM_OBJECT_ID Importing Type SAPB-SAPOBJID SAP ArchiveLink: Object ID (object identifier) *IM_SAP_OBJECT Importing Type TOAOM-SAP_OBJECT SAP ArchiveLink: Object type of business object *IM_DOC_TYPE Importing Type TOADV-DOC_TYPE SAP ArchiveLink: Document class *IM_DESCR Importing Type /MESERP/OL_D_CHAR60 Description *IM_FILENAME Importing Type CHAR255 Filename *IM_CREATOR Importing Type SYUNAME Creator (user name) *IM_/MESERP/MC_ARCLI Importing Type /MESERP/MC_ARCLI ArchiveLink *IM_/MESERP/MC_SOOIN Importing Type /MESERP/MC_SOOIN mes MC-DB: Protokoll Dokument Senderequest - eingehend " Fragen, wie hängen Anfrage und Angebot zusammen? => immer gleiche Nummer? " Lieferantenanfrage BUS2010 / ME43 " Lieferantenangebot BUS2011 / ME48 DATA: ls_/meserp/mc_sooin TYPE /meserp/mc_sooin. MOVE-CORRESPONDING im_/meserp/mc_sooin TO ls_/meserp/mc_sooin. ls_/meserp/mc_sooin-typeid = 'BUS2011'. " Eintrag Archiv & Journal *************************************************************************** IF im_arc_doc_id IS NOT INITIAL AND im_sap_object = 'BUS2012'. CALL FUNCTION 'ARCHIV_CONNECTION_INSERT' EXPORTING archiv_id = im_archiv_id arc_doc_id = im_arc_doc_id ar_date = sy-datum ar_object = im_ar_object mandant = sy-mandt object_id = ls_/meserp/mc_sooin-instid sap_object = ls_/meserp/mc_sooin-typeid doc_type = im_doc_type filename = im_filename descr = im_descr creator = im_creator EXCEPTIONS error_connectiontable = 1 OTHERS = 2. IF sy-subrc = 0. COMMIT WORK. MODIFY /meserp/mc_sooin FROM ls_/meserp/mc_sooin. "Journaleintrag ENDIF. ENDIF.
ENDMETHODE.
Expansion of the purchasing release strategy
Customer requirement: For contracts with a specific product group (long-term contracts), we need our own release strategy. How can we implement this?
Solution: CMOD extension M06E0004 – Changes to the communication structure for Freig. Receipt. With this extension, you can change the communication structure to the
Change the release strategy for purchasing documents.
*&---------------------------------------------------------------------* *& Include ZXM06U22 *&---------------------------------------------------------------------* DATA: wa_bekpo TYPE LINE OF mmpur_bekpo. e_cekko = i_cekko. CASE i_cekko-bstyp. WHEN 'F'. IF i_cekko-matkl IS INITIAL. "different matkl in items READ TABLE it_bekpo INTO wa_bekpo WITH KEY matkl = '325'. IF sy-subrc = 0. e_cekko-matkl = '325'. ELSE. e_cekko-matkl = '324'. ENDIF. ENDIF. WHEN 'K'. e_cekko-matkl = '325'. "Kontrakte werden analog Warengruppe 325 geprüft, sprich alle werden zunächst gesperrt. WHEN OTHERS. "do nothing ENDCASE.
Set BCC receiver automatically
Customer requirement: Each email should be automatically sent to an internal employee with BCC.
Solution: Programming MailCenter User-Exit ZMESERP_MC_CUSTOMER_007
IF i_vkorg = '4000'. IF sy-uname = 'USER01' OR sy-uname = 'USER02' OR sy-uname = 'USER03'. " lwa_address-e_mail = 'info@mustermann.com'. i_receiver-mbcc1 = lwa_address-e_mail. ELSE. MOVE sy-uname TO lv_uname. CLEAR lwa_address. CALL FUNCTION 'BAPI_USER_GET_DETAIL' EXPORTING username = lv_uname IMPORTING address = lwa_address TABLES return = i_return. IF lwa_address-e_mail IS NOT INITIAL. i_receiver-mbcc1 = lwa_address-e_mail. ENDIF. ENDIF. ENDIF.
Other interesting links:
SAP IDoc Overview
SAP automatic ordering
Release SAP order