Author Topic: Retaining old session design when opening a new session through a function.  (Read 4406 times)

rajesh.sabbineni

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 26
    • View Profile
Purpose
When a new session is opened through a function, old session Liquid UI design should  remain the same.

Liquid UI Code
//SAPLMGMM.E0060.sjs

// User interface
del("F[Material]");
del("F[Change Number]");
del("G[Copy from...]");
pos("F[Industry sector]", [4,58]);
pos("F[Material Type]", [5,58]);
box([2,45], [27,108], "");
box([7,47], [11,107], "Organizational Data");
radiobutton([8,49], "Plant 1000",{ "name":"z_mm01_plant", "value":1000});
radiobutton([8,69], "Plant 2000",{ "name":"z_mm01_plant", "value":2000});
radiobutton([8,89], "Plant 3000",{ "name":"z_mm01_plant", "value":3000});
inputfield( [10,49], "Stor.Loc", [10,60],{ "name":"z_mm01_storloc", "size":4, "required":true, "searchhelp":"H_T001L"});
box([13,47], [18,107], "Basic Data");
inputfield( [15,50], "Desc.", [15,60],{ "name":"z_mm01_desc", "size":32});
inputfield( [16,50], "BUOM", [16,60],{ "name":"z_mm01_buom", "size":2, "techname":"MARA-MEINS"});
inputfield( [17,50], "Mat grp", [17,60],{ "name":"z_mm01_matgrp", "size":7});
box([19,47], [23,107], "MRP Data");
inputfield( [21,50], "Mrp type", [21,61],{ "name":"z_mm01_mrptype", "size":5});
checkbox([24,49], "Bulk Material",{ "name":"z_mm01_blkmat"});
pushbutton([26,68], "@2L@Create Material   ",{ "process":mm01_create});
pushbutton([TOOLBAR],"List of materials","?",{"process":mb51_list_materials});

Functions
function mb51_list_materials(){
   onscreen 'SAPLMGMM.0060'
      mm01_screen();
      set("V[z_mm01_flag]", "X");
      enter("/oMB51");
}
// Screen design should be loaded in a function to keep the old session design
function mm01_screen(){   
   del("F[Material]");
   del("F[Change Number]");
   del("G[Copy from...]");
   pos("F[Industry sector]", [4,58]);
   pos("F[Material Type]", [5,58]);
   box([2,45], [27,108], "");
   box([7,47], [11,107], "Organizational Data");
   radiobutton([8,49], "Plant 1000",{ "name":"z_mm01_plant", "value":1000});
   radiobutton([8,69], "Plant 2000",{ "name":"z_mm01_plant", "value":2000});
   radiobutton([8,89], "Plant 3000",{ "name":"z_mm01_plant", "value":3000});
   inputfield( [10,49], "Stor.Loc", [10,60],{ "name":"z_mm01_storloc", "size":4, "required":true, "searchhelp":"H_T001L"});
   box([13,47], [18,107], "Basic Data");
   inputfield( [15,50], "Desc.", [15,60],{ "name":"z_mm01_desc", "size":32});
   inputfield( [16,50], "BUOM", [16,60],{ "name":"z_mm01_buom", "size":2, "techname":"MARA-MEINS"});
   inputfield( [17,50], "Mat grp", [17,60],{ "name":"z_mm01_matgrp", "size":7});
   box([19,47], [23,107], "MRP Data");
   inputfield( [21,50], "Mrp type", [21,61],{ "name":"z_mm01_mrptype", "size":5});
   checkbox([24,49], "Bulk Material",{ "name":"z_mm01_blkmat"});
   pushbutton([26,68], "@2L@Create Material   ",{ "process":mm01_create});
   pushbutton([TOOLBAR],"List of materials","?",{"process":mb51_list_materials});
}


See attachments for code sample