I think the best solution would be to create new Z... transaction codes
for each transaction that you call up from your launch pad (use SE93, parameter transaction), and then
in your scripts. This has the advantage that the user can call up your new
transactions via /N... as well, or define a SAP GUI shortcut for them.
The second best solution: Use the system variable V[_last_fcode]. For
example, for transaction VA01:
You probably start the transaction from your launchpad with
"/NVA01". In addition, set a flag V[via_launch_pad] = X. In the VA01 script, use
// transaction started via /N or /O command?
if V[_last_fcode=/NVA01] or V[_last_fcode=/OVA01]
// not coming from launch pad?
if not V[via_launchpad=X]
// reset all variables
// transaction started from launch pad
Set V[via_launchpad] ""