Message在Dialog的用法

Message 用在Screen或者做增强的时候,和普通的Report有些差别,尽量不要在PBO中使用S以外的Message,尤其是E类型的Message,可能会直接导致程序的退出,而不给你改正数据的机会。如果需要有E类型的Message,可以放到PAI里面。
如ME31K/ME32K的行项目检查增强,EXIT_SAPMM06E_016里面如果有E类型的Message将导致程序的直接退出。正确的方法是放到EXIT_SAPMM06E_017。

 

附:各个类型Message在各个事件的处理方法

事件

MESSAGE类型和处理方法

 

A

E

I

S

W

X

PAI Module

1

2

3

4

5

6

PAI Module for POH 

1

7

3

4

7

6

PAI Module for POV

1

7

3

4

7

6

AT SELECTION-SCREEN ... 

1

8

3

4

9

6

AT SELECTION-SCREEN for POH 

1

7

3

4

7

6

AT SELECTION-SCREEN for POV

1

7

3

4

7

6

AT SELECTION-SCREEN ON EXIT 

1

7

3

4

7

6

AT LINE-SELECTION 

1

10

3

4

10

6

AT PFn 

1

10

3

4

10

6

AT USER-COMMAND

1

10

3

4

10

6

INITIALIZATION 

1

11

3

4

11

6

START-OF-SELECTION

1

11

3

4

11

6

GET

1

11

3

4

11

6

END-OF-SELECTION 

1

11

3

4

11

6

TOP-OF-PAGE 

1

11

3

4

11

6

END-OF-PAGE 

1

11

3

4

11

6

TOP-OF-PAGE DURING ... 

1

10

3

4

10

6

LOAD-OF-PROGRAM 

1

1

4

4

4

6

PBO Module 

1

1

4

4

4

6

AT SELECTION-SCREEN OUTPUT 

1

1

4

4

4

6

 

  1. The message appears in a dialog box and the program terminates. When the user has confirmed the message, control returns to the next- highest area. All the internal sessions are deleted from the stack.
  2. The message appears in the status line. Then PAI terminates and the system returns to the current screen. All the screen fields combined usingFIELD or CHAIN are now ready for input. The user must enter new values. The system triggers the PAI event again, with the new values.
  3. The message appears in a dialog box. Once the user has confirmed the message, the program continues immediately after theMESSAGE statement.
  4. The message appears in the status line of the next screen. The program continues immediately after the message statement.
  5. The message appears in the status line. Then the system continues as in 2, except that the user can quit the message using ENTER without having to enter new values. The system continues handling the PAI event from immediately after the message statement.
  6. No message is displayed and a runtime error, MESSAGE_TYPE_X, is triggered. The short dump text contains the message identification.
  7. The program terminates with a runtime error DYNPRO_MSG_IN_HELP. While F1 and F4 are processed, the system cannot send error messages or warnings.
  8. The message appears in the status line. Then the system stops selection screen processing and returns to the selection screen itself. The screen fields specified in the additions to theAT SELECTION-SCREEN statement are now ready for input. The user must enter new values. The system then starts processing the selection screen again with the new values.
  9. The message appears in the status line. Then the system continues as in 8, except the the user can quit the message using ENTER, without having to enter new values. The system continues handling the PAI event from immediately after the message statement.
  10. The message appears in the status line and the processing block terminates. The list level is displayed as before.
  11. The message appears in the status line and the processing block terminates. The system then returns to the program call. 
在使用vant的dialog组件时,你可以按照以下步骤进行操作: 1. 首先,确保你已经安装了vant框架,并且已经在你的小程序项目中引入了vant的dialog组件。 2. 在需要使用dialog的页面或组件中,引入dialog组件。你可以使用以下代码进行引入: ``` import Dialog from '../../miniprogram_npm/@vant/weapp/dialog/dialog'; ``` 3. 在需要触发dialog的事件或方法中,调用dialog组件的相关方法。例如,你可以使用以下代码触发一个alert类型的dialog: ``` Dialog.alert({ message: 'hello world' }); ``` 4. 如果你想在dialog中插入其他组件或自定义内容,你可以在dialog组件的标签内部添加相应的组件或内容。例如,你可以使用以下代码创建一个带有输入框的dialog: ``` <van-dialog v-model="isShow" show-cancel-button :beforeClose="beforeClose"> <van-field v-model="userName" label="用户名" placeholder="请输入姓名" /> <van-field v-model="userPass" label="密码" placeholder="请输入密码" /> </van-dialog> ``` 5. 最后,根据你的需求,你可以在data中定义相应的变量(如isShow、userName、userPass)来控制dialog的显示和获取输入框的值。 请注意,以上代码仅为示例,你需要根据你的具体情况进行相应的修改和调整。同时,确保你已经正确引入了vant的dialog组件,并且按照vant的官方文档进行了正确的配置和使用。 #### 引用[.reference_title] - *1* [微信小程序中使用vant weapp 的dialog组件](https://blog.csdn.net/weixin_48947842/article/details/123524652)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [vue--vant组件库Dialog弹出框](https://blog.csdn.net/ansaofen5650/article/details/102252378)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

ChampaignWolf

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值