Login Form

Best viewed in IE 7.0

ADVERTISEMENTS
ADVERTISEMENT

Using sets instead of TVARV

TVARV is a good place to store your variables for use in your program selections.

Another option is to use sets. The one difference of sets over tvarv is that a set takes on the domain of the value you are storing so it can be validated at input time.

You use transaction GS01 / GS02 / GS03 to create / change and display a set.

 

The following example shows a set of material types that are used to populate a range table.

 

    select valsign valoption valfrom valto
      into (lv_valsign , lv_valoption , lv_valfrom , lv_valto )
      from setleaf
      where setclass = 0000 and
            subclass = '' and
            setname  = 'ZMTART'.

      wa_mtart-sign   = lv_valsign.
      wa_mtart-option = lv_valoption.
      wa_mtart-low    = lv_valfrom.
      wa_mtart-high   = lv_valto.
      append wa_mtart to lr_mtart.

 

      endselect.

ADVERTISEMENT
Free software downloads