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

syntax error in ABAP HR program

Former Member
0 Likes
872

Hello Experts,

I am new to programming in HR. I am getting a syntax error "PERNR is not defined for the current logical database" with the following piece of code.

TABLES: PERNR.

INFOTYPES: 0002, 0006.

GET PERNR.

PROVIDE * FROM P0002 BETWEEN PN-BEGDA AND PN-ENDDA.

WRITE: P0002-PERNR, P0002-NACHN, P0002-VORNA.

ENDPROVIDE.

Am I missing a statement or something needs to be configured in the system?

Any help will be highly appreciated.

thanks...

Rony.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
705

HI,

your code works perfectly well.. I have added the PNP logical database and selection screen 100... i think you r not added this PNP logical database

&----


*& Report ZTESTPRG *

*& *

&----


*& *

*& *

&----


REPORT ZTESTPRG .

TABLES: PERNR.

INFOTYPES: 0002, 0006.

GET PERNR.

PROVIDE * FROM P0002 BETWEEN PN-BEGDA AND PN-ENDDA.

WRITE: P0002-PERNR, P0002-NACHN, P0002-VORNA.

ENDPROVIDE.

Thanks

mahesh

4 REPLIES 4
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
705

Choose Go To -> Attributes from Se38. Is the Logic Database field filled in on this screen? I think it should be PNP.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
705

As Rich said that you need to add Logical database in your progam.

Select attributes -> in the bottom you will see Logical database -> fill your Logical database name.

one more thing when you use Logical database ,try to use nodes statement instead of Tables

Nodes : pernr.

Thanks

Seshu

Read only

Former Member
0 Likes
706

HI,

your code works perfectly well.. I have added the PNP logical database and selection screen 100... i think you r not added this PNP logical database

&----


*& Report ZTESTPRG *

*& *

&----


*& *

*& *

&----


REPORT ZTESTPRG .

TABLES: PERNR.

INFOTYPES: 0002, 0006.

GET PERNR.

PROVIDE * FROM P0002 BETWEEN PN-BEGDA AND PN-ENDDA.

WRITE: P0002-PERNR, P0002-NACHN, P0002-VORNA.

ENDPROVIDE.

Thanks

mahesh

Read only

Former Member
0 Likes
705

Thanks guys for such a quick response....

Points rewarded...

Rony.