如何跳过ABAP必填字段 [英] How to skip mandatory fields on ABAP

查看:1348
本文介绍了如何跳过ABAP必填字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望它跳过必填项目,当我在'İptal按钮点击。

I want it to skip mandatory fields when i clicked on 'İptal' button .

但我不想控制没有强制性必填字段。
我想看看查马克像截图文本框。

But i don't want to control mandatory fields without "obligatory" . I want to see check mark in textboxes like screenshot.

通常,'İptal按钮呼叫时,有没有强制性的领域不同的画面。

Normally 'İptal' button calls a different screen when there is no mandatory fields.

请注意:屏幕是标准选择屏幕

Note: Screens are standard selection screens.

推荐答案

您需要做的是有一个分配给具有函数类型退出屏幕上的按键功能code。

What you need to do is have a function code assigned to the pushbutton on the screen that has the function type "Exit".

然后你就可以在你的报告(我假设你是在谈论一个报告,因为你谈论选择画面)使用事件 AT SELECTION-SCREEN退出-COMMAND 。该事件是由系统确认屏幕上的字段之前被调用。在这里,你可以实现你的所有必要的逻辑。

Then you can use the event AT SELECTION-SCREEN ON EXIT-COMMAND in your report (I assume you are talking about a report because you talk about selection screens). This event is called by the system before validating the fields on the screen. Here you can implement all your necessary logic.

不过,我可以想怎么做到这一点的唯一方法是复制标准GUI状态%_ 00 从程序 RSSYSTDB 到您的程序,并添加你的函数code,使之成为键入exit。然后在 AT SELECTION屏输出您可以使用 SET PF-STATUS 命令覆盖标准GUI状态。 (否则,如果您分配一个函数code到您的按钮,但它不会得到特殊的待遇,触发退出-COMMAND 事件)。

However, the only way I can think how to do that is to copy the standard GUI status %_00 from program RSSYSTDB to your program and add your function code and make it a type "exit". Then in AT SELECTION-SCREEN OUTPUT you can use the SET PF-STATUS command to override the standard GUI status. (Otherwise if you assign a function code to your pushbutton, but it will not receive special treatment to trigger the ON EXIT-COMMAND event).

修改
我只是想这和它的作品,但不分配功能code到按钮时(使用 SELECTION-SCREEN PUSHBUTTON )。相反,我不得不添加功能code作为工具栏上的按钮。然后,它会触发 AT SELECTION屏输出事件)。

I just tried this and it works, but not when assigning the function code to a pushbutton (using SELECTION-SCREEN PUSHBUTTON). Instead, I had to add the function code as a button on the toolbar. Then it triggers the AT SELECTION-SCREEN OUTPUT event).

编辑2: (抄袭我的评论从下到这里,因为它需要注意的是)的顺便说一句,我不得不重命名%_00 GUI地位别的东西,当我把它抄了。否则,指定除了从程序中的SET PF-STATUS即使,它仍然使用旧的GUI状态从RSSYSTDB。

EDIT 2: (Just copied my comment from below into here because it is important to note) By the way, I had to rename the %_00 GUI status to something else when I copied it. Otherwise, even when specifying the addition FROM PROGRAM in SET PF-STATUS, it would still use the old GUI status from RSSYSTDB.

这篇关于如何跳过ABAP必填字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆