How to change STARTMODE of a SAP Transaction
I have created a transaction for a Web Dynpro ABAP application. I want to change the start mode of the transaction dynamically. Please let me if it is possible and how.
I would suggest you to create a program in SE38 and assign a Tcode to it.
Inside your program,check the value of the field which you require and then use FM 'WDY_EXECUTE_IN_PLACE' to open the application either in browser or in GUI.
You can use the code given by @Ramakrishnappa Gangappa above.