Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

a question about BOR

Former Member
0 Likes
546

Experts:

when I create a new attribute of a BOR, it requires me to indicate the source -- virtual or database field, so what should I do, can anyone tell me the difference between the two? when should it be a virtual and when should it be a database field?

thanks in advance

1 ACCEPTED SOLUTION
Read only

Sougata
Active Contributor
0 Likes
519

Hi Sun,

It depends on your data source i.e. the attribute itself. If it can be mapped (corresponds) to a ABAP Dictionary field then you should choose Dictionary field or if it doesn't map to a dictionary field or it should be calculated (derived) or you are not sure of it then you should choose Virtual.

Virtual means that its a derived attribute i.e. to be calculated by the associated program. E.g. Age of an employee

Database Field means that the attribute value can be determined directly from the content of a database (Dictionary) field. E.g. First name of an employee maps directly to SAP database table PA0002 and field VORNA.

Hope this helps.

Cheers,

Sougata.

Experts:

when I create a new attribute of a BOR, it requires me to indicate the source -- virtual or database field, so what should I do, can anyone tell me the difference between the two? when should it be a virtual and when should it be a database field?

thanks in advance

2 REPLIES 2
Read only

Sougata
Active Contributor
0 Likes
520

Hi Sun,

It depends on your data source i.e. the attribute itself. If it can be mapped (corresponds) to a ABAP Dictionary field then you should choose Dictionary field or if it doesn't map to a dictionary field or it should be calculated (derived) or you are not sure of it then you should choose Virtual.

Virtual means that its a derived attribute i.e. to be calculated by the associated program. E.g. Age of an employee

Database Field means that the attribute value can be determined directly from the content of a database (Dictionary) field. E.g. First name of an employee maps directly to SAP database table PA0002 and field VORNA.

Hope this helps.

Cheers,

Sougata.

Read only

Former Member
0 Likes
519

Hi,

As per SAP Documentation,

Virtual

A virtual attribute always requires implementation in the program for the object type, since a virtual attribute has no corresponding field content in the database, its value having yet to be determined or calculated.

Depending on implementation and the entry of the data type reference, it is necessary to distinguish between the following combinations:

1. Source "virtual" - data type reference " Dict. field"

The attribute value calculated or determined in the program for the object type has the same data type as the referenced dictionary field.

2. Source "virtual" - data type reference " object type"

The attribute value calculated or determined in the program for the object type references an object of the specified object type.

It is generally the case that double-spaced or wider attributes and attributes which reference an object with several key fields are implemented as virtual attributes.

Database field

Indicator that the attribute value is determined directly from the content of a database field.

The database field which serves as the information source can generally be identified by the key fields.

Depending on implementation and the specified data type reference, it is necessary to distinguish between the following combinations:

1. Source "database field" - data type reference " Dict. field"

The content of the referenced field is returned as an attribute value.

2. Source "data base field" - data type reference " object type"

An object reference which is composed of the content of the database field is returned as an attribute value. Both the dictionary type and the object type should be specified.

The latter only works if the referenced object type only has one key field. In other cases the attribute should be implemented as a virtual attribute.

Hope this helps.

Thanks,

Balaji