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

abap hr doubt

Former Member
0 Likes
1,292

Hi all,

When we use GET PERNR statement , we declare TABLES:PERNR to define the structure pernr in our program.

We declare the logical database as PNP for the standard selection screen.Now , if we dont declare LDB as PNP and create our own selection screen and use GET PERNR statement by including tables: pernr in the program , it is giving error at GET PERNR statement.My doubt is how is the LDB linked to GET PERNR statement.

Can anyone explain me clearly.

Plss dont send links to other threads.

Thanks & Regards

Chandrika

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,253

Sarath,

GET PERNR is used only when we are using LDB and if we are using GET PERNR than we must mention PNP as LDB in attributes to let statement GET PERNR known to compiler.

Amit.

Hi all,

When we use GET PERNR statement , we declare TABLES:PERNR to define the structure pernr in our program.

We declare the logical database as PNP for the standard selection screen.Now , if we dont declare LDB as PNP and create our own selection screen and use GET PERNR statement by including tables: pernr in the program , it is giving error at GET PERNR statement.My doubt is how is the LDB linked to GET PERNR statement.

Can anyone explain me clearly.

Plss dont send links to other threads.

Thanks & Regards

Chandrika

10 REPLIES 10
Read only

Former Member
0 Likes
1,254

Sarath,

GET PERNR is used only when we are using LDB and if we are using GET PERNR than we must mention PNP as LDB in attributes to let statement GET PERNR known to compiler.

Amit.

Read only

Former Member
0 Likes
1,253

Hi,

Use this FM

LDB_PROCESS and pass the LDB name here

Pls check the below link for more info -

http://help.sap.com/saphelp_nw04/helpdata/en/64/237f8cd43711d1950b0000e8353423/content.htm

Regards

Lekha

Read only

bpawanchand
Active Contributor
0 Likes
1,253

HI

Even you not need to mention the LDB name in teh program attributes To call a logical database from another program, use the function module LDB_PROCESS

regards

Pavan

Read only

Former Member
0 Likes
1,253

GET statement is linked to Logical Database, so we cannot use that directly without using the Logical Databse.

However you can use FM LDB_PROCESS to access the Logical Database.

Read only

Former Member
0 Likes
1,253

LDB means logical database.

Normally LDB are predefined subroutinues which consists of code. These are provided by SAP and internally these have select statements and other form rouinues which help to fetch data.

So, in out program when we declare the LDB and use GET statement automatically the code inside the LDB gets triggered and fetches the values. Now, whatever table is specified after GET, the corresponding table is been filled with data.

Read only

Former Member
0 Likes
1,253

Hai ,

It need to use PNP as LDB in attributes while creating the program to use GET PERNR.

or use goto --> attributes . since GET PERNR is defined in PNP.

GET PERNR : This event fills the data structures of declared infotypes with all records that exists for a personnel number.Data selection does not delimit the records that retrieved from the database.

Whenever GET PERNR statement is included in your program, check the following two .

1.whether included PNP for the logical database screen field in the program attributes while creating program.

2.whether included PERNR structure in the tables declaration.

With regards,

Lakshmi Narayana

Read only

Former Member
0 Likes
1,253

Hi All,

Thanks a lot for the replies.

But , I still have one doubt.

Without mentioning the LDB in the attributes of the program , is there no other way to use the GET PERNR statement.

I heard that without mentioning the LDB in the attributes , we can still use the GET PERNR statement by including soem program in the report.When I include the SAPDBPNP program in my report and odnt mention PNP in the attributes , it is giving error.Can anyone plss clarify this.

Thanks & Regards

Chandrika

Read only

0 Likes
1,253

Hi sarath,

1. I just tried. When we try to use

Include SAPDBPNP in our Z Program,

it gives SYNTAX error that

" Each ABAP program can contain only one "REPORT", "PROGRAM".

2. The reason is that SAPDBPNP is a Program

and not an include.

Hence, like any other program if we try to include,

it will give error.

3. The PNP ldb has the program SAPDBPNP behind the scenes. But to use it we have to assign the LDB PNP in the attributes.

4. There are some FMs LDB* (eg. LDB_PROCESS)

(I have not used them ) which allow

to use a LDB without specifying in the attribute.

regards,

amit m.

Read only

Former Member
0 Likes
1,253

Hi,

If u use your won LDB it will give error only... because it wont match the structure with LDB PNP..

if ur using Get PERNR.. then u should use LDB PNP...

Raghunath.S

Read only

Former Member
0 Likes
1,253

Hi,

LDB means logical database and GET is an event of logical database.

So, if u want to use GET event u need to either include PNP in attributes of program or include the LDB by calling Function module LDB_process.

Hope this will help u.

Regards,

Aleem.