Programmed Access to an Attribute

Access to the attribute Items of the object type VBAK (sales document). The value of the attribute Items contains a list of object references of the object type VBAP (sales document item).

* Access to attribute Items
*************************************************
* Data declaration
*************************************************
DATA: VBAK_REF TYPE SWC_OBJECT.
DATA: VBAP_ITEMS TYPE SWC_OBJECT OCCURS 0.

* Create object reference to sales document
*************************************************
SWC_CREATE_OBJECT VBAK_REF 'VBAK' <Key SalesDoc>

* Read sales document items
*************************************************
SWC_GET_TABLE_PROPERTY VBAK_REF 'Items' VBAP_ITEMS.