- 浏览: 887206 次
- 来自: ...
最新评论
-
maycolour:
唉,居然在系统里存在一个同样名字和代码类似的程序~~~~~~~ ...
SAP的BOM删除和维护 -
linghanjunzi:
真经典,总结了那么多的资料,很有用处,如果楼主再更新一下,把无 ...
C++--CListCtrl使用技巧的摘抄 -
harry_2013:
还可以这样啊
EDITOR-CALL语句的使用:修改abap内表的内容(代码摘抄) -
elin_yi:
你好,上面代码中的INCLUDE zheading.
可是ZH ...
BDC program for Purchase Info Records (ME11) -
byfhd:
you are stronger!
如何提高读取BSEG的性能(sap已清项和未清项的提取)
migo的屏幕格式的由来
migo的屏幕格式是根据用户选择的操作,由操作决定参考单据(操作和参考单据有个固定关系,在次关系基础上用户可以配置哪些TCODE可以使用哪些操作,操作参照哪些文档),在根据用输入的操作和参考文档,系统内部决定交易/事件类型,交易/事件类型内部决定操作代码(migo_mode ),有了操作代码就决定了屏幕的格式。具体内容和代码请参见下面的摘抄。
GOACTION: MIGO 事务中执行操作
Goods Receipt收货 A01
Return Delivery返回交货 A02
Cancellation取消 A03
Display显示 A04
Release GR blocked stock下达收货冻结库存 A05
Subsequent Delivery后续交货 A06
Goods Issue发货 A07
Transfer Posting转移过帐 A08
Remove from Storage出库 A09
Place in Storage入库 A10
Subsequent Adjustment后续调整 A11
REFDOC:MIGO参考凭证
Purchase Order采购订单 R01
Material Document物料凭证 R02
Delivery Note交货单 R03
Inbound Delivery向内发货 R04
Outbound Delivery向外交货 R05
Transport传送 R06
Transport ID Code运输标识代码 R07
Order订单 R08
Reservation预留 R09
Others其他 R10
配置:设置业务和参考单据
Path: IMG-物料管理-库存管理和实际库存-Enjoy 事务设置-货物移动设置 (MIGO_CUST_ACTION)
MIGO 事务中屏幕:执行操作和参考文档对应关系参见代码(LMIGOGL2:CLASS lcl_migo_globals IMPLEMENTATION.)
************************************************************************
* Create the internal customozing table.
* It contains the valid combinations of action and refdoc, derived
* a) From an internal default combination scheme
* b) The customizing, which is able to delete entries.
************************************************************************
METHOD customizing_read.
DATA: l_action_list TYPE string,
l_refdoc_list TYPE string,
lt_action TYPE TABLE OF goaction,
lt_refdoc TYPE TABLE OF refdoc,
l_action TYPE goaction,
l_refdoc TYPE refdoc,
ls_cust TYPE ty_s_cust,
ls_cust_action TYPE migo_cust_action,
ls_cust_refdoc TYPE migo_cust_refdoc.
* Create the default entries. These are the superset of all allowed
* combinations. Customizing can only delete entries.
l_action_list = 'A01 A02 A03 A04 A05 A06 A07 A08 A09 A10 A11'.
SPLIT l_action_list AT ' ' INTO TABLE lt_action.
LOOP AT lt_action INTO l_action.
CASE l_action.
WHEN 'A01'. l_refdoc_list = 'R01 R04 R05 R06 R07 R08 R09 R10'.
WHEN 'A02'. l_refdoc_list = 'R02 R03'.
WHEN 'A03'. l_refdoc_list = 'R02'.
WHEN 'A04'. l_refdoc_list = 'R02'.
WHEN 'A05'. l_refdoc_list = 'R02'.
WHEN 'A06'. l_refdoc_list = 'R02 R03'.
WHEN 'A07'. l_refdoc_list = 'R01 R08 R09 R10'.
WHEN 'A08'. l_refdoc_list = 'R09 R10'.
WHEN 'A09'. l_refdoc_list = 'R10'.
WHEN 'A10'. l_refdoc_list = 'R02 R10'.
WHEN 'A11'. l_refdoc_list = 'R01'.
ENDCASE.
SPLIT l_refdoc_list AT ' ' INTO TABLE lt_refdoc.
LOOP AT lt_refdoc INTO l_refdoc.
ls_cust-action = l_action.
ls_cust-refdoc = l_refdoc.
APPEND ls_cust TO t_cust.
ENDLOOP.
ENDLOOP.
* Read the customizing and eliminate found entries which are deselected.
SELECT * FROM migo_cust_action INTO ls_cust_action
WHERE tcode = caller_sytcode.
IF ls_cust_action-active = space.
DELETE t_cust WHERE action = ls_cust_action-action.
ELSE.
SELECT * FROM migo_cust_refdoc INTO ls_cust_refdoc
WHERE tcode = ls_cust_action-tcode
AND action = ls_cust_action-action.
IF ls_cust_refdoc-active = space.
DELETE t_cust WHERE action = ls_cust_refdoc-action
AND refdoc = ls_cust_refdoc-refdoc.
ENDIF.
ENDSELECT.
ENDIF.
ENDSELECT.
ENDMETHOD.
MIGO根据用户选择的操作选择参考文档的代码(LMIGOFL4: lcl_migo_firstline)
************************************************************************
* Fill the values for the REFDOC-listbox according to P_ACTION
* Entries can be deactivated in customizing table MIGO_CUST_REFDOC
************************************************************************
METHOD listbox_refdoc_set.
DATA: ls_ddic_info TYPE dd07v,
lt_ddic_info TYPE TABLE OF dd07v,
ls_refdoc TYPE pty_s_refdoc.
CLEAR pt_refdoc.
* Get all domain texts
CALL FUNCTION 'DDUT_DOMVALUES_GET'
EXPORTING
name = 'REFDOC'
texts_only = x
TABLES
dd07v_tab = lt_ddic_info
EXCEPTIONS
illegal_input = 1
OTHERS = 2.
IF sy-subrc <> 0.
sy-subrc = sy-subrc.
ENDIF.
* Loop over the allowed refdocs
LOOP AT lt_ddic_info INTO ls_ddic_info.
ls_refdoc-refdoc = ls_ddic_info-domvalue_l.
ls_refdoc-value = ls_ddic_info-ddtext.
READ TABLE lcl_migo_globals=>t_cust
WITH KEY action = p_action
refdoc = ls_refdoc-refdoc
TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
APPEND ls_refdoc TO pt_refdoc.
ENDIF.
ENDLOOP.
SORT pt_refdoc BY value.
ENDMETHOD. "listbox_refdoc_set
操作和参考单据决定了交易/事件类型(代码参见),再由交易类型来决定操作类型(操作类型又用于决定屏幕格式)(LMIGOKS1)
*_______________________________________________________________________
* INTERNAL DOCUMENTATION:
* How to set migo_mode.
* Possible values: GR (goods receipt [MB01]), GI (goods issue [MB11]),
* GO (goods receipt for production order [MB31]),
* GS (subsequent adjustment).
* Note: The allowed combinations for MIGO are layed out in LMIGOGL2
* (METHOD customizing_read).
* Determines the selected table control.
*
* \REFDOC |
* \ |
* \ |
* \ |
* ACTION \ |R01|R02|R03|R04|R05|R06|R07|R08|R09|R10|
*___________________________________________________________
* Goods receipt |GR | - | - |GR |GR |GR |GR |GO |GI |GI |
* Return delivery | - | * | * | - | - | - | - | - | - | - |
* cancellation | - | * | - | - | - | - | - | - | - | - |
* Display | - | * | - | - | - | - | - | - | - | - |
* Release GR bl.st.|GR | * | - |GR |GR |GR |GR | - | - | - |
* Subsequent deliv.| - | * | * | - | - | - | - | - | - | - |
* goods issue |GI | - | - | - | - | - | - |GI |GI |GI |
* transfer | - | - | - | - | - | - | - | - |GT |GT |
* remove from stor.| - | - | - | - | - | - | - | - | - |GT |
* place in stor. | - |GR | - | - | - | - | - | - | - |GR |
* Subsequent adjust|GS | - | - | - | - | - | - | - | - | - |
*___________________________________________________________
* Note: * means: determined by the material document to be read.
* Before reading, a default is set. Will be overwritten
* immedeately by the material document!
* Default today is: GR
*_______________________________________________________________________
************************************************************************
* Set a new kernel mode.
* According the to flags and fields in S_CONTROL, the data in
* S_ACTION are derived.
************************************************************************
METHOD mode_set.
DATA: lt_mvt TYPE TABLE OF bwart,
l_vgart TYPE vgart,
ls_action_old TYPE ty_s_action.
ls_action_old = s_action.
* Nothing to do if old and new mode are identical. Execute always
* if called from within RESET.
IF is_control <> s_control OR i_unconditional = abap_true.
* If either ACTION or REFDOC has changed, clear VGART. It will be
* set later in this routine to a default or set when reading a
* material document.
* Exception: Setting of VGART forced by flag. Needed for predoc,
* as this routing calls MODE_SET once with a complete set of data.
* Result:
* - New ACTION/REFDOC --> Correct combination set.
* - Read material document --> New VGART set.
* - Change another flag (e.g. new positions) --> No modif to VGART.
l_vgart = is_control-vgart.
IF ( s_control-action <> is_control-action OR
s_control-refdoc <> is_control-refdoc ) AND
i_keep_vgart = abap_false.
CLEAR l_vgart.
ENDIF.
s_control = is_control.
s_control-vgart = l_vgart.
* Create S_ACTION
CLEAR s_action.
* Settings for transaction type. If posting with reference to a
* material document, this is set by the material document reading
* routine. (Importing parameter I_VGART). If not given --> cleared.
* In all other cases, it is derived from ACTION/REFDOC.
CASE s_control-action.
WHEN 'A01'.
s_control-vgart = 'WE'.
IF 'R08' CS s_control-refdoc. s_control-vgart = 'WF'. ENDIF.
IF 'R09 R10' CS s_control-refdoc. s_control-vgart = 'WA'. ENDIF.
WHEN 'A05'.
IF 'R02' NS s_control-refdoc. s_control-vgart = 'WE'. ENDIF.
WHEN 'A07'. s_control-vgart = 'WA'.
WHEN 'A08'. s_control-vgart = 'WA'.
WHEN 'A09'. s_control-vgart = 'WA'.
WHEN 'A10'. s_control-vgart = 'WA'."583649
WHEN 'A11'. s_control-vgart = 'WO'.
ENDCASE.
* Goods receipt/issue others: Table control will be ready for input
IF s_control-refdoc = 'R10'.
s_control-new_line_mode = x.
ENDIF.
* Derive the MIGO_MODE.
* Controls the selection of the a table control variant, field
* selection and authority checks.
CASE s_control-vgart.
WHEN 'WE'. s_action-migo_mode = 'GR'.
WHEN 'WA'.
IF s_control-action = 'A08' or s_control-action = 'A09'.
s_action-migo_mode = 'GT'.
ELSE.
s_action-migo_mode = 'GI'.
ENDIF.
WHEN 'WF'. s_action-migo_mode = 'GO'.
WHEN 'WO'. s_action-migo_mode = 'GS'.
WHEN space. s_action-migo_mode = 'GR'.
WHEN OTHERS. s_action-migo_mode = 'GI'.
ENDCASE.
* If a transfer material document was read by materialdocument_get
* MIGO_MODE has to be 'GT' (only method materialdocument_get can set
* parameter i_transfer).
IF i_transfer = abap_true.
s_action-migo_mode = 'GT'.
ENDIF.
* set accounting VGART for accounting assignment block
CASE s_control-vgart. "431091
WHEN 'WE'. s_control-rw_vorgn = 'RMWE'. "431091 交易业务
WHEN 'WA'. s_control-rw_vorgn = 'RMWA'. "431091
WHEN 'WF'. s_control-rw_vorgn = 'RMWF'. "431091
* additional VGARTs for display material document "431091
WHEN 'WI'. s_control-rw_vorgn = 'RMWI'. "431091
WHEN 'WL'. s_control-rw_vorgn = 'RMWL'. "431091
WHEN 'WO'. s_control-rw_vorgn = 'RMWE'. "431091
WHEN 'WQ'. s_control-rw_vorgn = 'RMWQ'. "431091
WHEN 'WR'. s_control-rw_vorgn = 'RMRU'. "431091
WHEN 'WS'. s_control-rw_vorgn = 'RMRU'. "431091
WHEN 'WZ'. s_control-rw_vorgn = 'RMWA'. "431091
WHEN others. s_control-rw_vorgn = 'RMWA'. "431091
ENDCASE. "431091
* Set the small dependent flags in S_ACTION.
CASE s_control-action.
WHEN 'A01'.
s_action-create = abap_true.
IF s_action-migo_mode = 'GI'.
s_action-issue = abap_true.
ELSE.
s_action-receipt = abap_true.
ENDIF.
WHEN 'A02'.
s_action-create = abap_true.
s_action-return = abap_true.
WHEN 'A03'.
s_action-create = abap_true.
s_action-cancel = abap_true.
WHEN 'A04'.
s_action-display = abap_true.
WHEN 'A05'.
s_action-create = abap_true.
s_action-release = abap_true.
WHEN 'A06'.
s_action-create = abap_true.
s_action-subsequent = abap_true.
WHEN 'A07'.
s_action-create = abap_true.
s_action-issue = abap_true.
WHEN 'A08'.
s_action-create = abap_true.
WHEN 'A09'.
s_action-create = abap_true.
when 'A10'.
s_action-create = abap_true.
s_action-place = abap_true.
WHEN 'A11'.
s_action-create = abap_true.
ENDCASE.
* Set the type of reference document for this combination of
* ACTION and REFDOC.
CASE s_control-refdoc. "381404
WHEN 'R01' OR 'R04' OR 'R05' OR 'R06' OR 'R07'. "381404
* Purchase order, Inbound/Outbound delivery, Transport, TraId.
s_action-refdoctype = c_refdoctype_po. "381404
WHEN 'R02' OR 'R03'. "381404
* Material document, delivery note.
s_action-refdoctype = c_refdoctype_matdoc. "381404
WHEN 'R08'. "381404
* Order. Can be MB31 or goods issue for reservation.
CASE s_control-action. "381404
WHEN 'A01'. "381404
s_action-refdoctype = c_refdoctype_order. "381404
WHEN 'A07'. "381404
s_action-refdoctype = c_refdoctype_reservation. "381404
ENDCASE. "381404
WHEN 'R09'. "381404
* Reservation.
s_action-refdoctype = c_refdoctype_reservation. "381404
WHEN 'R10'. "381404
* No reference document.
s_action-refdoctype = c_refdoctype_none. "381404
ENDCASE. "381404
* Set context for the table control
CALL FUNCTION 'SET_TC_KONTEXT'
EXPORTING
programname = 'SAPLMIGO'
controlname = 'TV_GOITEM'
kontext = s_action-migo_mode. "#EC DOM_EQUAL
* The REFRESH ***after*** the context has been set ensures that the
* R/3 kernel creates the new table control structure using the
* correct settings from that context.
* This refresh has nothing to do with a refresh of the context!
REFRESH CONTROL 'TV_GOITEM' FROM SCREEN '0200'. "354686
* The detail toggler has to use different subscreens for transfer
* postings. Therefore it needs to be updated with the correct screens
* when migo_mode changes.
if s_action-migo_mode = 'GT'.
* To display all tabsprips, the control TS_GOITEM has to be cleared
CLEAR ts_goitem.
call method oref_detail_toggler->screen_set exporting
i_active_dyn = '0303'
i_inactive_dyn = '0302'
i_subscreen_dyn = '0305'
i_subscreen = 'G_DETAIL_SUBSCREEN'.
else.
* To display all tabsprips, the control TS_GOITEM has to be cleared
CLEAR ts_goitem.
call method oref_detail_toggler->screen_set exporting
i_active_dyn = '0301'
i_inactive_dyn = '0302'
i_subscreen_dyn = '0300'
i_subscreen = 'G_DETAIL_SUBSCREEN'.
endif.
def_sms 'MIGO_DETAIL_CARRIER_CHANGE' space space.
ENDIF. "S_CONTROL changed...
* Default values for header data
CALL METHOD header_defaults_set.
* BAdI: MODE SET
IF NOT lcl_migo_globals=>if_badi is initial. "552774
CALL METHOD lcl_migo_globals=>if_badi->mode_set
EXPORTING
i_action = s_control-action
i_refdoc = s_control-refdoc.
ENDIF. "552774
* Send message
def_sms 'KERNEL_MODE_CHANGED' ls_action_old-migo_mode
s_action-migo_mode.
* New 'migo_mode'-depending fieldselection
CALL METHOD screen_modify_mode.
* Get allowed movemtent types (from T158B / MIGO_T156)
CALL METHOD lcl_migo_buffer=>allowed_mvt_get
EXPORTING i_migo_mode = s_action-migo_mode
i_migo_action = s_control-action
IMPORTING et_mvt = lt_mvt.
* Export pt_mvt to memory, because F4-Help for BWART needs it.
EXPORT lt_mvt FROM lt_mvt TO MEMORY ID 'MIGO_MVT'.
ENDMETHOD.
MIGO的屏幕格式是如何来的?(代码摘自:LMIGOSM2)
* CLASS lcl_migo_screenmanager IMPLEMENTATION
METHOD lif_migo_frame~message_handler.
* Set the correct bit in the status data
* Mapping: <status> = 'ABC' with A = Header, B = Table, C = Item
CASE i_message_id.
WHEN 'MIGO_HEADER_TOGGLER_STATUS'. p_status+0(1) = is_message-data2.
WHEN 'MIGO_DETAIL_TOGGLER_STATUS'. p_status+2(1) = is_message-data2.
WHEN 'MIGO_DETAIL_CARRIER_CHANGE'. "new carrier screen with 'old'
"p_status
ENDCASE.
p_status+1(1) = x. "Table always visible
* Choose the appropriate subscreen
IF lcl_migo_globals=>kernel->s_action-migo_mode = 'GT'.
* Transfer posting
g_detail_subscreen = '0305'.
CASE p_status.
WHEN 'XX '. g_screenmanager_dynnr = '0006'.
WHEN 'XXX'. g_screenmanager_dynnr = '0007'.
WHEN ' X '. g_screenmanager_dynnr = '0008'.
WHEN ' XX'. g_screenmanager_dynnr = '0009'.
ENDCASE.
ELSE.
* Normal posting (mode: GI/GR/GS/GO)
g_detail_subscreen = '0300'.
CASE p_status.
WHEN 'XX '. g_screenmanager_dynnr = '0002'.
WHEN 'XXX'. g_screenmanager_dynnr = '0003'.
WHEN ' X '. g_screenmanager_dynnr = '0004'.
WHEN ' XX'. g_screenmanager_dynnr = '0005'.
ENDCASE.
endif.
ENDMETHOD.
相关推荐
migo-security是一个轻量级权限管理系统,其核心设计目标是开发Swift、学习简单、轻量级、易扩展 使用migo-security搭建项目,只需编写30%左右代码,其余的代码交给系统自动生成 部分代码使用Java8 Stream lambda ...
在SAP MM模块中,事务代码是用于执行特定业务流程的关键命令。以下是对标题和描述中涉及的一些关键事务代码的详细解释: 1. **采购订单**: - ME21N:创建采购订单,适用于已知供应商的情况。在这个事务代码中,...
在SAP的库存管理模块中,MIGO(Material Inventory General Ledger Document Entry)是一个非常重要的事务代码,它集成了MB1A、MB1B和MB1C的...通过不断的实践和学习,可以更好地利用MIGO来优化库存控制和财务管理。
- 使用交易代码`MIGO`进入收货流程。 - 选择`A01`(收货)->`R01`(采购订单)。 - 输入采购订单号。 - 对于有物料编码的商品使用`103`类型进行收货;对于无物料编码的赠品,则使用特定的收货类型。 2. **启用...
《MiGo商城源代码》是针对一款名为MiGo的在线购物平台的源代码集合,它包含了一系列用于构建和运行电商网站的文件。由于文件数量众多,这里我们将主要探讨该源代码可能涉及的关键技术、架构设计以及学习价值。 1. ...
在SAP系统中,MIGO(Material Goods Issue)主要用于处理库存物料的收货和发货操作。当执行103收货事务代码时,系统需要能够自动生成并打印IQC(Incoming Quality Check)检验单,以便进行质量检查和记录。本文将...
"SAP项目用户操作手册-MIGO 货物移动" 本手册描述了执行货物移动的操作方法,包括仓库对采购订单收货、仓库对非生产用发料、物料退货换货、库存调拨等业务。 一、事务操作的目的 本手册描述了执行货物移动的操作...
IDES学习(MM模块)Procurement with a Scheduling Agreement采购计划协议是一种采购方式,旨在.streamline采购流程,提高采购效率。采购计划协议是一种协议形式,规定了供应商需要供应的物料数量、价格、供货日期等...
在 SAP 系统中,SAP MM 模块(Materials Management)主要用于管理企业的物料和采购流程。无偿委外退货操作是企业在与供应商合作过程中,针对委外加工的产品不满意或者存在质量问题时,需要进行的一种特殊处理流程。...
总的来说,"MiGo商城源代码"提供了学习和研究移动互联网电商应用开发的宝贵资源,涵盖了用户交互、数据管理、支付流程、推荐系统等多个关键领域的技术实现。开发者可以从中学到如何构建一个完整的安卓商城应用,提升...
8. **报表和分析**:SAP MM提供丰富的报表工具,如MIGO(物料凭证过账)报告、MIRO(发票收付凭证)报告等,用于监控和分析业务活动,支持决策制定。 9. **最佳实践和配置**:学习SAP MM不仅涉及功能操作,还包括...
学习SAP MM模块需要理解物料主数据、供应商管理、采购流程、库存管理、发票校验等多个方面,并掌握如何在实际业务场景中灵活运用这些移动类型。通过深入理解和实践,可以提升企业供应链效率,减少库存成本,优化物料...
migo命令购买中国,在线订单工具淘宝,tmall,1688 服务由migo订单提供: - 咨询在顶级批发和零售网站上找到商品来源中国:阿里巴巴,1688.com,淘宝,Tmall.com ...... - 根据要求和检验购买家居用品 - 包装和...
1. **检查MIGO中的合作伙伴信息**:首先确认在MIGO事务中是否已经填写了与特殊库存B相关的客户信息。如果未填写或填写不正确,则需要进行修改。 2. **配置OMJJ**:若MIGO中的合作伙伴信息已正确填写但仍然报错,则...
"SAP MM 配置自动过账" SAP MM 配置自动过账(Automatic Account Assignment)是 SAP MM 模块中的一项功能,旨在自动将采购订单、物料清单等业务文档进行账务处理,并将其分配到相应的科目上,以便进行财务报表的...
标题"MIGO批次特性增强实例"涉及的是在SAP MM模块中对批次特性的扩展和配置。SAP MM是SAP的物料管理模块,用于管理企业的采购、库存和物料流动等业务流程。在这个实例中,主要关注如何通过增强点实现特定批次特性的...
migo-security是一个轻量级权限管理系统,其核心设计目标是开发Swift、学习简单、轻量级、易扩展 使用migo-security搭建项目,只需编写30%左右代码,其余的代码交给系统自动生成 部分代码使用Java8 Stream lambda ...
### SAP MM 物料管理模块知识点总结 #### 一、SAP MM 模块概述 SAP MM(Material Management)是SAP系统中的一个重要组成部分,主要用于处理企业的物流管理和采购活动。MM模块支持从供应商询价到采购订单创建,再到...
migo-security是一个轻量级权限管理系统,其核心设计目标是开发Swift、学习简单、轻量级、易扩展 使用migo-security搭建项目,只需编写30%左右代码,其余的代码交给系统自动生成 部分代码使用Java8 Stream lambda ...