Need function modules for the following...
Hello experts,
Is there an function module that I can use for:
1. get the last date for a given year
2. get the exchange rate for a given document number in a span of 5 years -
for example, I need to get the exchange rate of doc. number 0000000123
for the year 2000, 2001, 2002, 2003, 2004 and 2005(maximum of 5 years)
Help would be greatly appreciated.
Again, thank you guys and take care!
Hi,
To use CALCULATE_EXCHANGE_RATE_N, you just have to pass the required parameters like foreign amount/currency and local amount/currency, instead you can query the table TCURR for the same data, remember to convert the 'DATE' to internal format before sending it in to the fm/table, you can refer the following code, this might help,
WRITE V_date TO LV_DATUM USING EDIT MASK '__.__.____'.
CALL FUNCTION 'CONVERSION_EXIT_INVDT_INPUT'
EXPORTING
INPUT = LV_DATUM
IMPORTING
OUTPUT = LV_DATUM.
Retrieve the Exchange rate from Custom table for the Exchange
select ukurs from tcurr
into tcurr-ukurs
up to 1 rows
where kurst = 'M'
and fcurr = komk-waerk
and tcurr = komk-HWAER
and gdatu >= LV_DATUM.
endselect.
Rgds,
Similar Messages
-
Function modules for the following
Hi,
I want to know the function modules for the following purposes.
1) Check whether a date is valid or not
2) Calculate the no of days between two dates.
Expecting an early response.
Thanks n Regards,
AmitHi,
PARAMETERS: p_list LIKE t009b-bumon AS LISTBOX
VISIBLE LENGTH 11 OBLIGATORY ,
p_list1 LIKE t009b-bdatj OBLIGATORY.
SELECTION-SCREEN POSITION POS_HIGH.
PARAMETERS: p_list2 LIKE t009b-bumon AS LISTBOX
VISIBLE LENGTH 11 OBLIGATORY,
p_list3 LIKE t009b-bdatj OBLIGATORY.
Calling Function Module for calculating no of days between the
selected period
CALL FUNCTION 'NUMBER_OF_DAYS_PER_MONTH_GET'
EXPORTING
par_month = p_list
par_year = p_list1
IMPORTING
par_days = ws_n_days.
CALL FUNCTION 'NUMBER_OF_DAYS_PER_MONTH_GET'
EXPORTING
par_month = p_list2
par_year = p_list3
IMPORTING
par_days = ws_n_days1.
For Concatenating the month and year into the date format
CONCATENATE p_list1 p_list ws_i INTO ws_c_date1.
CONCATENATE p_list3 p_list2 ws_n_days1 INTO ws_c_date2.
date = ws_c_date1 - ws_c_date2.
In the above sample code the selection screen has month and year as input.
Also check this link
http://www.sapdevelopment.co.uk/tips/date/datehome.htm
Check FM
<b>RP_CALC_DATE_IN_INTERVAL</b> Add/subtract years/months/days from a date
<b>SD_DATETIME_DIFFERENCE</b> Give the difference in Days and Time for 2 dates
<b>Also for checking valid date:</b>
U can specify the date field as
Select-options: s_date like likp-date(similar to ur requirement)
This itself ceck for the valid date no seperate validation needed.
Thanks & Regards,
Judith. -
Existing function modules for the following scenarios...
Hello experts,
I am currently selecting the latest record from table ANLC based from
ANLN1(main asset number) and ANLN2(asset sub-number) and its AFABE is equal to
'01'. Now, is there any function module that I can use to automatically get the
latest record from ANLC? Currently, this is what I am doing:
get corresponding values from table ANLC based
from the current asset in it_finaltab
SELECT bukrs anln1 gjahr
afabe knafa kansw
answl kaafa nafal
aafav aafag nafap
aafap nafav nafag
FROM anlc UP TO 1 ROWS
INTO (it_anlc-bukrs, it_anlc-anln1, it_anlc-gjahr,
it_anlc-afabe, it_anlc-knafa, it_anlc-kansw,
it_anlc-answl, it_anlc-kaafa, it_anlc-nafal,
it_anlc-aafav, it_anlc-aafag, it_anlc-nafap,
it_anlc-aafap, it_anlc-nafav, it_anlc-nafag)
WHERE anln1 EQ it_anla-anln1
AND anln2 EQ it_anla-anln2
AND bukrs IN r_iwerk
AND afabe EQ '01'
ORDER BY gjahr DESCENDING.
ENDSELECT.
Also, Is there any function module that I can use to get the asset number of a
given equipment?
Again, thank you guys and God Bless!Can you check if it works this way???
CALL FUNCTION 'GM_GET_FISCAL_YEAR'
EXPORTING
I_DATE = SY-DATUM
I_FYV = 'F1'
IMPORTING
E_FY = l_gjahr
EXCEPTIONS
FISCAL_YEAR_DOES_NOT_EXIST = 1
NOT_DEFINED_FOR_DATE = 2
OTHERS = 3.
IF SY-SUBRC eq 0.
Assuming 2000 might be the oldest Fiscal year in system
CALL FUNCTION 'ANLC_READ_MULTIPLE_GJAHR'
EXPORTING
I_ANLN1 = it_anla-anln1
I_ANLN2 = it_anla-anln2
I_BJAHR = '2000'
I_BUKRS = p_bukr
I_GJAHR = l_gjahr
I_PROBELESEN = ' '
TABLES
T_ANLC = it_anlc
T_R_AFABE =
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC eq 0.
sort it_anlc by gjahr descending.
ENDIF.
endif.
Regards
Eswar
Note: Reward if you find the info useful.
Message was edited by: Eswar Rao Boddeti -
Function module for the transcation CS02(i.e) BOM
Hi All,
I want the function module for the transction CS02.
Actually I need the details of BOM for any material.
Please help....Its a urgent requirement.
Thanks in advanceHi,
You can also try with MGW1_CHANGE_BOM and CS_CL_S_BOM_CHANGE
Regards,
Ram
Message was edited by:
Ram Mohan Naidu Thammineni -
Need Function Module for convertion of Foreign currency to Indian currency
hi friends,
i need function module for converting amount from
Foreign currency to Indian currency
thankshi Venkat,
Please use the function module CONVERT_TO_LOCAL_CURRENCY
<b><u>Sample code:</u></b>
call function 'CONVERT_TO_LOCAL_CURRENCY'
exporting
date = p_alv_tab-begda
foreign_amount = p_alv_tab-kkost_p_person
foreign_currency = p_alv_tab-kwaer " foreign currency
local_currency = l_ev_waer " Indian currency
importing
local_amount = p_alv_tab-kkost_p_person
exceptions
no_rate_found = 1
overflow = 2
no_factors_found = 3
no_spread_found = 4
others = 5.
Hope this helps,
Sajan Joseph. -
Rfc enabled function module for the updating the database table
Hi,
I need one rfc enabled function module for the updating the database table from the legacy system.currently i am using the rfc_read_table to read the database table.similarly i need for the update.Hi
I believe you need to create one by yourself
Max -
Function module for the Inbound Delivery
Dear ABAPers,
I have created the Inbound Delivery in VL01N Transaction.I want to create the Post goods issue for the Delivery number.What is the Function module for the Post goods issue for the Delivery number and what all the Parameter needs to be passed.
Thanks & Regards,
Ashok.Hi,
Try this code...
PARAMETERS: p_vbeln LIKE likp-vbeln OBLIGATORY.
DATA: l_vbkok_wa TYPE vbkok,
l_i_prott TYPE STANDARD TABLE OF prott,
l_pgi_status TYPE xfeld,
c_check TYPE c VALUE 'X'.
l_vbkok_wa-vbeln_vl = p_vbeln.
l_vbkok_wa-vbtyp_vl = 'T'.
l_vbkok_wa-wabuc = c_check.
Do PGI
CALL FUNCTION 'WS_DELIVERY_UPDATE'
EXPORTING
vbkok_wa = l_vbkok_wa
commit = c_check
delivery = l_vbkok_wa-vbeln_vl
IMPORTING
ef_error_in_goods_issue_0 = l_pgi_status
TABLES
prot = l_i_prott.
IF l_pgi_status IS NOT INITIAL.
WRITE:/ 'PGI Failure : ', p_vbeln.
ELSE.
WRITE:/ 'PGI Success : ', p_vbeln.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_check.
ENDIF.
Regards
Meenakshi -
Custom Function Module for the New Process Codes
I want to distribute the custom table data . For that i have written the program using MASTER_IDOC_DISTRIBUTE. I have created the custom message & idoc types along with their assignments.
I got struck up at the process code. I have to assign the function module for that process code. Can anyone kindly help me in writting the code at that function module ?Hi Friends,
My requirement is , i need to transfer the table records. For that i have created the Message/Idoc Types and also created the Partner profile and the Distribution model view .....all alll i have done.
My doubt is , in the we20, at the outbound parameters , i can give the Message/Idoc types that i have created. Ok thats fine
But at the inbound parameters, i have to give the inbound process code. So i have created the Inbound process code. As we know that for every process code a function module is attached, now i have to create the function module which posts the records in receiver side.
so 1. Does the Function module need to be RFC Enabled ?
2. Do we need to create Object type in SWO1 once i
create and release the function module ? -
Need Mapping logic for the following scenario
Hi everyone,
I need a mapping logic for the following scenario.
For the same order no with same material no, the quantity should be summed and only one idoc should be created.
For the same order no with different material no, no need to sum the quantity and only one idoc should be created.
For example:
Source Structure:
Ord No Mat No QTY
12 1 2
13 1 3
13 2 1
12 2 4
15 1 5
14 3 7
12 1 6
Target Structure:
Ord No Mat No QTY
12 1 8
12 2 4
13 1 3
13 2 1
14 3 7
15 1 5
Thanks in AdvanceTry the graphical mapping as shown below using concat with a space as delimite and UDF to split the value again by space.
1. Idoc node
(RootContext)
OrdNo
|concat[ ] -> sort[asending] -> SplitByValue -> collapseContexts -> Idoc
MatNo case sensitive [ValueChange]
(RootContext)
2. OrdNo
OrdNo(RC)
|concat[ ] -> sort[asending] ->SplitByValue->collapseContexts->SplitByVale-> UDF to fetch ordno -> OrdNo
MatNo(RC) case sensitive [ValueChange] [eachValue] (return var1.split(" ")[0];)
3. MatNo
OrdNo(RC)
|concat[ ] -> sort[asending] -> SplitByValue ->collapseContexts->SplitByVale-> UDF to fetch ordno -> MatNo
MatNo(RC) case sensitive [ValueChange] [eachValue] (return var1.split(" ")[1];)
4. Qty
[asending,case sensitive]
-- sortByKey -----> formatByExample -> sum ->Qty
OrdNo(RC) | | ^
|concat[ ] -> | Qty(RC) |
MatNo(RC) | |
--sort[asending]-> SplitByValue
case sensitive [ValueChange]
Regards,
Sunil Chandra -
Hi All!
Do you know whether there is "function modul" existing
wherby I can find out Persons role by giving his name or ID ?
Thanks
sasHi,
You can use the function module CKEXUTIL_USER_TO_ROLE. The function module takes the USER-ID as input and gives out all the roles assigned to the user-id.
Call Function CKEXUTIL_USER_TO_ROLE..
Regards,
Ravi. -
A FUNCTION MODULE FOR THE HR MODULE FOR PAYROLL OF EMPLOYEES
hi,
i want some a function module or code where i need to get the payroll details like the basic pay ,hra,special allowance,medical allowance,other allowance of an employee on the monthly basis.
the data that i have on ot os not on the basis of months it contains datd of more than one month.like the baisc pay of an employee is given on a radom day basis of more than one month.
but i need to bifercatethe data on monthly basis.
waiting for the reply.
thanks and regardsHi,
Use the fun module
RP_FILL_WAGE_TYPE_TABLE_EXT
which willget PA0008 results.
but to get the real payroll results you have to import data from clusters by writing the program. Data will be fetch from RT and CRT internal tables based on the Wage Types
see the sample code:
report zporgr0100
line-size 252
line-count 60(1)
no standard page heading
message-id zndc.
Database Tables & Infotypes
tables: pcl1, " HR Cluster1
pcl2, " HR Cluster1
pa0003, " Master data - Payroll Status
cskt, " Cost Center Texts
t528t, " Positions Texts
t513s, " Job Titles
pernr, " Logical PNP
t001p, " Personnel Subarea
t500p, " Personnel Area
t501, " Employee Group
t503k, " Employee Subgroup
csks. " Cost Center
infotypes:0000,0001.
*include rpclst00.
include rpc2rx00.
include rpc2rxx0.
include rpc2cd00.
*include rpc2ps00.
*include rpc2pt00.
*include rpcfvp00.
*include rpcfdc10.
*include rpcfdc00.
include rpppxd00.
include rpppxd10.
Declaration of Internal Tables
Internal Table for Output Data
data: begin of rep_tab occurs 0,
kostl like pa0001-kostl, " Cost Center
pernr like pa0001-pernr, " Personal Number
ename like pa0001-ename, " Employee Name
ctext like cskt-ltext, " Cost Center Text
ptext like t528t-plstx, " Position Text
ot1 type p decimals 2, " Jan OT Amount
ot2 type p decimals 2, " Feb OT Amount
ot3 type p decimals 2, " Mar OT Amount
ot4 type p decimals 2, " Apr OT Amount
ot5 type p decimals 2, " May OT Amount
ot6 type p decimals 2, " Jun OT Amount
ot7 type p decimals 2, " Jul OT Amount
ot8 type p decimals 2, " Aug OT Amount
ot9 type p decimals 2, " Sep OT Amount
ot10 type p decimals 2, " Oct OT Amount
ot11 type p decimals 2, " Nov OT Amount
ot12 type p decimals 2, " Dec OT Amount
ott type p decimals 2, " Total OT Amount
end of rep_tab.
Declaration of Variables
data: v_mon(2) type n, " Month
v_no type i, " Data Lines
v_year(4) type c, " Year
v_date like sy-datum, " Date
v_date1 like sy-datum, " Date
v_seqnr like pc261-seqnr. " Sequence No.
Declaration of Constants
data: c_type like hrp1001-otype value 'S', " Object Type
c_kokrs like cskt-kokrs value '1000', " Controlling Area
c_date1 like sy-datum value '18000101', " Date
c_date2 like sy-datum value '99991231', " Date
c_x type c value 'X', " Sign
c_mon(2) type c value '01', " Month
c_val1(2) type c value '31', " Date
c_val2(2) type c value '12', " Month Type
c_val like p0041-dar01 value '01', " Date Type
c_lgart1 like p0008-lga01 value '0722', " Wage Type
c_lgart2 like p0008-lga01 value '0723', " Wage Type
c_1(2) type n value '01', " Month1
c_2(2) type n value '02', " Month2
c_3(2) type n value '03', " Month3
c_4(2) type n value '04', " Month4
c_5(2) type n value '05', " Month5
c_6(2) type n value '06', " Month6
c_7(2) type n value '07', " Month7
c_8(2) type n value '08', " Month8
c_9(2) type n value '09', " Month9
c_10(2) type n value '10', " Month10
c_11(2) type n value '11', " Month11
c_12(2) type n value '12'. " Month12
Selection-screen
parameters:
p_year like pc2b0-pabrj obligatory. " Payroll Year
At selection-screen
at selection-screen.
Validate the Selection Screen fields
perform validate_screen.
Start-of-Selection
start-of-selection.
Selection of Period
perform get_period.
Get PERNR from LDB
get pernr.
Get the Master data from infotype 0001
perform get_master_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(252) 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 Cost Center
clear csks.
if not pnpkostl[] is initial.
select single kostl
into csks-kostl
from csks
where kostl in pnpkostl.
if sy-subrc <> 0.
message e999 with 'Invalid Cost Center'(003).
endif.
endif.
Validation of Personnel Number
clear pa0003.
if not pnppernr[] is initial.
select pernr
from pa0003 up to 1 rows
into pa0003-pernr
where pernr in pnppernr.
endselect.
if sy-subrc <> 0.
message e999 with 'Incorrect Personal Number Entered'(002).
endif.
endif.
Validation of Personnel Area
clear t500p.
if not pnpwerks[] is initial.
select persa
from t500p up to 1 rows
into t500p-persa
where persa in pnpwerks.
endselect.
if sy-subrc <> 0.
message e999 with 'Incorrect Personnel Area Entered'(001).
endif.
endif.
Validation of Personnel Sub Area
clear t001p.
if not pnpbtrtl[] is initial.
select btrtl
from t001p up to 1 rows
into t001p-btrtl
where btrtl in pnpbtrtl.
endselect.
if sy-subrc <> 0.
message e999 with 'Incorrect Personnel Sub Area Entered'(037).
endif.
endif.
Validation of Employee Group
clear t501.
if not pnppersg[] is initial.
select persg
from t501 up to 1 rows
into t501-persg
where persg in pnppersg.
endselect.
if sy-subrc <> 0.
message e999 with 'Incorrect Employee Group Entered'(038).
endif.
endif.
Validation of Employee Sub Group
clear t503k.
if not pnppersk[] is initial.
select persk
from t503k up to 1 rows
into t503k-persk
where persk in pnppersk.
endselect.
if sy-subrc <> 0.
message e999 with 'Incorrect Employee Sub Group Entered'(039).
endif.
endif.
endform. "validate_screen
*& Form get_period
Get the Correct Period based on Selection screen selection
form get_period.
clear: v_year,v_mon, v_date, v_date1.
v_year = sy-datum+0(4).
v_mon = sy-datum+4(2).
if pnptimr1 = c_x. " Current Date
pnpbegda = sy-datum.
pnpendda = sy-datum.
elseif pnptimr2 = c_x. " Current Month
concatenate v_year v_mon c_val into v_date.
concatenate v_year v_mon c_val1 into v_date1.
pnpbegda = v_date.
pnpendda = v_date1.
elseif pnptimr3 = c_x. " Current Year
concatenate v_year c_val c_val into v_date.
concatenate v_year c_val2 c_val1 into v_date1.
pnpbegda = v_date.
pnpendda = v_date1.
elseif pnptimr4 = c_x. " Upto Today
pnpbegda = c_date1.
pnpendda = sy-datum.
elseif pnptimr5 = c_x. " From Today
pnpbegda = sy-datum.
pnpendda = c_date2.
else.
if ( pnpbegda is initial and pnpendda is initial ).
pnpbegda = c_date1.
pnpendda = c_date2.
elseif pnpbegda is initial and not pnpendda is initial.
pnpbegda = c_date1.
pnpendda = pnpendda.
elseif not ( pnpbegda is initial and pnpendda is initial ).
pnpbegda = pnpbegda.
pnpendda = pnpendda.
endif.
endif.
endform. "get_period
*& Form get_master_data
Get the Master Data from Database Tables PA0001,0002,0003
form get_master_data.
Get data from Respective Infotypes
rp_provide_from_last p0001 space pnpbegda pnpendda.
if p0001-kostl in pnpkostl.
rep_tab-kostl = p0001-kostl.
rep_tab-pernr = p0001-pernr.
rep_tab-ename = p0001-ename.
Get the Position Text
clear t528t-plstx.
select single plstx into t528t-plstx from t528t
where plans = p0001-plans and
otype = c_type and
sprsl = sy-langu.
if sy-subrc = 0.
rep_tab-ptext = t528t-plstx.
endif.
Get the Cost Center Text
clear cskt-ltext.
select single ltext into cskt-ltext from cskt
where spras = sy-langu and
kokrs = c_kokrs and
kostl = p0001-kostl.
if sy-subrc = 0.
rep_tab-ctext = cskt-ltext.
endif.
Get the Overtime Payment Data
perform get_ot_data.
rep_tab-ott = rep_tab-ot1 + rep_tab-ot2 + rep_tab-ot3 +
rep_tab-ot4 + rep_tab-ot5 + rep_tab-ot6 +
rep_tab-ot7 + rep_tab-ot8 + rep_tab-ot9 +
rep_tab-ot10 + rep_tab-ot11 + rep_tab-ot12.
append rep_tab.
clear rep_tab.
endif.
sort rep_tab by kostl pernr.
delete rep_tab where kostl = ' '.
delete rep_tab where ott = 0.
endform. "get_master_data
*& Form get_ot_data
Get the Overtime Payment Data
form get_ot_data.
cd-key = pernr-pernr.
rp-imp-c2-cd.
sort rgdir by seqnr.
To get sequence number for the payroll period
loop at rgdir where void is initial
and reversal is initial
and outofseq is initial
and srtza eq 'A'.
if rgdir-fpper+0(4) = p_year.
To consider offcycle run data
if not rgdir-ocrsn is initial.
v_seqnr = rgdir-seqnr.
exit.
endif.
v_seqnr = rgdir-seqnr.
endif.
if not v_seqnr is initial.
perform import_rx.
endif.
perform process_wagetypes.
endloop.
endform. "get_ot_data
include rpppxm00.
*& Form Import_rx
Import the RX data from Clusters
form import_rx.
rx-key-pernr = cd-key-pernr.
rx-key-seqno = v_seqnr.
rp-init-buffer.
rp-imp-c2-rx.
endform. " Import_rx
*& Form Process_wagetypes
Calculate the Overtime Amount based on Wage types
form process_wagetypes.
loop at rt.
if rt-lgart = c_lgart1 or rt-lgart = c_lgart2.
if rgdir-fpper+0(4) = p_year.
v_mon = rgdir-fpper+4(2).
case v_mon .
when c_1.
rep_tab-ot1 = rep_tab-ot1 + rt-betrg.
when c_2.
rep_tab-ot2 = rep_tab-ot2 + rt-betrg.
when c_3.
rep_tab-ot3 = rep_tab-ot3 + rt-betrg.
when c_4.
rep_tab-ot4 = rep_tab-ot4 + rt-betrg.
when c_5.
rep_tab-ot5 = rep_tab-ot5 + rt-betrg.
when c_6.
rep_tab-ot6 = rep_tab-ot6 + rt-betrg.
when c_7.
rep_tab-ot7 = rep_tab-ot7 + rt-betrg.
when c_8.
rep_tab-ot8 = rep_tab-ot8 + rt-betrg.
when c_9.
rep_tab-ot9 = rep_tab-ot9 + rt-betrg.
when c_10.
rep_tab-ot10 = rep_tab-ot10 + rt-betrg.
when c_11.
rep_tab-ot11 = rep_tab-ot11 + rt-betrg.
when c_12.
rep_tab-ot12 = rep_tab-ot12 + rt-betrg.
endcase.
endif.
endif.
endloop.
endform. "process_wagetypes
*& Form top_of_page
Write the Report and Column Headings
form top_of_page.
format color col_heading on.
write: /1(252) 'NATIONAL DRILLING COMPANY'(010) centered,
/1(252) 'Overtime Payments Details'(011) centered.
format color off.
if pnptimr1 = c_x. " Current Date
write: /2 'Period From :'(036), sy-datum, 'To:'(006), sy-datum.
elseif pnptimr2 = c_x. " Current Month
write: /2 'Period From :'(036), v_date, 'To:'(006), v_date1.
elseif pnptimr3 = c_x. " Current Year
write: /2 'Period From :'(036), v_date, 'To:'(006), v_date1.
elseif pnptimr4 = c_x. " Upto Today
write: /2 'Period From :'(036), c_date1, 'To:'(006), sy-datum.
elseif pnptimr5 = c_x. " From Today
write: /2 'Period From :'(036), sy-datum, 'To:'(006), c_date2.
else.
if ( pnpbegda is initial and pnpendda is initial ).
write: /2 'Period From :'(036), c_date1, 'To:'(006), c_date2.
elseif pnpbegda is initial and not pnpendda is initial.
write: /2 'Period From :'(036), c_date1, 'To:'(006), pnpendda.
elseif not ( pnpbegda is initial and pnpendda is initial ).
write: /2 'Period From :'(036), pnpbegda,
'To:'(006), pnpendda.
endif.
endif.
write: 219 'Report Run Date:'(018), sy-datum.
if not pnpkostl[] is initial.
if pnpkostl-high is initial.
write: /2 'Cost Center :'(004), pnpkostl-low,
219 'Time :'(020), sy-uzeit.
else.
write: /2 'Cost Center From:'(005), pnpkostl-low+7(3),
'To:'(006), pnpkostl-high,
219 'Time :'(020), sy-uzeit.
endif.
else.
write: /219 'Time :'(020), sy-uzeit.
endif.
if not pnppernr[] is initial.
if pnppernr-high is initial.
write: /2 'Personal Number :'(007), pnppernr-low,
219 'User :'(021), sy-uname.
else.
write: /2 'Personal No.From:'(008), pnppernr-low,
'To:'(006), pnppernr-high,
219 'User :'(021), sy-uname.
endif.
else.
write: /219 'User :'(021), sy-uname.
endif.
write: /219 'Page No :'(022), sy-pagno.
format color col_heading.
write /1(252) sy-uline.
write:/1 sy-vline, 10 sy-vline,
41 sy-vline,
67 sy-vline, 68(167) 'Overtime Payments(Dirhams)'(013) centered,
235 sy-vline,252 sy-vline.
format color col_heading.
write:/1 sy-vline, 2(8) 'Emp #'(019) centered,
10 sy-vline, 11(30) 'Employee Name'(012) centered,
41 sy-vline, 42(25) 'Position'(014) centered,
67 sy-vline, 68(167) sy-uline,
235 sy-vline,236(16) 'Total'(017) centered,
252 sy-vline.
write:/1 sy-vline, 10 sy-vline,
41 sy-vline,
67 sy-vline, 68(13) 'JANUARY'(024) centered,
81 sy-vline, 82(13) 'FEBRUARY'(025) centered,
95 sy-vline, 96(13) 'MARCH'(026) centered,
109 sy-vline,110(13) 'APRIL'(027) centered,
123 sy-vline,124(13) 'MAY'(028) centered,
137 sy-vline,138(13) 'JUNE'(029) centered,
151 sy-vline,152(13) 'JULY'(030) centered,
165 sy-vline,166(13) 'AUGUST'(031) centered,
179 sy-vline,180(13) 'SEPTEMBER'(032) centered,
193 sy-vline,194(13) 'OCTOBER'(033) centered,
207 sy-vline,208(13) 'NOVEMBER'(034) centered,
221 sy-vline,222(13) 'DECEMBER'(035) centered,
235 sy-vline,252 sy-vline.
format color off.
write /1(252) sy-uline.
endform. "top_of_page
*& Form Display_report
Write the Report Output
form display_report.
clear v_no.
describe table rep_tab lines v_no.
if v_no = 0.
message i999 with
'No Data found for the entered Selection'(015).
endif.
loop at rep_tab.
format color 3.
at new kostl.
read table rep_tab index sy-tabix.
write:/1 sy-vline, 2(12) 'Cost Center:'(009),
14(10) rep_tab-kostl,
25(30) rep_tab-ctext,
252 sy-vline.
format color off.
write /1(252) sy-uline.
endat.
format color col_normal.
write: /1 sy-vline, 2(8) rep_tab-pernr,
10 sy-vline, 11(30) rep_tab-ename,
41 sy-vline, 42(25) rep_tab-ptext,
67 sy-vline, 68(13) rep_tab-ot1 no-zero,
81 sy-vline, 82(13) rep_tab-ot2 no-zero,
95 sy-vline, 96(13) rep_tab-ot3 no-zero,
109 sy-vline,110(13) rep_tab-ot4 no-zero,
123 sy-vline,124(13) rep_tab-ot5 no-zero,
137 sy-vline,138(13) rep_tab-ot6 no-zero,
151 sy-vline,152(13) rep_tab-ot7 no-zero,
165 sy-vline,166(13) rep_tab-ot8 no-zero,
179 sy-vline,180(13) rep_tab-ot9 no-zero,
193 sy-vline,194(13) rep_tab-ot10 no-zero,
207 sy-vline,208(13) rep_tab-ot11 no-zero,
221 sy-vline,222(13) rep_tab-ot12 no-zero,
235 sy-vline,236(16) rep_tab-ott no-zero,
252 sy-vline.
at end of kostl.
write /1(252) sy-uline.
endat.
format color off.
at last.
sum.
format color 1.
write: /1 sy-vline,
10 sy-vline, 11(30) 'Total'(017) centered,
41 sy-vline,
67 sy-vline, 68(13) rep_tab-ot1 no-zero,
81 sy-vline, 82(13) rep_tab-ot2 no-zero,
95 sy-vline, 96(13) rep_tab-ot3 no-zero,
109 sy-vline,110(13) rep_tab-ot4 no-zero,
123 sy-vline,124(13) rep_tab-ot5 no-zero,
137 sy-vline,138(13) rep_tab-ot6 no-zero,
151 sy-vline,152(13) rep_tab-ot7 no-zero,
165 sy-vline,166(13) rep_tab-ot8 no-zero,
179 sy-vline,180(13) rep_tab-ot9 no-zero,
193 sy-vline,194(13) rep_tab-ot10 no-zero,
207 sy-vline,208(13) rep_tab-ot11 no-zero,
221 sy-vline,222(13) rep_tab-ot12 no-zero,
235 sy-vline,236(16) rep_tab-ott no-zero,
252 sy-vline.
write /1(252) sy-uline.
endat.
format color off.
endloop.
endform. "display_report
reward points if useful
regards,
Anji -
Need functional module for service order
hello,
while creating service notification i want to create service order automatically.for that i need a functional module which is the key funtion to process creation of transaction in the background. i want the name of that functional module to create iw31 service order automatically and that of functional group so that i can assign in the action box.
Regards,
Rajesh Kumar Raju
9900311069Hi,
unfortunately there is no such "official" BAPI available - not even in ERP2005! There is a BAPI called BAPI_ALM_ORDER_MAINTAIN but this is for changing an already existing service order.
But, you can use what the "SAP CRM group" developed for their integration to the backend R/3 system. This FM is called CRM_CS_API_ORDER_CREATE and is part of FUGR CRM_CS_API_ORDER. This FM is acting in the same way as a "normal" BAPI although you can not find this FM in transaction BAPI.
Hope this can help!
Best regards, Johan -
How to create a Z Function module for the standard FM VIEW_KURGV?
Hi all,
There is a requirement to the change the functionality of the standard FM VIEW_KURGV. This FM is being used in a Z report. Hence, I have a copied this FM to a Z FM ZVIEW_KURGV after having created the Z Function Group ZV05E. However, there are a number of standard routines which are present in the standard FM VIEW_KURGV which need to be also created in the Z FM ZVIEW_KURGV. Please advise how to proceed.
Thanks and regards,
AnishurInstead of copyg the std fm to z, do the following,
1. Go to se37 open FM VIEW_KURGV in display mode.
2. Click on the spiral icon on the top.
3. Then in menu go edit->enhancment options -> show implicit enhancement
4. """""""""""""""""""""" kind of lines will appear in the cde, just rt click on the line at the place u want to insert the code and select
enhancement implementation create.
5. Give apropriate name for thi , it will inset a n place to write your code.
This is an std sap methodology and is supported in upgradde also. -
Need Function Module for Printing Rates,Discounts and Taxes in Invoice.
Hi All,
For our Invoice printing I need to get a function module which will provide me the rates,discounts and taxes against each item line of the Invoice No.
Finall it will be printed accordingly.
Can anyone help me regarding this with input parameter example.
Thx in Adv.Hi,
As far as I know there is no fun module to print all this stuff.
You have to get this data from KONV table by passing the VBRK table KNUMV field.
Then check for all the Rates and amount KBETR and KWERT fields for the respective condition Types.
You have to loop the KONV internal table and write all the condition rates and amounts in the script driver program.
see any Std script for this.
Regards,
Anji -
Need function module for Sales order overall status
Dear Team,
Our requriement is we need to capture sales orders overall status 'compleated' in header and item datat details.
Could you please let me know what are function modules available for to get the over all status for sales orders, (header and item)
Thanks & Regards,
MK.Hi MK,
Use any of this FMs.
C1CE_VBUK_READ
SD_VBUP_READ_WITH_VBELN
WCB_VBUK_READ
Note that the values are in table VBUK and you can do a select statement from that table to get what you need.
Regards,
Peter
Maybe you are looking for
-
Mail attachments not available when sent
Attaching files in Mail, either by drag and drop, or using the "Attach" button on the "New Message" window, seems to work on the iMac, but when the files are sent and opened in Outlook Express on Windows XP, or online (Gmail) with a browser, only a t
-
Problems converting word in PDF, graphics
I use Acrobat X Pro and Word 2003 SP3. Photos change their size in the PDF. If the photo-size was never changed in Word, the photos stay as they were, but if the size of an inserted photo was slightly changed in word, this photo is in the PDF in its
-
How to draw smooth curve in Hyperdraw??
Okay, I've checked the manual 4x and have been playing with Hyperdraw for 30 minutes and still can't figure out how to draw a smooth bell curve in the Hypereditor... In Cubase, I would take the pencil tool and draw a nice curve but can't seem to figu
-
Forms11g display pdf in a browser
Hi, I have a PDF document saved in a table as BLOB, how to display it in a browser using forms11g?
-
Hi, There has to be a lot of people out there who might be having many questions about higher studies in SAP-ABAP. Please HELP us by guiding us. Assuming that all such people are engineering graduates or equivalent, I have some general questions abo