Default Values on Screen


 

Does anyone know how we can assign default values to certain fields with the purchasing screens, e.g - Account Assignment always defaulting to Cost Centre (K)?


Transaction variants are a way of customising standard SAP transactions without having to code any changes - you can supply default values, make fields display only, suppress fields and/or suppress whole screens.

The steps to do this are:

1: Setup a variant for the SAP transaction. Go to transaction SHD0, enter the name of the SAP transaction and a name for your variant. Click Create. Enter text and then click Screen Entries. The screens of the transaction are now displayed. Fill in the required default values etc. and press enter. On the screen displayed select for each field on the screen: 'With contents' where you want the default values filled in, 'Output Only' if you want the field in display mode or 'Invisible' if you want a field suppressed from the screen. Exit and Save.

2: Create the variant transaction. Transaction SE93: Enter a new transaction code and click Create. Select Variant transaction. Enter some text description, the base transaction code and the variant name. Click Save.

3: Now use your variant transaction rather than the base SAP transaction. ie. change the transaction code in your area menus etc. to point to your new transaction.