on 2010 May 24 5:30 AM
I have to generate a report that has personnel number,employee name,position and position text.The first three fields are being retrieved from one table ,that is,PA0001 and the last is to be retrived from another table namely HRP1000.Is there any common field in both the tables on which the validation can be applied and data can be retrieved?
can somebody please look into this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Fields in table PA0001 (Organizational Assignment):
PERNR Personnel Number
ENAME Employee Name
PLANS Position
Fields in table T528T (Positions)
PLANS Position
PLSTX Text
So PLANS is the key which can be used to link these 2 tables. You will also have to specify the language code in SPRSL field.
Regards,
Waqas Rashid
Just pass
perform GET_JOB_WORKKEY_TEXT using job_workey_text
value ( here pass p0001-plans) value date ( Pn-begda).
FORM GET_JOB_WORKKEY_TEXT USING JOB_WORKKEY_TEXT
VALUE(JOB_WORKKEY)
VALUE(DATE) TYPE D.
DATA: L_OBJECT_TEXT LIKE P1000-STEXT,
L_SHORT_TEXT LIKE P1000-SHORT.
CALL FUNCTION 'HR_READ_FOREIGN_OBJECT_TEXT'
EXPORTING
OTYPE = 'S'
OBJID = JOB_WORKKEY
STATUS = '1'
BEGDA = DATE
ENDDA = DATE
LANGU = SY-LANGU
IMPORTING
SHORT_TEXT = L_SHORT_TEXT
OBJECT_TEXT = L_OBJECT_TEXT
EXCEPTIONS
NOTHING_FOUND = 1
WRONG_OBJECTTYPE = 2
MISSING_COSTCENTER_DATA = 3
MISSING_OBJECT_ID = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
CLEAR JOB_WORKKEY_TEXT.
ELSE.
IF NOT L_OBJECT_TEXT IS INITIAL.
JOB_WORKKEY_TEXT = L_OBJECT_TEXT.
ELSE.
JOB_WORKKEY_TEXT = L_SHORT_TEXT.
ENDIF.
ENDIF.
ENDFORM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can achive this throug Ad-Hoc Query. No need to go for any Z reports. Try Ad hoc Query using t.code: S_PH0_48000513.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Geetu
have you tried AD-Hoc Query.
Just go to Ad-Hoc Query and select "Personnel Number" from Key fields and "Position" from Organisation assignment.
In the Output just select Value & text and it will display, employee no. name, position and position text.
Regards
Vikas K Sharma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI..
PA0001 will have PLANS - position
then HRP1000 where object type = S and Object ID = PA0001-plans.
You can use PA0001-ENAME for employee name.
cheers
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
112 | |
9 | |
8 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.