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

DATE PROBLEM IN THE BSEG TABLE

Former Member
0 Likes
797

hi ,

i have a problem.

i want to form a date where '01.04' is hardcoded and year is taken from GJAHR field of table BSEG .AND THE DATE SHOULD COME OUT AS '01.04.2006' IF GAJHR =2006.

URJENT.

hi ,

i have a problem.

i want to form a date where '01.04' is hardcoded and year is taken from GJAHR field of table BSEG .AND THE DATE SHOULD COME OUT AS '01.04.2006' IF GAJHR =2006.

URJENT.

5 REPLIES 5
Read only

Former Member
0 Likes
720

data: v_date(10).

concatenate '01.04.' gjahr into v_date.

write: v_date.

Regards,

ravi

Read only

Former Member
0 Likes
720

Hi,

In that case you have to declare a char 10 field and concatenated 01.04 with 2006.

A dats datatype can store 8 characters as the standard date format is 'YYYYMMDD'

Please reward points if this helps

Read only

Former Member
0 Likes
720

Hi Abhishek,

Use Concatenate stmt for the same

var1 type char6 value '01.04' ,

var2 type char6 value '2006',

var3 type char10.

concatenate var1 var2 into var3 no-gaps.

write:<b>var3</b>

Reward points if this Helps.

Manish

Read only

Former Member
0 Likes
720

CHECK THIS.

DATA : V1(5) TYPE C VALUE '01.04.'.
DATA : V(4) TYPE C. 
DATA: V2(10) TYPE C.

V = GJAHR+0(4)  ."UR VALUE
CONCATENATE V1 V INTO V2.

WRITE:/ V2.

O/P MUST BE 01.04.2006

regards,

vijay

Read only

Former Member
0 Likes
720

Hi Abhishek,

REPORT ZEX33 .

data : d1(6),

date(13),

w_gjahr like bseg-gjahr.

d1 = '01.04'.

  • Assume gjahr value is 1996

w_gjahr = '2006'.

concatenate d1 '.' w_gjahr into date.

write : / date.