发票校验部分增强

原创 2010年08月12日 10:30:00
Display customer fields in header of logistics invoice verification transactions Welcome Guest
View a printable version of the current page.

Added by Pablo Casamayor , last edited by Pablo Casamayor on Jun 28, 2008  (view change)  

Author: Pablo Casamayor
Submitted: 28.06.2008

The aim of this tutorial is to help in providing a solution when we want to display customer fields in logistics invoice verification transactions.


Figure 1 (customer fields in MIR7 transaction)

The requirement was to display additional fields in logistics invoice verification transactions.

The original idea was to use exit LMR1M001 but reading the documentation of EXIT_SAPLMR1M_003 I found out that:

As of Release 4.6A, transaction MR1M is no longer supported. Therefore this customer exit and its functions are obsolete.

Besides this I had to do the development in two different systems (SAP ERP Central Component 5.0 and SAP ECC 6.0).

So I gave up the exit and concentrated my efforts in finding an alternative.

For this I found badi BADI_FDCB_SUBBAS01

The documentation of this badi is:

Subscreen enhancement in function group FDCB, basic data screen 010 for vendors, 510 for customers.

These screens are accessed in the Enjoy transactions for FI document entry or MM invoice receipt. In FI, for example, these are the transactions FB60, FB65, FB70, FB75 or for parking, FV60, FV65, FV70, FV75.

In MM, screen 010 is accessed for example in transaction MIRO.

Screen fields: The fields must be in structure INVFO.

If the values in the FI document are to be saved, the fields must also be in table BKPF or BSEG. If the values in the MM document are to be saved, the fields must be in the structure ACMM_VENDOR_COMP, the view RBKP, and table RBKP.

My case was the one referring to MM.

First I tried to implement BADI_FDCB_SUBBAS01 but there was an implementation already running (FI_FDCB_SUBBAS01_EX).

Then I tried with the following one BADI_FDCB_SUBBAS02 but there was an implementation already running (FI_FDCB_SUBBAS02_EX).

Next I tried with BADI_FDCB_SUBBAS03 but there was an implementation already running (WRF_BADI_FDCB_BAS).

The only badi left then was BADI_FDCB_SUBBAS04.

Just having a look at the example implementation class CL_EXM_IM_BADI_FDCB_SUBBAS01 of badi BADI_FDCB_SUBBAS01 i found out that there were two methods available:

PUT_DATA_TO_SCREEN_OBJECT

GET_DATA_FROM_SCREEN_OBJECT

And within them I needed to add the following:

method IF_EX_BADI_FDCB_SUBBAS01~PUT_DATA_TO_SCREEN_OBJECT .
* fill interface attributes from importing paramters
  me->if_ex_badi_fdcb_subbas01~invfo  = im_invfo.
endmethod.

method IF_EX_BADI_FDCB_SUBBAS01~GET_DATA_FROM_SCREEN_OBJECT .
* fill export parameters from interface attributes
  ex_invfo  = me->if_ex_badi_fdcb_subbas01~invfo.
endmethod.

I just substituted subbas01 by subbas04.

Then based on tab subscreen of implementation FI_FDCB_SUBBAS01_EX i had to create dynpro 100 as well.

For this dynpro the flow logic was:

PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
  MODULE receive_data.
*

PROCESS AFTER INPUT.
* get again actual data from main screen
  MODULE receive_actual_data.
*
* implement from here on customer coding
* enumerate ALL fields on the screen because of field transportation
* with or within a module
  FIELD:
   invfo-lotkz.
* send data back to main screen
  MODULE USER_COMMAND_0100.

*----------------------------------------------------------------------*
***INCLUDE LBADI_EXAMPLE_FDCB_BASO01 .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Module  receive_data OUTPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
MODULE receive_data OUTPUT.
  IF o_badi_fdcb_subbas01 IS INITIAL.
    CALL METHOD cl_exithandler=>get_instance_for_subscreens
      CHANGING
        instance                      = o_badi_fdcb_subbas01
      EXCEPTIONS
        no_reference                  = 1
        no_interface_reference        = 2
        no_exit_interface             = 3
        data_incons_in_exit_managem   = 4
        class_not_implement_interface = 5
        OTHERS                        = 6.
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
  ENDIF.
* object created  ?
  CHECK NOT o_badi_fdcb_subbas01 IS INITIAL.
* get data from main screen

  CALL METHOD o_badi_fdcb_subbas01->get_data_from_screen_object
    IMPORTING
      ex_invfo = invfo.
ENDMODULE.                 " receive_data  OUTPUT


*----------------------------------------------------------------------*
***INCLUDE LBADI_EXAMPLE_FDCB_BASI01 .
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*&      Module  receive_actual_data  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module receive_actual_data input.
*  object created  ?
  CHECK NOT o_badi_fdcb_subbas01 IS INITIAL.
* get data from main screen

  CALL METHOD o_badi_fdcb_subbas01->get_data_from_screen_object
    IMPORTING
      ex_invfo  = invfo.
endmodule.                 " receive_actual_data  INPUT


*&---------------------------------------------------------------------*
*&      Module  USER_COMMAND_0100  INPUT
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
module USER_COMMAND_0100 input.
 CHECK NOT o_badi_fdcb_subbas01 IS INITIAL.
* put data to main screen

  CALL METHOD o_badi_fdcb_subbas01->put_data_to_screen_object
    EXPORTING
      im_invfo  = invfo.
endmodule.                 " USER_COMMAND_0100  INPUT

 

and so I did for my implementation (instead of subbas01 I used subbas04).

In my case only MM invoice receipt was going to be affected.

So I created my customer fields in append structures of:

INVFO, RBKP, RBKP_V, ACMM_VENDOR_COMP.



Figure 2 (append structure to structure INVFO)



 
Figure 3 (append structure to table RBKP)



 
Figure 4 (append structure to view RBKP_V)



Figure 5 (append structure to structure ACMM_VENDOR_COMP)

From here on you can display additional fields in logistics invoice verification transactions. Just add the new fields in the screen and code the corresponding logic.

Tips: the following transactions will be affected  

'FB60'

'FB65'

'FB70'

'FB75'

'FV60'

'FV65'

'FV70'

'FV75'

'FV63'

'MIRO'

'MR8M'

'MIRA'

'MIR7'

'MIR4'

You´ll need to add what´s necessary to prevent the new custom fields from appearing in unwanted transactions.

SAP 系统 MIRO 时替代 Recon. Account 的解决方案

介绍 MIRO 替换 Reconciliation Account 的解决方案。
  • stone0823
  • stone0823
  • 2017-06-15 10:32:27
  • 985

MM MIRO发票校验增强 也可以定义MIRO的屏幕增强

LMR1M001      在后勤发票校验中用户退出 *&--------------------------------------------------------------------...
  • zeewjj
  • zeewjj
  • 2012-06-04 13:16:17
  • 6212

SAP 屏幕增强

  • 2013年11月19日 10:32
  • 3.75MB
  • 下载

MIRO&nbsp;增强

Badi增强 MIRO BADI_FDCB_SUBBAS01 BADI_FDCB_SUBBAS02 BADI_FDCB_SUBBAS03 BADI_FDCB_SUBBAS04 BADI_FDCB_SU...
  • senlinmu110
  • senlinmu110
  • 2016-07-27 10:02:16
  • 743

采购订单BADI增强-ME_PROCESS_PO_CUST

采购订单BADI增强-ME_PROCESS_PO_CUST
  • kangliujie
  • kangliujie
  • 2017-07-06 15:13:23
  • 1882

采购订单价格及其发票校验权限控制的实现

本文的主要目的是实现采购订单价格信息维护以及估价标识维护的权限控制,并保证估价订单行项目不能够做发票校验。 1.       创建权限对象zpuordcon,用来进行订单价格信息维护和估价标识维护的...
  • hackai886
  • hackai886
  • 2012-09-01 16:59:21
  • 1282

如何从SAP中查找BADI

BADI作为SAP的第三代用户出口,他的应用也越来越广泛,但如何找到合适的badi是许多abap程序员的困惑。我这里就介绍一下我个人的应用的经验,供大家参考。1、badi对象的信息存储在SXS_INT...
  • CompassButton
  • CompassButton
  • 2006-09-16 18:09:00
  • 9670

SD发票 可以修改程序RV60AFZZ增强

***INCLUDE RV60AFZZ . ************************************************************************ *...
  • zeewjj
  • zeewjj
  • 2012-06-04 13:09:30
  • 2621

MIR7采购Invoice预制增强-INVOICE_UPDATE

SAP
  • kangliujie
  • kangliujie
  • 2017-07-07 10:53:02
  • 695

Mir7增强 badi MRM_HEADER_CHECK

MRM_HEADER_CHECK
  • zeewjj
  • zeewjj
  • 2012-07-01 13:06:10
  • 2744
收藏助手
不良信息举报
您举报文章:发票校验部分增强
举报原因:
原因补充:

(最多只允许输入30个字)