Downloading the employee details
Hi All,
I want to download the below details in the excel sheet or in the notepad for all the employees in the company.
Last Name
First Name
Corporate E-mail address
work site zip code
This is urgent and please reply asap. I am new to SAP HR, so request you to detail out the steps.
Thank you so much.
Edited by: SAPHR_123 on Jan 9, 2008 6:29 PM
Thanks Ananth...the answer was helpful.
I have another question for you...Do you know where can I find the work area zip code and the official email address and how can I import them into the transaction S_AHR_61016362.
I found the postal code in the above transaction, but that one was residence zip code.
Thanks once again for your answer.
Similar Messages
-
Pronlem in LOP while retrieving the employee details
Hi,
I am new to HR for ABAP developing,
I have a Pronlem in a report for LOP (loss of pay) while retrieving the employee details.
(i.e) while retrieving employee details by individual it shows the correct details.
But, in the group of 10 employess out of 9 doesn't have the LOP and the 1 is having LOP. While retrieving this it shows all the
10 members have LOP. It shows some amount for that 1 person also.
Kindly i need ur help for the above issues.
Waiting for ur valuable replies.Hi swarna,
Herewith i attached my code, would u please suggest me wer shud i make changes.
Rgds,
Karthik
START-OF-SELECTION.
IF P_1 = 'X'.
W_EXT = '.csv'.
ELSE.
W_EXT = 'err.csv'.
PR_PATH = '/obrm/in/asset/'.
ENDIF.
CLEAR:W_PR_FNAME,
W_STR,
W_PATH1,
W_LEN,
W_F6_TMP.
CLEAR:WA_MESSTAB,WA_UP_SUCC,WA_FINAL,WA_FILE.
REFRESH:IT_FINAL, IT_MESSTAB,IT_UP_ERROR,IT_UP_SUCC,ITFILE,ITFILE1 .
W_GO = 'X'.
CALL FUNCTION 'SUBST_GET_FILE_LIST'
EXPORTING
DIRNAME = PR_PATH
FILENM = '*'
TABLES
FILE_LIST = ITFILE
EXCEPTIONS
ACCESS_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE TEXT-102 TYPE C_I.
EXIT.
ENDIF.
LOOP AT ITFILE INTO WA_FILE.
IF WA_FILE-NAME CS W_EXT.
APPEND WA_FILE TO ITFILE1.
CLEAR WA_FILE.
ENDIF.
ENDLOOP.
LOOP AT ITFILE1 INTO WA_FILE.
IF SY-TABIX > 1.
CLEAR IT_FINAL[].
ENDIF.
CONCATENATE PR_PATH WA_FILE-NAME INTO W_PR_FNAME.
OPEN DATASET W_PR_FNAME FOR INPUT IN TEXT MODE ENCODING DEFAULT.
CLEAR : IT_SOURCE[].
DO.
READ DATASET W_PR_FNAME INTO W_STR.
IF SY-SUBRC NE 0.
EXIT.
ENDIF.
SPLIT W_STR AT ';' INTO
WA_FINAL-F1
WA_FINAL-F2
WA_FINAL-F3.
CLEAR WA_SOURCE.
WA_SOURCE-F1 = WA_FINAL-F1.
WA_SOURCE-F2 = WA_FINAL-F2.
WA_SOURCE-F3 = WA_FINAL-F3.
SO_SER-LOW = WA_FINAL-F1.
SO_SER-SIGN = 'I'.
SO_SER-OPTION = 'EQ'.
APPEND SO_SER.
APPEND WA_SOURCE TO IT_SOURCE.
APPEND WA_FINAL TO IT_FINAL.
ENDDO.
CLOSE DATASET W_PR_FNAME.
IF IT_FINAL[] IS INITIAL.
MESSAGE TEXT-E01 TYPE C_I.
EXIT.
ENDIF.
PERFORM MATERIAL_DOCS_GET.
IF SY-SUBRC NE 0.
MESSAGE TEXT-M01 TYPE 'S'.
RETURN.
ENDIF.
DELETE IT_MDOCS WHERE BWART = '102'.
LOOP AT IT_MDOCS INTO WA_MDOCS.
WA_AMT_SUM-EBELN = WA_MDOCS-EBELN.
WA_AMT_SUM-SHKZG = WA_MDOCS-SHKZG.
WA_AMT_SUM-DMBTR = WA_MDOCS-DMBTR.
COLLECT WA_AMT_SUM INTO IT_AMT_SUM.
ENDLOOP.
PERFORM SERIAL_NUMBERS_GET.
IF IT_SRNO[] IS INITIAL.
RETURN.
ENDIF.
ENDLOOP.
CALL SCREEN 100.
END-OF-SELECTION.
IF PR_TEST NE 'X'.
PERFORM DISPLAY_LOG.
ENDIF.
FORM MATERIAL_DOCS_GET .
SELECT MATNR
FROM MARA INTO TABLE IT_MATNR
WHERE MATKL in ('DTH_STB','DTH_STBSC') AND
MTART EQ 'UNBW' AND
LVORM EQ ' '.
IF IT_MATNR IS NOT INITIAL.
LOOP AT IT_MATNR INTO WA_MATNR.
SO_MATNR-SIGN = 'I'.
SO_MATNR-OPTION = 'EQ'.
SO_MATNR-LOW = WA_MATNR-MATNR.
APPEND SO_MATNR.
ENDLOOP.
ELSE.
MESSAGE TEXT-M06 TYPE 'S'.
RETURN.
ENDIF.
SELECT A~OBKNR A~SERNR A~MATNR B~OBKNR B~MBLNR B~MJAHR B~BWART
FROM OBJK AS A INNER JOIN SER03 AS B ON A~OBKNR = B~OBKNR
INTO CORRESPONDING FIELDS OF TABLE IT_SER03
WHERE A~SERNR IN SO_SER AND
A~MATNR IN SO_MATNR AND
B~BWART IN ('101','102','122') and
B~LIEFERANT <> ' '.
IF IT_SER03 IS NOT INITIAL.
SELECT MBLNR MJAHR ZEILE EBELN EBELP LFBNR LFBJA LFPOS SJAHR SMBLN SMBLP BWART SHKZG WAERS MENGE MEINS KUNNR
FROM MSEG INTO CORRESPONDING FIELDS OF TABLE IT_MSEG
FOR ALL ENTRIES IN IT_SER03
WHERE MBLNR = IT_SER03-MBLNR AND
MJAHR = IT_SER03-MJAHR AND
BWART IN ('101','102','122') AND
MATNR IN SO_MATNR AND
DMBTR > 0 .
ENDIF.
IF IT_MSEG IS NOT INITIAL.
SELECT * FROM ZPOVAL_ASSET INTO CORRESPONDING FIELDS OF TABLE IT_PO
FOR ALL ENTRIES IN IT_MSEG
WHERE EBELN = IT_MSEG-EBELN.
SELECT KUNNR REGIO
FROM KNA1 INTO CORRESPONDING FIELDS OF TABLE IT_KNA1
FOR ALL ENTRIES IN IT_MSEG
WHERE KUNNR = IT_MSEG-KUNNR.
ENDIF.
DELETE IT_MSEG WHERE EBELN = '6100000124'.
LOOP AT IT_SER03 INTO WA_SER03.
WA_MDOCS-SERNR = WA_SER03-SERNR.
WA_MDOCS-MATNR = WA_SER03-MATNR.
READ TABLE IT_MSEG INTO WA_MSEG1 WITH KEY MBLNR = WA_SER03-MBLNR.
IF SY-SUBRC = 0.
MOVE-CORRESPONDING WA_MSEG1 TO WA_MDOCS.
READ TABLE IT_PO INTO WA_PO WITH KEY EBELN = WA_MSEG1-EBELN.
IF SY-SUBRC = 0.
WA_MDOCS-DMBTR = WA_PO-DMBTR.
ENDIF.
READ TABLE IT_KNA1 INTO WA_KNA1 WITH KEY KUNNR = WA_MSEG1-KUNNR.
IF SY-SUBRC = 0.
WA_MDOCS-KUNNR = WA_KNA1-KUNNR.
WA_MDOCS-REGIO = WA_KNA1-REGIO.
ENDIF.
APPEND WA_MDOCS TO IT_MDOCS.
ENDIF.
ENDLOOP.
SORT IT_MDOCS BY SERNR MJAHR MBLNR DESCENDING.
DELETE ADJACENT DUPLICATES FROM IT_MDOCS COMPARING SERNR.
IF SY-SUBRC EQ 0.
LOOP AT IT_ZFT_POSTED_MDOCS1 INTO WA_ZFT_POSTED_MDOCS1.
CONCATENATE TEXT-M09 WA_ZFT_POSTED_MDOCS1-MBLNR TEXT-M10 INTO WA_LOG-MSG SEPARATED BY SPACE.
WRITE: /5 WA_LOG-MSG.
DELETE IT_MDOCS WHERE MBLNR EQ WA_ZFT_POSTED_MDOCS1-MBLNR.
ENDLOOP.
ENDIF.
CLEAR WA_LOG.
REFRESH IT_LOG[].
IF IT_MDOCS[] IS INITIAL.
SY-SUBRC = 4.
RETURN.
ENDIF.
*copy material docs for dumping in ZFT_POSTED_ASSET
IT_ZFT_POSTED_ASSET[] = IT_MDOCS[].
ENDFORM. " material_docs_get
FORM DISPLAY_LOG .
IF IT_LOG[] IS INITIAL.
RETURN.
ENDIF.
LOOP AT IT_LOG INTO WA_LOG.
WRITE: /5 WA_LOG-MSG.
ENDLOOP.
ENDFORM. " display_log
FORM SERIAL_NUMBERS_GET.
DATA: WA_SRNO1 TYPE TY_SRNO.
SELECT MBLNR MJAHR BUDAT
FROM MKPF INTO CORRESPONDING FIELDS OF TABLE IT_MKPF
FOR ALL ENTRIES IN IT_MDOCS
WHERE MBLNR = IT_MDOCS-MBLNR AND
MJAHR = IT_MDOCS-MJAHR.
LOOP AT IT_MDOCS INTO WA_MDOCS.
MOVE-CORRESPONDING WA_MDOCS TO WA_SRNO.
READ TABLE IT_MKPF INTO WA_MKPF WITH KEY MBLNR = WA_MDOCS-MBLNR MJAHR = WA_MDOCS-MJAHR.
IF SY-SUBRC = 0.
WA_SRNO-BUDAT = WA_MKPF-BUDAT.
ENDIF.
APPEND WA_SRNO TO IT_SRNO.
ENDLOOP.
LOOP AT IT_SRNO INTO WA_SRNO WHERE BWART EQ '101'.
READ TABLE IT_SRNO INTO WA_SRNO1 WITH KEY SERNR = WA_SRNO-SERNR
BWART = '122'.
IF SY-SUBRC EQ 0 AND WA_SRNO-MBLNR LT WA_SRNO1-MBLNR.
DELETE IT_SRNO.
ENDIF.
ENDLOOP.
DELETE IT_SRNO WHERE BWART = '122'.
DESCRIBE TABLE IT_SRNO LINES W_COUNT.
SORT IT_MDOCS BY SERNR.
SORT IT_SRNO BY SERNR.
SORT IT_FINAL BY F1.
LOOP AT IT_SRNO.
READ TABLE IT_MDOCS WITH KEY SERNR = IT_SRNO-SERNR.
IF SY-SUBRC = 0 .
IT_SRNO-VALUE = IT_MDOCS-DMBTR.
IT_SRNO-EBELN = IT_MDOCS-EBELN.
READ TABLE IT_FINAL WITH KEY F1 = IT_SRNO-SERNR.
IT_SRNO-CAPDT = IT_FINAL-F2.
CONCATENATE IT_FINAL-F26(4) IT_FINAL-F20(2) IT_FINAL-F2+3(2) INTO IT_SRNO-CAPDT.
CLEAR KNA1.
SELECT SINGLE * FROM KNA1 WHERE KUNNR = IT_FINAL-F3.
IF SY-SUBRC = 0 .
IT_SRNO-KUNNR = IT_FINAL-F2.
IT_SRNO-REGIO = KNA1-REGIO.
ENDIF.
SELECT SINGLE * FROM ZFT_100_ASSET WHERE SERNR = IT_SRNO-SERNR.
IF SY-SUBRC = 0.
IT_SRNO-VALUE = 0 .
ENDIF.
MODIFY IT_SRNO.
MOVE-CORRESPONDING IT_SRNO TO IT_ASSET .
IT_ASSET-ASSET_ACT_DT = IT_SRNO-CAPDT.
CONCATENATE 'A' W_FREENUM2 INTO IT_ASSET-ASSET_ID.
COLLECT IT_ASSET.
MOVE-CORRESPONDING IT_ASSET TO IT_ASSET_POST.
COLLECT IT_ASSET_POST.
ENDIF.
ENDLOOP .
SORT IT_ASSET_POST BY ASSET_ID ASSET_ACT_DT REGIO.
IF PR_TEST NE 'X'.
LOOP AT IT_ASSET_POST.
CLEAR W_FREENUM2.
SELECT SINGLE * FROM ZFT_STATE_COST WHERE REGIO = IT_ASSET_POST-REGIO AND TYPE = 'E' .
IF SY-SUBRC <> 0 .
MESSAGE X899(FI) WITH 'No cost center for the region'.
ENDIF.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
NR_RANGE_NR = '01'
OBJECT = C_NRANGE1
IMPORTING
NUMBER = W_FREENUM2
EXCEPTIONS
INTERVAL_NOT_FOUND = 1
NUMBER_RANGE_NOT_INTERN = 2
OBJECT_NOT_FOUND = 3
QUANTITY_IS_0 = 4
QUANTITY_IS_NOT_1 = 5
INTERVAL_OVERFLOW = 6
BUFFER_OVERFLOW = 7
OTHERS = 8.
IF SY-SUBRC = 0.
ENDIF.
CONCATENATE 'A' W_FREENUM2 INTO IT_ASSET_POST-ASSET_ID.
IT_ASSET_POST-KOSTL = ZFT_STATE_COST-KOSTL.
MODIFY IT_ASSET_POST.
CLEAR ZFT_100_ASSET.
ENDLOOP.
ENDIF.
SORT IT_ASSET_POST BY ASSET_ACT_DT REGIO.
SORT IT_ASSET BY ASSET_ACT_DT REGIO.
LOOP AT IT_ASSET.
READ TABLE IT_ASSET_POST WITH KEY ASSET_ACT_DT = IT_ASSET-ASSET_ACT_DT REGIO = IT_ASSET-REGIO MATNR = IT_ASSET-MATNR.
IF SY-SUBRC = 0 .
IT_ASSET-ASSET_ID = IT_ASSET_POST-ASSET_ID .
IF IT_ASSET-VALUE = 0.
IT_ASSET-TEXT = 'Asset Already Created'.
ELSE.
ENDIF.
MODIFY IT_ASSET.
ENDIF.
ENDLOOP.
ENDFORM. " serial_numbers_get
FORM ASSET_CREATE .
DATA :LW_CNT TYPE I.
LOOP AT IT_ASSET_POST WHERE VALUE > 0.
CLEAR: IT_ASSET1[],LW_CNT.
IT_ASSET1[] = IT_ASSET[].
DELETE IT_ASSET1 WHERE ASSET_ID <> IT_ASSET_POST-ASSET_ID.
DESCRIBE TABLE IT_ASSET1 LINES LW_CNT.
MOVE IT_ASSET_POST-ASSET_ID TO WA_ANLA-ANLN1.
CALL FUNCTION 'ASSET_EXISTENCE_CHECK'
EXPORTING
I_ANLN1 = WA_ANLA-ANLN1
I_BUKRS = '5100'
EXCEPTIONS
ANLAGE_DEAKTIV = 1
ANLAGE_GELOESCHT = 2
ANLAGE_GESPERRT = 3
ANLAGE_NOT_FOUND = 4
ANLAGE_IST_INVM = 5
OTHERS = 6.
IF SY-SUBRC EQ 0.
CONCATENATE TEXT-M02 IT_ASSET_POST-ASSET_ID TEXT-M05 INTO W_MSG SEPARATED BY SPACE.
WA_LOG-MSG = W_MSG.
APPEND WA_LOG TO IT_LOG.
CLEAR: WA_LOG, W_MSG.
CONTINUE.
ENDIF.
IF SY-SUBRC <> 0.
ENDIF.
WA_ANLA-BUKRS = '5100'. "company code
IF IT_ASSET_POST-MATNR = '000000000030000452'.
WA_ANLA-ANLKL = '00009021'. "asset class for STB
ELSEIF IT_ASSET_POST-MATNR = '000000000030000700'.
WA_ANLA-ANLKL = '00009033'. "asset class for HD STB Box
ENDIF.
WA_ANLA-ANLN1 = IT_ASSET_POST-ASSET_ID. "wa_srno-sernr.
CONCATENATE 'STB - ' IT_ASSET_POST-ASSET_ID INTO WA_ANLA-TXT50 SEPARATED BY SPACE.
WA_ANLA-AKTIV = IT_ASSET_POST-ASSET_ACT_DT.
WA_ANLZ-KOSTL = IT_ASSET_POST-KOSTL . "'1711121'.
WA_ANLA-MENGE = LW_CNT.
WA_ANLA-MEINS = 'EA'.
CALL FUNCTION 'CREATE_ASSET'
EXPORTING
I_ANLA = WA_ANLA
I_ANLV =
I_ANLZ = WA_ANLZ
I_DARK = 'X'
I_NASSETS_FIX = ' '
I_CALLED_BY_PURCHASE_ORDER = ' '
TABLES
T_ASSETS = IT_ASSETS
EXCEPTIONS
MISSING_COMPANY_CODE = 1
MISSING_ASSET_CLASS = 2
MISSING_ASSET_MAINNUMBER = 3
INTERNAL_ERROR = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF SY-SUBRC EQ 0.
COMMIT WORK.
SELECT SINGLE * FROM ANLB WHERE BUKRS = '5100' AND ANLN1 = WA_ANLA-ANLN1 AND AFASL = 'Z001'.
IF SY-SUBRC = 0 .
ANLB-AFABG = '20071201'.
MODIFY ANLB.
COMMIT WORK.
ENDIF.
SELECT SINGLE * FROM ANLB WHERE BUKRS = '5100' AND ANLN1 = WA_ANLA-ANLN1 AND AFASL = 'IN14'.
IF SY-SUBRC = 0 .
ANLB-AFABG = '20071201'.
MODIFY ANLB.
COMMIT WORK.
ENDIF. -
I want to display the Employee details in table format without using iGrid
Hi all,
Can anybody help me that I want to display the Employee details return by transaction in table format without using iGrid.Hi, view the link below.
http://help.sap.com/saphelp_xmii115/helpdata/en/Advanced_Topics/Customizing_Output/Customizing_Output.htm
Hope this help.
Danilo Santos -
Bapi to upload and download the leave details
Hi all,
Can u please tell me a bapi to upload and download the leave details for the infotype 2001.
Thanks.Hi
Warning! The API methods "Delete," "Approve," "Create," and "Request," and "Change," as well as their corresponding RFCs:
<b>bapi_absence_delete
bapi_absence_create
bapi_absence_approve
bapi_absence_request
bapi_absence_change</b>
are <b>no longer valid</b>. Using these APIs can create inconsistencies in time data.
Instead, use the corresponding API Methods "ManageDelete," "ManageCreation," and "ManageChange" for the Business Object BUS7007, as well as the following corresponding RFCs:
<b>bapi_ptmgrattabs_mngdelete
bapi_ptmgrattabs_mngcreation
bapi_ptmgrattabs_mngchange</b>
Regards
Raj -
User Exit for tcode PA20 check before displaying the employee details.
Dear All,
I want to restrict some of the user to see the details of some employee.. Can you please suggest how I can achieve this.. I would like the user from viewing the details of the employee even if employee comes in the help. If user select these employee and select an infotype to view the details a message should come You are not allowed to see this details'.
It will be good if we can stop these employee from even coming in the F4 help.
Regards,
Vidya.Hi JB,
Infact we are using the structural authorisation concept. The requirements is to allow the user to see the employee belonging to one site only while the user should be able to view the complete org structure..
We have achieved this by creating a profile which gives access to the complete org unit and restricting the employee for site specific value. This we have achieved by creating a profile in tcode OOSP and then assigning this to the user in OOSB.
This works fine and user is able to see complete org unit and only the people belonging to his site but he is also able to see all the employee who has left the company irrespective of their site.
We don't want the user to see leaver from other site so we were thinking of writting some some code which will stop them from coming in the help or if they appear in the help then stop user from viewing the details of other site leaver.
Please suggest any other way if possible..
Thanks,
Vidya. -
Smartform problem while printing the employee details
Hi,
I am creating a smartform to display the employee pay slips as the report.
the requirement is to display two employee's payslip on the single page.
Suppose:
1 ABC
2. XYZ
On the same page and so on...
How do i do it through smartform.... Any hint?Hi
there is an easy way to do that,
first u need to adapt the size of ur MAIN windows just for 2 registers, inside the MAIN a loop to the table with the data of employee and a template, so write the data there.
with that, the every 2 register the smartform will pass to another page.
It is everything on the MAIN windows,
Regards -
All the employee details also who left the company
Hi
I want to make a query for selecting employee's organization unit, for purpose I have gone through all
pa0001 table but it has so many rows regarding one employee. I needed get all employee organization unit including if the employee left the company also.
I have done a query like
select * from pa0001
where pa0001~endda gt sy-datum.
but I think It will not take the employee who left the company.
Regards
SebastianYes your question is true.
To solve this give following condition.
select * from pa0000
where pa0001~endda <= sy-datum.
if pa0000[] is not initial .
select * from pa0001
for all entries in pa0000
where pernr = pa0000-pernr
and endda = pa0000-endda.
endif.
And as far as you want data for all the employees in employee master with there organization unit.
-- That you can get it from PA0001 so it will solve your query ..
Give good points -
Dear Friends,
I have created one cube with base as a ODS.
Can we download what are the infoobjects involved into that cube and Update rules, Base ODS and Upadate rules and InfoSource and Transfer Rules,
i mean like DataFlow Diagram.
If possible pls suggest me.
Regards,
Rams.hi Rams,
to get the dataflow, you can try right click the infocube and 'display dataflow',
you can save the data flow. and use metadata repository (RSA1-metadata repository), look at 'active objects', choose infocube, and locate your infocube, you can then get the detail info of infoobjects etc.
hope this helps. -
PA30 Display Employee details on the Header Screen
Dear Team:
Sometimes I see that using transaction PA20 or PA30, when I give the Personnel Number, in the header screen, I do not see any employee information for some employees and could able to see other employees.
Anything that restricts us to see the employee details in the header screen.
If it is an authorization issue, what is the check that is restricting the same. Which authorization details should the I have to look for the employee details in the header screen.
Thanks and Regards
Team Member.Below are already avialable in the table.
00 A 60
00 B 80
01 A 01
01 B 21
02 A 02
02 B 22
03 A 03
03 B 23
04 A 04
04 B 24
05 A 18
10 A 00
10 B 20
45 A 45
Regards
Team Member -
Downloading the internal table with header to FTP folder
Hi All,
I have one requirement in downloading the internal table details with the fixed header line to FTP folder. The header line having the fixed text of 425 characters length.
Note: We are not suppose to use WS_DOWNLOAD and GUI_DOWNLOAD function modules.
Thanks in advance for your reply.
Regards
Kamini.Hi,
I can download the internal table details successfully to FTP folder using the FTP function modules like(FTP_CONNECT, FTP_COMMAND , FTP_R/3_TO_SERVER and FTP_DISCONNECT). Here my problem is I am unable to download the internation table with some header text.
You can see the format (example) of file to be download.
Here I can successfully download the below details without the header. But I am unable to download with header line. Could you please suggest me.
seq_no|record_action|trans_date|sku|description|
1|N|2008-01-03 07:52:31|TTASA5025CBO
2|N|2008-01-03 10:28:33|411014
3|N|2008-01-03 10:01:03|TTASA6030CBO
4|N|2008-01-03 10:01:15|TTASA6630CBO
5|N|2008-01-03 10:01:25|TTASA7035CBO
6|N|2008-01-08 16:57:39|TT6G
Regards
Kamini. -
Facing problem in Fetching Employee details
Hello All,
i need to write a abap coding to fetch the employee details from the corresponding table,i worte a code but its is not fetching the details of the employess in to the output,am sending my code along with this thread its great if any body help me out in ths regard,thanks in advance...
NAME : Chandeep Singh
DESCRIPTION : TO GENERATE SIMPLE REPORT USING HR ABAP
LOGICAl DATABASE- PNP .
REPORT zchandeep_hr_prog_1
LINE-SIZE 200 .
*Database Table
TABLES: pernr, " Pernr structure for Logical database
pa0001, " Actions
pa0002. " Personnel Info
*Infotypes
INFOTYPES: 0001, " Actions
0002. " personnel info
*Variable Declaration
DATA: form_nam LIKE p0001-ename,
v_age(5) TYPE c, "variable for calculating age in days
v_ctr1 TYPE i VALUE 0, "counter
v_ctr2 TYPE i VALUE 0, "counter
var(5) TYPE c , " variable to store btrtl
var1(5) TYPE c . " variable to store werks
*Internal Table Decalartion
DATA: BEGIN OF i_tab1 OCCURS 0,
pernr LIKE pa0001-pernr, "employee number
ename LIKE pa0001-ename, "employee name
begda LIKE pa0002-begda, "employee join date
werks LIKE pa0001-werks, "personnel area
btrtl LIKE pa0001-btrtl, "personnel sub area
persg LIKE pa0001-persg, "employee group
persk LIKE pa0001-persk, "employee sub-group
plans LIKE pa0001-plans, "position
gbdat LIKE p0002-gbdat, "date of birth
END OF i_tab1.
*START-OF-SELECTION
START-OF-SELECTION .
GET pernr .
rp-provide-from-last p0001 space pn-begda pn-endda . " Macro for IFT-0001
rp-provide-from-last p0002 space pn-begda pn-endda . " Macro for IFT-0002
**--> Populate internal table
MOVE p0001-pernr TO i_tab1-pernr .
MOVE p0001-ename TO i_tab1-ename .
MOVE p0002-begda TO i_tab1-begda .
MOVE p0001-werks TO i_tab1-werks .
MOVE p0001-btrtl TO i_tab1-btrtl .
MOVE p0001-persg TO i_tab1-persg .
MOVE p0001-persk TO i_tab1-persk .
MOVE p0001-plans TO i_tab1-plans .
MOVE p0002-gbdat TO i_tab1-gbdat .
**--> Append data to internal table
APPEND i_tab1 .
CLEAR i_tab1 . " Clear header I_TAB1******************************
*END-OF-SELECTION
END-OF-SELECTION.
*****sorting the internal table on personnel area & personnel sub-area
SORT i_tab1 BY werks btrtl.
*TOP_OF_PAGE
PERFORM top_of_page.
*Output Display
LOOP AT I_TAB1.
*for calculating the age in days
v_age = sy-datum - i_tab1-gbdat.
*control break on Personal Sub Area
LOOP.
AT NEW pnpbtrtl .
IF sy-tabix NE 1.
FORMAT COLOR COL_NORMAL ON.
WRITE:/5 'Total Number of Employees for personnel Sub-Area:',
var , 'is ',
v_ctr1.
CLEAR v_ctr1.
FORMAT COLOR OFF.
ENDIF.
ENDAT .
ENDLOOP.
**Control Break on personnel Area
LOOP.
AT NEW pnpwerks.
IF sy-tabix NE 1.
FORMAT COLOR COL_TOTAL ON.
WRITE:/5 'Total Number of Employees for Personal Area: ',
var1 ,'is ', v_ctr2. "color col_total. CLEAR V_CTR2.
SKIP 1.
FORMAT COLOR OFF.
ENDIF.
ENDAT .
WRITE:/5
i_tab1-pernr, "personnel number
16 i_tab1-ename, "emp name
47 i_tab1-begda, "join date
60 v_age, "age in days
74 i_tab1-werks, "P area
84 i_tab1-btrtl, "P sub Area
94 i_tab1-persg, "emp group
104 i_tab1-persk, "emp sub group
114 i_tab1-plans. "position
v_ctr1 = v_ctr1 + 1.
v_ctr2 = v_ctr2 + 1.
var = i_tab1-btrtl .
var1 = i_tab1-werks .
ENDLOOP.
*& Form top_of_page
Header Output
FORM top_of_page.
FORMAT COLOR COL_HEADING ON.
WRITE:/5 'Employee',
16 'Employee',
47 'Join Date',
62 'Age',
74 'Personal',
84 'Personal',
94 'Employee',
104 'Employee',
114 'Position ',
/5 'Number',
16 'Name',
60 '(In Days)',
74 'Area',
84 'Sub-Area',
94 'Group',
104 'Sub-Group'.
FORMAT COLOR OFF.
SKIP 1.
ENDFORM. " top_of_pageAfter tables pernr.
write this code :
GET PERNR.
and check the program
Regards,
Srinivas -
Oracle WebADI: How to Download the WebADI Excel File with Parameter
Hello Friends,
How to Download the Oracle WebADI Excel File with Parameter??
For Ex: How to download the Employees for Specific Department from Oracle WebADI.
And After to change the specific changes on Employee Data to Upload.
Thanks in Advance.Hi Team.
Any Advise on it!! -
How to handle the personal details ( Rejoin the organization )
Hi All
I need to update the personal details in HR Master (only rejoin ).
Any FM or BAPI to update the Personal deta details into HR Master ( Only Rejoin).
please specify the infotype and transacation code to update the personal details in HR Master ( Only Rejoin).
Thanks & Regards
K.Gunasekar.For Re-Entry of an employee, you have to perform 'Re-Entry into Company' Personnel Action in PA40. The Personal Information Infotype 0002 will come as per the sequence defined in the infogroup T588D.
Anyhow, most of the employee details already would have been available in the system. Then why do you need to update the Personal Information?
Regards
N Navaneethan -
Resigned employee details reflecting in Customer Advisor Search
Dear Experts,
In DBM while creating a sales order we need to assign the customer advisor for each sales. Based on the employee master data which we have maintained in SAP ECC. Automatically the employee details are reflecting Customer Advisor search column, but it is also showing the resigned employee details in F4 search.
Even though have changed the status of employee as resigned and still its showing the details in DBM.
Kindly advise how to eliminate or restrict the values in search. Kindly share any user manual or procedure document to update the same in DBM.
Thanks & Regards,
Pradeep KrishnamurthyDear Experts,
In DBM while creating a sales order we need to assign the customer advisor for each sales. Based on the employee master data which we have maintained in SAP ECC. Automatically the employee details are reflecting Customer Advisor search column, but it is also showing the resigned employee details in F4 search.
Even though have changed the status of employee as resigned and still its showing the details in DBM.
Kindly advise how to eliminate or restrict the values in search. Kindly share any user manual or procedure document to update the same in DBM.
Thanks & Regards,
Pradeep Krishnamurthy -
Not getting the leave details in the WF12300111
Hi all,
Am using the standard workflow 12300111 for the leave reuest in ESS.
The supervisor of the workflow initiator getting the leave request but he is not able to view the leave details and the leave type. The supervisor is getting only the employee details.
can anyone guide me to resolve dis issue?
Thanks,
Ravi.Hi Ravi,
Kindly check that in the Binding you are passing all the required data that needs to be transferred from 1 container to another. The Supervisor is not able to see leave Details because you have not passed them correctly in the Binding.
Let me know if it helps and even if you have any doubts
With Best Regards,
Kanika
Maybe you are looking for
-
How do I get black side bars on a full screen photo in iPhoto 11
How do I get black side bars on a full screen photo in iPhoto 11. It was black in iPhoto 09 and now it's a murky grey. I'm not talking about events or photo view where it's in preferences only full screen photo. Thanks
-
Convert aep-path in Win-path?
I Have problem with paths. Object File in Extened-script return me next data: "/d/test/file.png". But I want next data: "d:/test/file.png". how can I convert a path?
-
Credit card hacked thru iTunes?
I have a credit card that wasn't stolen, and has no balance on it. However, the day after I made an iTunes purchase for $1 (I bought one song), someone tried to charge $2,700 on my card. My credit card company called me to ask if I authorized that ch
-
Hi All, We are running the create accounting process from AP , I am getting the below error . Need assistance since i have to fix this issue ASAP. The subledger journal entry does not balance in the entered currency. Please verify the entered amoun
-
Acrobat Licensing and feature query
can i install acrobat 5 standard with acrobat 9 professional version? Also can you please share the feature comparison between acrobat 5.0 Std and 9 Pro?