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

GDATU CONVERSION

Former Member
0 Likes
6,102

Hi people i have a problem.

I must search in table tcurr the value about the data: Sy-datum. But when i search in the field GDATU i can't find the correct data.

I give you an example.

A date inserted in 18.02.2008, in gdatu have this value: 79919781

I know GDATU is an inverted_data field but i can't understand this value and how to make a search about this.

Anyone can help me?

P.s

I use this table to convert from euro to $.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,550

Hi,

Please try the following piece of code. This is an usage of Ninth's Complement which SAP uses to invert dates. Dates are inverted to aid in sorting.

The following code converts inverted date into a normal date.

DATA: inv_date TYPE D value '79919781' .

DATA: date TYPE D.

CONVERT INVERTED-DATE inv_date INTO DATE date .

WRITE: DATE. "18.02.2008

<REMOVED BY MODERATOR>

Edited by: prosenjit chaudhuri on Feb 19, 2008 11:54 AM

Edited by: Alvaro Tejada Galindo on Feb 19, 2008 6:08 PM

2 REPLIES 2
Read only

Former Member
1,550

Use the Function module

CONVERSION_EXIT_INVDT_OUTPUT

CONVERSION_EXIT_INVDT_INPUT

For more details, check the conversion routines maintained at GDATU data domine.

Thanks,

Read only

Former Member
0 Likes
1,551

Hi,

Please try the following piece of code. This is an usage of Ninth's Complement which SAP uses to invert dates. Dates are inverted to aid in sorting.

The following code converts inverted date into a normal date.

DATA: inv_date TYPE D value '79919781' .

DATA: date TYPE D.

CONVERT INVERTED-DATE inv_date INTO DATE date .

WRITE: DATE. "18.02.2008

<REMOVED BY MODERATOR>

Edited by: prosenjit chaudhuri on Feb 19, 2008 11:54 AM

Edited by: Alvaro Tejada Galindo on Feb 19, 2008 6:08 PM