ME21N/ME22N/ME23N屏幕增强BADI ME_GUI_PO_CUST
最近想更深入学习下classic BADI, 以前没玩过BADI屏幕增强, 所以决定玩一下.
这次的屏幕增强主要用到两个BADI: ME_GUI_PO_CUST和ME_PROCESS_PO_CUST
这两个BADI都是有例子的, 可以在se18那里按GoTo->Sample code->Display来查看, 也可以直接在SE24查看类CL_EXM_IM_ME_GUI_PO_CUST和CL_EXM_IM_ME_PROCESS_PO_CUST
现在我们对PO header加上自己的subscreen, SAP的例子提供的是对item增加subscreen.
Step 1: Create Function Group
仿照Function Group MEPOBADIEX建一个Function Group
我建的Function Group如下图所示
Step 2: 在Function Group里建Screen, screen number随便
在TOP里面加入对应屏幕的变量, 这里我是直接用tables.
Step 3: 给BADI ME_GUI_PO_CUST建一个implementation
在Public Section里加上TYPE-POOLS mmmfd .
Step 4: 在Method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE, 加入custom subscreen的设置代码
- METHOD if_ex_me_gui_po_cust~subscribe.
- DATA: lw_subscribers TYPE mepo_subscribers.
- * we want to add a customer subscreen on the Header tab
- CHECK im_application = 'PO'.
- CHECK im_element = 'HEADER'.
- CLEAR lw_subscribers.
- lw_subscribers-name = subscreen1.
- lw_subscribers-dynpro = '0100'.
- lw_subscribers-program = 'SAPLZCI_EKKODB'.
- lw_subscribers-struct_name = 'CI_EKKODB'.
- lw_subscribers-label = 'Zero test2'.
- lw_subscribers-position = 11.
- lw_subscribers-height = 8.
- APPEND lw_subscribers TO re_subscribers.
- ENDMETHOD.
METHOD if_ex_me_gui_po_cust~subscribe.
DATA: lw_subscribers TYPE mepo_subscribers. * we want to add a customer subscreen on the Header tab
CHECK im_application = 'PO'.
CHECK im_element = 'HEADER'. CLEAR lw_subscribers.
lw_subscribers-name = subscreen1.
lw_subscribers-dynpro = '0100'.
lw_subscribers-program = 'SAPLZCI_EKKODB'.
lw_subscribers-struct_name = 'CI_EKKODB'.
lw_subscribers-label = 'Zero test2'.
lw_subscribers-position = 11.
lw_subscribers-height = 8.
APPEND lw_subscribers TO re_subscribers.
ENDMETHOD.
Step 5: 在IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS, 加入代码, 使field name和它的数字编号关联起来
- FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
- LOOP AT ch_mapping ASSIGNING <mapping>.
- CASE <mapping>-fieldname.
- WHEN 'LV_TEST1'. <mapping>-metafield = mmmfd_cust_01.
- WHEN 'LV_TEST2'. <mapping>-metafield = mmmfd_cust_02.
- WHEN 'LV_TEST3'. <mapping>-metafield = mmmfd_cust_03.
- ENDCASE.
- ENDLOOP.
FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping. LOOP AT ch_mapping ASSIGNING <mapping>.
CASE <mapping>-fieldname.
WHEN 'LV_TEST1'. <mapping>-metafield = mmmfd_cust_01.
WHEN 'LV_TEST2'. <mapping>-metafield = mmmfd_cust_02.
WHEN 'LV_TEST3'. <mapping>-metafield = mmmfd_cust_03.
ENDCASE.
ENDLOOP.
Custom的field估计只能加9个, 因为我在TYPE-POOLS mmmfd看到最大的是mmfd_cust_09,
这里也可以把一些standard field弄到custom subscreen上.
经过以上五步, 我们可以在ME23N看到custom subscreen, 但在ME21N和ME22N依然是看不到的...这个是为什么, 我还搞不清楚.
Step 6: 给BADI ME_PROCESS_PO_CUST建一个implementation
在Public Section加入TYPE-POOLS mmmfd .
Step 7: 在Method IF_EX_ME_PROCESS_PO_CUST~FIELDSELECTION_HEADER加入代码, 改变表ch_fieldselection的field status
'-'代表hidden, '+'或'.'表示editable, '*'代表display
- METHOD if_ex_me_process_po_cust~fieldselection_header.
- DATA: lv_persistent TYPE mmpur_bool.
- FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.
- DEFINE set_input.
- read table ch_fieldselection assigning <fs> with table key metafield = &1.
- if sy-subrc = 0.
- if im_header->is_changeable( ) = mmpur_yes.
- <fs>-fieldstatus = '+'.
- else.
- <fs>-fieldstatus = '*'.
- endif.
- endif.
- END-OF-DEFINITION.
- * if the item is already on the database, we disallow to change field badi_bsgru
- lv_persistent = im_header->is_persistent( ).
- set_input mmmfd_cust_01.
- set_input mmmfd_cust_02.
- set_input mmmfd_cust_03.
- ENDMETHOD.
METHOD if_ex_me_process_po_cust~fieldselection_header.
DATA: lv_persistent TYPE mmpur_bool.
FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection. DEFINE set_input.
read table ch_fieldselection assigning <fs> with table key metafield = &1.
if sy-subrc = 0.
if im_header->is_changeable( ) = mmpur_yes.
<fs>-fieldstatus = '+'.
else.
<fs>-fieldstatus = '*'.
endif.
endif.
END-OF-DEFINITION. * if the item is already on the database, we disallow to change field badi_bsgru
lv_persistent = im_header->is_persistent( ). set_input mmmfd_cust_01.
set_input mmmfd_cust_02.
set_input mmmfd_cust_03. ENDMETHOD.
这里有两点注意下:
1. im_header->is_changeable()可以判断当前这些field是不是处于可编辑状态, 如果是则为'X'. 比如刚进TCODE ME21N, ME22N它们是可编辑的, 但当按save保存成功后, 它们暂时是不可以编辑的, 要再按把它改回编辑状态才可以编辑,这里就实现了这个功能.
2. im_header->is_persistent()可以判断当这些field在数据库里有值了, 它就是'X', 当我们把数据写进表里就不想它被修改时, 可以用这个来判断, 比如把某个field设置成ME21N可编辑, ME22N不可编辑.
经过这七步, ME21N/ME22N/ME23N都可以看到这个custom subscreen, 但所有自建field都是可编辑状态, 必需做完第八步, 才能正常显示
Step 8: 在screen中调用2个module
这两个module存放在下图的程序里
注意: 如果不调用这两个module, BADI ME_GUI_PO_CUST下面的4个method都不会触发
TRANSPORT_FROM_MODEL
TRANSPORT_TO_DYNP
TRANSPORT_FROM_DYNP
TRANSPORT_TO_MODEL
Step 9: 在Method IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_MODEL加入代码
把header的三个自建field传到attribute dynp_data_pho里
- METHOD if_ex_me_gui_po_cust~transport_from_model.
- DATA: lw_header TYPE REF TO if_purchase_order_mm,
- lw_mepoheader TYPE mepoheader,
- lw_customer TYPE ci_ekkodb.
- *--------------------------------------------------------------------*
- * system asks to transport data from the business logic into the view
- *--------------------------------------------------------------------*
- IF im_name = subscreen1.
- * is it an Header? im_model can be header or item.
- mmpur_dynamic_cast lw_header im_model.
- CHECK NOT lw_header IS INITIAL.
- * transport standard fields
- lw_mepoheader = lw_header->get_data( ).
- * store info for later use
- MOVE-CORRESPONDING lw_mepoheader TO dynp_data_pbo.
- ENDIF.
- ENDMETHOD.
METHOD if_ex_me_gui_po_cust~transport_from_model.
DATA: lw_header TYPE REF TO if_purchase_order_mm,
lw_mepoheader TYPE mepoheader,
lw_customer TYPE ci_ekkodb.
*--------------------------------------------------------------------*
* system asks to transport data from the business logic into the view
*--------------------------------------------------------------------* IF im_name = subscreen1.
* is it an Header? im_model can be header or item.
mmpur_dynamic_cast lw_header im_model.
CHECK NOT lw_header IS INITIAL.
* transport standard fields
lw_mepoheader = lw_header->get_data( ).
* store info for later use
MOVE-CORRESPONDING lw_mepoheader TO dynp_data_pbo.
ENDIF. ENDMETHOD.
Step 10: 在Method IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_DYNP加入代码
通过调用FM:ZCI_EKKODB_PUSH 把attribute
- METHOD if_ex_me_gui_po_cust~transport_to_dynp.
- IF im_name = subscreen1.
- CALL FUNCTION 'ZCI_EKKODB_PUSH'
- EXPORTING
- im_dynp_data = dynp_data_pbo.
- ENDIF.
- ENDMETHOD.
METHOD if_ex_me_gui_po_cust~transport_to_dynp. IF im_name = subscreen1.
CALL FUNCTION 'ZCI_EKKODB_PUSH'
EXPORTING
im_dynp_data = dynp_data_pbo.
ENDIF.
ENDMETHOD.
Step 11: 在IF_EX_ME_GUI_PO_CUST~TRANSPORT_FROM_DYNP加入代码
PAI事件时, 把屏幕的值传到attribute dynp_data_pai, 并且比较dynp_data_pbo和dynp_data_pai, 确定自建field的值有所改变, 把re_changed置为'X', 这样IF_EX_ME_PROCESS_PO_CUST~PROCESS_HEADER就会触发.
- METHOD if_ex_me_gui_po_cust~transport_from_dynp.
- IF im_name = subscreen1.
- CALL FUNCTION 'ZCI_EKKODB_POP'
- IMPORTING
- ex_dynp_data = dynp_data_pai.
- ENDIF.
- IF dynp_data_pai <> dynp_data_pbo.
- * something has changed therefor we have to notify the framework
- * to transport data to the model
- re_changed = mmpur_yes.
- ENDIF.
- ENDMETHOD.
METHOD if_ex_me_gui_po_cust~transport_from_dynp.
IF im_name = subscreen1.
CALL FUNCTION 'ZCI_EKKODB_POP'
IMPORTING
ex_dynp_data = dynp_data_pai. ENDIF. IF dynp_data_pai <> dynp_data_pbo.
* something has changed therefor we have to notify the framework
* to transport data to the model
re_changed = mmpur_yes.
ENDIF.
ENDMETHOD.
Step 12: 在IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_MODEL加入代码, 把修改后的数据传到bussiness object里
- METHOD if_ex_me_gui_po_cust~transport_to_model.
- DATA: lw_header TYPE REF TO if_purchase_order_mm,
- lw_mepoheader TYPE mepoheader,
- lw_customer TYPE ci_ekkodb,
- lw_po_header_handle TYPE REF TO cl_po_header_handle_mm.
- *--------------------------------------------------------------------*
- * data have to be transported to business logic
- *--------------------------------------------------------------------*
- IF im_name = subscreen1.
- * is it an item? im_model can be header or item.
- mmpur_dynamic_cast lw_header im_model.
- CHECK NOT lw_header IS INITIAL.
- lw_mepoheader = lw_header->get_data( ).
- * standard fields changed?
- IF dynp_data_pbo-lv_test1 <> dynp_data_pai-lv_test1
- OR dynp_data_pbo-lv_test2 <> dynp_data_pai-lv_test2
- OR dynp_data_pbo-lv_test3 <> dynp_data_pai-lv_test3.
- * update standard fields
- lw_mepoheader-lv_test1 = dynp_data_pai-lv_test1.
- lw_mepoheader-lv_test2 = dynp_data_pai-lv_test2.
- lw_mepoheader-lv_test3 = dynp_data_pai-lv_test3.
- CALL METHOD lw_header->set_data
- EXPORTING
- im_data = lw_mepoheader.
- ENDIF.
- ENDIF.
- ENDMETHOD.
METHOD if_ex_me_gui_po_cust~transport_to_model. DATA: lw_header TYPE REF TO if_purchase_order_mm,
lw_mepoheader TYPE mepoheader,
lw_customer TYPE ci_ekkodb,
lw_po_header_handle TYPE REF TO cl_po_header_handle_mm.
*--------------------------------------------------------------------*
* data have to be transported to business logic
*--------------------------------------------------------------------*
IF im_name = subscreen1. * is it an item? im_model can be header or item.
mmpur_dynamic_cast lw_header im_model.
CHECK NOT lw_header IS INITIAL.
lw_mepoheader = lw_header->get_data( ).
* standard fields changed?
IF dynp_data_pbo-lv_test1 <> dynp_data_pai-lv_test1
OR dynp_data_pbo-lv_test2 <> dynp_data_pai-lv_test2
OR dynp_data_pbo-lv_test3 <> dynp_data_pai-lv_test3.
* update standard fields
lw_mepoheader-lv_test1 = dynp_data_pai-lv_test1.
lw_mepoheader-lv_test2 = dynp_data_pai-lv_test2.
lw_mepoheader-lv_test3 = dynp_data_pai-lv_test3. CALL METHOD lw_header->set_data
EXPORTING
im_data = lw_mepoheader. ENDIF.
ENDIF.
ENDMETHOD.
Step 13: 如果要check这些field的值的话, 可以写在IF_EX_ME_PROCESS_PO_CUST~PROCESS_HEADER, 这里我要check field1必须是PALM.
- METHOD if_ex_me_process_po_cust~process_header.
- DATA: lw_mepoheader TYPE mepoheader,
- lw_customer TYPE ci_ekkodb.
- DATA: lv_testflag TYPE c.
- INCLUDE mm_messages_mac. "useful macros for message handling
- lw_mepoheader = im_header->get_data( ).
- IF lw_mepoheader-lv_test1 <> 'PALM'.
- * Place the cursor onto field lv_test1. The metafield was defined in BAdI ME_GUI_PO_CUST,
- * Method MAP_DYNPRO_FIELDS.
- mmpur_metafield mmmfd_cust_01.
- mmpur_message_forced 'E' 'ZDEV001' '999' '' '' '' ''.
- * MESSAGE 'This field should be filled ''PALM''' TYPE 'W'.
- * CLEAR lv_testflag.
- * lv_testflag = 'X'.
- * EXPORT lv_testflag FROM lv_testflag TO MEMORY ID 'Z_ZERO_ME22N'.
- * invalidate the object
- CALL METHOD im_header->invalidate( ).
- ENDIF.
- ENDMETHOD.
METHOD if_ex_me_process_po_cust~process_header.
DATA: lw_mepoheader TYPE mepoheader,
lw_customer TYPE ci_ekkodb. DATA: lv_testflag TYPE c. INCLUDE mm_messages_mac. "useful macros for message handling lw_mepoheader = im_header->get_data( ). IF lw_mepoheader-lv_test1 <> 'PALM'.
* Place the cursor onto field lv_test1. The metafield was defined in BAdI ME_GUI_PO_CUST,
* Method MAP_DYNPRO_FIELDS. mmpur_metafield mmmfd_cust_01.
mmpur_message_forced 'E' 'ZDEV001' '999' '' '' '' ''.
* MESSAGE 'This field should be filled ''PALM''' TYPE 'W'. * CLEAR lv_testflag.
* lv_testflag = 'X'.
* EXPORT lv_testflag FROM lv_testflag TO MEMORY ID 'Z_ZERO_ME22N'. * invalidate the object
CALL METHOD im_header->invalidate( ).
ENDIF. ENDMETHOD.
如果按回车来check的话, 它会显示error message,一次改变后按一次回车有反应, 第二次就没反应.
这里有一个缺陷, 当我们按save里, 这条message是不会显示到message表中的(研究了很久, 没研究出来怎么搞), 幸好这里有个功能十分不错, 选中PO header data still faulty这个message, 按Edit, 就可以定位到error message的field.
至此, 增强完成.
补充:
1. IF_EX_ME_PROCESS_PO_CUST~INITIALIZE: initialize function groupZCI_EKKODB的变量语句可以写在这.
- METHOD if_ex_me_process_po_cust~initialize.
- CALL FUNCTION 'ZCI_EKKODB_INIT'
- .
- ENDMETHOD.
METHOD if_ex_me_process_po_cust~initialize.
CALL FUNCTION 'ZCI_EKKODB_INIT'
.
ENDMETHOD.
2. IF_EX_ME_PROCESS_PO_CUST~OPEN: 如果要select自建表的东西可以写在这里, 这里有个field IM_TRTYP有一定的控制作用, 具体可以查看它的domain值.
3. IF_EX_ME_PROCESS_PO_CUST~POST: update自建表的语句可以写在这里.
4. Custom subscreen的field必须引用method IF_EX_ME_GUI_PO_CUST~SUBSCRIBE里的定义的那个structure, from dict要勾上.
5. 如果有自建表里面的field, 必须在method IF_EX_ME_GUI_PO_CUST~TRANSPORT_TO_MODEL判断自建表的field改变时, 加上语句CALL METHOD lw_header->set_changed( ), 不这样的话, 你的自建表的field怎么变在保存时都会提示No data changed. 下面代码是例子.
- METHOD if_ex_me_gui_po_cust~transport_to_model.
- DATA: lw_header TYPE REF TO if_purchase_order_mm,
- lw_mepoheader TYPE mepoheader,
- lw_customer TYPE ci_ekkodb,
- lw_po_header_handle TYPE REF TO cl_po_header_handle_mm.
- *--------------------------------------------------------------------*
- * data have to be transported to business logic
- *--------------------------------------------------------------------*
- IF im_name = subscreen1.
- * is it an item? im_model can be header or item.
- mmpur_dynamic_cast lw_header im_model.
- CHECK NOT lw_header IS INITIAL.
- lw_mepoheader = lw_header->get_data( ).
- * standard fields changed?
- IF dynp_data_pbo-lv_test1 <> dynp_data_pai-lv_test1
- OR dynp_data_pbo-lv_test2 <> dynp_data_pai-lv_test2
- OR dynp_data_pbo-lv_test3 <> dynp_data_pai-lv_test3.
- * update standard fields
- lw_mepoheader-lv_test1 = dynp_data_pai-lv_test1.
- lw_mepoheader-lv_test2 = dynp_data_pai-lv_test2.
- lw_mepoheader-lv_test3 = dynp_data_pai-lv_test3.
- CALL METHOD lw_header->set_data
- EXPORTING
- im_data = lw_mepoheader.
- ENDIF.
- IF dynp_data_pbo-zdamon <> dynp_data_pai-zdamon.
- CALL FUNCTION 'ZCI_EKKODB_SET_DATA'
- EXPORTING
- im_damon = dynp_data_pai-zdamon.
- CALL METHOD lw_header->set_changed( ).
- ENDIF.
- ENDIF.
- ENDMETHOD.
METHOD if_ex_me_gui_po_cust~transport_to_model. DATA: lw_header TYPE REF TO if_purchase_order_mm,
lw_mepoheader TYPE mepoheader,
lw_customer TYPE ci_ekkodb,
lw_po_header_handle TYPE REF TO cl_po_header_handle_mm.
*--------------------------------------------------------------------*
* data have to be transported to business logic
*--------------------------------------------------------------------*
IF im_name = subscreen1. * is it an item? im_model can be header or item.
mmpur_dynamic_cast lw_header im_model.
CHECK NOT lw_header IS INITIAL.
lw_mepoheader = lw_header->get_data( ).
* standard fields changed?
IF dynp_data_pbo-lv_test1 <> dynp_data_pai-lv_test1
OR dynp_data_pbo-lv_test2 <> dynp_data_pai-lv_test2
OR dynp_data_pbo-lv_test3 <> dynp_data_pai-lv_test3.
* update standard fields
lw_mepoheader-lv_test1 = dynp_data_pai-lv_test1.
lw_mepoheader-lv_test2 = dynp_data_pai-lv_test2.
lw_mepoheader-lv_test3 = dynp_data_pai-lv_test3. CALL METHOD lw_header->set_data
EXPORTING
im_data = lw_mepoheader. ENDIF. IF dynp_data_pbo-zdamon <> dynp_data_pai-zdamon.
CALL FUNCTION 'ZCI_EKKODB_SET_DATA'
EXPORTING
im_damon = dynp_data_pai-zdamon. CALL METHOD lw_header->set_changed( ).
ENDIF. ENDIF.
ENDMETHOD.
6.Method IF_EX_ME_GUI_PO_CUST~EXECUTE可以处理function code.
- METHOD if_ex_me_gui_po_cust~execute.
- IF im_fcode = 'ZZZZ'.
- MESSAGE 'Zero test' TYPE 'I'.
- ENDIF.
- ENDMETHOD.
METHOD if_ex_me_gui_po_cust~execute.
IF im_fcode = 'ZZZZ'.
MESSAGE 'Zero test' TYPE 'I'.
ENDIF.
ENDMETHOD.
ME21N/ME22N/ME23N屏幕增强BADI ME_GUI_PO_CUST的更多相关文章
- SAP采购订单屏幕增强
转自<http://blog.csdn.net/heng0757/article/details/8073875> 为采购订单增加一个页标签,在其中放入客户自定义字段, 1. CMOD 增 ...
- SAP S4/HANA BP屏幕增强添加自定义字段(BDT方式)
喜欢博主的读者也许会意识到,这是本博客中第一篇有关屏幕增强的文章.之前没有总结过相关的东西,除了因为相关经验有限之外,我个人也是不喜欢所谓dynpro编程的,它有许多“潜规则”一样的东西要记住,想要运 ...
- 【MM系列】SAP 交货单屏幕增强
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[MM系列]SAP 交货单屏幕增强 前言部分 ...
- [转载]ME51n,ME52n,ME53n屏幕增强
原文地址:ME51n,ME52n,ME53n屏幕增强作者:cyzhang811 http://blog.sina.com.cn/s/blog_721b218c0100zch9.html 使用增强:ME ...
- 如何实现标准TCODE的屏幕增强
如何实现标准TCODE的屏幕增强(HOWTO:Implement a screen exit to a standard SAP transaction) Introduction SAP provi ...
- SAP销售订单屏幕增强行项目屏幕增强
1.在vbap表中 append一个自定义结构,如下图: 2.TCODE:SE80 程序名:SAPMV45A 屏幕:8459 如图: 3.标记增强的屏幕字段 4.屏幕增强的位置 *& ...
- SAP 金税接口增强 BADI
SAP与金税连接有两种方式:组件接口及文本接口. 文本接口为例: 1.SAP取发票数据.主要来自合同,销售订单,交货单.发票,客户供应商主数据等 2.SAP处理:合并.拆分,折扣等 3.导出TXT ...
- 增强篇4 CO01生产订单屏幕增强
Step1. 结构 CO_AUFK 里增加自定义字段:ZZZ_TRIAL 然后激活结构 查看AUFK是激活状态, 字段增强完成: Step2. CMOD 使用客户增强:PPCO0012 生产订 ...
- 【MM系列】SAP PO增强BADI
公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[MM系列]SAP PO增强BADI 前言部 ...
随机推荐
- 修改Android默认背光值
/********************************************************************* * 修改Android默认背光值 * 说明: * 本文主要 ...
- 【转】Android异步消息处理机制完全解析,带你从源码的角度彻底理解
原文网址:http://blog.csdn.net/guolin_blog/article/details/9991569 转载请注明出处:http://blog.csdn.net/guolin_bl ...
- WCF发布后远程访问的域名解析问题
环境: VS2010 sp1,.net framework 4.0,windows server 2003 x64 ,iis 6.0 症状: WCF开发测试,本地调用都正常.发布后,在浏览器中访问ht ...
- memcached单点故障与负载均衡
在上文中,主要教大家如何搭建在windows IIS 7.5下搭建php环境,使用常见的两种memcached性能监视工具.通过自己动手实践,观察监控工具上数据,相信大家对于memcached的了解 ...
- CSS遮罩——如何在CSS中使用遮罩
Css遮罩是2008年4月由苹果公司添加到webkit引擎中的.遮罩提供一种基于像素级别的,可以控制元素透明度的能力,类似于png24位或png32位中的alpha透明通道的效果. 图像是由rgb三个 ...
- ASDL + WN725N 配置无线AP
1. ASDL 正常拨号上网 2. 安装TP-LINK无线客户端应用程序 打开之后选择模拟AP 如下图设置----应用 3. 本地连接----属性----高级 如下图设置 4. 宽带连接--- ...
- HDU 5690 All X 暴力循环节
分析:暴力找循环节就好了 #include <iostream> #include <cstdio> #include <cstdlib> #include < ...
- HDU 4777 Rabbit Kingdom 树状数组
分析:找到每一个点的左边离他最近的不互质数,记录下标(L数组),右边一样如此(R数组),预处理 这个过程需要分解质因数O(n*sqrt(n)) 然后离线,按照区间右端点排序 然后扫一遍,对于当前拍好顺 ...
- tomcat 容器中的UML架构图
- bzoj 3122 [Sdoi2013]随机数生成器(逆元,BSGS)
Description Input 输入含有多组数据,第一行一个正整数T,表示这个测试点内的数据组数. 接下来T行,每行有五个整数p,a,b,X1,t,表示一组数据.保证X1和t都是合法的页码. ...