Welcome! Guest
New User? Register | Login
Learn n Earn
Home » ABAP »

Use wilcard in "On" statement in SAP ABAP GuiXT

ShareThis
By: Shailesh Singh | 12 Jul 2009 6:04 am

Hi

I am using a variable with a toggle script to determine whether to display the standard SAP screen or a custom GuiXT screen for IW31.

The issue is if the user toggles to the standard view then, so long as they are in the same session if they execute IW31 again, the script sees the toggle variable is set and shows them the standard screen. I would like them to always see the GuiXT screen as the initial default view for IW31.

I can easily clear the variables if they execute the transaction, but if they leave the transaction without executing it then I have an issue.

I tried using the On statement to capture if they left IW31 without executing the transaction and so resetting the variables. E.G.

On "/3" process="ClearVaria bles.txt" . This works OK if they enter /3 in the transaction code field. However they could enter any number of values to jump to a new transaction (e.g. /nXXXX). I wanted to try and create a catch-all that did not matter what value they type in the transaction code field. I tried

On "/n*" process="ClearVarai ables.txt" but that did not work.

Any ideas?

Comments

Hi Philip,

you can clear the variables when the user enters transaction IW31. In order to determine
whether it is the first time the screen is displayed for this IW31 call, you can use the system
variable "&V[_transactionid] ". It contains a string "IW31.1", "IW31.2" and so on for
subsequent IW31 calls.

Sample coding:

// new IW31 call?
if not V[IW31_transactioni d=&V[_transactio nid]]

// reset variables
Set V[IW31_*] ""

// save transaction id
Set V[IW31_transactioni d] "&V[_transactionid] "

endif
By: saperpguru | 12 Jul 2009

Leave a comment

image
Type the characters you see in the picture below.
Submit Comment
Close Move