on 09-05-2008 11:13 AM
Hi,
Can any one Tell me .. How to do the same functionality .. given below (select).
Using the Function Module RH_READ_INFTY_1001...
*reads CP (Central Person) based on BP (Business Partner)
Select single objid (Object ID)
from hrp1001
into gv_sobid
where subty eq 'B207'
and sclas eq 'BP'
and sobid eq is_header-partner.
*reads P (Person) Based on determined BP (Business Partner)
select single sobid (ID related Object)
from hrp1001
into gv_sobid
where subty eq 'B209'
and otype eq 'CP'
and objid eq gv_sobid.
*determines UserID from IT0105 for determined personell ID
select single usrid
from pa0105
into gv_usrid
where pernr eq gv_sobid
and subty eq '999'.
Reply ASAP....
Answers will be Rewarded...
Hi,
data: lt_1001 type table of p1001,
wa_1001 type p1001,
lv_objid type P1001-objid.
call function 'RH_READ_INFTY_1001'
exporting
AUTHORITY = 'DISP'
WITH_STRU_AUTH = 'X'
plvar = '01'
otype = 'CP'
objid = lv_objid
istat = '1'
**EXTEND = 'X'
**SUBTY = ' '
begda = sy-datum
endda = sy-datum
**CONDITION = '00000'
**SORT = 'X'
**WITH_EV = ' '
**ADATA = 'X'
**AUTH_SOBID = ' '
tables
i1001 = lt_1001
**OBJECTS =
exceptions
nothing_found = 1
wrong_condition = 2
wrong_parameters = 3
others = 4
.
*-----Read the BP (Business Partner).
read table lt_1001 with key rsign = 'B' relat = '207'.
*-----Read the P (Person).
read table lt_1001 with key rsign = 'B' relat = '209'.
Hope it helps you, pls reply back if you need more info.
Regards
Sunil Kondoju
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
objects-plvar = l_plvar.
objects-otype = 'S '.
objects-sobid = l_positions-objid.
APPEND objects.
*
CLEAR i1001_itab. REFRESH i1001_itab.
CALL FUNCTION 'RH_READ_INFTY_1001'
EXPORTING
* AUTHORITY = 'DISP'
* WITH_STRU_AUTH = 'X'
istat = '1'
* EXTEND = 'X'
subty = 'A008'
begda = l_keyda
endda = l_keyda
* CONDITION = '00000'
* SORT = 'X'
* WITH_EV = ' '
* ADATA = 'X'
TABLES
i1001 = i1001_itab
objects = objects
EXCEPTIONS
nothing_found = 1
wrong_condition = 2
OTHERS = 3.
*
IF sy-subrc <> 0.
CLEAR i1001_itab. REFRESH i1001_itab.
CLEAR mngr_nr.
ELSE.
READ TABLE i1001_itab WITH KEY sclas = 'P'.
IF sy-subrc = 0.
mngr_nr = i1001_itab-sobid.
ELSE.
THis is the sample code to use function module using this function module you can get upto HRP1001 selection for userid you need to use same select you write for PA0105
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
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.