[英]Custom fields not showing on table output
I'm having trouble figuring out why two custom fields are not showing up in transaction VA05
(its output to be specific).我无法弄清楚为什么两个自定义字段没有出现在事务
VA05
(具体为 output)中。
Before reading below: I didn't make any changes to the program because I wasn't assigned to this task.在阅读以下内容之前:我没有对程序进行任何更改,因为我没有被分配到这项任务。 One of my colleagues did this change.
我的一位同事做了这个改变。
I followed this tutorial, which explains how to expand the VA05
output table with custom fields.我遵循了本教程,它解释了如何使用自定义字段扩展
VA05
output 表。
I didn't actually followed this guide.我实际上并没有遵循本指南。 I followed this tutorial only to understand what my colleague might have done to achieve what we need and what might be needed to fix the issue.
我遵循本教程只是为了了解我的同事可能做了什么来实现我们的需要以及解决问题可能需要什么。
So, as the tutorial suggests, this is what should be done in short:因此,正如本教程所建议的,这是应该做的简而言之:
SE11
and search for VBEP
Database table and click display. SE11
并搜索VBEP
数据库表并单击显示。Append Structure
Append Structure
Create Append
Create Append
ZZVBEP_MECC
ZZVBEP_MECC
ZZDELIVERYDATE
and ZZREQDELIVERYDATE
ZZDELIVERYDATE
和ZZREQDELIVERYDATE
If you go to VBEP
table now, you'll see at the bottom the field .APPEND
with the column Data Element
set to ZZVBEP_MECC
.如果您现在将 go 添加到
VBEP
表,您将在底部看到字段.APPEND
,其Data Element
列设置为ZZVBEP_MECC
。
Now, following the tutorial, the include program V05TZZMO
need to be changed, and here's ours:现在,按照教程,需要更改包含程序
V05TZZMO
,这是我们的:
***INCLUDE V05TZZMO .
* This form is called in the include LV05TFMO.
FORM MOVE_USERFIELDS USING ZP.
CASE ZP.
WHEN 'VBAK'.
WHEN 'VBAP'.
CHECK LVBAP-PSTYV NE 'ZRAC'.
CHECK LVBAP-PSTYV NE 'ZCAC'. "Escl.acconti
MOVE LVBAP-KDMAT TO LVBMTV-ZZKDMAT.
PERFORM OFFENE_AUFTRAGSMENGE.
SELECT SINGLE * FROM VBKD WHERE VBELN = LVBAP-VBELN.
IF SUBRC = 0.
MOVE VBKD-KDGRP TO LVBMTV-ZZKDGRP.
ENDIF.
WHEN 'VBEP'.
MOVE LVBEP-ZZDELIVERYDATE TO LVBMTV-ZZDELIVERYDATE.
MOVE LVBEP-ZZREQDELIVERYDATE TO LVBMTV-ZZREQDELIVERYDATE.
ENDCASE.
ENDFORM.
When I run VA05
however, these two custom fields are not there nor are in the Change Layout
screen.但是,当我运行
VA05
时,这两个自定义字段不存在,也不在“ Change Layout
屏幕中。
Is it possible that the code in V05TZZMO
is not in the right place?有没有可能是
V05TZZMO
里的代码放错地方了? Looking at the tutorial's code I saw that they put those statements in WHEN 'VBAK'
instead of WHEN 'VBEP'
.查看教程的代码,我看到他们将这些语句放在
WHEN 'VBAK'
而不是WHEN 'VBEP'
中。
Also, the ENHANCEMENT 1 ZZ_SD_VBAK_VA05
is not present in my code.此外,
ENHANCEMENT 1 ZZ_SD_VBAK_VA05
不存在于我的代码中。
There might be something I missed.可能有什么我错过了。 As I said above, I didn't make these changes so I cannot tell exactly what my colleague did.
正如我上面所说,我没有进行这些更改,所以我无法确切地说出我的同事做了什么。
Custom fileds also must be included in the structure VBMTVZ .自定义文件也必须包含在结构VBMTVZ中。
Regards问候
Finally solved.终于解决了。
Here's the procedure step-by-step we followed in order to fix the issue:以下是我们为解决此问题而遵循的分步过程:
Append Structure
Append Structure
SE11
and open database table VBMTVZ
SE11
并打开数据库表VBMTVZ
Append Structure...
(It's in the program's toolbar) - or Goto > Append Structure
Append Structure...
(位于程序的工具栏中)- 或Goto > Append Structure
Append Structure
(There's a button for it)Append Structure
(有一个按钮)ZZVBMTVZ_MECC
ZZVBMTVZ_MECC
VBMTVZ
again.VBMTVZ
。 At the end of the list of fields there must be one field called .APPEND
with the type set to the name of the structure you created..APPEND
的字段,其类型设置为您创建的结构的名称。 After this field, there's also all your fields you created on that structure.V05T
programV05T
程序Now you'll need to make some changes to the program linked to the TCode VA05
.现在您需要对链接到 TCode
VA05
的程序进行一些更改。
To do this:去做这个:
SE80
. SE80
。Function Group
and insert V05T
as the name of the group. Function Group
并插入V05T
作为组名。Includes
and look for V05TZZMO
Includes
的子文件夹并查找V05TZZMO
change
mode.change
模式打开此包含文件。***INCLUDE V05TZZMO .
* This form is called in the include LV05TFMO.
FORM MOVE_USERFIELDS USING ZP.
CASE ZP.
WHEN 'VBAK'.
* header
* MOVE LVBAK-XXXXX TO LVBMTV-ZZXXXXX.
WHEN 'VBAP'.
* item
* MOVE LVBAP-XXXXX TO LVBMTV-ZZXXXXX.
WHEN 'VBEP'.
* schedule line
* MOVE LVBEP-XXXXX TO LVBMTV-ZZXXXXX.
ENDCASE.
ENDFORM.
Add the following line of code to the WHEN 'VBEP'.
将以下代码行添加到
WHEN 'VBEP'.
code block.代码块。
MOVE LVBEP-name_of_your_field TO LVBMTV-name_of_your_field
You need to add that line for each field you appended.您需要为附加的每个字段添加该行。
In my case, the final result was the following:就我而言,最终结果如下:
***INCLUDE V05TZZMO .
* This form is called in the include LV05TFMO.
FORM MOVE_USERFIELDS USING ZP.
CASE ZP.
WHEN 'VBAK'.
* header
* MOVE LVBAK-XXXXX TO LVBMTV-ZZXXXXX.
WHEN 'VBAP'.
* item
* MOVE LVBAP-XXXXX TO LVBMTV-ZZXXXXX.
WHEN 'VBEP'.
* schedule line
* MOVE LVBEP-XXXXX TO LVBMTV-ZZXXXXX.
move LVBEP-zzdeliverydate to lvbmtv-zzdeliverydate.
move LVBEP-zzreqdeliverydate to lvbmtv-zzreqdeliverydate.
ENDCASE.
ENDFORM.
Save the file and activate the program.保存文件并激活程序。
At this point you should be able to see your fields in the output of TCode VA05
.此时您应该能够在 TCode
VA05
的 output 中看到您的字段。
In order to be able to change the include program V05TZZMO
you need an Access Key.为了能够更改包含程序
V05TZZMO
,您需要一个访问密钥。 Without that you cannot change the program.没有它你就不能改变程序。
If the fields you appended aren't showing even after activating, try:如果您添加的字段在激活后仍未显示,请尝试:
/$SYNC
/$SYNC
重置缓冲区
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.