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

conversion error WRITE vbrk-fkdat TO billdate.

Former Member
0 Likes
1,476

Data : billdate(10).

WRITE vbrk-fkdat TO billdate.

In a print program i'm using code as under

WRITE vbrk-fkdat TO billdate.

20100217 & final converts to 17.02.2010

But in case of export billing

WRITE vbrk-fkdat TO billdate.

20100217 & final converts to 20.10.0217

Can u pls suggest

Data : billdate(10).

WRITE vbrk-fkdat TO billdate.

In a print program i'm using code as under

WRITE vbrk-fkdat TO billdate.

20100217 & final converts to 17.02.2010

But in case of export billing

WRITE vbrk-fkdat TO billdate.

20100217 & final converts to 20.10.0217

Can u pls suggest

7 REPLIES 7
Read only

Former Member
0 Likes
1,296

Hi,

Try this

WRITE vbrk-fkdat to field DD/MM/YYY.

Hope this helps.

Ernesto

Read only

venkat_o
Active Contributor
0 Likes
1,296

But in case of export billing
What does it mean ? Thanks Venkat.O

Read only

Former Member
0 Likes
1,296

when i am issuing the print for export billing the date conversion is not correct.

For same scenario on Development it is working fine.But on LIve system it thows error Specify a valid date

Read only

Former Member
0 Likes
1,296

Hi,

data date type sy-datum.
data str type string.
your date values is date =  20100220. Assume

data : date type char2,
          month type char2,
          year type char4.
date = sy-datum. 
year = date+0(4). " gives you 20
month = date+4(2).  "gives you 02
date = date+6(2). Gives you 2010

now concatenate date '.' month '.' year into str.

Now the result willl be 20.02.2010

Hope this serves your purpse.

Cheerz

Ram

Read only

venkat_o
Active Contributor
0 Likes
1,296

But in case of export billing

WRITE vbrk-fkdat TO billdate.

20100217 & final converts to 20.10.0217
<li>Put breakpoint at WRITE vbrk-fkdat TO billdate in case of export billing and check whether the value of vbrk-fkdat is 20100217 or not because WRITE statement does not behave differently in different places. Thanks Venkat .O

Read only

Former Member
0 Likes
1,296

Hi,

Use CONCATENATE STATEMENT.

CONCATENATE vbrk-fkdat+6(2) '.' vbrk-fkdat+4(2) '.' vbrk-fkdat+0(4) TO billdate.

Regards,

Shankar.

Read only

Former Member
0 Likes
1,296

Actaully in case of export the configuration was maintained as yyyymmdd instead of ddmmyyyy.

Thanks 4 ur answers.