Line 1 of your code is not a good practice - you are redefining Y in terms of itself.
Try this:
raw_data_table = New Table( "Test",Add Rows( 4 ),
New Column( "Col1 (ppm)", Numeric, "Continuous", Format( "Best", 12 ),
Set Values( [1, 2, 3, 4] ) ),
New Column( "Numéro de lot", Character, "Nominal",
Set Values( {"a", "a", "b", "b"} ) ),
New Column( "Period", Numeric, "Continuous", Format( "Best", 12 ),
Set Values( [1, 2, 3, 4] ) )
);
Y = "Col1"; // Selected from your dialog box
ycol = Y || " (ppm)";
graph = RAW_DATA_TABLE <<
Control Chart Builder(
Size( 534, 450 ),
Show Two Shewhart Charts( 0 ),
Show Control Panel( 0 ),
Sort by Row Order( 1 ),
Variables( Y( column(RAW_DATA_TABLE, ycol) ),Subgroup( :Numéro de lot ), Phase(:"Period")),
// Get Limits(LIMIT_TABLE),
);
I commented out the reference to limit_table as I didn't have that data.