on 09-03-2012 9:08 PM
So, i got this little problem.
I get all the data from this user, we can call it "Jhon doe", But i need the name of the General management. I mean:
General management > data i need
'
'
'
management
'
'
'
jhon doe > data i got.
I just need the name of the General management where my friend "Jhon doe" is working. this is for an abap project so i need a FM or something like that, if one of you can help me,
Thanks in advance.
PD: Sorry for the bad english.
I solved this.
i use the ORGEH from the pa0001 using the pern of my employee
select * into TABLE t0001 from pa0001 where pernr = v_pernr.
SORT t0001 by endda DESCENDING.
READ TABLE t0001 index 1.
v_ORGEH = t0001-ORGEH.
then i look in the table hrp1001 the field SOBID.
SELECT SINGLE sobid
INTOv_sobid FROM hrp1001 WHERE OBJID = v_ORGEH AND PLVAR = '01' AND RSIGN = 'A' AND RELAT = '002'.
and use the FM HR_READ_FOREIGN_OBJECT_TEXT
call function 'HR_READ_FOREIGN_OBJECT_TEXT'
exporting
otype = 'O'
OBJID = v_sobid
* COSTCENTER =
* CONTROLLINGAREA =
* STATUS = '1'
* BEGDA = '18000101'
* ENDDA = '99991231'
* REFERENCE_DATE = SY-DATUM
* LANGU = SY-LANGU
IMPORTING
SHORT_TEXT = General_name 'Name of the General Management'.
OBJECT_TEXT =
COSTCENTER_NAME =
INTEGRATION_ACTIVE =
RETURN =
EXCEPTIONS
NOTHING_FOUND = 1
WRONG_OBJECTTYPE = 2
MISSING_COSTCENTER_DATA = 3
MISSING_OBJECT_ID = 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.
thanks all for you help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can u please explain, what you mean with "general management" ?! What transaction ?
Do you mean "User maintanance", SU01 ? Or some kind of HCR ? Which solution ? ERP, CRM, SRM ?
Greetings
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.