Internal Table [DEFAULT] Expression

light111Internal Table [DEFAULT] Expression


SCARR table entries

1

While reading ITAB with key or index the DEFAULT expression can be added. In case the read is unsuccessful then the default value is assigned to the target value holder.

2

below here the s2nd read is unsuccessful, so the target  LS_SCARR2 is assigned to the default structure value.

3


SELECT FROM scarr INTO TABLE @DATA(lt_scarr).
DATA(ls_scarr_defVALUE scarrmandt symandt carrid ‘XX’ carrname ‘NOT ASSIGNED’  currcode ‘XXX’ url ‘NO URL’ ).

DATA(ls_scarr1VALUE #lt_scarr[ carrid ‘AA’ DEFAULT ls_scarr_def ).
DATA(ls_scarr2VALUE #lt_scarr[ carrid ‘ZZ’ DEFAULT ls_scarr_def ).


 

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s