Download GuiXT / InputAssistant / Viewer / Controls Dokumentation
Transcript
Special Topics / Aufnehmen von eigenen Spalten in TableControl // Additional column is active? else stop of script processing if not V[ME51N_active=X] Stop endif // no entry field in detail screen to avoid synchronization with table column if F[Purch. organization] del F[Purch. organization] endif // when saving call own script on "/11" process="ME51N_save.txt" // when checking call own script on "/39" process="ME51N_save.txt" using MODE = "C" // on on on when the user leaves the transaction, handle the "do you want to save" popup "/3" process="ME51N_leave.txt" "/12" process="ME51N_leave.txt" "/15" process="ME51N_leave.txt" endif Some comments on the script: We reset the variables when the item table is empty. Our new column "POrg" uses the item number as key column. This is necessary since the user can delete items, and the absolute row number will then change for each item above the deleted one. GuiXT uses the value in the key column as index as soon as it is available. We also define a searchhelp for the new column (techname=...) The standard data entry field for the purchase organization is deleted from the screen. If we were to allow data entry in this field, it would become difficult to synchronize the field with the column data entry When the user presses the "check" button, we also first transport the entered "POrg" fields from our added column to the standard SAP fields, so that the checking is done for these fields as well. We use the same script "ME51N_save.txt", but provide an additional parameter MODE = "C". For the exit function "/3", "/12", "/15" we start a separate InputScript "ME51N_leave.txt". For GuiXT versions before version 2007 Q1 1, it was also necessary to add On "/Menu=x,y" statements in order to handle menu clicks that correspond to /11, /2, /12,... This is now no longer necessary, the On "/11",... is processed automatically in these cases. The "ME51N_leave.txt" script handles the popup that is displayed when the user leaves the transaction: // InputScript "ME51N_leave.txt" // popup screen "do you want to save the document first" © by Synactive GmbH 269-274