PA0008- ANSAL Field
Hi All,
I have few employees for whom annual salary shows zero in one of the custom budget report created for my client.
Master data is properly maintained and I see the annual salary field is also updated accurately in IT0008. I found out that this report pulls data from PA0008 table, here the annual salary field was empty.
In order to update that I then go into PA30 and am required to make some type of change and resave. When I run the report again, that employee’s salary now appears on the report. I feel this is still an issue since I just updated the wage but am required to go back in and pretend to make some type of change and resave it.
I did a little research to check how data comes in Table PA0008. Some people have mentioned that the wage types which are indirectly evaluated does not get displayed in this table. Since my wage type for hourly employees has TARIF updated in table T511, I am not sure if this is the reason for this issue.
I can not erase TARIF from Table T511.
Please let me know your thoughts over this.
Please check if the issue pernrs are saved by some specific user id. The issue may be related to security roles for a particular user as when you are editing IT0008, it is getting picked up.
Alternatively, try using FM 'RP_ANSAL_FROM_PERNR' as below:
call function 'RP_ANSAL_FROM_PERNR'
EXPORTING
f_date = pa0008-begda
f_pernr = pernr "pernr value
IMPORTING
f_ansal = lv_ansal "annual salary
EXCEPTIONS
internal_error = 1
error_read_0001 = 2
error_read_0008 = 3
error_at_indirect_evaluation = 4
currency_conversion_error = 5
others = 6.
Similar Messages
-
As part of Compensation we created entries in Info type 759 related to salary.
after that ran the standard activation process Tcode "PECM_CHANGE_STATUS"
this creates new records in info type 8,
problem is:
if i go to PA30 or PA20 i can see ANSAL is populated but when i go to SE11 and table PA0008,ANSAL value is blank.
if i got o PA30 and do manual save it's saving in PA0008 table
This is for country TUNISIA
and working fine for all other countries....
Please advise..Hi,
Please check if OSS note 1500929 is relevant in your case. Most likely you need an entry in V_T510_ANSAL for country TN and in that the u201Cyearu201D box should be checked.
Hope this helps.
Donnie -
Feature ANSAL --> ASAL (10 country grp)
--> CSAL (02 Switerzland)
ANSAL is doing Indirect valuation. Problem is, If I check the emp. salary in PA20, IT0008. The annual salary is visible. But for the same record in PA0008 the ansal field is 0.(For International countries, other than US). Please let me know how to fix this issue.If you are using indirect valuation on IT0008 (i.e. if you are referring to table T510) then ANSAL and the WT value will remain blank. At run time display, it would generate the values in screen structure (Q0008).
If you need all the values to be populated, use direct valuation (Table T710). -
What is the field and table name to describe -Employee Hourly Rate or Emplo
Hi,
Can any one please tell me what is the field and table name to describe
Employee Hourly Rate or Employee Rate.
Thanks for ur time.
Murali.Hi Murali,
The hourly rate is tied to a Wagetype & maintained in Infotype 0008. The database table is PA0008.
the field could vary depending on the No of wagetypes maintained.
regards,
Suresh Datti -
Hi
Could any one share your ideas on the Relationship between Planned workig time -0007 and BasicPay -Ansal field.
Thanks in Advance.
Kumar
Edited by: kumar Rag on Feb 26, 2009 12:12 PMHi Sikindar,
Thx for the replay .I came across this problem while doing data migration, when we were trying to upload 0008 particularly ANSAL field was showing error.
After 0007 upload it was fine ,so far i thought only Capacity Utilization .ie.100 % has impact on 0007.
Thanks
Kumar -
ANSAL module for wage types !
Hello,
Can you please explain
1. What is the significance (why & when is it used) of ANSAL module in wage type configuration ?
2. How is this configured ?
Thank You,
AnthonyHi
1. What is the end result of configuring the tables mentioned above ?
> You can default the WT's and its values in IT 8 using above configuration.
2. Will the field Ann. salary in IT0008 be populated ?
> If you enter the amt in WT's field which is defaulted, ANSAL field will automatically calculates annual amts.
3. So do we use ANSAL only for generating the annual salary ? Is there any other purpose of using this
module for wage types ?
> As of past experience, i have used only for defaulting the values ie.. configuring the IT-0008 to make it easier for the enduser to enter the values.
Good Luck
Pavan
Reward Points if it is useful -
ABAP HR - Populating fields on Infotype screen
Hi
I have the foll. requirement.
In Infotype 8 when an employee enters the ANSAL field ie. the value for Annual Salary all the wage types should get populated on their own in the wage type table control in the screen based on the following calulations :
basic pay = 40% of ANSAL
HRA = 30% of basic. etc.
Please tell me where exactly I should write the code for this calculation and how.You need to implement use exit EXIT_SAPFP50M_001, (cmod/smod thing)
and code something like this inside:
IF innnn-infty = '0008'.
call method cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
exporting
prelp = innnn
importing
pnnnn = wa_p0008.
* Assign the values/calculations here
* wa_p0008-yourfield = whatever_you_want. "Change this line
* wa_p0008-yourfield = whatever_you_want. "Change this line
* etc.
* etc.
call method cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
exporting
pnnnn = wa_p0008
importing
prelp = innnn. -
Calculate IT0008-ANSAL using a User Exit
Hi,
Anybody know the enhancement / exit for calculating ANSAL ?
It is not sufficient just to get the right figure displayed in PA30 IT0008 Function Modules like RP_ANSAL_FROM_PERNR will also need to work
so enhancement PBAS0001 would not work.
I see a lot of mentions on SCN of an 'Exit' but people seem shy about releasing the name !!
Cheers
bgGiriesh,
Regarding IT0008 - and I stand to be corrected on this !
In standard config you can set up what wage types make up ANSAL
If any of those wage types are themselves indirectly valued then ANSAL does not get stored in PA0008-ANSAL and it is recalculated each time you go into IT0008.
If none of the wage types are indirectly valued then ANSAL does get stored to PA0008-ANSAL.
I have alway assumed this was because if ANSAL was based on indirectly valued wage types you could not store it in PA0008 as if you changed the underlying wage type configuration then any ANSAL that were stored on PA0008 would no longer be correct and would need to be re-calculated!
Therefore if I was writing a report that had to display ANSAL I would use a FM like RP_ANSAL_FROM_WAGETYPES as PA0008-ANSAL would not be populated for all my employees.
The FM would derive ANSAL based on IT0008 and Configuration in the sitaution where PA0008-ANSAL is blank. Where PA0008-ANSAL is populated then I am not sure what it does.
Therefore If I calculate ANSAL with enhancement PBAS0001 and store it on PA0008-ANSAL it will only be correct as long as I do not change config relating to my wage types and indirect evaluation or any of the orther elements that I may wish to incorporate in my ANSAL calculation.
Regards
bg -
Down Loading ALV Output to Excel Sheet
Hi All,
I am working on Vendor Line Items Report which have both Header details as well as line item details.
So i developed Heirarical ALV to display the output and it is working fine.But my problem is Downloading output to Excel sheet functionality is not working.
In output screen LIST->EXPORT->SPREADSHEET functionality is not working.
Please give me suggestions regarding the same or is there any another way to do the same by using ALV List Display.
Points will be rewarded
Thanks and Regards,
Siva.hi ,
this is a working example check this...
REPORT zvenkattest0.
TABLES:pa0002,pa0008.
TYPE-POOLS:slis.
CONSTANTS:c VALUE 'X'.
DATA:BEGIN OF it_pa0008 OCCURS 0,
pernr LIKE pa0008-pernr,
begda LIKE pa0008-begda,
endda LIKE pa0008-endda,
preas LIKE pa0008-preas,
ansal LIKE pa0008-ansal,
lga01 LIKE pa0008-lga01,
expand TYPE xfeld,
END OF it_pa0008.
DATA:BEGIN OF it_pa0002 OCCURS 0,
pernr LIKE pa0002-pernr,
vorna LIKE pa0002-vorna,
nachn LIKE pa0002-nachn,
gbdat LIKE pa0002-gbdat,
gblnd LIKE pa0002-gblnd,
sprsl LIKE pa0002-sprsl,
perid LIKE pa0002-perid,
END OF it_pa0002.
DATA: wa_field_cat TYPE slis_fieldcat_alv,
it_field_cat TYPE slis_t_fieldcat_alv,
wa_keyinfo TYPE slis_keyinfo_alv,
it_layout TYPE slis_layout_alv.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:s_pernr FOR pa0002-pernr NO INTERVALS.
SELECTION-SCREEN: SKIP.
PARAMETERS:p_expand AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
PERFORM select_data.
PERFORM build_field_cat.
PERFORM disply_data.
*& Form SELECT_DATA
text
--> p1 text
<-- p2 text
FORM select_data .
SELECT pernr
begda
endda
preas
ansal
lga01
FROM pa0008
INTO CORRESPONDING FIELDS OF TABLE it_pa0008
UP TO 10 ROWS.
IF NOT it_pa0008[] IS INITIAL.
SELECT pernr
vorna
nachn
gbdat
gblnd
sprsl
perid
FROM pa0002
INTO CORRESPONDING FIELDS OF TABLE it_pa0002
FOR ALL ENTRIES IN it_pa0008
WHERE pernr = it_pa0008-pernr.
ENDIF.
SORT it_pa0008 BY pernr.
ENDFORM. " SELECT_DATA
*& Form BUILD_FIELD_CAT
text
--> p1 text
<-- p2 text
FORM build_field_cat .
wa_field_cat-tabname = 'PA0008'.
wa_field_cat-fieldname = 'PERNR'.
wa_field_cat-seltext_l = 'personnelno'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0008'.
wa_field_cat-fieldname = 'BEGDA'.
wa_field_cat-seltext_l = 'begindate'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0008'.
wa_field_cat-fieldname = 'ENDDA'.
wa_field_cat-seltext_l = 'enddate'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0008'.
wa_field_cat-fieldname = 'PREAS'.
wa_field_cat-seltext_l = 'reason'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0008'.
wa_field_cat-fieldname = 'ANSAL'.
wa_field_cat-seltext_l = 'annualsalary'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0008'.
wa_field_cat-fieldname = 'LGA01'.
wa_field_cat-seltext_l = 'wagetype'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0002'.
wa_field_cat-fieldname = 'VORNA'.
wa_field_cat-seltext_l = 'firstname'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0002'.
wa_field_cat-fieldname = 'NACHN'.
wa_field_cat-seltext_l = 'lastname'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0002'.
wa_field_cat-fieldname = 'GBDAT'.
wa_field_cat-seltext_l = 'birhtdate'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0002'.
wa_field_cat-fieldname = 'GBLND'.
wa_field_cat-seltext_l = 'birthcountry'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0002'.
wa_field_cat-fieldname = 'SPRSL'.
wa_field_cat-seltext_l = 'languageused'.
APPEND wa_field_cat TO it_field_cat.
wa_field_cat-tabname = 'PA0002'.
wa_field_cat-fieldname = 'PERID'.
wa_field_cat-seltext_l = 'personnelid'.
APPEND wa_field_cat TO it_field_cat.
ENDFORM. " BUILD_FIELD_CAT
*& Form DISPLY_DATA
text
--> p1 text
<-- p2 text
FORM disply_data .
it_layout-group_change_edit = c.
it_layout-colwidth_optimize = c.
it_layout-zebra = c.
it_layout-detail_popup = c.
it_layout-get_selinfos = c.
IF p_expand = c.
it_layout-expand_fieldname = 'EXPAND'.
ENDIF.
wa_keyinfo-header01 = 'PERNR'.
wa_keyinfo-item01 = 'PERNR'.
wa_keyinfo-item02 = 'SUBTY'.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
is_layout = it_layout
it_fieldcat = it_field_cat
i_tabname_header = 'PA0008'
i_tabname_item = 'PA0002'
is_keyinfo = wa_keyinfo
TABLES
t_outtab_header = it_pa0008
t_outtab_item = it_pa0002.
ENDFORM. " DISPLY_DATA
regards,
venkat. -
Authorization checks for PNP LDB
question : how to validate authorization checks for pnp logical database?
2 nd question: hr report
this report is basically for salary survey. in this i had so many fields can any body let me know how
can i form the internal tables. and i have to display overall 150 fields in csv file for that
how can i take in to the final internal table.
what is the logic behind this:
T71JPR09-JOBCODE
PA0000-PERNR
HRP1000-STEXT
P0006-PSTLZ
PA0008-ANSAL * 100 / PA0008-BSGRD
PA0015-BETRG
PA0761-LTEXT WHERE PA0761-CPLAN = LTI PLAN PSU YEAR 1
PA0761-GRADT WHERE PA0761-CPLAN = LTI PLAN PSU YEAR 1
PA0761-ZZGRANT WHERE PA0761-CPLAN = LTI PLAN PSU YEAR 1
PA0761-LTEXT WHERE PA0761-CPLAN = LTI PLAN esu YEAR 1
like that i had.
please give me the steps how can i proceed.Hi,
The PNP database will take care of authorization check. It will not execute if used does not have authorizations.
Hope this helps. -
Hi,
I wrote a program to retrieve data from three different master data tables but not getting the desired output. The output comes all in zeroes.
Can anyone tell me where am I going wrong?
Here is the code-
REPORT ZREPORT1 .
Tables: PA0002, PA0008, PA0015.
data : begin of itab occurs 0,
CLIENTNO LIKE PA0002-MANDT,
ENAME TYPE PA0002-CNAME,
ESAL TYPE PA0008-ANSAL,
OT TYPE PA0015-BETRG,
ENO LIKE PA0002-PERNR,
END OF ITAB.
SELECT A~CNAME
A~PERNR
A~MANDT
B~ANSAL
B~PERNR
C~BETRG
C~PERNR
INTO CORRESPONDING FIELDS OF TABLE itab
FROM ( PA0002 AS A INNER JOIN PA0008 AS B
ON APERNR = BPERNR )
INNER JOIN PA0015 AS C
ON BPERNR = CPERNR
WHERE A~MANDT = 800.
LOOP AT itab.
WRITE: / ITAB-CLIENTNO, 25 ITAB-ESAL ,45 ITAB-OT.
ENDLOOP.Hi ,
u have to put like this .
SELECT A~CNAME
A~PERNR
A~MANDT <b>as clientNo</b>
B~ANSAL <b>as esal</b>
B~PERNR
C~BETRG <b>as OT</b>
C~PERNR
INTO CORRESPONDING FIELDS OF TABLE itab
FROM ( PA0002 AS A INNER JOIN PA0008 AS B
ON APERNR = BPERNR )
INNER JOIN PA0015 AS C
ON BPERNR = CPERNR
WHERE A~MANDT = 800.
LOOP AT itab.
WRITE: / ITAB-CLIENTNO, 25 ITAB-ESAL ,45 ITAB-OT.
ENDLOOP.
Regards
Prabhu -
ZReport addition in report tree.
Hi Everybody,
Can anyone suggest the steps to be followed for adding a zprogram in a report tree(sret)?
Thanks in advance
Nazmulhi check this....
REPORT ZVENKATTEST0.
TABLES:PA0002,PA0008.
TYPE-POOLS:SLIS.
CONSTANTS:C VALUE 'X'.
DATA:BEGIN OF IT_PA0008 OCCURS 0,
PERNR LIKE PA0008-PERNR,
BEGDA LIKE PA0008-BEGDA,
ENDDA LIKE PA0008-ENDDA,
PREAS LIKE PA0008-PREAS,
ANSAL LIKE PA0008-ANSAL,
LGA01 LIKE PA0008-LGA01,
EXPAND TYPE XFELD,
END OF IT_PA0008.
DATA:BEGIN OF IT_PA0002 OCCURS 0,
PERNR LIKE PA0002-PERNR,
VORNA LIKE PA0002-VORNA,
NACHN LIKE PA0002-NACHN,
GBDAT LIKE PA0002-GBDAT,
GBLND LIKE PA0002-GBLND,
SPRSL LIKE PA0002-SPRSL,
PERID LIKE PA0002-PERID,
END OF IT_PA0002.
DATA: WA_FIELD_CAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELD_CAT TYPE SLIS_T_FIELDCAT_ALV,
WA_KEYINFO TYPE SLIS_KEYINFO_ALV,
IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:S_PERNR FOR PA0002-PERNR NO INTERVALS.
SELECTION-SCREEN: SKIP.
PARAMETERS:P_EXPAND AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
PERFORM SELECT_DATA.
PERFORM BUILD_FIELD_CAT.
PERFORM DISPLY_DATA.
*& Form SELECT_DATA
text
--> p1 text
<-- p2 text
FORM SELECT_DATA .
SELECT PERNR
BEGDA
ENDDA
PREAS
ANSAL
LGA01
FROM PA0008
INTO CORRESPONDING FIELDS OF TABLE IT_PA0008
UP TO 10 ROWS.
IF NOT IT_PA0008[] IS INITIAL.
SELECT PERNR
VORNA
NACHN
GBDAT
GBLND
SPRSL
PERID
FROM PA0002
INTO CORRESPONDING FIELDS OF TABLE IT_PA0002
FOR ALL ENTRIES IN IT_PA0008
WHERE PERNR = IT_PA0008-PERNR.
ENDIF.
SORT IT_PA0008 BY PERNR.
ENDFORM. " SELECT_DATA
*& Form BUILD_FIELD_CAT
text
--> p1 text
<-- p2 text
FORM BUILD_FIELD_CAT .
WA_FIELD_CAT-TABNAME = 'PA0008'.
WA_FIELD_CAT-FIELDNAME = 'PERNR'.
WA_FIELD_CAT-SELTEXT_L = 'personnelno'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
WA_FIELD_CAT-TABNAME = 'PA0008'.
WA_FIELD_CAT-FIELDNAME = 'BEGDA'.
WA_FIELD_CAT-SELTEXT_L = 'begindate'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
WA_FIELD_CAT-TABNAME = 'PA0008'.
WA_FIELD_CAT-FIELDNAME = 'ENDDA'.
WA_FIELD_CAT-SELTEXT_L = 'enddate'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
WA_FIELD_CAT-TABNAME = 'PA0008'.
WA_FIELD_CAT-FIELDNAME = 'PREAS'.
WA_FIELD_CAT-SELTEXT_L = 'reason'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
WA_FIELD_CAT-TABNAME = 'PA0008'.
WA_FIELD_CAT-FIELDNAME = 'ANSAL'.
WA_FIELD_CAT-SELTEXT_L = 'annualsalary'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
WA_FIELD_CAT-TABNAME = 'PA0008'.
WA_FIELD_CAT-FIELDNAME = 'LGA01'.
WA_FIELD_CAT-SELTEXT_L = 'wagetype'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
WA_FIELD_CAT-TABNAME = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'VORNA'.
WA_FIELD_CAT-SELTEXT_L = 'firstname'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
WA_FIELD_CAT-TABNAME = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'NACHN'.
WA_FIELD_CAT-SELTEXT_L = 'lastname'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
WA_FIELD_CAT-TABNAME = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'GBDAT'.
WA_FIELD_CAT-SELTEXT_L = 'birhtdate'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
WA_FIELD_CAT-TABNAME = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'GBLND'.
WA_FIELD_CAT-SELTEXT_L = 'birthcountry'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
WA_FIELD_CAT-TABNAME = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'SPRSL'.
WA_FIELD_CAT-SELTEXT_L = 'languageused'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
WA_FIELD_CAT-TABNAME = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'PERID'.
WA_FIELD_CAT-SELTEXT_L = 'personnelid'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
ENDFORM. " BUILD_FIELD_CAT
*& Form DISPLY_DATA
text
--> p1 text
<-- p2 text
FORM DISPLY_DATA .
IT_LAYOUT-GROUP_CHANGE_EDIT = C.
IT_LAYOUT-COLWIDTH_OPTIMIZE = C.
IT_LAYOUT-ZEBRA = C.
IT_LAYOUT-DETAIL_POPUP = C.
IT_LAYOUT-GET_SELINFOS = C.
IF P_EXPAND = C.
IT_LAYOUT-EXPAND_FIELDNAME = 'EXPAND'.
ENDIF.
WA_KEYINFO-HEADER01 = 'PERNR'.
WA_KEYINFO-ITEM01 = 'PERNR'.
wa_keyinfo-item02 = 'SUBTY'.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-CPROG
IS_LAYOUT = IT_LAYOUT
IT_FIELDCAT = IT_FIELD_CAT
I_TABNAME_HEADER = 'PA0008'
I_TABNAME_ITEM = 'PA0002'
IS_KEYINFO = WA_KEYINFO
TABLES
T_OUTTAB_HEADER = IT_PA0008
T_OUTTAB_ITEM = IT_PA0002.
ENDFORM. " DISPLY_DATA -
Dynamic where clause problem?
Hi all,
I am using 4 parameters for the attrition rate report of an employee on the selection screen.
Level
Grade
Position
Salary Range (pa0008-ansal)
i have filled the values of level, grade, position, from database tables at the initialization event.
And for the salary range i hardcoded them to 0-5000, 5001-10000 etc.. and so on.
and then showed all 4 parameters are listbox on the selection screen.
now the first 3 parameters are from infotype pa0001 and the last is from pa0008.
Now I want to select pernr, persg ,persk ,plans, begda ,endda fields from infotype pa0001, and 'ansal' field from pa0008 , with the help of a dynamic where clause, is it possible, because here it might be needed for a join as well.
Please help me out with some sample coding help.
Regards
TarunDATA: lv_query TYPE string.
lv_query = ' '.
IF position IS NOT INITIAL.
IF lv_query IS NOT INITIAL.
CONCATENATE lv_query ' and p1~plans eq position ' '' INTO lv_query.
ELSE.
CONCATENATE ' p1~plans eq position ' '' INTO lv_query.
ENDIF.
ENDIF.
IF grade IS NOT INITIAL.
IF lv_query IS NOT INITIAL .
CONCATENATE lv_query ' and p1~PERSK eq grade ' '' INTO lv_query.
ELSE.
CONCATENATE ' p1~PERSK eq grade ' '' INTO lv_query.
ENDIF.
ENDIF.
IF level IS NOT INITIAL.
IF lv_query IS NOT INITIAL .
CONCATENATE lv_query ' and p1~PERsg eq level ' '' INTO lv_query.
ELSE.
CONCATENATE ' p1~PERsg eq level ' '' INTO lv_query.
ENDIF.
ENDIF.
IF sal_slab IS NOT INITIAL.
SELECT pernr ansal begda endda FROM pa0008 INTO CORRESPONDING FIELDS OF TABLE lt_st_p8 WHERE ansal = sal_slab.
*IF lv_query IS NOT INITIAL .*
*CONCATENATE lv_query ' and p8~ansal le sal_slab ' '' INTO lv_query.*
*ELSE.*
*CONCATENATE ' p8~ansal le sal_slab ' '' INTO lv_query.*
*ENDIF.*
ENDIF.
SELECT p1~pernr
p1~persg p1~persk p1~plans p1~begda p1~endda
p8~ansal
INTO CORRESPONDING FIELDS of TABLE lt_st_p1_p8
FROM pa0001 AS p1 JOIN pa0008 AS p8 ON p1~pernr = p8~pernr
WHERE (lv_query) .
<Added code tags>
Now in case of salary slab, i have ranges like 0-5000 , 5001-10000 and so on and I showed it as a listbox on sel. screen.
So how can I read the figure after the '-'?????
And also review, if for the previous 3 parameters it is correct, or it can be shortened and accurated.
Edited by: Suhas Saha on Dec 28, 2011 1:44 PM -
How to edit ALV report using function modules
I have a ALV report , i want to edit the report
using function modules.
how can i do that...
Edited by: ms kumar on Mar 6, 2008 3:24 PMhi i had used this report with the check box,
using the fm of alvs.....
*& Report ZZZ00
REPORT ZPR_02.
TYPE-POOLS: SLIS.
TABLES:pa0002,pa0008.
data:begin of it_pa0002 occurs 0,
checkbox,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
end of it_pa0002.
data:begin of it_pa00021 occurs 0,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
expand TYPE xfeld value 'X',
end of it_pa00021.
data:begin of it_pa0008 occurs 0,
pernr like pa0008-pernr,
begda like pa0008-begda,
endda like pa0008-endda,
ANSAL like pa0008-ANSAL,
LGA01 like pa0008-LGA01,
BET01 LIKE PA0008-BET01,
end of it_pa0008.
DATA: IT_FIELD_CAT TYPE SLIS_T_FIELDCAT_ALV,
IT_FIELD_CAT1 TYPE SLIS_T_FIELDCAT_ALV,
IT_LAYOUT1 TYPE SLIS_LAYOUT_ALV,
WA_FIELD_CAT TYPE SLIS_FIELDCAT_ALV,
WA_FIELD_CAT1 TYPE SLIS_FIELDCAT_ALV,
IT_LAYOUT TYPE SLIS_LAYOUT_ALV,
IT_EVENTS TYPE SLIS_T_EVENT,
WA_EVENTS TYPE SLIS_ALV_EVENT,
IT_HEADER TYPE SLIS_T_LISTHEADER,
WA_HEADER TYPE SLIS_LISTHEADER,
wa_keyinfo TYPE slis_keyinfo_alv.
CONSTANTS:c VALUE 'X'.
SELECT-OPTIONS: S_pernr FOR pa0002-pernr.
START-OF-SELECTION.
SET PF-STATUS 'DATA' .
PERFORM GET_DATA.
PERFORM BUILD_FIELD_CAT.
PERFORM GET_EVENTS.
PERFORM DISPLAY_DATA.
*& Form get_data
text
FORM GET_DATA .
SELECT pernr
begda
endda
vorna
nachn
FROM pa0002
INTO CORRESPONDING FIELDS OF TABLE IT_pa0002
WHERE pernr IN S_pernr.
ENDFORM. " get_data
*& Form build_field_cat
text
FORM BUILD_FIELD_CAT .
wa_field_cat-tabname = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'CHECKBOX'.
wa_field_cat-ref_tabname = 'IT_PA0002'.
WA_FIELD_CAT-REPTEXT_DDIC = 'Check Box'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
CLEAR WA_FIELD_CAT.
wa_field_cat-tabname = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'PERNR'.
wa_field_cat-ref_tabname = 'IT_PA0002'.
WA_FIELD_CAT-REPTEXT_DDIC = 'Personnel no'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
CLEAR WA_FIELD_CAT.
wa_field_cat-tabname = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'BEGDA'.
wa_field_cat-ref_tabname = 'IT_PA0002'.
WA_FIELD_CAT-REPTEXT_DDIC = 'Start date'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
CLEAR WA_FIELD_CAT.
wa_field_cat-tabname = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'ENDDA'.
wa_field_cat-ref_tabname = 'IT_PA0002'.
WA_FIELD_CAT-REPTEXT_DDIC = 'End date'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
CLEAR WA_FIELD_CAT.
wa_field_cat-tabname = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'VORNA'.
wa_field_cat-ref_tabname = 'IT_PA0002'.
WA_FIELD_CAT-REPTEXT_DDIC = 'First name'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
CLEAR WA_FIELD_CAT.
wa_field_cat-tabname = 'PA0002'.
WA_FIELD_CAT-FIELDNAME = 'NACHN'.
wa_field_cat-ref_tabname = 'IT_PA0002'.
WA_FIELD_CAT-REPTEXT_DDIC = 'Last name'.
APPEND WA_FIELD_CAT TO IT_FIELD_CAT.
CLEAR WA_FIELD_CAT.
wa_field_cat1-tabname = 'PA0002'.
WA_FIELD_CAT1-FIELDNAME = 'PERNR'.
wa_field_cat1-ref_tabname = 'IT_PA00021'.
WA_FIELD_CAT1-REPTEXT_DDIC = 'Personnel no'.
APPEND WA_FIELD_CAT1 TO IT_FIELD_CAT1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0002'.
WA_FIELD_CAT1-FIELDNAME = 'BEGDA'.
wa_field_cat1-ref_tabname = 'IT_PA00021'.
WA_FIELD_CAT1-REPTEXT_DDIC = 'Start date'.
APPEND WA_FIELD_CAT1 TO IT_FIELD_CAT1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0002'.
WA_FIELD_CAT1-FIELDNAME = 'ENDDA'.
wa_field_cat1-ref_tabname = 'IT_PA00021'.
WA_FIELD_CAT1-REPTEXT_DDIC = 'End date'.
APPEND WA_FIELD_CAT1 TO IT_FIELD_CAT1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0002'.
WA_FIELD_CAT1-FIELDNAME = 'VORNA'.
wa_field_cat1-ref_tabname = 'IT_PA00021'.
WA_FIELD_CAT1-REPTEXT_DDIC = 'First name'.
APPEND WA_FIELD_CAT1 TO IT_FIELD_CAT1.
CLEAR WA_FIELD_CAT.
wa_field_cat1-tabname = 'PA0002'.
WA_FIELD_CAT1-FIELDNAME = 'NACHN'.
wa_field_cat1-ref_tabname = 'IT_PA00021'.
WA_FIELD_CAT1-REPTEXT_DDIC = 'Last name'.
APPEND WA_FIELD_CAT1 TO IT_FIELD_CAT1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0008'.
wa_field_cat1-fieldname = 'PERNR'.
wa_field_cat-ref_tabname = 'IT_PA0008'.
wa_field_cat1-REPTEXT_DDIC = 'personnelno'.
APPEND wa_field_cat1 TO it_field_cat1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0008'.
wa_field_cat1-fieldname = 'BEGDA'.
wa_field_cat-ref_tabname = 'IT_PA0008'.
wa_field_cat1-REPTEXT_DDIC = 'begindate'.
APPEND wa_field_cat1 TO it_field_cat1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0008'.
wa_field_cat1-fieldname = 'ENDDA'.
wa_field_cat-ref_tabname = 'IT_PA0008'.
wa_field_cat1-REPTEXT_DDIC = 'enddate'.
APPEND wa_field_cat1 TO it_field_cat1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0008'.
wa_field_cat1-fieldname = 'ANSAL'.
wa_field_cat-ref_tabname = 'IT_PA0008'.
wa_field_cat1-REPTEXT_DDIC = 'annualsalary'.
APPEND wa_field_cat1 TO it_field_cat1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0008'.
wa_field_cat1-fieldname = 'LGA01'.
wa_field_cat-ref_tabname = 'IT_PA0008'.
wa_field_cat1-REPTEXT_DDIC = 'wagetype'.
APPEND wa_field_cat1 TO it_field_cat1.
CLEAR WA_FIELD_CAT1.
wa_field_cat1-tabname = 'PA0008'.
wa_field_cat1-fieldname = 'BET01'.
wa_field_cat-ref_tabname = 'IT_PA0008'.
wa_field_cat1-REPTEXT_DDIC = 'Amount'.
APPEND wa_field_cat1 TO it_field_cat1.
CLEAR WA_FIELD_CAT1.
ENDFORM. " build_field_cat
*& Form display_data
text
FORM DISPLAY_DATA .
it_layout-box_fieldname = 'CHECKBOX'.
it_layout-EDIT = 'X'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_FIELDCAT = IT_FIELD_CAT
IS_LAYOUT = IT_LAYOUT
IT_EVENTS = IT_EVENTS
TABLES
T_OUTTAB = IT_pa0002.
ENDFORM. " display_data
*& Form get_events
text
FORM GET_EVENTS .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
IMPORTING
ET_EVENTS = IT_EVENTS .
READ TABLE IT_EVENTS INTO WA_EVENTS
WITH KEY NAME = SLIS_EV_TOP_OF_PAGE.
IF SY-SUBRC = 0.
WA_EVENTS-FORM = 'TOP_OF_PAGE'.
MODIFY IT_EVENTS FROM WA_EVENTS INDEX SY-TABIX.
ENDIF.
ENDFORM. " get_events
*& Form top_of_page
text
FORM TOP_OF_PAGE.
WA_HEADER-TYP = 'H'.
WA_HEADER-INFO = 'EMPLOYEE DATA'.
APPEND WA_HEADER TO IT_HEADER.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_HEADER
ENDFORM. "top_of_page
*& Form GUI_SET
FORM GUI_SET USING RT_EXTAB TYPE SLIS_T_EXTAB .
SET PF-STATUS 'DATA' .
ENDFORM. "GUI_SET
*& Form USER_COMMAND
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
R_SELFIELD TYPE SLIS_SELFIELD.
DATA:V_PERNR LIKE PA0002-PERNR.
CASE R_UCOMM.
WHEN 'DET'.
DATA: V_FLAG.
clear : v_flag.
LOOP AT IT_PA0002.
if it_PA0002-checkbox = 'X'.
v_flag = 'X'.
v_pernr = IT_PA0002-PERNR.
SELECT PERNR
BEGDA
ENDDA
VORNA
NACHN
FROM PA0002
INTO CORRESPONDING FIELDS OF TABLE IT_PA00021
WHERE PERNR = V_PERNR.
SORT IT_PA00021 BY PERNR.
DELETE ADJACENT DUPLICATES FROM IT_PA00021 COMPARING PERNR.
READ TABLE IT_PA00021 INDEX 1.
SELECT PERNR
BEGDA
ENDDA
ANSAL
LGA01
BET01
FROM PA0008
INTO TABLE IT_PA0008
FOR ALL ENTRIES IN IT_PA00021
WHERE PERNR = IT_PA00021-PERNR.
if not it_PA0008[] Is initial.
SORT IT_PA0008 BY PERNR.
delete adjacent duplicates from it_PA0008 comparing pernr.
READ TABLE IT_PA0008 INDEX 1.
endif.
endif.
enddo.
it_layout1-group_change_edit = c.
it_layout1-colwidth_optimize = c.
it_layout1-zebra = c.
it_layout1-detail_popup = c.
it_layout1-get_selinfos = c.
it_layout-expand_fieldname = 'EXPAND'.
wa_keyinfo-header01 = 'PERNR'.
wa_keyinfo-item01 = 'PERNR'.
IF NOT V_FLAG IS INITIAL.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = IT_LAYOUT1
IT_FIELDCAT = IT_FIELD_CAT1
I_TABNAME_HEADER = 'PA0002'
I_TABNAME_ITEM = 'PA0008'
IS_KEYINFO = wa_keyinfo
TABLES
T_OUTTAB_HEADER = IT_PA00021
T_OUTTAB_ITEM = IT_PA0008.
ENDIF.
CLEAR: IT_PA00021,IT_PA0002,IT_PA0008.
ENDLOOP.
WHEN 'BACK'.
EXIT.
ENDCASE.
ENDFORM. "USER_COMMAND
reward points if useful,
venkat. -
Logic req. using innerjoin for vendor
plz help me,
tell me req . select statements useing innorjoins.give me logic.
tables:
MARA, MARC, MARD, MAKT, MAPF, MSEG, LFA1
input fields:
The end user will select a list of materials and vendors within a date range.
output fields:
The report should display vendor name,
actual Creation Date,
payment terms
prices,
Material Number,
Storage Location,
Unit of Measure,
description ,
group totals.
thank you,
venkihi ,
here is a simple inner join see this ..but inner jions is not good at performance..
report test .
tables: pa0002,pa0008,pa0021.
data: begin of it_pa0002 occurs 0,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
end of it_pa0002.
data: begin of it_pa0008 occurs 0,
pernr like pa0008-pernr,
ansal like pa0008-ansal,
lga01 like pa0008-lga01,
bet01 like pa0008-bet01,
end of it_pa0008.
data: begin of it_pa0021 occurs 0,
pernr like pa0021-pernr,
famsa like pa0021-famsa,
fanam like pa0021-fanam,
favor like pa0021-favor,
end of it_pa0021.
data: begin of it_final occurs 0,
pernr like pa0002-pernr,
begda like pa0002-begda,
endda like pa0002-endda,
vorna like pa0002-vorna,
nachn like pa0002-nachn,
ansal like pa0008-ansal,
lga01 like pa0008-lga01,
bet01 like pa0008-bet01,
famsa like pa0021-famsa,
fanam like pa0021-fanam,
favor like pa0021-favor,
end of it_final .
select-options:s_pernr for pa0002-pernr.
select a~pernr
a~begda
a~endda
a~vorna
a~nachn
b~ansal
b~lga01
b~bet01
c~famsa
c~fanam
c~favor
from ( ( pa0002 as a inner join pa0008 as b on apernr = bpernr )
inner join pa0021 as c on apernr = cpernr and bpernr = cpernr )
into table it_final
where a~pernr in s_pernr.
sort it_final by pernr begda descending.
loop at it_final.
write:/ it_final-pernr,
it_final-begda,
it_final-endda,
it_final-vorna,
it_final-nachn,
it_final-ansal,
it_final-lga01,
it_final-bet01,
it_final-famsa,
it_final-fanam,
it_final-favor.
endloop.
regards.
venkat.
Maybe you are looking for
-
Given (MainWindow:Window) Window_Loaded() dlgName dlg = new dlgName("Xxx"); dlg.ShowDialog(); string stName = dlg.stReturnValue; dlg.Close(); MessageBox.Show("message"); ... code consumes about ten secs ...
-
IPod will not turn BACK ON! Cold weather?
My iPod will not turn back on. I left it in a cold car for a few days while I was at my family's house, and the battery must have died while I was there. I came home and plugged it in, but it wouldn't charge or turn on. Help!!
-
I reported a fault on my line on 20th Jan via the online fault reporter, which said it should be fixed within 3 working days. It has been over a week now and nothing has changed. The site also said it would keep me updated witht he latest progress b
-
HI EVERY ONE, I HAVE A REQUIREMENT WORKING ON MM , I HAVE SOME BUSINESS RULES IN FUNCTIONAL DESIGN DOCUMENT AND I NEED TO WRITE THE TECH DESIGN . MY QUESTION IS HOW TO ADD BUSINESS RULES IN TECH SPEC. EXAMPLE I HAVE FINAL DUE DATE AS BUSINESS RULE
-
Hi - I've searched to find some info on which Anti Virus to get for use with XP using Bootcamp. My first MAC should arrive in the next few days I know now not to install Norton and also what "free" program to use on the MAC side. I'm sorry if I've po