METHOD if_ex_me_gui_po_cust~subscribe.
DATA: ls_subscriber LIKE LINE OF re_subscribers.
*
*************add by abap02 begin 20120316 只有显示的时候调用增强页面
* CHECK SY-TCODE EQ 'ME53N'.
*************add by abap02 end 20120316
* IF im_application EQ 'REQ' AND im_element EQ 'HEADER'.
* CLEAR re_subscribers[].
* MOVE: subscreen1 TO ls_subscriber-name,
* '0002' TO ls_subscriber-dynpro,
* 'ZME_GUI_PR_CUST_SCREEN' TO ls_subscriber-program,
* 'ZCI_EBANDB_HDR' TO ls_subscriber-struct_name,
* text-001 TO ls_subscriber-label,
* 2 TO ls_subscriber-position,
* 7 TO ls_subscriber-height.
* APPEND ls_subscriber TO re_subscribers.
* ENDIF.
*
* IF im_application EQ 'REQ' AND im_element EQ 'ITEM'.
* CLEAR re_subscribers[].
* MOVE: subscreen2 TO ls_subscriber-name,
* '0004' TO ls_subscriber-dynpro,
* 'ZME_GUI_PR_CUST_SCREEN' TO ls_subscriber-program,
* 'ZCI_EBANDB_POS' TO ls_subscriber-struct_name,
* text-002 TO ls_subscriber-label,
* 10 TO ls_subscriber-position,
* 7 TO ls_subscriber-height.
* APPEND ls_subscriber TO re_subscribers.
* ENDIF.
IF im_application EQ 'PO' AND im_element 正切函数的定义域EQ 'ITEM'.
CLEAR re_subscribers[].
MOVE: subscreen2 TO ls_subscriber-name,
'0100' TO ls_subscriber-dynpro,
'SAPLZME_GUI_PR_CUST_ME23N' TO ls_subscriber-program,
'ZCI_ME23N_SMDY' TO ls_subscriber-struct_name,
text-003 TO 中英转换ls_subscriber-label,
24 TO ls_subscriber-position,
17 TO ls_subscriber-height.
APPEND ls_subscriber TO re_subscribers.
ENDIF.
ENDMETHOD.
METHOD if_ex_me_gui_po_cust~map_dynpro_fields.
* establish a mapping to metafields which are ud for field lection
* purpos and error handling Standard definitions can be found in type pool MMMFD.
* It is important for customer fields to u integer constants above 90000000 for the metafield.
* FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
* LOOP AT ch_mapping ASSIGNING <mapping>.
* CASE <mapping>-fieldname.
* "header
* WHEN 'ZPRJID'. MOVE mmmfd_cust_01 TO <mapping>-metafield.
* WHEN 'ZPRJNAME'. MOVE mmmfd_cust_02 TO <mapping>-metafield.
* WHEN 'ZGCZGP'. MOVE mmmfd_cust_03 TO <mapping>-metafield.
* WHEN 'ZGCXMLX'. MOVE mmmfd_cust_04 TO <mapping>-metafield.
* WHEN 'ZKGTM'. MOVE mmmfd_cust_05 TO <mapping>-metafield.
* WHEN 'ZWGTM'. MOVE mmmfd_cust_06 TO <mapping>-metafield.
* WHEN 'ZDYDJ'. MOVE mmmfd_cust_07 TO <mapping>-metafield.
*********************modify by abap02 begin 20120308 去掉批次,增加联系方式
** WHEN 'ZCHARG'. MOVE mmmfd_cust_08 TO <mapping>-metafield.
* WHEN 'ZLXFS'. MOVE mmmfd_cust_08 TO <mapping>-metafield.
*********************modify by abap02 end 20120308 去掉批次,增加联系方式
* "items
* ENDCASE.
* ENDLOOP.
FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
怎么怀上男孩 LOOP AT ch_mapping ASSIGNING <mapping>.
CASE <mapping>-fieldname.
"header
WHEN 'GV_SBFL'. MOVE mmmfd_cust_01 TO <mapping>-metafield.
WHEN 'GV_ZCCJ'. MOVE mmmfd_cust_02 TO <mapping>-metafield.
WHEN 'GV_ZCXL'. MOVE mmmfd_cust_03 TO <mapping>-metafield.
WHEN 'GV_WYSBM'. MOVE mmmfd_cust_04 TO <mapping>-metafield.
WHEN 'GV_SBFL_MS'. MOVE mmmfd_cust_05 TO <mapping>-metafield.
WHEN 'GV_ZCCJ_MS'. MOVE mmmfd_cust_06 TO <mapping>-metafield.
WHEN 'GV_ZCXL_MS'. MOVE mmmfd_cust_07 TO <mapping>-猫咪日记metafield.
* WHEN 'ZDYDJ'. MOVE mmmfd_cust_08 TO <mapping>-metafield.
********************modify by abap02 begin 20120308 去掉批次,增加联系方式
* WHEN 'ZCHARG'. MOVE mmmfd_cust_08 TO <mapping>-metafield.
* WHEN 'ZLXFS'. MOVE mmmfd_cust_08 TO <mapping>-metafield.
********************modify by abap02 end 20120308 去掉批次,增加联系方式
"items
ENDCASE.
ENDLOOP.
ENDMETHOD.
METHOD if_ex_me_gui_po_cust抗美援朝文章~transport_from_dynp.
* CASE im_name.
* WHEN subscreen1. "header
* CALL FUNCTION 'ZMEREQBADIEX_HDR_POP'
* IMPORTING
* e_dynp_data = ci_hdr_pai.
*
* "won't t 'X' to re_changed that will trigger event TRANSPORT_TO_MODEL
* "instead, let the ZME_PROCESS_REQ_CUST~PROCESS_ITEM do it
** IF ci_hdr_pai NE ci_hdr_pbo.
** MOVE mmpur_yes TO re_changed.
** ENDIF.
*
** WHEN subscreen2. "item
** CALL FUNCTION 'ZMEREQBADIEX_POS_POP'
** IMPORTING
** e_dynp_data = ci_pos_pai.
** IF ci_pos_pai NE ci_pos_pbo.
** MOVE mmpur_yes TO re_changed.
** ENDIF.
* WHEN OTHERS.
* ENDCASE.
CASE im_name.
WHEN subscreen2.
CALL FUNCTION 'ZFM_ME23N_POP'
IMPORTING
ex_dynp_data = dynp_data_pai.
IF dynp_data_pai NE dynp_data_pbo.
* something has changed therefor we have to notify the framework
* to transport data to the model
re_changed = mmpur_yes.
ENDIF.
WHEN OTHERS.
ENDCASE.
ENDMETHOD.
FUNCTION ZFM_ME23N_POP.
*"----------------------------------------------------------------------
*"*"Local interface:
*" EXPORTING
*" REFERENCE(EX_DYNP_DATA) TYPE ZCI_ME23N_SMDY
*"----------------------------------------------------------------------
ex_dynp_data = ZCI_ME23N_SMDY.
ENDFUNCTION.
METHOD if_ex_me_gui_po_cust~transport_from_model.
DATA: l_item TYPE REF TO if_purcha_order_item_mm,
ls_mepoitem TYPE mepoitem,
ls_customer TYPE ZCI_ME23N_SMDY.
* DATA: l_req_header TYPE REF TO if_purcha_requisition,
* l_req_item TYPE REF TO if_purcha_requisition_item,
* lt_req_items TYPE mmpur_requisition_items,
* lw_req_item TYPE mmpur_requisition_item,
* l_mereq_item TYPE mereq_item.
* DATA: l_document TYPE mepo_document,
* l_tcode TYPE sy-tcode,
* l_uncomplete TYPE mmpur_bool,
* l_park_allow TYPE mmpur_bool,
* l_changed TYPE mmpur_bool.
*
* CASE im_name.
* WHEN subscreen1. "header
* mmpur_dynamic_cast l_req_header im_model.
* CHECK l_req_header IS NOT INITIAL.
* CALL METHOD l_req_header->get_transaction_state
* IMPORTING
* ex_document = l_document
* ex_tcode = l_tcode
* ex_uncomplete = l_uncomplete
* ex_parking_allowed = l_park_allow
* ex_changed = l_changed.
* IF l_document-trtyp EQ 'H'. "create
* CALL FUNCTION 'ZMEREQBADIEX_HDR_POP'
* IMPORTING
* e_dynp_data = ci_hdr_pbo.
*
* ELSE.
* lt_req_items = l_req_header->get_items( ).
* READ TABLE lt_req_items INTO lw_req_item INDEX 1.
* IF sy-subrc EQ 0.
* l_mereq_item = lw_req_item-item->get_data( ).
* MOVE-CORRESPONDING l_mereq_item TO ci_hdr_pbo.
*
* ENDIF.草原的歌曲
* ENDIF.
*
** WHEN subscreen2. "item
** mmpur_dynamic_cast l_req_item im_model.
** l_mereq_item = l_req_item->get_data( ).
** MOVE-CORRESPONDING l_mereq_item TO ci_pos_pbo.
* WHEN OTHERS.
* ENDCASE.
CASE im_name.
WHEN subscreen2.
* is it an item? im_model can be header or item.
mmpur_dynamic_cast l_item im_model.
CHECK NOT l_item IS INITIAL.
* transport standard fields
ls_mepoitem = l_item->get_data( ).
* transport customer fields
CALL FUNCTION 'ZFM_ME23N_GE'
EXPORTING
im_BANFN = ls_mepoitem-BANFN
im_BNFPO = ls_mepoitem-BNFPO
IMPORTING
ex_data = ls_customer.
* store info for later u
MOVE-CORRESPONDING ls_customer TO dynp_data_pbo.
* MOVE ls_customer-badi_bsgru TO dynp_data_pbo-badi_bsgru.
* MOVE ls_customer-badi_afnam TO dynp_data_pbo-badi_afnam.
WHEN OTHERS.
* ...
ENDCASE.手机imei
ENDMETHOD.
FUNCTION ZFM_ME23N_GE.
*"----------------------------------------------------------------------
*"*"Local interface:
*" IMPORTING
*" REFERENCE(IM_BANFN) TYPE BANFN
*" REFERENCE(IM_BNFPO) TYPE BNFPO
*" EXPORTING
*" REFERENCE(EX_DATA) TYPE ZCI_ME23N_SMDY
*"----------------------------------------------------------------------
CLEAR:ls_zmmt114_h.
SELECT SINGLE * FROM ZMMT114_h into ls_zmmt114_h WHERE BANFN = IM_BANFN.
CLEAR:GV_SBFL,GV_SBFL_MS,GV_ZCCJ,GV_ZCCJ_MS,GV_ZCXL,GV_ZCXL_MS,GV_WYSBM.
IF ls_zmmt114_h is NOT INITIAL.
CLEAR ls_zmmt114_I.
SELECT SINGLE * FROM ZMMT114_I INTO ls_zmmt114_I WHERE ZXQDBH = ls_zmmt114_h-ZXQDBH AND ZDJBHH = IM_BNFPO.
EX_DATA-GV_SBFL = ls_zmmt114_I-EQART.
EX_DATA-GV_ZCCJ = ls_zmmt114_I-ZCCJ.
EX_DATA-GV_ZCXL = ls_zmmt114_I-ZCXL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = ls_zmmt114_I-matnr
IMPORTING
output = ls_zmmt114_I-matnr.
SELECT SINGLE ZWYBSM FROM zmmt113 into EX_DATA-GV_WYSBM WHERE matnr = ls_zmmt114_I-matnr
and EQART = ls_zmmt114_I-EQART
and ZCCJ = ls_zmmt114_I-ZCCJ
and ZCXL = 风信子的养殖方法ls_zmmt114_I-ZCXL.
* GV_WYSBM = ls_zmmt114_I-ZWYBSM.
SELECT SINGLE ZSBFLMS FROM ZPMT_004 INTO EX_DATA-GV_SBFL_MS WHERE ZSBFL = EX_DATA-GV_SBFL.
SELECT SINGLE DDTEXT FROM DD07T INTO EX_DATA-GV_ZCCJ_MS WHERE DOMNAME = 'ZZCCJ'
AND DOMVALUE_L = EX_DATA-GV_ZCCJ.
SELECT SINGLE STEXT4 FROM ZZTYPBZ4 INTO EX_DATA-GV_ZCXL_MS WHERE TYPBZ4 = EX_DATA-GV_ZCXL.
ENDIF.
MOVE-CORRESPONDING EX_DATA to ls_smdy.
ENDFUNCTION.