Presentation is loading. Please wait.

Presentation is loading. Please wait.

User Documentation PMI Interface

Similar presentations


Presentation on theme: "User Documentation PMI Interface"— Presentation transcript:

1 User Documentation PMI Interface
Process Flow and Embedding of BAdI Methods Siemens AG For internal use only! Document status: Released Date changed: Feb 26, 2013

2 Transaction YPMI _ Program YPPMD_MAIN YPMI 1 PMI_REQUEST PRODAT PRICAT
PBO 0100: METHOD default_values_for_screen_100 modify_screen_attributes FORM check_authority AUTH Object 'V_VBAK_VKO' PAI: METHOD check_authority FORM y_handle_dynpro100_input VKORG -> BUKRS -> Req. country VKORG -> First entry in yypmi_relations METHOD select_yypmi_relations YYSES Parameter ‘RFCJSIC’? Inactive PMI Request via SICON Active Call FUNCTION /SIE/SF_ED_PMI_PREP Check mandatory fields and sort options Call FUNCTION /SIE/SF_ED_PMI_REQUEST PMI_REQUEST Call FUNCTION /SIE/SF_ED_PMI_DATA_CHECK For PRODAT IDOC For PRICAT IDOC ‘O’ PRODAT ‘O’ PRICAT YPMI 2

3 Save_Purchasing_Cond
Transaction YPMI _ YPMI 2 Program YPPMD_MAIN Display IDOC Data e.g. in screen ‚Basic Data‘: PBO 0200: METHOD modify_screen_attributes FORM  y_save_product_and_common Call FUNCTION Y_PROCESS_MATERIAL PROCESS_MATERIAL Update Material Master? Display error messages in popup Failed Successful Save_Purchasing_Cond Save_Sales_Cond

4 Transaction VA01, etc. _ Program SAPMV45A FuGr /SIE/SF_ED_PMI
MODULE VBAP-MATNR_PRUEFEN YYSES Parameter ‘RFCJSIC’? Inactive PMI Request via SICON Active PMI Request via JSIC FuGr /SIE/SF_ED_PMI FUNCTION /SIE/SF_ED_PMI_SD YTY01 Identifier ‘0066’? Return to Vaxx: User must enter SAP MATNR in field “Material” Inactive Active “Material” = MARA-MATNR exists, incl. MVKE record? Yes Return to Vaxx: Return SAP MATNR in field “Material” No PMI_INTERFACE

5 FuGr /SIE/SF_ED_PMI PMI_INTERFACE PMI_INTERFACE_INT
FUNCTION /SIE/SF_ED_PMI_INTERFACE Checks and Initialization METHOD determine_sender_matnr VKORG -> BUKRS -> Req. country VKORG/VTWEG -> YYPMI_RELATIONS Request parameters GS_YPPMD_FDBQUERY METHOD default_values_for_screen_100 Call FUNCTION /SIE/SF_ED_PMI_PREP Check mandatory fields and sort options Search SAP MATNR with MLFB and options: Several SAP MATNR exist Unique SAP MATNR exists including MVKE Either no SAP MATNR or no suitable MVKE record Return to caller with error handling Return to caller with SAP MATNR YYSES Parameter ‘VAXX_VKORG ’? No Return to caller: No PMI request for VKORG INCLUDE zx_autchk_pmi_interface For local authority checks METHOD enable_pmi_in_so : Possibility to suppress the PMI call VAxx: Call FUNCTION /SIE/SF_ED_PMI_INTERFACE_INT DESTINATION 'NONE' PMI_INTERFACE_INT Yes MVKE created? Return to call with SAP MATNR in field ‘Material’ Yes No Display error messages in popup In case of errors -> METHOD modify_message_parameters

6 Save_Purchasing_Cond
PMI_INTERFACE_INT FuGr /SIE/SF_ED_PMI FUNCTION /SIE/SF_ED_PMI_INTERFACE_INT Call FUNCTION /SIE/SF_ED_PMI_REQUEST PMI_REQUEST Call FUNCTION /SIE/SF_ED_PMI_DATA_CHECK For PRODAT IDOC For PRICAT IDOC ‘O’ PRODAT ‘O’ PRICAT PRODAT & PRICAT without errors? No Return to caller for error handling Yes Call FUNCTION Y_PROCESS_MATERIAL PROCESS_MATERIAL Update Material Master? Return to caller for error handling Failed Successful Save_Purchasing_Cond Save_Sales_Cond Page 6

7 FuGr /SIE/SF_ED_PMI PMI_REQUEST FUNCTION /SIE/SF_ED_PMI_REQUEST
Determine RFC destination for JSIC call / YYSES ‚RFCJSIC‘ Prio1: For VKORG if defined Prio 2: For Region if defined Prio 3: Default for client Determine Host for RFC destination PMI key / YYSES 'PMIKEY‚ Execution mode ‚run‘ or ‚test‘ Complete virtual YPMIRQ IDOC METHOD modify_jsic_parameter Call Function /SIE/SF_CM_WS_PMIRQ  DESTINATION <Dest for JSIC> RFC: Call PMI via JSIC Response status YOSTAT? Display error information in popup Not ok ‘NOK’ OK METHOD prepare_idoc Determine request type METHOD modify_request_type Store PRODAT and PRICAT in T_PRODAT_IDOC & T_PRICAT_IDOC Remark: PMI via JSIC is not calling METHOD select_online_source See: FORM jsic_pmi_data_transfer

8 FM Y_ED_IDOC_INPUT_PRODAT_N
1) FuGr YPPMD FM Y_ED_IDOC_INPUT_PRODAT_N Determine message sender (NAD+MS) and receiver (NAD+MR) ORGID Initializations and SELECT customizing B: Determine CS_UNIT of MS from yypmi_relations B: Determine SIE division of MS METHOD prepare_idoc for tests METHOD assign_group_to_orgid Read YYPMI_RELATIONS for CS_UNIT Read YYSES recip. indep. -> S_PARAM For each item/material in the IDOC: Read IDOC item data -> store in SESMAX structures & tables METHOD no_update_for_selected_matno Fill header data into structure S_YYPPMDMAX Determine MTART from YYSES Determine SAP MATNR Determine request type: O, I or M Determine relevant sets of org. units Determine SAP division Determine SAP supplier numbers METHOD modify_sesmax METHOD determine_printform METHOD determine_sortform METHOD determine_sap_matnr METHOD modify_request_type METHOD determine_division METHOD modify_orgunits METHOD determine_kreditor O: FORM DERIVATIONS_FOR_DISPLAY Derivations (V1) Process material? Yes ‘O’ or ‘B’ ? No ‘O’ 1) Next Item / material ‘B’ B: End of IDOC processing O: Return to caller PROCESS_MATERIAL ‘O’ : Input method ‘O’ is used for PMI online requests ‘B’ : Input method ‘B’ is used for IDOC processing (in batch)

9 FuGr YPPMD Derivations Determine Product Hierarchy
Call Function Y_DETERMINE_PRODH METHOD determine_prodh Determine Profit Center Call Function Y_DETERMINE_PRCTR METHOD determine_prctr Determine material pricing group Call Function Y_DETERMINE_KONDM METHOD determine_kondm V1) Store org. units in structure S_YYPPMDMAX Call Function Y_ED_ORGUNITS_TO_PPMDMAX V1) Determine Tax Classification Call Function Y_GET_TAXKM METHOD get_taxkm Determine sales and purchase status Call Function Y_DERIVE_SALES_PURCHASE_STATUS METHOD determine_sales_status Variant V1) : Only relevant for FORM DERIVATIONS_FOR_DISPLAY

10 FILL_BAPI_STR_SINGLE
PROCESS_MATERIAL FuGr YPPMD FUNCTION Y_PROCESS_MATERIAL YYSES fast_process PPMD2 Normal processing with FM Y_ED_BAPI_CALL_PPMD Inactive Active Initializations for fast process, etc. For each relevant set of org units: Fill BAPI structures for one set of org. units FILL_BAPI_STR_SINGLE Next set of org. units Update all org. views of material with BAPI_MATERIAL_SAVEREPLICA METHOD user_modif_material_data If MARA exists: Update export control data (MAEX), future values, IPC URL, battery data and SVHC codes METHOD modify_maex_all Material update successful? Error handling No Yes Update IPC data METHODs: mod_pir_data_bef_aggregation modify_pir_data modify_bdcdata_pir ework_after_call_ta Update purchasing info records (PIR) Update source list (SL) METHODs: modify sourcelist_plants modify_bdcdata_source_list Rework_after_call_ta Update listing

11 FILL_BAPI_STR_SINGLE
FuGr YPPMD Adjust planned delivery time for suppliers, get material views, etc. METHOD suppress_bapi_processing Derive product hierarchy, profit center, material pricing group and sales & purchase status Derivations Store org. units in structure S_YYPPMDMAX Call Function Y_ED_ORGUNITS_TO_PPMDMAX METHOD modify_max_structures Fill BAPI structures dynamically, using entries in YYPPMBAPI_MAND and YYPPMDBAPI METHOD modify_yyppmdbapi METHOD determine_existing_views METHOD modify_internal_yyppmdbapi Process alternative units of measures, raw material surcharges, futures values, etc. Determine tax classification METHOD get_taxkm Append BAPI structures for current set of org. units to tables for mass update with BAPI_MATERIAL_SAVEREPLICA Prepare supplier data for update of PIR Call Function Y_ED_FILL_EKITABLE METHOD modify_yyppmd_eki_entries

12 FM Y_ED_IDOC_INPUT_PRICAT_N
1) FuGr YPPMD Determine message sender (NAD+MS) and receiver (NAD+MR) ORGID Initializations Select data from customizing tables Determine owner of (all) material(s) METHOD prepare_idoc for tests YYPMI_CONDITIONS B: Determine SIE division of MS B: Determine CS_UNIT of MS from yypmi_relations: METHOD assign_group_to_orgid Read YYPMI_RELATIONS for CS_UNIT Read YYSES -> S_PARAM Read IDOC item data -> store in SESMAX structures & tables FILL_YYCOND ‘O’ or ‘B’ ? ‘O’ Return to caller 1) ‘B’ B: Save sales conditions Save_Cond_1 B: Save purchase conditions Save_Cond_2 B: End of IDOC processing ‘O’ : Input method ‘O’ is used for PMI online requests ‘B’ : Input method ‘B’ is used for IDOC processing (in batch)

13 FuGr YPPMD YYPMI_CONDITIONS FILL_YYCOND FM Y_EXTEND_YYPMI_CONDITIONS
Read table YYPMI_CONDITIONS, YYSES, T685A and T681 and store extended data in int. table I_YYPMI_CONDITIONS FILL_YYCOND For each item/material in the IDOC: Read IDOC item data -> store in SESMAX structures & tables Determine SAP MATNR Determine request type: O, I or M Determine relevant sets of org. units METHOD determine_printform METHOD determine_sortform METHOD determine_sap_matnr METHOD modify_request_type METHOD modify_orgunits Completion of I_YYCOND METHOD modify_yycond_entries Next Item / material Modify I_YYCOND METHOD user_cond_process

14 Save_Cond_1 FuGr YPPMD FM Y_SAVE_SALES_CONDITIONS Process sales and purchase conditions depending on S_PARAM and content of I_YYCOND Initializations METHOD add_cond_process B: Open BI session e.g. for VK15 METHOD modify_bi_name For each relevant entry in I_YYCOND: PS_PARAM-INPUT_MM = ‘B’ or ‘C’ ? ‘Yes’ Fill pt_yypmi_purchase_conditions ‘No’ METHOD determine_kreditor ‘No’ PS_PARAM-INPUT_SD = ‘B’ or ‘C’ ? ‘Yes’ Fill bdc_tab with data for TA VK15 Create or update sales conditions METHOD modify_komg METHOD modify_bi_name METHOD rework_after_call_ta Next condition record

15 O: Purchase condition exists?
Save_Cond_2 FuGr YPPMD FM Y_SAVE_PURCHASE_CONDITIONS Process all purchase conditions in PT_YYPMI_PURCHASE_CONDITIONS B: Open BI session e.g. for ME12 METHOD modify_bi_name For each entry in PT_YYPMI_PURCHASE_CONDITION Read PIR if existing O: Purchase condition exists? ‘Yes’ ‘No’ Fill bdc_tab with data for TA ME12 Create/ update purchase conditions or Delete purchase condition METHOD modify_bdc_table METHOD modify_bi_name or METHOD modify_bdc_delete_pir METHOD rework_after_call_ta Next purchase condition

16 Change History Changes in Document Version 12.2
New document describing the process flow with fast process (TTP687 PRODAT IN) and PMI Online via JSIC (TTP807) TTP807, TTP687 Feb 26, 2013


Download ppt "User Documentation PMI Interface"

Similar presentations


Ads by Google