简体   繁体   English

Smartform 错误“只能对表参数使用 LIKE 来引用平面类型”

[英]Smartform error "Flat types may only be referenced using LIKE for table parameters"

I created a table ZPDETAIL01 in se11 and activated it.我在 se11 中创建了一个表 ZPDETAIL01 并激活它。 In smartforms' Form Interface I create a table parameter zdetail in the tables tab, with type assignment as TYPE and associated type as ZPDETAIL01.在 smartforms 的表单界面中,我在表选项卡中创建了一个表参数 zdetail,类型分配为 TYPE,关联类型为 ZPDETAIL01。 When I check it ,an error occurred,"ZPDETAIL01 Flat types may only be referenced using LIKE for table parameters"当我检查它时,发生错误,“ZPDETAIL01 平面类型只能使用 LIKE 来引用表参数”

Is this error of my table itself or my parameter setting?这是我的表本身的错误还是我的参数设置错误? Thx.谢谢。

I changed the type assignment to LIKE and problem solved.我将类型分配更改为 LIKE 并解决了问题。 But I wonder why in the search help button I can't find the LIKE option, only TYPE and TYPE REF.但我想知道为什么在搜索帮助按钮中我找不到 LIKE 选项,只有 TYPE 和 TYPE REF。

Simply a flaw in the UI.只是用户界面中的一个缺陷。 If it's allowed then it should be listed as a possible value.如果允许,则应将其列为可能的值。

But I guess SAP just didn't care to correct those little things of this obsolete technology (ie Smart Forms... now prefer Adobe forms or third-party solutions).但我想 SAP 只是不在乎纠正这种过时技术的那些小事(即 Smart Forms...现在更喜欢 Adob​​e 表单或第三方解决方案)。 Note that the list of values come from the table RSFBTYPEIN , and probably LIKE was previously defined in this table but as LIKE became obsolete for typing import and export parameters in function modules, SAP probably removed it: majority wins over minority.请注意,值列表来自表RSFBTYPEIN ,并且可能LIKE之前已在此表中定义,但由于 LIKE 在功能模块中键入导入和导出参数已过时,SAP 可能将其删除:多数胜于少数。 Just a guess.只是一个猜测。

If you wish, you may open a ticket at SAP support to make it corrected.如果您愿意,您可以在 SAP 支持部门开票以进行更正。

Behaviors in ABAP 7.52 SP01 (tests done with DDIC objects: flat table SCARR, non-flat table SOTR_TEXTU, table type BAPIRETTAB): ABAP 7.52 SP01 中的行为(使用 DDIC 对象完成的测试:平面表 SCARR、非平面表 SOTR_TEXTU、表类型 BAPIRETTAB):

Typing   Associated type    Button           Error message
------   ----------------   --------------   -------------------------------------------
TYPE     Flat struc/table   Check            SCARR Flat types may only be referenced 
                                             using LIKE for table parameters
TYPE     Flat struc/table   Activate         Only table types may be used as the 
                                             reference type for a table parameter
TYPE     Non-flat str/tab.  Check/Activate   Only table types may be used as the 
                                             reference type for a table parameter
TYPE     Table type         Check/Activate   None
LIKE     Flat struc/table   Check/Activate   None

LIKE     Non-flat str/tab.  Check/Activate   None but short dump at runtime (because of
                                             syntax error in FM: "&1" must be a flat 
                                             structure. Internal tables, strings, references, 
                                             and structures cannot be used as components.)
LIKE     Table type         Check            Type BAPIRETTAB is not allowed in this context
LIKE     Table type         Activate         Tables using LIKE may only reference flat structures

As you see, there's a bigger problem than just not displaying LIKE, there's a short dump in one case!如您所见,有一个比不显示 LIKE 更大的问题,在一种情况下会出现短暂的转储!

Note that I didn't test TYPE REF TO, but I doubt a TABLES parameter can use it.请注意,我没有测试 TYPE REF TO,但我怀疑 TABLES 参数是否可以使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM