Hello,
I've some questions first:
1. Where are you starting the workflow? (In which program?) - Most probably you will get the value of SY-TCODE in the program.
2. Which Function Module are you using to start the workflow? I normally use 'SAP_WAPI_CREATE_EVENT', then I pass the necessary data in the table input_container.
Basically, that's the way I do it:
1. Pass the values from the program (such that you get the value of SY-TCODE)
2. Create a workflow container in your workflow (SWDD)
3. Do the binding correctly so that it gets your SY-TCODE value. You will most probably need to do binding in Start Events (Basic data) and in your task (transaction PFTC)