Relation ship code for finding manager position..
Hi Experts,
How to find the relationship code for finding Manager position of France and US.
i know that
A012 is the relationship code for France,
What should be the relationship code for US?
Thanks in advance.
Hi
If you take tables QMEL & DRAW / DRAW & QMFE
if u have created a document in CV01N, with the object link has notification... Then you will be able to able both these tables...
Document will be displayed...
Both has same relationships.... you have to maintain the notification in document management system.
Check out the linking details in SPRO - Cross-Application Components - Document Management - Control Data - Define Document types
- Pithan
Similar Messages
-
EHSM Login / T.codes for Incident Management
Hi All,
I am a BW Consultant & got the requirement to develop the Incident Management Reports.
we have SAP standard Extractors for Incident Management to load the Data.
I want to know
1. I need to reconcile my bw report, what are the T.codes for Incident Management,
2. is EHSM is web based / SAP GUI based, if web based...how to login.
3. I have access to ECC where the EHSM is instaled, but I am very new & dont have Idea to login.
Please help me in this...since I dont have any functional consultant here.
THx,Dear Shaik ,
First you will have to ensure you have EHSM roles asssigned to you(i.e SAP_EHSM_MASTER or customized role of it)
Second :once you login select Health and Safety->Overview where you would be able to see incident and incident reports ; also you can select analytical reports to viewing BI data
Third:
Please find the list of data sources in RSA5
0EHSM_HSS_INC_REC Incident Management
0EHSM_HSS_INC_REC_01 Incidents
0EHSM_HSS_INC_REC_02 Injuries
0EHSM_HSS_INC_REC_03 Assets
0EHSM_HSS_INC_REC_04 Financial Transactions
0EHSM_HSS_INC_REC_05 Releases
0EHSM_HSS_INC_REC_06 Actions
0EHSM_HSS_INC_REC_07 Investigations
0EHSM_HSS_INC_REC_08 Risk Matrix
0EHSM_HSS_INC_REC_09 Notices of Violation
0EHSM_HSS_INC_REC_10 HCM Data
0EHSM_HSS_INC_REC-IO Incident Management Master Data
Thanks
GJ -
How to setup a company code for material management
Hi,
While creating material in MM01, in sales org tab, when I gave plant XXXX, it is giving an error "Company code YYYY is not setup for material management".
So can you help me , how to setup a company code for material management
Help is appreciated
thanks
DILHello Sendil,
You can maintain it with trns code OMSY or MMPI/MMPV.
Hope this helps
Regards
Arif Mansuri -
Need a code for finding prime no.s from 0 to 100.
Hi,
i need a code for finding prime no.s from 0 to 100.
Please help me out.
Regards,
Santosh Kotra.hai santosh,
here is an example program to find the prime number...........
EXAMPLE:
DATA: BEGIN OF primes OCCURS 0,
number TYPE i,
exp TYPE i,
END OF primes.
DATA: w_mult TYPE i,
w_limi TYPE i,
w_prem TYPE i.
DATA: w_outp TYPE text132.
DATA: w_rtime TYPE i,
w_stime TYPE p DECIMALS 3.
DEFINE add_part.
sy-fdpos = strlen( &1 ) + 1.
&1+sy-fdpos(*) = &2.
condense &1.
END-OF-DEFINITION.
PARAMETERS: p_numb TYPE i, "number to check
p_fact TYPE c AS CHECKBOX, "display components
p_nbpr TYPE c AS CHECKBOX. "nb of primes
START-OF-SELECTION.
GET RUN TIME FIELD w_rtime.
IF p_nbpr IS INITIAL OR p_numb LE 12000.
PERFORM eratostene USING p_numb.
add_part w_outp p_numb.
READ TABLE primes WITH KEY number = p_numb.
IF sy-subrc = 0.
add_part w_outp 'is prime'.
ELSE.
IF p_fact IS INITIAL.
add_part w_outp 'is not prime'.
ELSE.
add_part w_outp '='.
w_limi = p_numb.
LOOP AT primes WHERE exp GT 0.
CHECK primes-number LE w_limi.
IF w_prem GT 0.
add_part w_outp '*'.
ENDIF.
IF primes-exp GT 1.
add_part w_outp '('.
add_part w_outp primes-number.
add_part w_outp '^'.
add_part w_outp primes-exp.
add_part w_outp ')'.
ELSE.
add_part w_outp primes-number.
ENDIF.
w_limi = w_limi / ( primes-number ** primes-exp ).
IF w_limi = 1.
EXIT.
ENDIF.
w_prem = 1.
ENDLOOP.
ENDIF.
ENDIF.
WRITE: / w_outp.
IF NOT p_nbpr IS INITIAL.
DESCRIBE TABLE primes LINES sy-tmaxl.
CLEAR: w_outp.
add_part w_outp 'Number of primes:'.
add_part w_outp sy-tmaxl.
WRITE: / w_outp.
SKIP.
LOOP AT primes.
WRITE: / primes-number.
ENDLOOP.
ENDIF.
ELSE.
PERFORM factors.
ENDIF.
GET RUN TIME FIELD w_rtime.
w_stime = w_rtime / 1000000.
SKIP.
CLEAR: w_outp.
add_part w_outp 'Calculation time:'.
add_part w_outp w_stime.
WRITE: / w_outp.
FORM eratostene *
FORM eratostene USING in_number TYPE i.
DATA: BEGIN OF no_primes OCCURS 0,
number TYPE i,
END OF no_primes.
DATA: cnum TYPE i,
dnum TYPE i,
limi TYPE i,
mult TYPE i,
puis TYPE i,
cmod TYPE i.
IF NOT ( p_fact IS INITIAL AND p_nbpr IS INITIAL ).
limi = in_number.
ELSE.
limi = sqrt( in_number ).
ENDIF.
cnum = 2.
WHILE cnum LE limi.
READ TABLE no_primes WITH KEY number = cnum.
IF sy-subrc NE 0.
primes-number = cnum.
mult = 2.
puis = 1.
dnum = mult * cnum.
WHILE dnum LE in_number.
READ TABLE no_primes WITH KEY number = dnum.
IF sy-subrc NE 0.
no_primes-number = dnum.
APPEND no_primes.
ENDIF.
IF NOT p_fact IS INITIAL.
cmod = dnum MOD ( cnum ** puis ).
IF cmod = 0.
cmod = in_number MOD ( cnum ** puis ).
IF cmod = 0.
primes-exp = puis.
puis = puis + 1.
ENDIF.
ENDIF.
ENDIF.
mult = mult + 1.
dnum = mult * cnum.
ENDWHILE.
APPEND primes.
CLEAR: primes.
ENDIF.
cnum = cnum + 1.
ENDWHILE.
ENDFORM.
FORM factors *
FORM factors.
DATA: ex_factors TYPE string,
mod TYPE i,
still TYPE f,
factor TYPE i,
exponent TYPE i,
square TYPE f,
fac_string TYPE text40,
exp_string TYPE text40.
IF p_numb LE 3.
ex_factors = p_numb.
ELSE.
factor = 2.
still = p_numb.
DO.
CLEAR: exponent.
mod = still MOD factor.
WHILE mod = 0.
exponent = exponent + 1.
still = still div factor.
mod = still MOD factor.
ENDWHILE.
IF exponent EQ 1.
fac_string = factor.
CONCATENATE ex_factors '*' fac_string
INTO ex_factors
SEPARATED BY space.
CONDENSE ex_factors.
ELSEIF exponent GT 1.
fac_string = factor.
exp_string = exponent.
CONCATENATE ex_factors '* (' fac_string
'^' exp_string ')'
INTO ex_factors
SEPARATED BY space.
CONDENSE ex_factors.
ENDIF.
factor = factor + 1.
square = factor ** 2.
IF square GT still.
EXIT.
ENDIF.
ENDDO.
IF still GT 1.
CATCH SYSTEM-EXCEPTIONS convt_overflow = 1.
fac_string = factor = still.
ENDCATCH.
IF sy-subrc NE 0.
fac_string = still.
ENDIF.
CONCATENATE ex_factors '*' fac_string
INTO ex_factors
SEPARATED BY space.
CONDENSE ex_factors.
ENDIF.
SHIFT ex_factors UP TO '*'.
SHIFT ex_factors BY 2 PLACES.
ENDIF.
WRITE: / p_numb RIGHT-JUSTIFIED.
IF ex_factors CA '*^'.
WRITE: '=', ex_factors.
ELSE.
WRITE: 'is prime'.
ENDIF.
ENDFORM.
HOPE THIS WILL BE HELPFULL.
regards
praba. -
Code for finding CPU utilisation for executing query
Hi, i need code for finding CPU utilisation for executing the particular query.
Use session tracing, then in trace file you can find cpu utilization for particular statement on each phase: parse, execute, fetch and the overall.
Or You can use the dbms_utility.get_cpu_time (if your database is 10g) in pl/sql:
declare
cpt1 pls_integer;
cpt2 pls_integer;
cputime pls_integer;
begin
cpt1:=sys.dbms_utility.get_cpu_time;
<some code here>
cpt2:=sys.dbms_utility.get_cpu_time;
cputime:=cpt2-cpt1;
end;
good luck -
Sample code for Org Management
Hi,
I am new to Org Management coding in HR ABAP.
Can anybody post some simple sample code for Org. Management so that I can understand the flow of coding..
Thanks and Regards,
RamHi
see the sample code using Orgn management infotypes like HRP1000 etc
report zporgr0040
line-size 108
line-count 60(1)
no standard page heading
message-id zndc.
Database Tables
tables: hrp1001, " HR Master Record (Orgn. Assignment)
pa0002, " Personal Data
t528t, " Position Texts
t527x, " Org Unit Text
t528b, " Positions
csks, " Cost Center
cskt. " Cost Center Texts
Declaration of Internal Tables
Internal Table for Orgn Object Data HRP1000
data: begin of obj_tab occurs 0,
otype like hrp1000-otype, " Object Type
objid like hrp1000-objid, " Object ID
plvar like hrp1000-plvar, " Plan Version
istat like hrp1000-istat, " Planning Status
begda like hrp1000-begda, " Begin date
endda like hrp1000-endda, " End date
end of obj_tab.
Internal Table for Active Employees data PA0000
data: begin of stat_tab occurs 0,
pernr like pa0000-pernr, " Object Type
begda like pa0000-begda, " Begin date
endda like pa0000-endda, " End date
stat2 like pa0000-stat2, " Employment Status
end of stat_tab.
Internal Table for Actual Orgn Assignment Data PA0001
data: begin of act_tab occurs 0,
pernr like pa0001-pernr, " Object Type
begda like pa0001-begda, " Begin date
endda like pa0001-endda, " End date
kostl like pa0001-kostl, " Cost Center
orgeh like pa0001-orgeh, " Org Unit
plans like pa0001-plans, " Position
natio like pa0002-natio, " Nationality
end of act_tab.
Internal Table for Orgn Data HRP1001
data: begin of org_tab occurs 0,
otype like hrp1001-otype, " Object Type
objid like hrp1001-objid, " Object ID
plvar like hrp1001-plvar, " Plan Version
istat like hrp1001-istat, " Planning Status
begda like hrp1001-begda, " Begin date
endda like hrp1001-endda, " End date
subty like hrp1001-subty, " Sub Type
sclas like hrp1001-sclas, " Type of Related Object
sobid like hrp1001-sobid, " Id of Related Object
kostl like pa0001-kostl, " Cost Center
plstx like t528t-plstx, " Position Text
orgtx like t527x-orgtx, " Org Unit Text
end of org_tab.
Internal Table for Position Calculations
data: begin of org1_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
objid like hrp1001-objid, " Object ID
end of org1_tab.
Internal Table for Position Calculations
data: begin of org2_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
count type i, " No of Positions
end of org2_tab.
Internal Table for Actual Manpower Calculations
data: begin of act1_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
natio like pa0002-natio, " Nationality
plans like pa0001-plans, " Position
end of act1_tab.
Internal Table for Actual Manpower Calculations(UAE)
data: begin of act2_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
natio like pa0002-natio, " Nationality
end of act2_tab.
Internal Table for Actual Manpower Calculations(Others)
data: begin of act3_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
natio like pa0002-natio, " Nationality
end of act3_tab.
Internal Table for Actual Manpower Calculations(UAE)
data: begin of act4_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
count1 type i, " No of Positions(UAE)
end of act4_tab.
Internal Table for Actual Manpower Calculations(OTHERS)
data: begin of act5_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
count2 type i, " No of Positions(Others)
end of act5_tab.
Internal Table for Vaccancies Data
data: begin of vac_tab occurs 0,
plvar like hrp1007-plvar, " Plan Version
otype like hrp1007-otype, " Object Type
objid like hrp1007-objid, " Object ID
istat like hrp1007-istat, " Planning Status
begda like hrp1007-begda, " Begin date
endda like hrp1007-endda, " End date
vacan like hrp1007-vacan, " Vacancy Indicator
status like hrp1007-status, " Status of Vacancy
end of vac_tab.
Internal Table to store the Report Output data
data : begin of rep_tab occurs 0 ,
kostl(10) type n, " Cost Cente
plans like pa0001-plans, " Position
vacan like hrp1007-vacan, " Vacancy Indicator
status like hrp1007-status, " Status of Vacancy
plstx like t528t-plstx, " Position Text
orgtx like t527x-orgtx, " Org Unit Text
end of rep_tab.
Internal Table to store the Report Output data
data : begin of rep1_tab occurs 0 ,
kostl(10) type n, " Cost Cente
cnt type i, " No of Vacancies
end of rep1_tab.
Internal Table to store the Report Output data
data : begin of rep2_tab occurs 0 ,
kostl(10) type n, " Cost Cente
app_no type i, " Approved
nat_no type i, " National
exp_no type i, " Expatriate
tot_no type i, " Total
vac_no type i, " Vacancies
end of rep2_tab.
Declaration of Variables
data: v_sobid like hrp1001-sobid, " Object Id
v_sobid1 like hrp1001-sobid, " Object Id
v_sobid2 like hrp1001-sobid, " Object Id
v_sclas like hrp1001-sclas, " Related Obj Type
v_subty like hrp1001-subty, " Related Object Id
v_otype like hrp1007-otype, " Object Type
v_str(9) type c, " Text
v_str1(10) type c, " Text
v_cnt like sy-tabix. " Table Index
Declaration of Constants
constants : c_x type c value 'X', " Flag
c_stat1 like pa0000-stat2 value '3', " Emp Status
c_plan like hrp1001-plvar value '01', " Plan Version
c_name like hrp1000-uname value 'SAP', " Uname
c_uae like pa0002-natio value 'AE', " Country
c_type like hrp1007-otype value 'O', " Object Type
c_otype like hrp1007-otype value 'S', " Object Type
c_stat like hrp1007-status value '0', " Status
c_pstat like hrp1007-istat value '1', " Plang Status
c_sclas like hrp1001-sclas value 'K', " Rel. Obj Type
c_subty like hrp1001-subty value 'A002', " Related ObjId
c_subty2 like hrp1001-subty value 'A003', " Related ObjId
c_sclas1 like hrp1001-sclas value 'O', " Rel.Obj Type
c_subty1 like hrp1001-subty value 'A011', " Rel.Object Id
c_kokrs like coej-kokrs value '1000'. " Controlling Area
Selection Screen
selection-screen begin of block b1 with frame title text-001.
parameters :
p_date like pa0001-begda obligatory default sy-datum. " Date
select-options :
s_kostl for csks-kostl, " Cost Center
s_plans for t528b-plans. " Position ID
selection-screen end of block b1.
At selection-screen
at selection-screen.
Validate the Selection Screen fields
perform validate_screen.
Start-of-Selection
start-of-selection.
Get the Orgn data from database Table HRP1001
perform get_org_data.
Get the Actual Manpower from PA0001
perform get_act_data.
Get the Vaccancies data from database Table HRP1007
perform get_vac_data.
Append the data into final Internal Table
perform append_data.
Top-of-page
top-of-page.
Write the Report and Column Headings
perform top_of_page.
End-of-Page
end-of-page.
write /1(108) sy-uline.
End-of-Selection
end-of-selection.
Display the Output Report.
perform display_report.
Form-Routines
*& Form validate_screen
Validation of selection Screen fields
form validate_screen.
Validation of Position ID
clear t528b.
if not s_plans[] is initial.
select single plans
into t528b-plans
from t528b
where plans in s_plans.
if sy-subrc <> 0.
message e999 with 'Invalid Position ID'(009).
endif.
endif.
Validation of Cost Center
clear csks.
if not s_kostl[] is initial.
select single kostl
into csks-kostl
from csks
where kostl in s_kostl.
if sy-subrc <> 0.
message e999 with 'Invalid Cost Center'(008).
endif.
endif.
endform. "validate_screen
*& Form get_org_data
Get the Orgn Data from Database Table HRP1001
form get_org_data.
v_str = 'Developee'(002).
v_str1 = 'Deployment'(003).
Select All the Positions from HRP1000
select otype " Object Type
objid " Object ID
plvar " Plan Version
istat " Planning Status
begda " Begin date
endda " End date
into table obj_tab
from hrp1000
where otype = c_otype and
plvar = c_plan and
istat = c_pstat and
begda le p_date and
endda ge p_date and
objid in s_plans and
uname ne c_name.
sort obj_tab by otype objid.
Get the Orgn and Cost Center for all the above Positions
if not obj_tab[] is initial.
select otype " Object Type
objid " Object ID
plvar " Plan Version
istat " Planning Status
begda " Begin date
endda " End date
subty " Sub Type
sclas " Type of Related Object
sobid " Id of Related Object
into table org_tab
from hrp1001
for all entries in obj_tab
where otype = c_otype and
plvar = c_plan and
istat = c_pstat and
begda le p_date and
endda ge p_date and
sclas eq c_sclas1 and
subty eq c_subty2 and
objid eq obj_tab-objid.
endif.
sort org_tab by otype objid.
Get the Cost Center
loop at org_tab.
v_otype = c_otype. " S
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid = org_tab-objid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
org_tab-kostl = hrp1001-sobid+0(10).
else.
v_otype = c_otype. " S
v_sclas = c_sclas1. " O
v_subty = c_subty2. " A003
v_sobid = org_tab-objid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
v_otype = c_type. " O
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid1 = v_sobid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc <> 0.
v_otype = c_type. " O
v_sclas = c_sclas1. " O
v_subty = c_subty. " A002
v_sobid = v_sobid1.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
v_otype = c_type. " O
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid2 = v_sobid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc <> 0.
v_otype = c_type. " O
v_sclas = c_sclas1. " O
v_subty = c_subty. " A002
v_sobid = v_sobid2.
perform get_org using v_otype v_sclas v_subty
v_sobid.
else.
org_tab-kostl = hrp1001-sobid+0(10).
endif.
endif.
else.
org_tab-kostl = hrp1001-sobid+0(10).
endif.
else.
v_otype = c_otype. " S
v_sclas = c_otype. " S
v_subty = c_subty. " A002
v_sobid = org_tab-objid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
v_otype = c_otype. " S
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid1 = v_sobid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc <> 0.
v_otype = c_otype. " S
v_sclas = c_sclas1. " O
v_subty = c_subty2. " A003
v_sobid = v_sobid1.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc = 0.
v_otype = c_type. " O
v_sclas = c_sclas. " K
v_subty = c_subty1. " A011
v_sobid2 = v_sobid.
perform get_org using v_otype v_sclas v_subty
v_sobid.
if sy-subrc <> 0.
v_otype = c_type. " O
v_sclas = c_sclas1. " O
v_subty = c_subty. " A002
v_sobid = v_sobid2.
perform get_org using v_otype v_sclas v_subty
v_sobid.
else.
org_tab-kostl = hrp1001-sobid+0(10).
endif.
endif.
else.
org_tab-kostl = hrp1001-sobid+0(10).
endif.
endif.
endif.
endif.
Get the Position Text
clear t528t.
select single plstx from t528t into t528t-plstx
where sprsl = sy-langu and
otype = c_otype and
plans = org_tab-objid.
org_tab-plstx = t528t-plstx.
Get the Org Unit Text
clear t527x.
select single orgtx from t527x into t527x-orgtx
where sprsl = sy-langu and
orgeh = org_tab-sobid+0(8).
org_tab-orgtx = t527x-orgtx.
modify org_tab index sy-tabix.
clear v_sobid.
endloop.
sort org_tab by otype objid.
Calculate the Approved No of Positions
loop at org_tab.
if org_tab-kostl in s_kostl.
move-corresponding org_tab to org1_tab.
append org1_tab.
clear org1_tab.
endif.
endloop.
sort org1_tab by kostl objid.
clear v_cnt.
loop at org1_tab.
at end of kostl.
sy-tabix = sy-tabix - v_cnt.
org2_tab-kostl = org1_tab-kostl.
org2_tab-count = sy-tabix.
v_cnt = v_cnt + sy-tabix.
append org2_tab.
clear:org2_tab.
endat.
endloop.
sort org2_tab by kostl.
endform. "get_org_data
*& Form get_act_data
Get the Actual Manpower Data from Database Table PA0001
form get_act_data.
clear : stat_tab, act_tab.
refresh: stat_tab, act_tab.
Get all the Active Employees
select pernr " Object Type
begda " Begin date
endda " End date
stat2 " Emp Status
into table stat_tab
from pa0000
where stat2 eq c_stat1 and
begda le p_date and
endda ge p_date.
sort act_tab by pernr.
if not stat_tab[] is initial.
select pernr " Object Type
begda " Begin date
endda " End date
kostl " Cost Center
orgeh " Org Unit
plans " Position
into table act_tab
from pa0001
for all entries in stat_tab
where pernr eq stat_tab-pernr and
kostl in s_kostl and
plans in s_plans and
persg eq '1' and
begda le p_date and
endda ge p_date.
endif.
sort act_tab by pernr.
loop at act_tab.
move-corresponding act_tab to act1_tab.
clear pa0002-natio.
select single natio into pa0002-natio from pa0002
where pernr = act_tab-pernr.
if sy-subrc = 0.
act1_tab-natio = pa0002-natio.
endif.
append act1_tab.
clear act1_tab.
endloop.
sort act1_tab by kostl natio.
Calculate the Local and Expatriate Manpower
loop at act1_tab.
if act1_tab-natio = c_uae.
act2_tab-kostl = act1_tab-kostl.
act2_tab-natio = act1_tab-natio.
else.
act3_tab-kostl = act1_tab-kostl.
act3_tab-natio = act1_tab-natio.
endif.
append: act2_tab, act3_tab.
clear : act2_tab,act3_tab.
endloop.
sort act2_tab by kostl.
sort act3_tab by kostl.
Actual UAE Manpower
clear v_cnt.
loop at act2_tab.
at end of kostl.
sy-tabix = sy-tabix - v_cnt.
act4_tab-kostl = act2_tab-kostl.
act4_tab-count1 = sy-tabix.
v_cnt = v_cnt + sy-tabix.
append act4_tab.
clear:act4_tab.
endat.
endloop.
sort act4_tab by kostl.
Other Countries
clear v_cnt.
loop at act3_tab.
at end of kostl.
sy-tabix = sy-tabix - v_cnt.
act5_tab-kostl = act3_tab-kostl.
act5_tab-count2 = sy-tabix.
v_cnt = v_cnt + sy-tabix.
append act5_tab.
clear:act5_tab.
endat.
endloop.
sort act5_tab by kostl.
endform. "get_act_data
*& Form get_org
Get the Cost Center from Parent Org Id
form get_org using p_v_otype p_v_sclas p_v_subty p_v_sobid.
clear hrp1001.
select single * from hrp1001
where otype = p_v_otype and
plvar = c_plan and
istat = c_pstat and
begda le p_date and
endda ge p_date and
sclas eq p_v_sclas and
subty eq p_v_subty and
objid eq p_v_sobid.
v_sobid = hrp1001-sobid+0(8).
endform. " get_org
*& Form get_vac_data
Get the Vaccancies Data from Database Table HRP1007
form get_vac_data.
if not org_tab[] is initial.
select plvar " Plan Version
otype " Object Type
objid " Object ID
istat " Planning Status
begda " Begin date
endda " End date
vacan " Vacancy Indicator
status " Status of Vacancy
into table vac_tab
from hrp1007
for all entries in org_tab
where plvar = c_plan and
otype = c_otype and
istat eq c_pstat and
objid = org_tab-objid and
begda le p_date and
endda ge p_date and
vacan eq c_x and
status eq c_stat.
endif.
sort vac_tab by plvar otype objid.
Get the HR data into the rep_tab Internal Table
loop at vac_tab.
rep_tab-plans = vac_tab-objid.
rep_tab-vacan = vac_tab-vacan.
rep_tab-status = vac_tab-status.
read table org_tab with key objid = vac_tab-objid.
if sy-subrc = 0.
rep_tab-kostl = org_tab-kostl.
rep_tab-plstx = org_tab-plstx.
rep_tab-orgtx = org_tab-orgtx.
endif.
append rep_tab.
clear rep_tab.
endloop.
loop at rep_tab.
if not rep_tab-kostl in s_kostl.
delete rep_tab index sy-tabix.
endif.
endloop.
sort rep_tab by kostl plans.
delete rep_tab where plstx cs v_str.
delete rep_tab where orgtx cs v_str1.
Calculate the Count of Vacancies in each Division
clear v_cnt.
loop at rep_tab.
at end of kostl.
sy-tabix = sy-tabix - v_cnt.
rep1_tab-kostl = rep_tab-kostl.
rep1_tab-cnt = sy-tabix.
v_cnt = v_cnt + sy-tabix.
append rep1_tab.
clear:rep1_tab.
endat.
endloop.
sort rep1_tab by kostl.
endform. "get_vac_data
*& Form append_data
Append the data into final Internal Table
form append_data.
loop at org2_tab.
rep2_tab-kostl = org2_tab-kostl.
rep2_tab-app_no = org2_tab-count.
read table act4_tab with key kostl = org2_tab-kostl
binary search.
if sy-subrc = 0.
rep2_tab-nat_no = act4_tab-count1.
endif.
read table act5_tab with key kostl = org2_tab-kostl
binary search.
if sy-subrc = 0.
rep2_tab-exp_no = act5_tab-count2.
endif.
read table rep1_tab with key kostl = org2_tab-kostl
binary search.
if sy-subrc = 0.
rep2_tab-vac_no = rep1_tab-cnt.
endif.
rep2_tab-tot_no = rep2_tab-nat_no + rep2_tab-exp_no.
append rep2_tab.
clear rep2_tab.
endloop.
sort rep2_tab by kostl.
endform. "append_data
*& Form top_of_page
Write the Report and Column Headings
form top_of_page.
skip.
format color col_heading on.
write: /1(108) 'NATIONAL DRILLING COMPANY'(010) centered,
/1(108) 'Summary of Manning Level Report'(011) centered.
format color off.
skip.
write: /2 'Key Date :'(013), p_date,
75 'Report Run Date:'(041), sy-datum.
if not s_kostl[] is initial.
if s_kostl-high is initial.
write: /2 'Cost Center :'(023), s_kostl-low,
75 'Time :'(042), sy-uzeit.
else.
write: /2 'Cost Center From:'(024), s_kostl-low+7(3),
'To'(022), s_kostl-high,
75 'Time :'(042), sy-uzeit.
endif.
else.
write: /75 'Time :'(042), sy-uzeit.
endif.
if not s_plans[] is initial.
if s_plans-high is initial.
write: /2 'Position Id :'(019), s_plans-low,
75 'User :'(043), sy-uname.
else.
write: /2 'Position Id From:'(021), s_plans-low,
'To'(022), s_plans-high,
75 'User :'(043), sy-uname.
endif.
else.
write: /75 'User :'(043), sy-uname.
endif.
write: /75 'Page No :'(044), sy-pagno.
skip.
write /1(108) sy-uline.
format color col_heading.
write:/1 sy-vline,
12 sy-vline, 53 sy-vline,
64 sy-vline, 65(32) 'Actual'(018) centered,
97 sy-vline,108 sy-vline.
write:/1 sy-vline, 2(10) 'CostCenter'(014),
12 sy-vline, 13(40) 'Description'(026) centered,
53 sy-vline, 54(10) 'Approved'(025) centered,
64 sy-vline, 65(32) sy-uline,
97 sy-vline, 98(10) 'Vacancies'(017),
108 sy-vline.
write:/1 sy-vline,
12 sy-vline, 53 sy-vline,
64 sy-vline, 65(10) 'National'(015) centered,
75 sy-vline, 76(10) 'Expatriate'(020) centered,
86 sy-vline, 87(10) 'Total'(016) centered,
97 sy-vline,108 sy-vline.
format color off.
write /1(108) sy-uline.
endform. "top_of_page
*& Form Display_report
Write the Report Output
form display_report.
if rep2_tab[] is initial.
message i999 with
'No Data found for the entered Selection'(035).
else.
loop at rep2_tab.
Authorization Check for the Orgn and Cost Centers
perform auth_check_org.
if sy-subrc = 0.
clear cskt.
select single ltext into cskt-ltext from cskt
where spras = sy-langu and
kokrs = c_kokrs and
kostl = rep2_tab-kostl.
format color col_normal.
write: /1 sy-vline, 2(10) rep2_tab-kostl+7(3),
12 sy-vline, 13(40) cskt-ltext,
53 sy-vline, 54(10) rep2_tab-app_no,
64 sy-vline, 65(10) rep2_tab-nat_no,
75 sy-vline, 76(10) rep2_tab-exp_no,
86 sy-vline, 87(10) rep2_tab-tot_no,
97 sy-vline, 98(10) rep2_tab-vac_no,
108 sy-vline.
format color off.
at last.
sum.
format color 3.
write /1(108) sy-uline.
write: /1 sy-vline, 2(10) 'Total'(027),
12 sy-vline,
53 sy-vline, 54(10) rep2_tab-app_no,
64 sy-vline, 65(10) rep2_tab-nat_no,
75 sy-vline, 76(10) rep2_tab-exp_no,
86 sy-vline, 87(10) rep2_tab-tot_no,
97 sy-vline, 98(10) rep2_tab-vac_no,
108 sy-vline.
format color off.
endat.
endif.
endloop.
endif.
write /1(108) sy-uline.
endform. " Display_report
*& Form auth_check_org
Authorization Check for the Orgn and Cost Center
form auth_check_org.
authority-check object 'ZNDCHROM'
id 'PLVAR' dummy
id 'OTYPE' dummy
id 'KOSTL' field rep2_tab-kostl.
endform. "auth_check_org
<b>Reward points for useful Answers</b>
Regards
Anji -
I found the code for centering a back ground image:
background-position:center;
but this puts it dead center. I want the image to be top
center.
I assume it's easy, just can't find it...
Thanks!background-position:top center;
Alec
Adobe Community Expert -
Code for finding the factorial of a no
program for finding the factorial of a no........
hi
the following are the 2 different codes for factorial
PARAMETERS:
P_NUMBR TYPE I.
DATA:
W_FACT TYPE I VALUE 1,
W_TEMP TYPE I.
W_TEMP = P_NUMBR.
DO P_NUMBR TIMES.
W_FACT = W_FACT * W_TEMP.
SUBTRACT 1 FROM W_TEMP.
ENDDO.
WRITE: W_FACT.
USING MACROS
DEFINE FACTORIAL. " Define macro
DO 5 TIMES. " Do 5 times
IF &1 GT 5.
EXIT.
ELSE.
&2 = &1 * &2.
WRITE: /'The factorial of &1 is'(001),&2.
ENDIF. " Endif
&1 = &1 + 1.
ENDDO. " Enddo
END-OF-DEFINITION.
DATA:
w_fact TYPE I VALUE 1, " Factorial
w_temp TYPE I VALUE 1. " Temp
FACTORIAL w_temp w_fact.
regards,
kiran kumar k -
hi to all
can anybody gives the mostly used t-codes for HU ManagementThe following are some of the most common transactions in HUM for your reference:
HU02 Creating and Changing Handling Units
HU03 Display of HUs
HU04 Creation of HUs with stock
HUMO HU Monitor
HUPAST Packing Station
VLMOVE Posting General Goods Movements (with HU)
HUCANC Matl Doc. Cancellation of HU Gds Mvt
For the use of HU in manufacturing environment, you may also find the following important transactions:
HUP1 HU creation in production
COPAWA - Components Packing for work order, Material staging with HU
COWBPACK - Finished Product, Packing in Production
COWBHUWA - Goods Issue for Work Order
COWBHUWE - Goods Receipt for Work Order
Hope the above answers your enquiry. -
T-codes for warehouse management
hi.
can anybody gives the mostly used t-codes for warehouse managementSAP WMS - Decentralized Warehouse Management System Integration Setup
You can operate the SAP Warehouse Management System (WMS) as a stand-alone decentralized system that is independent of a central Enterprise Resource Planning (ERP) System.
You make the necessary settings for the ERP (Enterprise Resource Planning) system within the WMS component (Warehouse Management System).
The steps are set up as a checklist and guide you through the process of configuring the system parameters.
Checklist (For those with the Table Views used transaction code SM30).
1. Customizing for "Enterprise Structure"
- Create storage location in OX09 (if necessary).
- Define warehouse number in Views V_T3001.
(you should not copy the warehouse number in the ERP system)
Activities within a warehouse, like goods movements and physical inventory, are assigned to a specific
warehouse number.
The physical warehouse where these activities take place is identified by the warehouse number.
- Assign plant/storage location to warehouse number in Views V_T320.
(Valid if the component MM-IM (Inventory Management) is implemented.)
Fields : Plant + Sloc + WhN
2. Customizing for "Decentralized WMS integration", section "Central processing" -> Application
- Activate decentralized WMS in Views V_T340DM.
- Define interface to Inventory Management in Views :-
V_156S_WM - Assign WM movement type references to IM movement types
V_T3211 - Delivery-Relevant Parameters for Reference Movement Type
V_T340DL - Delivery-Relevant Data for Warehouse Number
- Exclude stock in decentralized WMS in Views V_T321B
(if the decentralized WMS is not an SAP R/3 system)
- Finally do a consistency check for decentralised WMS in transaction OL20.
3. Customizing for "Application Link Enabling (ALE)", section "Basis Components"
Maintaining Logical Systems in Views V_TBDLS.
Assign logical system to client in Views T000.
4. Make basic settings for RFC in transaction BD97.(if necessary)
5. Customizing for "Application Link Enabling (ALE)", section "Maintain Distribution Model"
You can define the Reduce message types and Activate message types in transaction BD53.
SAP recommends that you use message types :
"MATMAS" (material master tables) and
"DEBMAS" (customer master) as a template.
Be aware that only those fields that are absolutely necessary are transferred from the master data tables in
the ERP system to the decentralized WMS.
6. Customizing for "Decentralized WMS integration", section "Central processing" -> Distribution
Use transaction OL19 to generate distribution model. As far as the application is concerned, when the model
is generated, application-specific Customizing parameters are modified or set (for example, activate
decentralized WMS).
Display or check distribution model
Generate partner profile in transaction BD82.
(you can also perform this activity using ALE Customizing)
Distribute distribution model in transaction BD64 (model view) using menu item "Edit"
If both the ERP system and the decentralized WMS are SAP R/3 systems, the distribution model should be
distributed on a central basis only, that is, via the ERP system.
7. Customizing for "Application Link Enabling (ALE)", section "Maintain Distribution Model" (transaction BD64)
Activate the change pointers for master data distribution using transactin BD61.
If necessary, reduce the message types concerned with transaction BD53.
8. Customizing for
"Logistics - General" - "Material Master" - "Tools" - "Data Transfer : Material Master" -
-> "Define required-field check for ALE/Direct Input" (Views V_T130S)
Define whether an error message should be generated in the receiving system for required fields
from the material master.
Reward points if useful. -
Basic Transaction Codes for RailCAr Management
Hi,
I am looking for some basic Transaction Codes for Rail Car Management especially loads and unloads.
Anyone please?
RegardsHello Shirley,
I assume that you are using either Event Management to collect the load/unload events OR your manually entering this data onto the Freight Unit?
If the answer to the above information is correct, then it would depend where you are storing this data. Are you adding the data to the Freight Orders or to the Freight Units? If you are using FOs then some of the fields might be present on the FO work list and you could create a query/view there to view this data. There is also a work list on the FWO side but it would only contain a summary of the FUs. That is due to the one to many relationship between FWOs and FUs.
You might be better off building an ALV report to gather the fields that you need. Alternatively this could be done in SQVI but it is more limited.
An alternative to all of this if your using Event Management, is that you could produce a report in EM to give you this information. This however would only be possible if you are sharing all of the info that you need in the report with EM.
Hope that helps
Devin -
Hi everyone,
I have a list of about 500 entries, with each entry being formatted as follows:
Firstname [tab] Lastname [tab] State [tab] Level
I need to perform a find/change operation using some GREP code that will target the tab between the first and last name and replace it with a space. Then I need to target the tab between the last name and the state and replace it with a comma and a space. Then finally I need to target the tab between the state and level and also replace it with a comma and space.
I wondered if someone could tell me what the code would be for this type of operation?
Appreciate any assistance.You can also do it in a single search:
Find
(.+?)\t(.+?)\t(.+?)\t
Replace
$1 $2, $3,
(there's a space after the $3,) -
Use, purpose, related t-codes for "INVOIC_FI_INBOUND"
Hi all,
I am new to badi and suddenly i got requirement to work with this badi - INVOIC_FI_INBOUND.
I need the (1) Use of this badi
(2) Purpose of this badi
(3) I need all the T-codes which are used for this badi or the respective T-codes which are related to this badi
(4) why we are using this badi
(5) how to use this badi
Thanks in advance,
KarthikSo, there's a requirment to use this BADI, and you don't know what the BADI is for, nor why you need to use it. How was the requirement phrased? Did your boss say - Hey, Kalai - your next assignment. Use this BADI.
Funny that - because usually, your Boss or whoever, will say something like - we need this functionality, you can implement in this BADI. Then you know the why.
So, what's it all about? Why do you need this information? -
Code for find the missing number in array without sorting/comparing in java
Hi all,
We have 1 to 100 number in an array, but one number is missing (from 1 to 100). we have to find it out without sorting or comparing of this missing number in array.
please help me out to find the solution this query.
regards & thanks
Mohan Kumar
Bangalore,
IndiaMaybe you could sum up the numbers you've got in your array and subtract the result from 5050 [the term [code](N*N+N)/2 where N is your upper bound (i.e. 100)]. You'll get the sum of all missing values (which in this case would be exactly the missing number). n.b. that you could genaeralize on that for arbitrary finite series.
Kind Regards, -
I put in My IMEI code and ICLOUD tells me THAT THE product has been replaced. I am doing This to TRY TO ACTIVATE MY IPHONE5 AS it wont Accept My 4 digit code after downloading IOS7
So My phone in disabaled, wont let me backup,restore kos FIND MY PHONE IS TURNED ON! How Canon i turn it on if phone is disabaled and computer wont recognise phone kos its locked and if i reboot it it demands i enter code (how Can i, phone,computer wont Accept) TALK ABOUT BANGING MY HEAD AGAINST A WALL, ALL I WANT IS TO USE MY PHONE . APPLE INTRODUCE NEWS SUPER SYSTEM, BETTER THIS, BETTER THAT, HA. IVE SPENT ALL YESTERDAY AND STILL TRYING TO RESOLVE THIS, LET ALONE MAKE A SIMPLE PHONE CALL!
HELP ME SOMEONE PLEASE ,PLEASEYou can't restore a backup to a phone that is running a version of iOS earlier than the version running when the backup was made. Normaly this situation occurs when replacing a phone, and the eplacement OS is not up to date. The fix is to update the replacement phone, then restore from the backup.
You could try an older backup made with iOS6.
Anyway, why do you need all your info on it while the screen is being fixed?
Maybe you are looking for
-
How to copy system table from one client to another client
Hi, Currently i am implementing recruitment module in one of the power sector company. I have finished all the configuration in one of the client in development server. I have trasported all the request in Qulaity server so that i can do the testing.
-
BW - Source System in wrong TAB
Hi SAP BW Gurus, I am connecting my SAP BW to a new R/3 Source System, but when i create the new system in RSA1 -> Source Systems, despite using the right click of mouse over the TAB SAP, when the Source System is create he apears on the TAB BI. What
-
How do I convert an mp3 file to wav in labview? Using active X with another program, or whatever. Anyone have any examples made? Why can't NI just include sound vi's that use mp3 just as it does wav? Wav is impractical. Thx.
-
let's face it, MS 8.1 and MS IE are both really bad compared to Firefox when it works, but since I've switched to MS 8.1 (64 bit) I haven't been able to get Firefox to work 100%.
-
I am unable to choose "selected calendars" to sync
I don't have a current version of Outlook to sync the calendar with, but I was going to try the new Google calendar that supposedly uses the correct file that would work with ipod. However, on iTunes the only thing I can choose is "sync calendars fro