2013 May 22 12:49 PM
Hi Team,
I want to change the selection screen field in logical database- PNP. i searched so many form but could not get,
when i am using the report categories it get sort the selection field by alphabetical order how can i arrange field as my requirement.
My selection screen order is,
personnel number
employee status
personnel area
personnel sub area
employee group
employee sub group
payroll area
cost center
company code
but the report categories display like,
personnel number
employee status
company code
personnel area
personnel sub area
employee group
employee sub group
payroll area
cost center
How can achieve my requirement please help me out.
Thank You.
Hi Team,
I want to change the selection screen field in logical database- PNP. i searched so many form but could not get,
when i am using the report categories it get sort the selection field by alphabetical order how can i arrange field as my requirement.
My selection screen order is,
personnel number
employee status
personnel area
personnel sub area
employee group
employee sub group
payroll area
cost center
company code
but the report categories display like,
personnel number
employee status
company code
personnel area
personnel sub area
employee group
employee sub group
payroll area
cost center
How can achieve my requirement please help me out.
Thank You.
2013 May 23 12:36 PM
Hi All,
Here i attached my requirement screen shots. Kindly help me out.
2013 May 27 5:36 AM
Hello John,
The display of selection fields in LDB will be displayed based on the order of fields in the given staructure.
If you want to edit that order you will see SELECTIONS button when you open the LDB.
*DB*SEL will be the include name, there you can edit the order I think.
2013 May 27 5:53 AM
U can create custom report category and achieve the requirement .
Regards,
Siva Prasad
2013 May 27 6:23 AM
Hi Kishore,
I tried with the selection field but it has rearrange the field by alphabetical order..
Here the company code is mandatory and employee status have the default value 3.
And also tell me if i will define my own selection screen how can i pass the value from my selection screen to LDB. Help me..
Thank You.
2013 May 27 6:43 AM
Hi John,
You can use HR report category option to choose the ordering of fields on your selection screen.
Step to view/change HR report category:
- View the attributes of the report you have created.
- On the attribute display screen click on HR Report Category button at the bottom
- You will see Report Category Assignment pop up, there click on Report Category
- Once there you will be able to see Selection Fields tab.
- Click on the change option to edit the selection field ordering.
Hope this helps.
-
Karan
2013 May 27 8:38 AM
Hi Karan,
I already tried every thing as you said. But it's not working. Now i decided to define my own selection screen. Is it possible to set our own selection screen if it is how can i pass the value to LDB through my own selection screen. Ex: How can i pass the entered PERNR to GET PERNR, as well as status to PNPSTAT2 and company code to PNPBUKRS.
Help me.
Thank You.
2013 May 27 10:01 AM
John,
Please refer to the following link for specific details on how to configure HR report category:
If you use HR report category your GET PERNR event will automatically work.
--
Karan
2013 May 27 4:07 PM
Hi Karan,
I tried everything but it is sort the field by alphabetical order tell me if i define own selection screen with my require fields how can i pass the entered PERNR value to LDB Ex:How can i pass the entered PERNR to GET PERNR, as well as status to PNPSTAT2 and company code to PNPBUKRS.
2013 May 28 7:40 AM
Hey john,
In order to pass your own selection screen elements to GET PERNR,
- Hide all the standard selection screen options.
- Define your own selection screen options.
- In START-OF-SELECTION. section assign all parameter values to pnp<val> before calling GET pernr.
For example:
If you have defined p_pernr and p_bukrs as your selection screen options.
START-OF-SELECTION.
pnppernr = p_pernr.
pnpbukrs = p_bukrs.
GET pernr.
This would pass all your selection screen options to GET pernr event structure and you would get the data required.
-
Karan
2013 May 29 10:05 AM
2013 May 29 10:05 AM
2013 May 29 10:05 AM
2013 May 29 10:05 AM
Hi Karan,
I tried as you said but it get passed single value when i am passing multiple range and multiple single value it could not pass the value to pnppernr and others.
Even i am passing my custom select option to pnppernr the get pernr event get all the pernr.
Give me the solution for my problem.
Kind Regards,
John.
2013 May 29 11:18 AM
Hi John,
I guess you are not passing the select options correctly or are collecting data after END-OF-SELECTION.
The following code fragment could help you out.
DATA: l_pernr TYPE PERSNO.
SELECT-OPTIONS: s_pernr FOR l_pernr.
DATA: s_pernr_line LIKE LINE OF s_pernr,
l_pnppernr_line LIKE LINE OF pnppernr.
START-OF-SELECTION.
LOOP AT s_pernr INTO s_pernr_line.
l_pnppernr_line-sign = s_pernr_line-sign.
l_pnppernr_line-option = s_pernr_line-option.
l_pnppernr_line-low = s_pernr_line-low.
l_pnppernr_line-high = s_pernr_line-high.
APPEND l_pnppernr_line TO pnppernr.
ENDLOOP.
GET pernr.
LOOP AT p0001.
WRITE:/ p0001-ename.
ENDLOOP.
The above code fetches all the data from the custom select options.
I think this should solve your problem.
Regards,
Karan
2013 May 31 6:23 AM
Hi Karan,
Now it's working fine.I know already based on the selection screen it get sort the data in LDB. But in my requirement i need to pass different where condition. Ex. Time info-type i want to get the particular date i.e 01.02.28 to 01.02.28 attendance hours and also i need to pick the data form my custom info-type pa9002 between these date. In LDB it get entire pernr details. Help me to achieve my requirement.
Warm Regards,
John.
2013 May 31 9:21 AM
Hi John,
For reading time info types, you create a separate date selection option.
You would then need to read the attendance hours and data from the custom using standard Function Modules.
FM to read PA infotypes - 'HR_READ_INFOTYPE' you can pass the date selection parameter as the begda and endda parameters for the above options.
Time infotypes - 2001, 2002 and PA9002 can read using the following FM
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = p_pernr
infty = p_infty
begda = p_begda (from selection option)
endda = p_endda (from slection option)
TABLES
infty_tab = p_innnn
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
In order to read time events (2011) -
Use the following FM
CALL FUNCTION 'HR_EVENT_READ'
EXPORTING
pernr = pernr
begda = begda
endda = endda
TABLES
mt = lt_2011.
Get all the details which you can through LDB using GET pernr, but for other data use these FM's to get the required data.
Regards,
Karan
2013 May 31 10:55 AM
Hi karan,
I don't want read the data from info-type pa2011 i want to read the data from pa2002 because they done some configuration from this info-type to custom infotype but the above function module only work for ap2011.
Warm Regards,
John.
2013 May 31 12:32 PM
You can use HR_READ_INFOTYPE for reading data from pa2002.
Example
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = pernr
infty = '2002'
begda = begda
endda = endda
TABLES
infty_tab = it2002
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
This will give you data from PA2002 for all attendance types for pernr and date range.
--
Karan