发票校验部分增强

原创 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.

相关文章推荐

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

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

MIR7采购Invoice预制增强-INVOICE_UPDATE

SAP

ABAP源程序---发票校验明细表

ABAP源程序---发票校验明细表 6 ]  S# q, W; s. s4 O 4 U6 q& l1 Z7 R8 h& r *&--------------------------------...

Mir7增强 badi MRM_HEADER_CHECK

MRM_HEADER_CHECK
  • zeewjj
  • zeewjj
  • 2012年07月01日 13:06
  • 2523

ABAP MIR7预制凭证BAPI

ABAP MIR7预制凭证BAPI

给定A, B两个整数,不使用除法和取模运算,求A/B的商和余数

给定A, B两个整数,不使用除法和取模运算,求A/B的商和余数。 1.   最基本的算法是,从小到大遍历: for (i = 2 to A -1)          if (i * B > A)...

利用K-means聚类算法根据经纬度坐标对中国省市进行聚类

K-means聚类算法是一种非层次聚类算法,在最小误差的基础上将数据划分了特定的类,类间利用距离作为相似度指标,两个向量之间的距离越小,其相似度就越高。程序读取全国省市经纬度坐标,然后根据经纬度坐标进...

Radon变换理论介绍与matlab实现--经验交流

本人最近在研究Radon变换,在查阅了各种资料之后在此写下个人的理解,希望与各位牛牛进行交流共同进步,也使得理解更加深刻些。 Radon变换的本质是将原来的函数做了一个空间转换,即,将原来的XY平...

CT图像重建技术

由于csdn贴图不方便,并且不能上传附件,我把原文上传到了资源空间CT图像重建技术 1.引言 计算机层析成像(Computed Tomography,CT)是通过对物体进行不同角度的射线投影测量而...

Matlab绘图-很详细,很全面

Matlab绘图强大的绘图功能是Matlab的特点之一,Matlab提供了一系列的绘图函数,用户不需要过多的考虑绘图的细节,只需要给出一些基本参数就能得到所需图形,这类函数称为高层绘图函数。此外,Ma...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:发票校验部分增强
举报原因:
原因补充:

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