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

help needed

Former Member
0 Likes
633

hi to all, can u help me in this, can we write like this in data statement

data : begin of it_vbak occurs 0,

vbeln type vbak-vbeln,

erdat(4),"can we write this like this mentioning length since its lenght is 8 iam taking 4 to get it same 4 spaces in selection screen can i do it

end of it_vbak

thanks& regards

Kranthi Revuri

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
607

What is the objective?

You can use the declarations like that in a internal table. If you want just the year part of the date, you can use the data element GJAHR for reference instead of giving like this.

Regards,

Ravi

Note : please mark all the helpful answers

5 REPLIES 5
Read only

Former Member
0 Likes
608

What is the objective?

You can use the declarations like that in a internal table. If you want just the year part of the date, you can use the data element GJAHR for reference instead of giving like this.

Regards,

Ravi

Note : please mark all the helpful answers

Read only

Former Member
0 Likes
607

Hello Kranthi,

Since u r not mentioning the refrence field ERDAT(4) will be character variable of length 4.

The code u have written for declaring the Itab. is correct.

If useful reward points.

Regards,

Vasanth

Read only

Former Member
0 Likes
607

ya u can take any variable of any length ...

but erdat is used for date...

if u fetch date value in this variable it show error.

Read only

0 Likes
607

if u want only the year there , use

erdat(4) type n

Read only

saikat_pal2
Explorer
0 Likes
607

Yes u can . the control would treat it as a field of character field of length 4.