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

Fetching data from LDB

Former Member
0 Likes
1,450

Hello Guys,

I'm new to ABAP-HR. I have used PNPCE LDB in my program. Now I have to make the Employment status as obligatory.

Depending on the period entered along with the Employment status, I need to select the data from infotype.

Only I want the master data screen and none of the other options should be working. The other options available should not be working when a program is executed.

Kindly guide me, if any link is available then kindly provide me as I was not able to get it in the forum.

Thanks.

11 REPLIES 11
Read only

andreas_mann3
Active Contributor
0 Likes
1,318

here's the command setting employment status obligatory:

..AT SELECTION-SCREEN OUTPUT.
  LOOP AT SCREEN.
    IF screen-name = 'PNPSTAT2-LOW'.
      screen-required = 1.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP..

grx.

Andreas

Read only

0 Likes
1,318

Thanks Andreas.

Its working. After this when the execute button is clicked, the data from PA0000 should be selected for the time period is entered.

Other options like Payroll period and Person selection shouldnt work. And also the Action type field should be in the selection screen. No other selection fields should be selected by the user.

Kindly guide me.

Read only

Former Member
0 Likes
1,318

Hello guys,

Kindly help me as i'm in need of it urgently.

Any link available.

Thanks.

Read only

Former Member
0 Likes
1,318

Hello,

For your requirement,

Go to attributes of your program -> HR report category -> Create report category -> Select PNPCE.

Left side you have ALLWED selections.Click on that.

You will all the selection screen variable related to PNPCE.

Select whichever you want.

Thanks.

Ramya.

Edited by: sri Ramya Goparaju on Aug 10, 2010 3:11 PM

Read only

0 Likes
1,318

Thank you Ramya.

It worked. Sorry for asking more and more, but when execute button is clicked I want to select the records from PA0000 based on the entries in the selection screen.

After this I need to get data from IT0171 for the time period.

Kindly guide me.

Thanks.

Read only

0 Likes
1,318

In start-of-selection event write the selection from PA0000 based on the selection screen entries.Here is the sample code.

tables pernr.

start-of-selection.

select pernr begda from pa0000

into corresponding fields of pernr

where pernr = PNPPERNR-LOW

and stat2 = PNPSTAT2-LOW.

endselect.

Thanks.

Ramya.

Read only

0 Likes
1,318

Hi ,

Use get pernr event after start-of-selection.

Get perner will get u data based on selection screen values.

example:

tables: pernr.

infotypes: 0000,0001.

start-of-selection.

GET PERNR.

  • This event fetches all data of pernrs which are selected on the selection screen. it fecthes data from infotypes 0000, 0001,

end-of-selection.

Read only

0 Likes
1,318

Thank you Ramya.

Just to add one more criteria to my question. I have to select the records from PA0000 according to the date entered (either it can be key date or a date range) and the employment status.

Can this be used after GET PERAS directly by using Select statement or do we have to use Provide statement.

Thank you.

Read only

0 Likes
1,318

Just adding one more thing, keydate or the date range cannot be empty. Can you please tell me the field names or the table name where we can find the field names of the fields used.

Thanks

Read only

0 Likes
1,318

Hi,

If u are using LDB pnpce ,then just use get peras it will get u data...no need to do select ....

go to transaction SE36 and enter the LDB PNPCE. Now go to the documentation. There is a really extensive documentation available that should answer a lot of questions.

Edited by: pr@t on Aug 12, 2010 8:24 AM

Read only

Former Member
0 Likes
1,318

issue resolved