To assign a default SAP radiobutton or checkbox, please do the following. In this example, we will use the MB1C transaction. The default MB1C transaction is shown below:
-
We want to set the 'Individual Slip' radiobutton as default and also check the 'Print' checkbox. To do this, open the MB1C script file (SAPMM07M.E0400.sjs) and enter the following code. Create the file if it does not exist.
pushbutton([TOOLBAR], "Set", "/nmb1c", {"process":z_process});
function z_process() {
onscreen 'SAPMM07M.0400'
set("R[Individual Slip]", "X");
set("C[Print]", "X");
}
-
Save the changes and refresh SAP. The screen should now look as follows:
-
Open the Easy Access script file (SAPLSMTR_NAVIGATION.E0100.sjs) and enter the following code:
for(a=firstChild; a!=null; a=a.nextSibling)
a.del( );
set("V[z_movtype]","101");
radiobutton([12,52],"101 Movement Type" , {"name":"z_movtype", "value":101});
radiobutton([13,52],"102 Movement Type" , {"name":"z_movtype", "value":102});
onscreen 'SAPMM07M.0400'
set("F[Movement Type]", "&V[z_movtype]");
You can use the same technique to pass values from GuiXT radiobuttons or checkboxes. In the following example, we will pass a value from a radiobutton on the Easy Access screen to MB1C.
Save your changes and refresh SAP. The Easy Access screen now looks as follows:
-
Press Enter.
-
The MB1C transaction will start and the following screen will display: