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

what is Version in DEELETE statement??

former_member181959
Contributor
0 Likes
449

hi

can on please tell me what is 'vers' in the below statemet?

DELETE dbtab VERSION vers.

thanks,

Prasad Babu.

1 ACCEPTED SOLUTION
Read only

dani_mn
Active Contributor
0 Likes
425

HI,

<b>Note</b>

This variant is now obsolete, since other variants allow you to specify the database table name dynamically.

<b>

Effect</b>

Deletes a line in a database table, the name of which is taken from the field vers at runtime. The database table must be known to the ABAP Dictionary and its name must conform to the following naming convention: It must begin with 'T' and can consist of four additional characters. The field vers must contain the table name without a leading 'T'. Only lines in the current client are deleted. The line to be deleted is taken from the statically specified table work area dbtab or *dbtab.

The return code is set as follows:

SY-SUBRC = 0:

The line was deleted.

SY-SUBRC = 4:

No lines could be deleted because no line existed with the specified primary key.

Regards,

HRA

hi

can on please tell me what is 'vers' in the below statemet?

DELETE dbtab VERSION vers.

thanks,

Prasad Babu.

2 REPLIES 2
Read only

dani_mn
Active Contributor
0 Likes
426

HI,

<b>Note</b>

This variant is now obsolete, since other variants allow you to specify the database table name dynamically.

<b>

Effect</b>

Deletes a line in a database table, the name of which is taken from the field vers at runtime. The database table must be known to the ABAP Dictionary and its name must conform to the following naming convention: It must begin with 'T' and can consist of four additional characters. The field vers must contain the table name without a leading 'T'. Only lines in the current client are deleted. The line to be deleted is taken from the statically specified table work area dbtab or *dbtab.

The return code is set as follows:

SY-SUBRC = 0:

The line was deleted.

SY-SUBRC = 4:

No lines could be deleted because no line existed with the specified primary key.

Regards,

HRA

Read only

Former Member
0 Likes
425

Hi Prasad,

DELETE dbtab VERSION vers.

DELETE *dbtab VERSION vers.

This variant is not allowed in an ABAP Objects context. See VERSION addition not allowed.

Note

This variant is now obsolete, since variants 1 - 3 allow you to specify the database table name dynamically.

Effect

Deletes a line in a database table, the name of which is taken from the field vers at runtime. The database table must be known to the ABAP Dictionary and its name must conform to the following naming convention: It must begin with 'T' and can consist of four additional characters. The field vers must contain the table name without a leading 'T'. Only lines in the current client are deleted. The line to be deleted is taken from the statically specified table work area dbtab or *dbtab.

The return code is set as follows:

SY-SUBRC = 0:

The line was deleted.

SY-SUBRC = 4:

No lines could be deleted because no line existed with the specified primary key.

If useful reward.

Vasanth