目的
了解如何根据创建通知的要求将通知详细信息从一个屏幕发送到另一个屏幕。为了解释这一点,我们将引导您完成以下步骤。
- 使用 title() 更改屏幕标题
- 删除“引用”组框
- 根据交易自定义屏幕
- 添加用于复制和发送通知详细信息的函数
在脚本文件夹中创建此文件,用于自定义“创建通知”屏幕 SAPLIQSO。E0100.sjs
//现在,让我们开始将 Liquid UI 脚本添加到上面的文件中并保存它。
- 导航到 IW21(创建 PM 通知:初始屏幕),并将屏幕标题更改为创建 PM 通知 - 液体 UI,如下所示:
<span style="color:#333333"><span style="background-color:#f5f5f5"><span style="color:#888888">//Changes the title of the screen</span> title("<span style="color:#f00000">Create PM Notification - Liquid UI</span>"); </span></span>
2、使用 del 命令删除屏幕上现有的“引用”组框。
<span style="color:#333333"><span style="background-color:#f5f5f5"><span style="color:#888888">// Deletes the reference group box</span> del("<span style="color:#f00000">G</span>[<span style="color:#f00000">Reference</span>]"); </span></span>
<span style="color:#333333"><span style="background-color:#f5f5f5">set("<span style="color:#f00000">z_iw21_textbox1</span>",""); </span></span>
<span style="color:#333333"><span style="background-color:#f5f5f5"><span style="color:#888888">// Function to toggle the flag</span> if(_transaction=="IW21") { text([<span style="color:#f00000">7,25</span>],"<span style="color:#f00000">Enter Notification Information</span>",{<span style="color:#848484">"size":30</span>}); textbox([<span style="color:#f00000">8,15</span>],[<span style="color:#f00000">14,66</span>],{<span style="color:#f00000">"name":"z_iw21_textbox1</span>","<span style="color:#848484">enter text{":true,"textfont":"Arial","left":true,"textheight":"15","textweight":"5"</span>}); pushbutton([<span style="color:#f00000">16,29</span>],"<span style="color:#f00000">@12@Create Notification</span>","<span style="color:#f00000">?</span>",{<span style="color:#848484">"process":iw21_copytext</span>}); del("<span style="color:#f00000">F</span>[<span style="color:#f00000">Notification</span>]"); text("<span style="color:#f00000">F</span>[<span style="color:#f00000">Notification type</span>]","<span style="color:#f00000">Select Notification type</span>",{<span style="color:#848484">"intensified":true,"text":true</span>}); } </span></span>
<span style="color:#333333"><span style="background-color:#f5f5f5"><span style="color:#888888">// Function to copy the text from initial screen to final screen</span> function iw21_copytext(){ //Create PM Notification:Maintenance request enter(); onscreen '<span style="color:#f00000">SAPLIQS0.7200</span>' copytext({"<span style="color:#f00000">fromtext":"z_iw21_textbox1","toscreen":"X[TEXT]","append":true</span>}); } </span></span>