Liquid UI - WS Reference Library

Edit and save text on same screen



This example demonstrates the direct editing of the text on the MM02 transaction by creating a pushbutton. When clicked on pushbutton, the material description is copied into the text area with a provision for additional data. The user can save and refresh the data on the same screen.

User Interface

Navigate to MM02 transaction and execute the script. You will get the following screen:


Enter the Material number and click on pushbutton. The Material description will auto populate in the material inputfield. You can enter the text in the textbox and save the text. You can also erase the text by clicking Refresh button.

Liquid UI Script

{ //old if Q[Transaction=MM02] if(MM02_DisplayTextbox=='X')
{ //old if V[MM02_DisplayTextbox=X] box([8,0],[25,82],""); inputfield([9,2],"Material &V[MM02_Material]",[9,33],{"name":"MM02_Materialtext","size":40}); textbox([10,1],[22,80],{"name":"MM02_text"}); pushbutton([24,2],"@2L@Save",{"process":MM02_UpdateText}); pushbutton([24,20],"@42@Refresh text",{"process":MM02_ReadText}); pushbutton([9,78],"@02@",{"process":MM02_CloseText}); } else
{ pushbutton([10,5],'Change material name and description',{"process":MM02_ReadText,"size":2}); } } function MM02_UpdateText(){ set("F[Material]",'&V[MM02_Material]'); enter(); onscreen 'SAPLMGMM.0070' set('cell[Table,0,1]','X'); enter(); onscreen 'SAPLMGMM.4004' enter('=PB26'); onscreen 'SAPLMGMM.4300' set("F[MAKT-MAKTX]",'&V[MM02_Materialtext]'); copytext({"toscreen":"X[LONGTEXT_GRUNDD]","fromtext":"MM02_text"}); enter('/11'); } function MM02_ReadText()
{ set("V[MM02_Material]",'&F[Material]'); onscreen 'SAPLMGMM.0070' set('cell[Table,0,1]','X'); enter(); onscreen 'SAPLMGMM.4004' enter('=PB26'); onscreen 'SAPLMGMM.4300' set("V[MM02_Materialtext]", '&F[MAKT-MAKTX]'); copytext({"fromscreen":"X[LONGTEXT_GRUNDD]","totext":"MM02_text"}); set("V[MM02_DisplayTextbox]",'X'); enter('/NMM02'); } function MM02_CloseText()
{ set("V[MM02_DisplayTextbox]",'N'); enter('/NMM02'); }

Was this information helpful? Send Feedback