MDG read helper
for BP model
for MM model
코드:
CLASS zcl_mdp_read_helper DEFINITION
PUBLIC
CREATE PUBLIC .
PUBLIC SECTION.
TYPES ts_bp_key TYPE /mdgbp/_s_bp_ky_bp_header .
TYPES:
tt_bp_key TYPE SORTED TABLE OF /mdgbp/_s_bp_ky_bp_header WITH NON-UNIQUE KEY bp_header .
TYPES ts_bp_bp_header TYPE mdg_bs_bp_bp_header .
TYPES:
tt_bp_bp_header TYPE SORTED TABLE OF mdg_bs_bp_bp_header WITH NON-UNIQUE KEY bp_header .
TYPES ts_bp_ad_email TYPE mdg_bs_bp_ad_email .
TYPES:
tt_bp_ad_email TYPE SORTED TABLE OF mdg_bs_bp_ad_email WITH NON-UNIQUE KEY bp_header addrno ad_consno .
TYPES ts_bp_ad_fax TYPE mdg_bs_bp_ad_fax .
TYPES:
tt_bp_ad_fax TYPE SORTED TABLE OF mdg_bs_bp_ad_fax WITH NON-UNIQUE KEY bp_header addrno ad_consno .
TYPES ts_bp_ad_name_o TYPE mdg_bs_bp_ad_name_o .
TYPES:
tt_bp_ad_name_o TYPE SORTED TABLE OF mdg_bs_bp_ad_name_o WITH NON-UNIQUE KEY bp_header addrno ad_nation .
TYPES ts_bp_ad_name_p TYPE mdg_bs_bp_ad_name_p .
TYPES:
tt_bp_ad_name_p TYPE SORTED TABLE OF mdg_bs_bp_ad_name_p WITH NON-UNIQUE KEY bp_header addrno ad_nation .
TYPES ts_bp_ad_postal TYPE mdg_bs_bp_ad_postal .
TYPES:
tt_bp_ad_postal TYPE SORTED TABLE OF mdg_bs_bp_ad_postal WITH NON-UNIQUE KEY bp_header addrno ad_nation .
TYPES ts_bp_ad_tel TYPE mdg_bs_bp_ad_tel .
TYPES:
tt_bp_ad_tel TYPE SORTED TABLE OF mdg_bs_bp_ad_tel WITH NON-UNIQUE KEY bp_header addrno ad_consno .
TYPES ts_bp_ad_url TYPE mdg_bs_bp_ad_url .
TYPES:
tt_bp_ad_url TYPE SORTED TABLE OF mdg_bs_bp_ad_url WITH NON-UNIQUE KEY bp_header addrno ad_consno .
TYPES ts_bp_address TYPE mdg_bs_bp_address .
TYPES:
tt_bp_address TYPE SORTED TABLE OF mdg_bs_bp_address WITH NON-UNIQUE KEY bp_header addrno .
TYPES ts_bp_bp_addr TYPE mdg_bs_bp_bp_addr .
TYPES:
tt_bp_bp_addr TYPE SORTED TABLE OF mdg_bs_bp_bp_addr WITH NON-UNIQUE KEY bp_header addrno .
TYPES ts_bp_bp_addusg TYPE mdg_bs_bp_bp_addusg .
TYPES:
tt_bp_bp_addusg TYPE SORTED TABLE OF mdg_bs_bp_bp_addusg WITH NON-UNIQUE KEY bp_header addrno bp_adrknd .
TYPES ts_bp_bp_bkdtl TYPE mdg_bs_bp_bp_bkdtl .
TYPES:
tt_bp_bp_bkdtl TYPE SORTED TABLE OF mdg_bs_bp_bp_bkdtl WITH NON-UNIQUE KEY bp_header bank_id .
TYPES ts_bp_bp_ccdtl TYPE mdg_bs_bp_bp_ccdtl .
TYPES:
tt_bp_bp_ccdtl TYPE SORTED TABLE OF mdg_bs_bp_bp_ccdtl WITH NON-UNIQUE KEY bp_header card_id .
TYPES ts_bp_bp_centrl TYPE mdg_bs_bp_bp_centrl .
TYPES:
tt_bp_bp_centrl TYPE SORTED TABLE OF mdg_bs_bp_bp_centrl WITH NON-UNIQUE KEY bp_header .
TYPES ts_bp_bp_idnum TYPE mdg_bs_bp_bp_idnum .
TYPES:
tt_bp_bp_idnum TYPE SORTED TABLE OF mdg_bs_bp_bp_idnum WITH NON-UNIQUE KEY bp_header bp_idtype bp_id_num .
TYPES ts_bp_bp_indstr TYPE mdg_bs_bp_bp_indstr .
TYPES:
tt_bp_bp_indstr TYPE SORTED TABLE OF mdg_bs_bp_bp_indstr WITH NON-UNIQUE KEY bp_header bp_indsct bp_indsys .
TYPES ts_bp_bp_role TYPE mdg_bs_bp_bp_role .
TYPES:
tt_bp_bp_role TYPE SORTED TABLE OF mdg_bs_bp_bp_role WITH NON-UNIQUE KEY bp_header bp_rol_id .
TYPES ts_bp_bp_taxnum TYPE mdg_bs_bp_bp_taxnum .
TYPES:
tt_bp_bp_taxnum TYPE SORTED TABLE OF mdg_bs_bp_bp_taxnum WITH NON-UNIQUE KEY bp_header bp_tx_typ .
TYPES ts_bp_bp_mlt_as TYPE /mdgbpx/_s_bp_pp_bp_mlt_as .
TYPES:
tt_bp_bp_mlt_as TYPE SORTED TABLE OF /mdgbpx/_s_bp_pp_bp_mlt_as WITH NON-UNIQUE KEY bp_header assgnm_id .
TYPES ts_bp_bp_mlt_ad TYPE /mdgbpx/_s_bp_pp_bp_mlt_ad .
TYPES:
tt_bp_bp_mlt_ad TYPE SORTED TABLE OF /mdgbpx/_s_bp_pp_bp_mlt_ad WITH NON-UNIQUE KEY bp_header assgnm_id addrno .
TYPES ts_bp_bp_cus_cc TYPE mdg_bs_cust_bp_cus_cc .
TYPES:
tt_bp_bp_cus_cc TYPE SORTED TABLE OF mdg_bs_cust_bp_cus_cc WITH NON-UNIQUE KEY bp_header assgnm_id company .
TYPES ts_bp_bp_cuscla TYPE mdg_bs_cust_bp_cuscla .
TYPES:
tt_bp_bp_cuscla TYPE SORTED TABLE OF mdg_bs_cust_bp_cuscla WITH NON-UNIQUE KEY bp_header assgnm_id class classtype ecocntr .
TYPES ts_bp_bp_cusddb TYPE mdg_bs_cust_bp_cusddb .
TYPES:
tt_bp_bp_cusddb TYPE SORTED TABLE OF mdg_bs_cust_bp_cusddb WITH NON-UNIQUE KEY bp_header assgnm_id cus_dokar cus_doknr cus_doktl cus_dokvr .
TYPES ts_bp_bp_cusdun TYPE mdg_bs_cust_bp_cusdun .
TYPES:
tt_bp_bp_cusdun TYPE SORTED TABLE OF mdg_bs_cust_bp_cusdun WITH NON-UNIQUE KEY bp_header assgnm_id company maber .
TYPES ts_bp_bp_cusfcn TYPE mdg_bs_cust_bp_cusfcn .
TYPES:
tt_bp_bp_cusfcn TYPE SORTED TABLE OF mdg_bs_cust_bp_cusfcn WITH NON-UNIQUE KEY bp_header assgnm_id spart vkorg vtweg parvw parza .
TYPES ts_bp_bp_cusgen TYPE mdg_bs_cust_bp_cusgen .
TYPES:
tt_bp_bp_cusgen TYPE SORTED TABLE OF mdg_bs_cust_bp_cusgen WITH NON-UNIQUE KEY bp_header assgnm_id .
TYPES ts_bp_bp_custax TYPE mdg_bs_cust_bp_custax .
TYPES:
tt_bp_bp_custax TYPE SORTED TABLE OF mdg_bs_cust_bp_custax WITH NON-UNIQUE KEY bp_header assgnm_id aland tatyp .
TYPES ts_bp_bp_cusulp TYPE mdg_bs_cust_bp_cusulp .
TYPES:
tt_bp_bp_cusulp TYPE SORTED TABLE OF mdg_bs_cust_bp_cusulp WITH NON-UNIQUE KEY bp_header assgnm_id ablad .
TYPES ts_bp_bp_cusval TYPE mdg_bs_cust_bp_cusval .
TYPES:
tt_bp_bp_cusval TYPE SORTED TABLE OF mdg_bs_cust_bp_cusval WITH NON-UNIQUE KEY bp_header assgnm_id charid classtype ecocntr valcnt .
TYPES ts_bp_bp_cuswht TYPE mdg_bs_cust_bp_cuswht .
TYPES:
tt_bp_bp_cuswht TYPE SORTED TABLE OF mdg_bs_cust_bp_cuswht WITH NON-UNIQUE KEY bp_header assgnm_id company witht .
TYPES ts_bp_bp_sales TYPE mdg_bs_cust_bp_sales .
TYPES:
tt_bp_bp_sales TYPE SORTED TABLE OF mdg_bs_cust_bp_sales WITH NON-UNIQUE KEY bp_header assgnm_id spart vkorg vtweg .
TYPES ts_bp_cuscctxt TYPE mdg_bs_cust_cuscctxt .
TYPES:
tt_bp_cuscctxt TYPE SORTED TABLE OF mdg_bs_cust_cuscctxt WITH NON-UNIQUE KEY bp_header assgnm_id company cuslangu cus_tdid .
TYPES ts_bp_cusgentxt TYPE mdg_bs_cust_cusgentxt .
TYPES:
tt_bp_cusgentxt TYPE SORTED TABLE OF mdg_bs_cust_cusgentxt WITH NON-UNIQUE KEY bp_header assgnm_id cuslangu cus_tdid .
TYPES ts_bp_cussaltxt TYPE mdg_bs_cust_cussaltxt .
TYPES:
tt_bp_cussaltxt TYPE SORTED TABLE OF mdg_bs_cust_cussaltxt WITH NON-UNIQUE KEY bp_header assgnm_id spart vkorg vtweg cuslangu cus_tdid .
TYPES ts_bp_bp_compny TYPE mdg_bs_suppl_bp_compny .
TYPES:
tt_bp_bp_compny TYPE SORTED TABLE OF mdg_bs_suppl_bp_compny WITH NON-UNIQUE KEY bp_header assgnm_id company .
TYPES ts_bp_bp_dunn TYPE mdg_bs_suppl_bp_dunn .
TYPES:
tt_bp_bp_dunn TYPE SORTED TABLE OF mdg_bs_suppl_bp_dunn WITH NON-UNIQUE KEY bp_header assgnm_id company maber .
TYPES ts_bp_bp_porg TYPE mdg_bs_suppl_bp_porg .
TYPES:
tt_bp_bp_porg TYPE SORTED TABLE OF mdg_bs_suppl_bp_porg WITH NON-UNIQUE KEY bp_header assgnm_id prch_org .
TYPES ts_bp_bp_porg2 TYPE mdg_bs_suppl_bp_porg2 .
TYPES:
tt_bp_bp_porg2 TYPE SORTED TABLE OF mdg_bs_suppl_bp_porg2 WITH NON-UNIQUE KEY bp_header assgnm_id prch_org ltsnr werks_d .
TYPES ts_bp_bp_taxgrp TYPE mdg_bs_suppl_bp_taxgrp .
TYPES:
tt_bp_bp_taxgrp TYPE SORTED TABLE OF mdg_bs_suppl_bp_taxgrp WITH NON-UNIQUE KEY bp_header assgnm_id koart taxgr .
TYPES ts_bp_bp_vencla TYPE mdg_bs_suppl_bp_vencla .
TYPES:
tt_bp_bp_vencla TYPE SORTED TABLE OF mdg_bs_suppl_bp_vencla WITH NON-UNIQUE KEY bp_header assgnm_id class classtype ecocntr .
TYPES ts_bp_bp_venddb TYPE mdg_bs_suppl_bp_venddb .
TYPES:
tt_bp_bp_venddb TYPE SORTED TABLE OF mdg_bs_suppl_bp_venddb WITH NON-UNIQUE KEY bp_header assgnm_id ven_dokar ven_doknr ven_doktl ven_dokvr .
TYPES ts_bp_bp_venfcn TYPE mdg_bs_suppl_bp_venfcn .
TYPES:
tt_bp_bp_venfcn TYPE SORTED TABLE OF mdg_bs_suppl_bp_venfcn WITH NON-UNIQUE KEY bp_header assgnm_id prch_org ltsnr parvw parza werks_d .
TYPES ts_bp_bp_vengen TYPE mdg_bs_suppl_bp_vengen .
TYPES:
tt_bp_bp_vengen TYPE SORTED TABLE OF mdg_bs_suppl_bp_vengen WITH NON-UNIQUE KEY bp_header assgnm_id .
TYPES ts_bp_bp_vensub TYPE mdg_bs_suppl_bp_vensub .
TYPES:
tt_bp_bp_vensub TYPE SORTED TABLE OF mdg_bs_suppl_bp_vensub WITH NON-UNIQUE KEY bp_header assgnm_id ltsnr ven_langu .
TYPES ts_bp_bp_venval TYPE mdg_bs_suppl_bp_venval .
TYPES:
tt_bp_bp_venval TYPE SORTED TABLE OF mdg_bs_suppl_bp_venval WITH NON-UNIQUE KEY bp_header assgnm_id charid classtype ecocntr valcnt .
TYPES ts_bp_bp_whtax TYPE mdg_bs_suppl_bp_whtax .
TYPES:
tt_bp_bp_whtax TYPE SORTED TABLE OF mdg_bs_suppl_bp_whtax WITH NON-UNIQUE KEY bp_header assgnm_id company land_1 witht .
TYPES ts_bp_vencctxt TYPE mdg_bs_suppl_vencctxt .
TYPES:
tt_bp_vencctxt TYPE SORTED TABLE OF mdg_bs_suppl_vencctxt WITH NON-UNIQUE KEY bp_header assgnm_id company venlangu ven_tdid .
TYPES ts_bp_vengentxt TYPE mdg_bs_suppl_vengentxt .
TYPES:
tt_bp_vengentxt TYPE SORTED TABLE OF mdg_bs_suppl_vengentxt WITH NON-UNIQUE KEY bp_header assgnm_id venlangu ven_tdid .
TYPES ts_bp_venpotxt TYPE mdg_bs_suppl_venpotxt .
TYPES:
tt_bp_venpotxt TYPE SORTED TABLE OF mdg_bs_suppl_venpotxt WITH NON-UNIQUE KEY bp_header assgnm_id prch_org venlangu ven_tdid .
TYPES ts_mm_key TYPE /mdgmm/_s_mm_kf_material .
TYPES:
tt_mm_key TYPE SORTED TABLE OF /mdgmm/_s_mm_kf_material WITH NON-UNIQUE KEY material .
TYPES ts_mm_txt TYPE /mdgmm/_st_mm_pp_material .
TYPES:
tt_mm_txt TYPE SORTED TABLE OF /mdgmm/_st_mm_pp_material WITH NON-UNIQUE KEY material langu .
TYPES ts_mm_material TYPE /mdgmm/_s_mm_pp_material .
TYPES:
tt_mm_material TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_material WITH NON-UNIQUE KEY material .
TYPES ts_mm_bscdattxt TYPE /mdgmm/_s_mm_pp_bscdattxt .
TYPES:
tt_mm_bscdattxt TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_bscdattxt WITH NON-UNIQUE KEY material langucode .
TYPES ts_mm_classasgn TYPE /mdgmm/_s_mm_pp_classasgn .
TYPES:
tt_mm_classasgn TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_classasgn WITH NON-UNIQUE KEY material changeno class classtype ecocntr guid .
TYPES ts_mm_intcmnt TYPE /mdgmm/_s_mm_pp_intcmnt .
TYPES:
tt_mm_intcmnt TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_intcmnt WITH NON-UNIQUE KEY material langucode .
TYPES ts_mm_marapurch TYPE /mdgmm/_s_mm_pp_marapurch .
TYPES:
tt_mm_marapurch TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marapurch WITH NON-UNIQUE KEY material .
TYPES ts_mm_maraqtmng TYPE /mdgmm/_s_mm_pp_maraqtmng .
TYPES:
tt_mm_maraqtmng TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_maraqtmng WITH NON-UNIQUE KEY material .
TYPES ts_mm_marasales TYPE /mdgmm/_s_mm_pp_marasales .
TYPES:
tt_mm_marasales TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marasales WITH NON-UNIQUE KEY material .
TYPES ts_mm_maraspm TYPE /mdgmm/_s_mm_pp_maraspm .
TYPES:
tt_mm_maraspm TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_maraspm WITH NON-UNIQUE KEY material .
TYPES ts_mm_marastor TYPE /mdgmm/_s_mm_pp_marastor .
TYPES:
tt_mm_marastor TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marastor WITH NON-UNIQUE KEY material .
TYPES ts_mm_marcatp TYPE /mdgmm/_s_mm_pp_marcatp .
TYPES:
tt_mm_marcatp TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcatp WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcbasic TYPE /mdgmm/_s_mm_pp_marcbasic .
TYPES:
tt_mm_marcbasic TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcbasic WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marccstng TYPE /mdgmm/_s_mm_pp_marccstng .
TYPES:
tt_mm_marccstng TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marccstng WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcfrcst TYPE /mdgmm/_s_mm_pp_marcfrcst .
TYPES:
tt_mm_marcfrcst TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcfrcst WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcfrgtr TYPE /mdgmm/_s_mm_pp_marcfrgtr .
TYPES:
tt_mm_marcfrgtr TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcfrgtr WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcfrpar TYPE /mdgmm/_s_mm_pp_marcfrpar .
TYPES:
tt_mm_marcfrpar TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcfrpar WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcmrpfc TYPE /mdgmm/_s_mm_pp_marcmrpfc .
TYPES:
tt_mm_marcmrpfc TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcmrpfc WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcmrpls TYPE /mdgmm/_s_mm_pp_marcmrpls .
TYPES:
tt_mm_marcmrpls TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcmrpls WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcmrpmi TYPE /mdgmm/_s_mm_pp_marcmrpmi .
TYPES:
tt_mm_marcmrpmi TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcmrpmi WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcmrppp TYPE /mdgmm/_s_mm_pp_marcmrppp .
TYPES:
tt_mm_marcmrppp TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcmrppp WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcmrpsp TYPE /mdgmm/_s_mm_pp_marcmrpsp .
TYPES:
tt_mm_marcmrpsp TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcmrpsp WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcprt TYPE /mdgmm/_s_mm_pp_marcprt .
TYPES:
tt_mm_marcprt TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcprt WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcpurch TYPE /mdgmm/_s_mm_pp_marcpurch .
TYPES:
tt_mm_marcpurch TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcpurch WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcqtmng TYPE /mdgmm/_s_mm_pp_marcqtmng .
TYPES:
tt_mm_marcqtmng TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcqtmng WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcsales TYPE /mdgmm/_s_mm_pp_marcsales .
TYPES:
tt_mm_marcsales TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcsales WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcstore TYPE /mdgmm/_s_mm_pp_marcstore .
TYPES:
tt_mm_marcstore TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcstore WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_marcwrksd TYPE /mdgmm/_s_mm_pp_marcwrksd .
TYPES:
tt_mm_marcwrksd TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_marcwrksd WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_mardmrp TYPE /mdgmm/_s_mm_pp_mardmrp .
TYPES:
tt_mm_mardmrp TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mardmrp WITH NON-UNIQUE KEY material werks lgort .
TYPES ts_mm_mardstor TYPE /mdgmm/_s_mm_pp_mardstor .
TYPES:
tt_mm_mardstor TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mardstor WITH NON-UNIQUE KEY material werks lgort .
TYPES ts_mm_mbewactng TYPE /mdgmm/_s_mm_pp_mbewactng .
TYPES:
tt_mm_mbewactng TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mbewactng WITH NON-UNIQUE KEY material bwkey bwtar .
TYPES ts_mm_mbewcstng TYPE /mdgmm/_s_mm_pp_mbewcstng .
TYPES:
tt_mm_mbewcstng TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mbewcstng WITH NON-UNIQUE KEY material bwkey .
TYPES ts_mm_mbewmlac TYPE /mdgmm/_s_mm_pp_mbewmlac .
TYPES:
tt_mm_mbewmlac TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mbewmlac WITH NON-UNIQUE KEY material bwkey bwtar curtp .
TYPES ts_mm_mbewmlval TYPE /mdgmm/_s_mm_pp_mbewmlval .
TYPES:
tt_mm_mbewmlval TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mbewmlval WITH NON-UNIQUE KEY material bwkey bwtar curtp .
TYPES ts_mm_mbewvalua TYPE /mdgmm/_s_mm_pp_mbewvalua .
TYPES:
tt_mm_mbewvalua TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mbewvalua WITH NON-UNIQUE KEY material bwkey bwtar .
TYPES ts_mm_mdmabasic TYPE /mdgmm/_s_mm_pp_mdmabasic .
TYPES:
tt_mm_mdmabasic TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mdmabasic WITH NON-UNIQUE KEY material werks berid .
TYPES ts_mm_mean_gtin TYPE /mdgmm/_s_mm_pp_mean_gtin .
TYPES:
tt_mm_mean_gtin TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mean_gtin WITH NON-UNIQUE KEY material qteunit ean .
TYPES ts_mm_mlanpurch TYPE /mdgmm/_s_mm_pp_mlanpurch .
TYPES:
tt_mm_mlanpurch TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mlanpurch WITH NON-UNIQUE KEY material aland .
TYPES ts_mm_mlansales TYPE /mdgmm/_s_mm_pp_mlansales .
TYPES:
tt_mm_mlansales TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mlansales WITH NON-UNIQUE KEY material aland tatyp .
TYPES ts_mm_mlgnstor TYPE /mdgmm/_s_mm_pp_mlgnstor .
TYPES:
tt_mm_mlgnstor TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mlgnstor WITH NON-UNIQUE KEY material lgnum .
TYPES ts_mm_mlgtstor TYPE /mdgmm/_s_mm_pp_mlgtstor .
TYPES:
tt_mm_mlgtstor TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mlgtstor WITH NON-UNIQUE KEY material lgnum lgtyp .
TYPES ts_mm_mpgdprodg TYPE /mdgmm/_s_mm_pp_mpgdprodg .
TYPES:
tt_mm_mpgdprodg TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mpgdprodg WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_mrptxt TYPE /mdgmm/_s_mm_pp_mrptxt .
TYPES:
tt_mm_mrptxt TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mrptxt WITH NON-UNIQUE KEY material werks .
TYPES ts_mm_mvkegrpng TYPE /mdgmm/_s_mm_pp_mvkegrpng .
TYPES:
tt_mm_mvkegrpng TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mvkegrpng WITH NON-UNIQUE KEY material vkorg vtweg .
TYPES ts_mm_mvkesales TYPE /mdgmm/_s_mm_pp_mvkesales .
TYPES:
tt_mm_mvkesales TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_mvkesales WITH NON-UNIQUE KEY material vkorg vtweg .
TYPES ts_mm_purchtxt TYPE /mdgmm/_s_mm_pp_purchtxt .
TYPES:
tt_mm_purchtxt TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_purchtxt WITH NON-UNIQUE KEY material langucode .
TYPES ts_mm_qinsptxt TYPE /mdgmm/_s_mm_pp_qinsptxt .
TYPES:
tt_mm_qinsptxt TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_qinsptxt WITH NON-UNIQUE KEY material langucode .
TYPES ts_mm_qmatbasic TYPE /mdgmm/_s_mm_pp_qmatbasic .
TYPES:
tt_mm_qmatbasic TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_qmatbasic WITH NON-UNIQUE KEY material werks art .
TYPES ts_mm_salestxt TYPE /mdgmm/_s_mm_pp_salestxt .
TYPES:
tt_mm_salestxt TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_salestxt WITH NON-UNIQUE KEY material vkorg vtweg langucode .
TYPES ts_mm_unitofmsr TYPE /mdgmm/_s_mm_pp_unitofmsr .
TYPES:
tt_mm_unitofmsr TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_unitofmsr WITH NON-UNIQUE KEY material qteunit .
TYPES ts_mm_valuation TYPE /mdgmm/_s_mm_pp_valuation .
TYPES:
tt_mm_valuation TYPE SORTED TABLE OF /mdgmm/_s_mm_pp_valuation WITH NON-UNIQUE KEY material changeno charid classtype ecocntr guid valcnt .
CLASS-DATA gv_debug_mode TYPE flag .
CLASS-METHODS get_cr_from_key
IMPORTING
!iv_model TYPE usmd_model
!iv_main_entity TYPE usmd_entity
!is_key TYPE data
RETURNING
VALUE(rv_cr) TYPE usmd_crequest .
CLASS-METHODS get_t_sel_from_conv_api
RETURNING
VALUE(rt_sel) TYPE usmd_ts_sel .
CLASS-METHODS read_entity
IMPORTING
!iv_entity TYPE clike
EXPORTING
!et_data TYPE ANY TABLE .
CLASS-METHODS read_bp
IMPORTING
!iv_key TYPE bu_partner OPTIONAL
!it_key TYPE rpm_tt_bupa OPTIONAL
!iv_read_inactive TYPE flag OPTIONAL
EXPORTING
!es_bp_header TYPE ts_bp_bp_header
!et_key TYPE tt_bp_key
!et_bp_header TYPE tt_bp_bp_header
!et_ad_email TYPE tt_bp_ad_email
!et_ad_fax TYPE tt_bp_ad_fax
!et_ad_name_o TYPE tt_bp_ad_name_o
!et_ad_name_p TYPE tt_bp_ad_name_p
!et_ad_postal TYPE tt_bp_ad_postal
!et_ad_tel TYPE tt_bp_ad_tel
!et_ad_url TYPE tt_bp_ad_url
!et_address TYPE tt_bp_address
!et_bp_addr TYPE tt_bp_bp_addr
!et_bp_addusg TYPE tt_bp_bp_addusg
!et_bp_bkdtl TYPE tt_bp_bp_bkdtl
!et_bp_ccdtl TYPE tt_bp_bp_ccdtl
!et_bp_centrl TYPE tt_bp_bp_centrl
!et_bp_idnum TYPE tt_bp_bp_idnum
!et_bp_indstr TYPE tt_bp_bp_indstr
!et_bp_role TYPE tt_bp_bp_role
!et_bp_taxnum TYPE tt_bp_bp_taxnum
!et_bp_mlt_as TYPE tt_bp_bp_mlt_as
!et_bp_mlt_ad TYPE tt_bp_bp_mlt_ad
!et_bp_cus_cc TYPE tt_bp_bp_cus_cc
!et_bp_cuscla TYPE tt_bp_bp_cuscla
!et_bp_cusddb TYPE tt_bp_bp_cusddb
!et_bp_cusdun TYPE tt_bp_bp_cusdun
!et_bp_cusfcn TYPE tt_bp_bp_cusfcn
!et_bp_cusgen TYPE tt_bp_bp_cusgen
!et_bp_custax TYPE tt_bp_bp_custax
!et_bp_cusulp TYPE tt_bp_bp_cusulp
!et_bp_cusval TYPE tt_bp_bp_cusval
!et_bp_cuswht TYPE tt_bp_bp_cuswht
!et_bp_sales TYPE tt_bp_bp_sales
!et_cuscctxt TYPE tt_bp_cuscctxt
!et_cusgentxt TYPE tt_bp_cusgentxt
!et_cussaltxt TYPE tt_bp_cussaltxt
!et_bp_compny TYPE tt_bp_bp_compny
!et_bp_dunn TYPE tt_bp_bp_dunn
!et_bp_porg TYPE tt_bp_bp_porg
!et_bp_porg2 TYPE tt_bp_bp_porg2
!et_bp_taxgrp TYPE tt_bp_bp_taxgrp
!et_bp_vencla TYPE tt_bp_bp_vencla
!et_bp_venddb TYPE tt_bp_bp_venddb
!et_bp_venfcn TYPE tt_bp_bp_venfcn
!et_bp_vengen TYPE tt_bp_bp_vengen
!et_bp_vensub TYPE tt_bp_bp_vensub
!et_bp_venval TYPE tt_bp_bp_venval
!et_bp_whtax TYPE tt_bp_bp_whtax
!et_vencctxt TYPE tt_bp_vencctxt
!et_vengentxt TYPE tt_bp_vengentxt
!et_venpotxt TYPE tt_bp_venpotxt .
CLASS-METHODS read_mm
IMPORTING
!iv_key TYPE matnr OPTIONAL
!it_key TYPE matnr_tab OPTIONAL
!iv_read_inactive TYPE flag OPTIONAL
EXPORTING
!es_material TYPE ts_mm_material
!et_key TYPE tt_mm_key
!et_txt TYPE tt_mm_txt
!et_material TYPE tt_mm_material
!et_bscdattxt TYPE tt_mm_bscdattxt
!et_classasgn TYPE tt_mm_classasgn
!et_intcmnt TYPE tt_mm_intcmnt
!et_marapurch TYPE tt_mm_marapurch
!et_maraqtmng TYPE tt_mm_maraqtmng
!et_marasales TYPE tt_mm_marasales
!et_maraspm TYPE tt_mm_maraspm
!et_marastor TYPE tt_mm_marastor
!et_marcatp TYPE tt_mm_marcatp
!et_marcbasic TYPE tt_mm_marcbasic
!et_marccstng TYPE tt_mm_marccstng
!et_marcfrcst TYPE tt_mm_marcfrcst
!et_marcfrgtr TYPE tt_mm_marcfrgtr
!et_marcfrpar TYPE tt_mm_marcfrpar
!et_marcmrpfc TYPE tt_mm_marcmrpfc
!et_marcmrpls TYPE tt_mm_marcmrpls
!et_marcmrpmi TYPE tt_mm_marcmrpmi
!et_marcmrppp TYPE tt_mm_marcmrppp
!et_marcmrpsp TYPE tt_mm_marcmrpsp
!et_marcprt TYPE tt_mm_marcprt
!et_marcpurch TYPE tt_mm_marcpurch
!et_marcqtmng TYPE tt_mm_marcqtmng
!et_marcsales TYPE tt_mm_marcsales
!et_marcstore TYPE tt_mm_marcstore
!et_marcwrksd TYPE tt_mm_marcwrksd
!et_mardmrp TYPE tt_mm_mardmrp
!et_mardstor TYPE tt_mm_mardstor
!et_mbewactng TYPE tt_mm_mbewactng
!et_mbewcstng TYPE tt_mm_mbewcstng
!et_mbewmlac TYPE tt_mm_mbewmlac
!et_mbewmlval TYPE tt_mm_mbewmlval
!et_mbewvalua TYPE tt_mm_mbewvalua
!et_mdmabasic TYPE tt_mm_mdmabasic
!et_mean_gtin TYPE tt_mm_mean_gtin
!et_mlanpurch TYPE tt_mm_mlanpurch
!et_mlansales TYPE tt_mm_mlansales
!et_mlgnstor TYPE tt_mm_mlgnstor
!et_mlgtstor TYPE tt_mm_mlgtstor
!et_mpgdprodg TYPE tt_mm_mpgdprodg
!et_mrptxt TYPE tt_mm_mrptxt
!et_mvkegrpng TYPE tt_mm_mvkegrpng
!et_mvkesales TYPE tt_mm_mvkesales
!et_purchtxt TYPE tt_mm_purchtxt
!et_qinsptxt TYPE tt_mm_qinsptxt
!et_qmatbasic TYPE tt_mm_qmatbasic
!et_salestxt TYPE tt_mm_salestxt
!et_unitofmsr TYPE tt_mm_unitofmsr
!et_valuation TYPE tt_mm_valuation .
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ZCL_MDP_READ_HELPER IMPLEMENTATION.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_MDP_READ_HELPER=>GET_CR_FROM_KEY
* +-------------------------------------------------------------------------------------------------+
* | [--->] IV_MODEL TYPE USMD_MODEL
* | [--->] IV_MAIN_ENTITY TYPE USMD_ENTITY
* | [--->] IS_KEY TYPE DATA
* | [<-()] RV_CR TYPE USMD_CREQUEST
* +--------------------------------------------------------------------------------------</SIGNATURE>
METHOD get_cr_from_key.
DATA: lt_crequest_id TYPE usmd_cr_ts_root_node_id.
*IV_OBJECT_TYPE TYPE USMD_OBJECT
*IS_OBJECT_KEY TYPE DATA
*IV_MODEL TYPE USMD_MODEL
*value( RT_CREQUEST_ID ) TYPE USMD_CR_TS_ROOT_NODE_ID
cl_usmd_cr_factory=>get_cr_service_provider( )->if_usmd_cr_sp_query~retrieve_open_cr_by_object_key(
EXPORTING
iv_object_type = iv_main_entity
is_object_key = is_key
iv_model = iv_model
RECEIVING
rt_crequest_id = lt_crequest_id
).
* CATCH cx_usmd_cr_root_no_model_insta. " no model instance for model name
* CATCH cx_usmd_cr_root_bad_entity_typ. " Illegal entity typ
* CATCH cx_usmd_cr_root_emp_entity_key. " Initial entity key.
CHECK: lt_crequest_id IS NOT INITIAL.
rv_cr = lt_crequest_id[ 1 ]-usmd_crequest.
ENDMETHOD.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_MDP_READ_HELPER=>GET_T_SEL_FROM_CONV_API
* +-------------------------------------------------------------------------------------------------+
* | [<-()] RT_SEL TYPE USMD_TS_SEL
* +--------------------------------------------------------------------------------------</SIGNATURE>
METHOD get_t_sel_from_conv_api.
DATA: lo_conv_api TYPE REF TO if_usmd_conv_som_gov_api,
lt_object_list_db_style TYPE usmd_t_crequest_entity,
ls_object_list_db_style TYPE usmd_s_crequest_entity,
ls_sel TYPE usmd_s_sel.
TRY.
lo_conv_api = cl_usmd_conv_som_gov_api=>get_instance( ).
lo_conv_api->get_object_list(
IMPORTING
et_object_list_db_style = lt_object_list_db_style " Change Request, Entity, Table Type
).
ls_sel-sign = 'I'.
ls_sel-option = 'EQ'.
LOOP AT lt_object_list_db_style INTO ls_object_list_db_style WHERE usmd_entity = lo_conv_api->mv_main_entity.
ls_sel-fieldname = ls_object_list_db_style-usmd_entity_obj.
ls_sel-low = ls_object_list_db_style-usmd_value.
INSERT ls_sel INTO TABLE rt_sel.
ENDLOOP.
CATCH cx_usmd_gov_api. " General Processing Error GOV_API
ENDTRY.
ENDMETHOD.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_MDP_READ_HELPER=>READ_BP
* +-------------------------------------------------------------------------------------------------+
* | [--->] IV_KEY TYPE BU_PARTNER(optional)
* | [--->] IT_KEY TYPE RPM_TT_BUPA(optional)
* | [--->] IV_READ_INACTIVE TYPE FLAG(optional)
* | [<---] ES_BP_HEADER TYPE TS_BP_BP_HEADER
* | [<---] ET_KEY TYPE TT_BP_KEY
* | [<---] ET_BP_HEADER TYPE TT_BP_BP_HEADER
* | [<---] ET_AD_EMAIL TYPE TT_BP_AD_EMAIL
* | [<---] ET_AD_FAX TYPE TT_BP_AD_FAX
* | [<---] ET_AD_NAME_O TYPE TT_BP_AD_NAME_O
* | [<---] ET_AD_NAME_P TYPE TT_BP_AD_NAME_P
* | [<---] ET_AD_POSTAL TYPE TT_BP_AD_POSTAL
* | [<---] ET_AD_TEL TYPE TT_BP_AD_TEL
* | [<---] ET_AD_URL TYPE TT_BP_AD_URL
* | [<---] ET_ADDRESS TYPE TT_BP_ADDRESS
* | [<---] ET_BP_ADDR TYPE TT_BP_BP_ADDR
* | [<---] ET_BP_ADDUSG TYPE TT_BP_BP_ADDUSG
* | [<---] ET_BP_BKDTL TYPE TT_BP_BP_BKDTL
* | [<---] ET_BP_CCDTL TYPE TT_BP_BP_CCDTL
* | [<---] ET_BP_CENTRL TYPE TT_BP_BP_CENTRL
* | [<---] ET_BP_IDNUM TYPE TT_BP_BP_IDNUM
* | [<---] ET_BP_INDSTR TYPE TT_BP_BP_INDSTR
* | [<---] ET_BP_ROLE TYPE TT_BP_BP_ROLE
* | [<---] ET_BP_TAXNUM TYPE TT_BP_BP_TAXNUM
* | [<---] ET_BP_MLT_AS TYPE TT_BP_BP_MLT_AS
* | [<---] ET_BP_MLT_AD TYPE TT_BP_BP_MLT_AD
* | [<---] ET_BP_CUS_CC TYPE TT_BP_BP_CUS_CC
* | [<---] ET_BP_CUSCLA TYPE TT_BP_BP_CUSCLA
* | [<---] ET_BP_CUSDDB TYPE TT_BP_BP_CUSDDB
* | [<---] ET_BP_CUSDUN TYPE TT_BP_BP_CUSDUN
* | [<---] ET_BP_CUSFCN TYPE TT_BP_BP_CUSFCN
* | [<---] ET_BP_CUSGEN TYPE TT_BP_BP_CUSGEN
* | [<---] ET_BP_CUSTAX TYPE TT_BP_BP_CUSTAX
* | [<---] ET_BP_CUSULP TYPE TT_BP_BP_CUSULP
* | [<---] ET_BP_CUSVAL TYPE TT_BP_BP_CUSVAL
* | [<---] ET_BP_CUSWHT TYPE TT_BP_BP_CUSWHT
* | [<---] ET_BP_SALES TYPE TT_BP_BP_SALES
* | [<---] ET_CUSCCTXT TYPE TT_BP_CUSCCTXT
* | [<---] ET_CUSGENTXT TYPE TT_BP_CUSGENTXT
* | [<---] ET_CUSSALTXT TYPE TT_BP_CUSSALTXT
* | [<---] ET_BP_COMPNY TYPE TT_BP_BP_COMPNY
* | [<---] ET_BP_DUNN TYPE TT_BP_BP_DUNN
* | [<---] ET_BP_PORG TYPE TT_BP_BP_PORG
* | [<---] ET_BP_PORG2 TYPE TT_BP_BP_PORG2
* | [<---] ET_BP_TAXGRP TYPE TT_BP_BP_TAXGRP
* | [<---] ET_BP_VENCLA TYPE TT_BP_BP_VENCLA
* | [<---] ET_BP_VENDDB TYPE TT_BP_BP_VENDDB
* | [<---] ET_BP_VENFCN TYPE TT_BP_BP_VENFCN
* | [<---] ET_BP_VENGEN TYPE TT_BP_BP_VENGEN
* | [<---] ET_BP_VENSUB TYPE TT_BP_BP_VENSUB
* | [<---] ET_BP_VENVAL TYPE TT_BP_BP_VENVAL
* | [<---] ET_BP_WHTAX TYPE TT_BP_BP_WHTAX
* | [<---] ET_VENCCTXT TYPE TT_BP_VENCCTXT
* | [<---] ET_VENGENTXT TYPE TT_BP_VENGENTXT
* | [<---] ET_VENPOTXT TYPE TT_BP_VENPOTXT
* +--------------------------------------------------------------------------------------</SIGNATURE>
METHOD read_bp.
DATA: lo_model_ext TYPE REF TO if_usmd_model_ext,
lt_sel TYPE usmd_ts_sel,
ls_sel TYPE usmd_s_sel,
lv_readmode TYPE usmd_readmode_ext VALUE if_usmd_model_ext=>gc_readmode_default,
lv_key LIKE LINE OF it_key.
FIELD-SYMBOLS: <ls_key> LIKE LINE OF et_key.
CLEAR: et_key, et_bp_header, es_bp_header.
cl_usmd_model_ext=>get_instance(
EXPORTING
i_usmd_model = 'BP'
IMPORTING
eo_instance = lo_model_ext
).
CHECK: lo_model_ext IS NOT INITIAL.
ls_sel-fieldname = 'BP_HEADER'.
ls_sel-sign = 'I'.
ls_sel-option = 'EQ'.
IF iv_key IS NOT INITIAL.
ls_sel-low = iv_key.
INSERT ls_sel INTO TABLE lt_sel.
ENDIF.
IF it_key IS NOT INITIAL.
LOOP AT it_key INTO lv_key.
ls_sel-low = lv_key.
INSERT ls_sel INTO TABLE lt_sel.
ENDLOOP.
ENDIF.
IF lt_sel IS INITIAL.
lt_sel = get_t_sel_from_conv_api( ).
ENDIF.
CHECK: lt_sel IS NOT INITIAL.
IF iv_read_inactive EQ abap_true.
lv_readmode = if_usmd_model_ext=>gc_readmode_no_act.
lo_model_ext->read_char_value(
EXPORTING
i_fieldname = 'BP_HEADER'
it_sel = lt_sel
i_readmode = lv_readmode
IMPORTING
et_data = et_key
).
CHECK: et_key IS NOT INITIAL.
IF lines( lt_sel ) <> lines( et_key ).
CLEAR: lt_sel.
LOOP AT et_key ASSIGNING <ls_key>.
ls_sel-low = <ls_key>-bp_header.
INSERT ls_sel INTO TABLE lt_sel.
ENDLOOP.
ENDIF.
lv_readmode = if_usmd_model_ext=>gc_readmode_all_inact.
ENDIF.
lo_model_ext->read_char_value(
EXPORTING
i_fieldname = 'BP_HEADER'
it_sel = lt_sel
i_readmode = lv_readmode
IMPORTING
et_data = et_bp_header
).
CHECK: et_bp_header IS NOT INITIAL.
READ TABLE et_bp_header INTO es_bp_header INDEX 1.
MOVE-CORRESPONDING et_bp_header TO et_key.
* IF et_bp_centrl IS SUPPLIED.
* CLEAR: et_bp_centrl.
* lo_model_ext->read_char_value(
* EXPORTING
* i_fieldname = 'BP_CENTRL'
* it_sel = lt_sel
* i_readmode = lv_readmode
* IMPORTING
* et_data = et_bp_centrl
* ).
* ENDIF.
DEFINE __read.
IF gv_debug_mode EQ abap_true OR et_&1 IS SUPPLIED.
CLEAR: et_&1.
lo_model_ext->read_char_value(
EXPORTING
i_fieldname = '&1'
it_sel = lt_sel
i_readmode = lv_readmode
IMPORTING
et_data = et_&1
).
ENDIF.
END-OF-DEFINITION.
__read ad_email.
__read ad_fax.
__read ad_name_o.
__read ad_name_p.
__read ad_postal.
__read ad_tel.
__read ad_url.
__read address.
__read bp_addr.
__read bp_addusg.
__read bp_bkdtl.
__read bp_ccdtl.
__read bp_centrl.
__read bp_idnum.
__read bp_indstr.
__read bp_role.
__read bp_taxnum.
__read bp_mlt_as.
__read bp_mlt_ad.
__read bp_cus_cc.
__read bp_cuscla.
__read bp_cusddb.
__read bp_cusdun.
__read bp_cusfcn.
__read bp_cusgen.
__read bp_custax.
__read bp_cusulp.
__read bp_cusval.
__read bp_cuswht.
__read bp_sales.
__read cuscctxt.
__read cusgentxt.
__read cussaltxt.
__read bp_compny.
__read bp_dunn.
__read bp_porg.
__read bp_porg2.
__read bp_taxgrp.
__read bp_vencla.
__read bp_venddb.
__read bp_venfcn.
__read bp_vengen.
__read bp_vensub.
__read bp_venval.
__read bp_whtax.
__read vencctxt.
__read vengentxt.
__read venpotxt.
IF gv_debug_mode EQ abap_true.
BREAK-POINT.
ENDIF.
ENDMETHOD.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_MDP_READ_HELPER=>READ_ENTITY
* +-------------------------------------------------------------------------------------------------+
* | [--->] IV_ENTITY TYPE CLIKE
* | [<---] ET_DATA TYPE ANY TABLE
* +--------------------------------------------------------------------------------------</SIGNATURE>
METHOD read_entity.
DATA: lo_mdg_api TYPE REF TO if_usmd_conv_som_gov_api,
lo_model_api TYPE REF TO if_usmd_model_ext,
lt_sel TYPE usmd_ts_sel.
CLEAR: et_data.
TRY.
lo_mdg_api = cl_usmd_conv_som_gov_api=>get_instance( ).
CATCH cx_usmd_gov_api.
RETURN.
ENDTRY.
CHECK: lo_mdg_api IS NOT INITIAL.
cl_usmd_model_ext=>get_instance(
EXPORTING
i_usmd_model = lo_mdg_api->mv_model_name
IMPORTING
eo_instance = lo_model_api
).
CHECK: lo_model_api IS NOT INITIAL.
lt_sel = get_t_sel_from_conv_api( ).
lo_model_api->read_char_value(
EXPORTING
i_fieldname = CONV #( iv_entity )
it_sel = lt_sel
IMPORTING
et_data = et_data
).
ENDMETHOD.
* <SIGNATURE>---------------------------------------------------------------------------------------+
* | Static Public Method ZCL_MDP_READ_HELPER=>READ_MM
* +-------------------------------------------------------------------------------------------------+
* | [--->] IV_KEY TYPE MATNR(optional)
* | [--->] IT_KEY TYPE MATNR_TAB(optional)
* | [--->] IV_READ_INACTIVE TYPE FLAG(optional)
* | [<---] ES_MATERIAL TYPE TS_MM_MATERIAL
* | [<---] ET_KEY TYPE TT_MM_KEY
* | [<---] ET_TXT TYPE TT_MM_TXT
* | [<---] ET_MATERIAL TYPE TT_MM_MATERIAL
* | [<---] ET_BSCDATTXT TYPE TT_MM_BSCDATTXT
* | [<---] ET_CLASSASGN TYPE TT_MM_CLASSASGN
* | [<---] ET_INTCMNT TYPE TT_MM_INTCMNT
* | [<---] ET_MARAPURCH TYPE TT_MM_MARAPURCH
* | [<---] ET_MARAQTMNG TYPE TT_MM_MARAQTMNG
* | [<---] ET_MARASALES TYPE TT_MM_MARASALES
* | [<---] ET_MARASPM TYPE TT_MM_MARASPM
* | [<---] ET_MARASTOR TYPE TT_MM_MARASTOR
* | [<---] ET_MARCATP TYPE TT_MM_MARCATP
* | [<---] ET_MARCBASIC TYPE TT_MM_MARCBASIC
* | [<---] ET_MARCCSTNG TYPE TT_MM_MARCCSTNG
* | [<---] ET_MARCFRCST TYPE TT_MM_MARCFRCST
* | [<---] ET_MARCFRGTR TYPE TT_MM_MARCFRGTR
* | [<---] ET_MARCFRPAR TYPE TT_MM_MARCFRPAR
* | [<---] ET_MARCMRPFC TYPE TT_MM_MARCMRPFC
* | [<---] ET_MARCMRPLS TYPE TT_MM_MARCMRPLS
* | [<---] ET_MARCMRPMI TYPE TT_MM_MARCMRPMI
* | [<---] ET_MARCMRPPP TYPE TT_MM_MARCMRPPP
* | [<---] ET_MARCMRPSP TYPE TT_MM_MARCMRPSP
* | [<---] ET_MARCPRT TYPE TT_MM_MARCPRT
* | [<---] ET_MARCPURCH TYPE TT_MM_MARCPURCH
* | [<---] ET_MARCQTMNG TYPE TT_MM_MARCQTMNG
* | [<---] ET_MARCSALES TYPE TT_MM_MARCSALES
* | [<---] ET_MARCSTORE TYPE TT_MM_MARCSTORE
* | [<---] ET_MARCWRKSD TYPE TT_MM_MARCWRKSD
* | [<---] ET_MARDMRP TYPE TT_MM_MARDMRP
* | [<---] ET_MARDSTOR TYPE TT_MM_MARDSTOR
* | [<---] ET_MBEWACTNG TYPE TT_MM_MBEWACTNG
* | [<---] ET_MBEWCSTNG TYPE TT_MM_MBEWCSTNG
* | [<---] ET_MBEWMLAC TYPE TT_MM_MBEWMLAC
* | [<---] ET_MBEWMLVAL TYPE TT_MM_MBEWMLVAL
* | [<---] ET_MBEWVALUA TYPE TT_MM_MBEWVALUA
* | [<---] ET_MDMABASIC TYPE TT_MM_MDMABASIC
* | [<---] ET_MEAN_GTIN TYPE TT_MM_MEAN_GTIN
* | [<---] ET_MLANPURCH TYPE TT_MM_MLANPURCH
* | [<---] ET_MLANSALES TYPE TT_MM_MLANSALES
* | [<---] ET_MLGNSTOR TYPE TT_MM_MLGNSTOR
* | [<---] ET_MLGTSTOR TYPE TT_MM_MLGTSTOR
* | [<---] ET_MPGDPRODG TYPE TT_MM_MPGDPRODG
* | [<---] ET_MRPTXT TYPE TT_MM_MRPTXT
* | [<---] ET_MVKEGRPNG TYPE TT_MM_MVKEGRPNG
* | [<---] ET_MVKESALES TYPE TT_MM_MVKESALES
* | [<---] ET_PURCHTXT TYPE TT_MM_PURCHTXT
* | [<---] ET_QINSPTXT TYPE TT_MM_QINSPTXT
* | [<---] ET_QMATBASIC TYPE TT_MM_QMATBASIC
* | [<---] ET_SALESTXT TYPE TT_MM_SALESTXT
* | [<---] ET_UNITOFMSR TYPE TT_MM_UNITOFMSR
* | [<---] ET_VALUATION TYPE TT_MM_VALUATION
* +--------------------------------------------------------------------------------------</SIGNATURE>
METHOD read_mm.
DATA: lo_model_ext TYPE REF TO if_usmd_model_ext,
lt_sel TYPE usmd_ts_sel,
ls_sel TYPE usmd_s_sel,
lv_readmode TYPE usmd_readmode_ext VALUE if_usmd_model_ext=>gc_readmode_default,
lv_key LIKE LINE OF it_key.
FIELD-SYMBOLS: <ls_key> LIKE LINE OF et_key.
CLEAR: et_key, et_material, es_material.
cl_usmd_model_ext=>get_instance(
EXPORTING
i_usmd_model = 'MM'
IMPORTING
eo_instance = lo_model_ext
).
CHECK: lo_model_ext IS NOT INITIAL.
ls_sel-fieldname = 'MATERIAL'.
ls_sel-sign = 'I'.
ls_sel-option = 'EQ'.
IF iv_key IS NOT INITIAL.
ls_sel-low = iv_key.
INSERT ls_sel INTO TABLE lt_sel.
ENDIF.
IF it_key IS NOT INITIAL.
LOOP AT it_key INTO lv_key.
ls_sel-low = lv_key.
INSERT ls_sel INTO TABLE lt_sel.
ENDLOOP.
ENDIF.
IF lt_sel IS INITIAL.
lt_sel = get_t_sel_from_conv_api( ).
ENDIF.
CHECK: lt_sel IS NOT INITIAL.
IF iv_read_inactive EQ abap_true.
lv_readmode = if_usmd_model_ext=>gc_readmode_no_act.
lo_model_ext->read_char_value(
EXPORTING
i_fieldname = 'MATERIAL'
it_sel = lt_sel
i_readmode = lv_readmode
IMPORTING
et_data = et_key
).
CHECK: et_key IS NOT INITIAL.
IF lines( lt_sel ) <> lines( et_key ).
CLEAR: lt_sel.
LOOP AT et_key ASSIGNING <ls_key>.
ls_sel-low = <ls_key>-material.
INSERT ls_sel INTO TABLE lt_sel.
ENDLOOP.
ENDIF.
lv_readmode = if_usmd_model_ext=>gc_readmode_all_inact.
ENDIF.
lo_model_ext->read_char_value(
EXPORTING
i_fieldname = 'MATERIAL'
it_sel = lt_sel
i_readmode = lv_readmode
IMPORTING
et_data = et_material
).
CHECK: et_material IS NOT INITIAL.
READ TABLE et_material INTO es_material INDEX 1.
MOVE-CORRESPONDING et_material TO et_key.
IF et_txt IS SUPPLIED OR gv_debug_mode EQ abap_true.
lo_model_ext->read_char_value(
EXPORTING
i_fieldname = 'MATERIAL'
it_sel = lt_sel
i_readmode = lv_readmode
IMPORTING
et_data = et_txt
).
ENDIF.
* IF et_BSCDATTXT IS SUPPLIED.
* CLEAR: et_BSCDATTXT.
* lo_model_ext->read_char_value(
* EXPORTING
* i_fieldname = 'BSCDATTXT'
* it_sel = lt_sel
* i_readmode = lv_readmode
* IMPORTING
* et_data = et_BSCDATTXT
* ).
* ENDIF.
DEFINE __read.
IF gv_debug_mode EQ abap_true OR et_&1 IS SUPPLIED.
CLEAR: et_&1.
lo_model_ext->read_char_value(
EXPORTING
i_fieldname = '&1'
it_sel = lt_sel
i_readmode = lv_readmode
IMPORTING
et_data = et_&1
).
ENDIF.
END-OF-DEFINITION.
__read bscdattxt.
__read classasgn.
__read intcmnt.
__read marapurch.
__read maraqtmng.
__read marasales.
__read maraspm.
__read marastor.
__read marcatp.
__read marcbasic.
__read marccstng.
__read marcfrcst.
__read marcfrgtr.
__read marcfrpar.
__read marcmrpfc.
__read marcmrpls.
__read marcmrpmi.
__read marcmrppp.
__read marcmrpsp.
__read marcprt.
__read marcpurch.
__read marcqtmng.
__read marcsales.
__read marcstore.
__read marcwrksd.
__read mardmrp.
__read mardstor.
__read mbewactng.
__read mbewcstng.
__read mbewmlac.
__read mbewmlval.
__read mbewvalua.
__read mdmabasic.
__read mean_gtin.
__read mlanpurch.
__read mlansales.
__read mlgnstor.
__read mlgtstor.
__read mpgdprodg.
__read mrptxt.
__read mvkegrpng.
__read mvkesales.
__read purchtxt.
__read qinsptxt.
__read qmatbasic.
__read salestxt.
__read unitofmsr.
__read valuation.
IF gv_debug_mode EQ abap_true.
BREAK-POINT.
ENDIF.
ENDMETHOD.
ENDCLASS.
'ABAP > MDG 기준정보' 카테고리의 다른 글
MDG staging table 가비지 데이터 삭제 처리 프로그램 (0) | 2023.06.15 |
---|---|
MDG BP 생성/수정 CR 만드는 로직 (0) | 2021.12.15 |