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

HR Reporting

Former Member
0 Likes
625

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 ??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
587

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.

3 REPLIES 3
Read only

former_member226519
Active Contributor
0 Likes
587

you will have to PROVIDE FIELDS * FROM P2001 INTO your_structure_2001 ...

see documentation for exact syntax

your_structure_2001will contain 20090101

Read only

Former Member
0 Likes
588

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.

Read only

0 Likes
587

Many thanks Jorge for taking the time out to reply.

You have solved a very big headache !!!

Cheers

Andy