‎2010 Jan 18 3:27 PM
Hello everyone,
I am curently wrting a HR report using the PROVIDE * FROM 2001 in my report.
The screen start and end dates are 01/01/2009 and 31/12/2009.
When I debug my program and look at the contents of the P2001 record by
typeinf in p2001-begda it displays 01/01/2009. But the actual contents of
the field on the database is 15/12/2008.
I can see this when i type p2001[1]-begda in the debugger.
How can i reference this p2001[1]-begda at the code level. When I enter
wa_start_date = p2001[1]-begda I get an error.
Any ideas anyone ??
‎2010 Jan 18 3:39 PM
ABAP doesn't use arrays
Youn can't use p2001[1]-begda.
Use this
data l_it2001 like p2001.
read table from pa2001 into l_it2001 index 1.
‎2010 Jan 18 3:37 PM
you will have to PROVIDE FIELDS * FROM P2001 INTO your_structure_2001 ...
see documentation for exact syntax
your_structure_2001will contain 20090101
‎2010 Jan 18 3:39 PM
ABAP doesn't use arrays
Youn can't use p2001[1]-begda.
Use this
data l_it2001 like p2001.
read table from pa2001 into l_it2001 index 1.
‎2010 Jan 18 3:58 PM
Many thanks Jorge for taking the time out to reply.
You have solved a very big headache !!!
Cheers
Andy