You're pretty limited on what you can do in the header of type 3 forms. If you add the field as an extern in the script and on the form as a single occurrence field in the header portion, you will be able to modify the field on the form and capture it in the check.input section for the field in your script only when a 'find' (bowtie button) is done. Otherwise, all fields in the header are set to read-only, including the local extern field.
Your best option is probably to add the new field as a 'display' single occurrence field in the header, add a specific option and a button with a label "change <fieldname>", and a choice section in the script to execute a session to enter/change the field. After.choice with a 'display' for the field keeps it current. Since you're on Baan4, you can try to replace the session with an input.string() call to capture the single field.
extern domain tcmcs.str6 test1
#pragma used dll "ottdllinputstr" | Required for 'input.string' call.
| set up user.0 special option and button in form. Add field in header as 'display'.
if (input.string("Title of input box", "Label for field", 6, 6, test1)) then
| numbers are length of string, number of visible fields.