Author Topic: Implementing LongText in Liquid UI Server  (Read 8282 times)

Rahul Gera

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 88
    • View Profile
Implementing LongText in Liquid UI Server
« on: July 18, 2019, 05:15:30 PM »
Purpose: To use enter({fromScreenLongtext:true}); command for CopyText.
1. To use CopyText command to Copy Text from SAP TextBox to Liquid UI Text Area.
2. To use CopyText command to Copy Text from Liquid UI Text Area to SAP Text Box.
3. To use CopyText command to Copy Text from Liquid UI Text Area to SAP Text Box, appending the data in the SAP Text Box.

Sample working Scripts:

IW32 screens:
/* *************************************
************** Screen Script **************
 ******** SAP EASY ACCESS SCREEN ***********
 ***** SAPLSMTR_NAVIGATION.E0100.sjs *******
**************************************
************************************** */


clearscreen();
// 1.
pushbutton([1,1],"Copytext 'fromscreen' to below textbox",'/nIW32',{'size':[2,50],'process':procCopyText, 'using':{'ptype':'FROM'}});
textbox([4,1],[12,75],{"name":'mytext2', 'readonly':true});
// 2.
pushbutton([15,1],"Copytext 'toscreen' from below textbox [Enter Data below]",'/nIW32',{'size':[2,50],'process':procCopyText, 'using':{'ptype':'TO'}});
// 3.
pushbutton([15,62],"Copytext 'toscreen' from below textbox [Enter Data below] using appendline",'/nIW32',{'size':[2,70],'process':procCopyText, 'using':{'ptype':'TOAPPEND'}});
//10006673
textbox([18,1],[26,75],{"name":'mytext1'});
pushbutton([28,1],"Clear both Textboxes",'?',{'size':[2,50],'process':procClearTextboxes});

/* *************************************
**************************************
 ************** Function Scripts *************
*****************************************
************************************** */

function procCopyText(param){
   onscreen 'SAPLCOIH.0101'
      set('F[Order]','822409');         //ZEUS data
      if(param.ptype == 'FROM' || param.ptype == 'TOAPPEND'){
         enter({fromScreenLongtext:true});                 // SINCE IT CAN JUMP directly because of TEXT_CONTINUE, to be safe.
                                                                                                              // Screen prior to copytext({'fromscreen':'X[LTEXT]','totext':'mytext2'});

      }
      else {
         enter();
      }      
      
   onscreen 'SAPLCOIH.3000'
      if(!<'X[LTEXT]'>.isValid){
         if(param.ptype == 'FROM' || param.ptype == 'TOAPPEND'){
            enter('=LTHE', {fromScreenLongtext:true}); // Screen prior to copytext({'fromscreen':'X[LTEXT]','totext':'mytext2'});
         }
         else {
            enter('=LTHE');
         }         
      } else {
         goto TEXT_CONTINUE;
      }
   
   onscreen 'SAPLCOIH.3000'
      TEXT_CONTINUE:;
      if(param.ptype == 'TO'){
         copytext({'fromtext':'mytext1','toscreen':'X[LTEXT]'});
         enter();
      } else if(param.ptype == 'TOAPPEND'){
         copytext({'fromtext':'mytext1','toscreen':'X[LTEXT]',"appendline":true});      //Should start appending from new line
         enter();
      } else if(param.ptype == 'FROM'){
         copytext({'fromscreen':'X[LTEXT]','totext':'mytext2'});
         enter('/n');
      }
      
   onscreen 'SAPLCOIH.3000'
      enter();
}

function procClearTextboxes(){
   var z_blank = "";
   copytext({'fromstring':'z_blank','totext':'mytext1'});
   copytext({'fromstring':'z_blank','totext':'mytext2'});
}





« Last Edit: July 19, 2019, 10:18:19 AM by Rahul Gera »