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

command

Former Member
0 Likes
652

Hi ,

i am getting a value from a function module to a variable in a combined form of year and week eg: 200711, 200712 etc. into a variable w_year_week.how to get only the year ?? .

if i select year and week in the selection screen it should display the combined year and week in the alv columns.. Any suggestions on this pls..

thanks,

vind.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
633

Hello,

Do like this:

data: year(4),
         week(2).

year = w_year_week+0(4).

week = w_year_week+4(2).

write: year, week.

Vasanth

4 REPLIES 4
Read only

Former Member
0 Likes
633

Hi,

Once you got the combined field(v_yearmm) from the fun module, You can seperate the Year and week from it by Offsetting that field.

Year = v_yearmm+0(4)

week = v_yearmm+4(2)

You can display these fields in the ALV.

Regards,

Anji

Message was edited by:

Anji Reddy Vangala

Read only

Former Member
0 Likes
634

Hello,

Do like this:

data: year(4),
         week(2).

year = w_year_week+0(4).

week = w_year_week+4(2).

write: year, week.

Vasanth

Read only

Former Member
0 Likes
633

DATA:

zlv_year(4) type N.

zlv_year = w_year_week+0(4).

But perhaps your requirement is a little more complicated than this?

Regards,

john.

Read only

Former Member
0 Likes
633

hi Vind,

from 200712 if u want to separate 2007 and 12....

u try this code...

DATA :year(4),

week(2).

year = w_year_week+0(4).

week = w_year_week+4(2).

this will separate 2007 into variable year and 12 into variable week.

reward helpful answers.,...

regards,

Tejas