Getting the validity period of a Document and send notification
Dear Experts
I have enabled Timebased publishing for some folders. Now I want to send a notification to the Administrator prior to expiry of a document.
Can I achieve using a scheduler Task?
If yes, if choose the CM system on which i want the scheduler to be executed will it execute for all subfolders?
Regards
Harish
Hi Harish,
I think you can achieve using a schedular task, Pls go thro the useful links.
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/5b6635f5e0ef428fb513336881679b/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/5b6635f5e0ef428fb513336881679b/frameset.htm</a>
<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/5b6635f5e0ef428fb513336881679b/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/d1/5b6635f5e0ef428fb513336881679b/frameset.htm</a>
And also you send the notification to administrator, using the KM RecentNotification iview.
<a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/3a/d60a00803111d5992f00508b6b8b11/content.htm">Notification</a>
Regards
Prakash
Similar Messages
-
The other error messages are "cannot copy message to drafts" and " thunderbird failed to connect to gmail server". This appears to only happen when sending mail to a gmail address.
OK, you seem to be running Zone Alarm as your firewall. It includes a utility which checks to see whether a site is safe or not and also adds a plugin to Firefox which is listed as '''npFFApi'''. Can you disable that and see if it makes any difference?
To get to the plugins manager, click the orange Firefox button, then click "Add-ons". In the page that opens, click the "Plugins" link on the left which will open the menu. Then find '''npFFApi '''and click the "''Disable''" button. -
How to get the event moment after a bottun and 2 validation windows?
We need to do something after the user press [add] button and after SBO insert OVMP/VMP1. But, right after the [add] button, there are 2 validation windows coming out. I need to get the moment after 2 [ok] selection and OVPM/VPM1 inserting. How to do that?
Hi Nerow,
Try using the "pVal.Action_Success" for the item event - after the button is clicked/pressed. This will fire if the add/update logic is handled.
Let me know if this works. -
When I get the Please wait... message and have the latest Adobe update why won't the document open?
What is your operating system? Reader version ("latest" means nothing)?
Is this a local or only PDF? If online, in what browser? -
request the code for the exchange of Mac OS X Mountain Lion, on 25 July and still I do not get the validation email, what should I do?
ANYBODY HELP ME!!same problem here.....
anyone can help? -
Fetch the netprice from the validity period which always matches with the
Let me describe the same.
Suppose the PO creation date is 04.07.2007
The conditions for an item in a contract for the PO are as follows;
1. Validity from 04.07.2007 validity to 04.07.2007 Netprice = 100.00
2. Validity from 05.07.2007 validity to 31.12.9999 Netprice = 200.00
We need to always fetch the netprice from the validity period which always matches with the PO creation date. here the value 100.00 should be the correct netpr as the PO creation date matches with the first validity period.
But the program is fetching the netprice 200.000 which belongs to the second validity period. That is beacuse the select statement which fetches the data for contracts collects on the basis of EKKO-kdate and ekko-kdtab.the fields kdate and kdtab retrieves the validity period of the contract which is from 04.07.2007 to 31.072007. This data is then used to retrieve the netpr data from EKPO and it fetched 200.00 as it retrives the netprice of current data in contract validity and h not with respect to PO creation date.
This data is then used to fetch the get the netpr data from EKPO.
what we need is the netprice for that validity period of item(Conditions) that matches with the PO creation date..
Below is the code where I'm selecting the data from ekko and ekpo for the contracts data..Can you please add the code snippet to the below attachesd subroutine to get the required data from KONV and KONP so that we can retrieve the correct Netprice.
FORM select_contracts USING p_s_cebeln LIKE s_cebeln[]
p_c_k_bstyp TYPE ebstyp
p_p_bukrs TYPE bukrs
p_p_ekorg TYPE ekorg
p_p_ekgrp TYPE bkgrp
*Begin of Mod-004
fp_p_cernam type ty_r_ernam
p_p_cernam TYPE ernam
*End of Mod-004
p_s_werks LIKE s_werks[]
p_s_matnr LIKE s_matnr[]
p_s_lifnr LIKE s_lifnr[]
p_s_val_dt LIKE s_val_dt[].
*mod-002
data : l_amount type BAPICURR_D, " Net price
l_waers TYPE waers, " Currency Key
l_eff_amount type BAPICURR_D. " Effective value
data: l_v_netpr type bprei.
*mod-002
SELECT ebeln
bukrs
bstyp
aedat
ernam
lifnr
zterm
ekorg
ekgrp
waers
wkurs
kdatb
kdate
inco1
INTO TABLE i_ekko
FROM ekko
WHERE ebeln IN p_s_cebeln
AND bstyp EQ p_c_k_bstyp
AND bukrs EQ p_p_bukrs
AND ekorg EQ p_p_ekorg
AND ekgrp EQ p_p_ekgrp
*Begin of Mod-004
AND ernam EQ p_p_cernam
AND ernam IN fp_p_cernam
*End of Mod-004
AND lifnr IN p_s_lifnr
AND ( kdatb IN p_s_val_dt OR kdate IN p_s_val_dt ).
IF sy-subrc EQ 0.
Populates internal table i_ekpo using EKPO table.
SELECT ebeln
ebelp
loekz
txz01
matnr
werks
ktmng
menge
meins
bprme
netpr
peinh
webaz
mwskz
uebto
untto
erekz
pstyp
knttp
repos
webre
konnr
ktpnr
ean11
effwr
xersy
aedat
prdat
INTO TABLE i_ekpo
FROM ekpo
FOR ALL ENTRIES IN i_ekko
WHERE ebeln = i_ekko-ebeln
and aedat = i_ekko-aedat
AND werks IN p_s_werks
AND matnr IN p_s_matnr.
LOOP AT i_ekpo INTO rec_ekpo.
MOVE rec_ekpo-ebeln TO rec_contr-ebeln.
MOVE rec_ekpo-ebelp TO rec_contr-ebelp.
MOVE rec_ekpo-loekz TO rec_contr-loekz.
MOVE rec_ekpo-txz01 TO rec_contr-txz01.
MOVE rec_ekpo-matnr TO rec_contr-matnr.
MOVE rec_ekpo-werks TO rec_contr-werks.
MOVE rec_ekpo-ktmng TO rec_contr-ktmng.
MOVE rec_ekpo-menge TO rec_contr-menge.
MOVE rec_ekpo-meins TO rec_contr-meins.
MOVE rec_ekpo-bprme TO rec_contr-bprme.
MOVE rec_ekpo-netpr TO rec_contr-netpr.
move l_v_netpr TO rec_contr-netpr.
mod-002
read table i_ekko into rec_ekko with key
ebeln = rec_ekpo-ebeln.
l_waers = rec_ekko-waers.
CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
EXPORTING
currency = l_waers
amount_internal = rec_contr-netpr
IMPORTING
AMOUNT_EXTERNAL = l_amount.
rec_contr-netpr = l_amount.
mod-002
MOVE rec_ekpo-peinh TO rec_contr-peinh.
MOVE rec_ekpo-webaz TO rec_contr-webaz.
MOVE rec_ekpo-mwskz TO rec_contr-mwskz.
MOVE rec_ekpo-uebto TO rec_contr-uebto.
MOVE rec_ekpo-untto TO rec_contr-untto.
MOVE rec_ekpo-erekz TO rec_contr-erekz.
MOVE rec_ekpo-pstyp TO rec_contr-pstyp.
MOVE rec_ekpo-knttp TO rec_contr-knttp.
MOVE rec_ekpo-repos TO rec_contr-repos.
MOVE rec_ekpo-webre TO rec_contr-webre.
MOVE rec_ekpo-konnr TO rec_contr-konnr.
MOVE rec_ekpo-ktpnr TO rec_contr-ktpnr.
MOVE rec_ekpo-ean11 TO rec_contr-ean11.
MOVE rec_ekpo-effwr TO rec_contr-effwr.
mod-002
CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
EXPORTING
currency = l_waers
amount_internal = rec_contr-effwr
IMPORTING
AMOUNT_EXTERNAL = l_eff_amount.
rec_contr-effwr = l_eff_amount.
*mod-002
MOVE rec_ekpo-xersy TO rec_contr-xersy.
APPEND rec_contr TO i_contr.
CLEAR: rec_ekpo,rec_contr.
mod-002
CLEAR : rec_ekko,l_amount, l_eff_amount,l_waers.
mod-002
ENDLOOP.
Modifying i_contr using i_ekko.
SORT i_ekko BY ebeln.
LOOP AT i_contr INTO rec_contr.
READ TABLE i_ekko INTO rec_ekko WITH KEY
ebeln = rec_contr-ebeln
BINARY SEARCH.
MOVE rec_ekko-bukrs TO rec_contr-bukrs.
MOVE rec_ekko-bstyp TO rec_contr-bstyp.
MOVE rec_ekko-aedat TO rec_contr-aedat.
MOVE rec_ekko-ernam TO rec_contr-ernam.
MOVE rec_ekko-lifnr TO rec_contr-lifnr.
MOVE rec_ekko-zterm TO rec_contr-zterm.
MOVE rec_ekko-ekorg TO rec_contr-ekorg.
MOVE rec_ekko-ekgrp TO rec_contr-ekgrp.
MOVE rec_ekko-waers TO rec_contr-waers.
MOVE rec_ekko-wkurs TO rec_contr-wkurs.
MOVE rec_ekko-kdatb TO rec_contr-kdatb.
MOVE rec_ekko-kdate TO rec_contr-kdate.
MOVE rec_ekko-inco1 TO rec_contr-inco1.
MODIFY i_contr FROM rec_contr.
ENDLOOP.
ENDIF.
REFRESH: i_ekko,
i_ekpo.
CLEAR : rec_ekko,
rec_ekpo,
rec_contr.
ENDFORM. "select_contracts
Thanks.Hi,
Please get the valid condition ( based on date ) from A016 (MK & LPA). With the appropriate KNUMH read the Condition header. You can access the different condition items viz., PB00, RA00 etc., for the values from table KONP. Further if you have Value scales / Quantity scales, you can read the data from KONM, KONW.
An additional tips: in KONP, if you have a condition like RA00 - Rebate, the value will be multiplied by 10 and saven in database to accomodate the discount to the third decimal.
I could not completely understand your requirements like nature of development ( Is it a Report / SAP Script ??) you are working etc., so that I could help you precisely.
Hope this helps,
Best Regards, Murugesh AS
Message was edited by:
Murugesh Arcot -
How to get the split period wage type amount in payslip?
How to get the split period wage type amount in payslip?
Payroll period for 01.01.09 to 31.01.09.
1. Employee is active from 1.1.09 to 10.01.09
2. Employee is inactive from 11.01.09 to 20.01.09
3. Employee is again active from 21.01.09 to 31.01.09
In Result Table three split periods are created.
From 01.01.09 to 10.01.09 u2018Basic Salaryu2019 Wtype 1101 amt is 20.00
From 11.01.09 to 20.01.09 u2018Basic Salaryu2019 Wtype 1101 amt is 00.00
From 21.01.09 to 31.01.09 u2018Basic Salaryu2019 Wtype 1101 amt is 10.00
My requirement is to print only the last split period in payslip from 21.01.09 to 31.01.09. May you please help me in this regard.
Thanks in advance
Regards,
Rajesh.Hi
Try to read the below:
WPBPC : Distribute Lump Sum Wage Elements to WPBP Periods
Object
Operation
Use
Operation WPBPC distributes the amount of the current wage type to the
active WPBP periods in the payroll period.
Input
The current wage type in the header entry of table OT is used as input
for this operation.
Procedure
Within payroll, wage types are assigned to a fixed WPBP period by
infotype 0014 Recurring Payments/Deductions, for example. However, you
may want to distribute this payment to all active WPBP periods, which is
what would happen if the wage type were entered in basic pay. Therefore,
various specifications exist for parameter S:
o If the specification is 'A', and if several active WPBP periods
exist, the amount is simultaneously reduced on a calendar-day basis.
o If the specification is 'D', the wage type is distributed to all
existing WPBP periods without the amount being reduced.
o If the specification is 'S', and if the validity period starts or
ends during the period, the entry in table WPBP is split using this
date. The wage type is stored in table OT for the corresponding WPBP
period.
This parameter is only allowed if processing was accessed using
function P0014.
In this case, infotype 0014 must be processed before absence
valuation and function PARTT. Otherwise, rejections occur during
payroll processing.
o Specification 'X' is the combination of 'A' and 'S'.
This parameter is only allowed if processing was accessed using
function P0014.
o If the specification is 'W', and if the validity period starts or
ends during the period, the entry in table WPBP is split using this
date (as with option 'S'). Unlike 'S', the wage type is not stored
in table OT.
This parameter is only allowed if processing was accessed using
function P0014.
o If the specification is ' ', the wage type is stored in table OT for
each WPBP period in which the validity interval fits.
This parameter is only allowed if processing was accessed using
functions P0014 or P0015.
If the WPBP split is set for a wage type, the wage type is stored
without changes in table OT. If you specify a different wage type name
in the second parameter, the wage type is stored with this name in table
OT. Before you execute operation WPBPC, you may therefore need to delete
the split using operation ELIMI.
If a country-specific split (C1, C2, or C3 split) is set, the operation
interprets it as an error. The employee in question is rejected by
payroll. All other splits are transferred as they are.
Output
The processed wage type, or the wage type specified in the operation
call, is written to table OT (output table) with the appropriate split
indicator and reduced amount as operation output for each WPBP period.
Parameter specification 'W' is the only exception.
Syntax
OOOOOSVVVV
OOOOO WPBPC Operation name
S
blank distribute to all WPBP periods
S split and distribute WPBP
W split but do not distribute WPBP
A distribute to active WPBP periods
with calendar-day reductions
D distribute to all existing
WPBP periods
X combination of 'S' and 'A'
VVVV Results wage type
blank input wage type = results wage type
wage wage type name of input wage type is replaced
type by wage type name of results wage
name type
Wage type before operation:
Example
M100 02 3000
WPBP split
01 June 01 - June 20 active
02 June 21 - June 30 active
VVVV Results wage type
blank input wage type = results wage type
wage wage type name of input wage type is replaced
type by wage type name of results wage
name type
Wage type before operation:
Example
M100 02 3000
WPBP split
01 June 01 - June 20 active
02 June 21 - June 30 active
Wage type before operation:
WType WPBP Amount
M100 00 3000.-
M200 02 2000.-
Operation: WPBPCA
Wage type after operation:
WType WPBP Amount
M100 01 2000.-
M100 02 1000.-
M200 02 2000.-
Operation: WPBPC
Wage type after operation:
WType WPBP Amount
M100 01 3000.-
M100 02 3000.-
M200 02 2000.-
Regards
Team Member. -
So, I'm a little new to PowerShell and I came across a PowerShell which allow me to copy the content od a spreadsheet, into the new message in Outlook 2007. I have search and search on a way to do the same with a Word Document. I would like to
create a PowerShell Script that copies the content of a Word Document and paste that content in an email message.
I am basing my script on this
#Create and get my Word Obj
$w1 = New-Object -comobject Word.Application
$w1.Visible = $True
$UserWord = $w1.Workbooks.Open("C:\Users\hhhh\Documents\Powershell\test.docx")
#create outlook Object
$Outlook = New-Object -comObject Outlook.Application
$Mail = $Outlook.CreateItem(0)
$Mail.SentOnBehalfOfName = "[email protected]"
$Mail.Recipients.Add("[email protected]")
#Add the text part I want to display first
$Mail.Subject = "Test email"
$Mail.Body = "My Comment on the Excel Spreadsheet"
#Then Copy the Word using parameters to format it
$Mail.Getinspector.WordEditor.Range().PasteExcelTable($true,$false,$false)
#Then it becomes possible to insert text before
$wdDoc = $Mail.Getinspector.WordEditor
$wdRange = $wdDoc.Range()
$Mail.Display()
Any Help would be great!My requirements are the Word documents are a template of sorts. The document will be changes prior to its email with some changes. The other twist is that the customer might more that one recipients, and each recipient will have to have a separate
email, with the same content of the word document.
For example: Say I'm doing maintenance. The Word doc might descript that maintenance, in a set format. Once save the script is run to generate 3 to 10 email with separate recipients with the body of the email containing what was in the Word document. -
How to get the link of already archived document
Dear all,
How to get the link of already archivied document. for example i have a sales order for which subsequent documents have been archived. now i want to get the link of subsequent document.
please give some solution
Thanks in advance
Thanks,
Hemachandran.Hemachandran,
The archiving object for sales order is SD_VBAK. If you run the program S3VBAKAU by transaction se38 and search based on the document numbers ( as you mentioned it is the preceeding document numbers to the current document), you will be able to retrieve the information regarding the previous sales orders.
More information on the sales order archiving object can be found at,
http://help.sap.com/saphelp_45b/helpdata/en/a9/55c7b690a111d1a5510000e82deaaa/content.htm
Sojan
<<text removed by moderator>>
Edited by: Matt on Nov 16, 2008 5:08 PM - Do not request points -
How to get the link between mara, ausp, cawn and cawnt tables
hello ABAPERS
i have got a requiremet in that i have to get the relation .
how to get the link between mara, ausp, cawn and cawnt tables and also type how can we get link between char value and char description in cawn and cawnt tables through ausp and mara tables.
I would be very thankful for ur help in advance.
Thanks & Regards.
soniHi,
Sample report using the linkage between tables;
report batch_char no standard page heading
line-size 132
line-count 58(1)
message-id mm.
Report by Batch Characteristic *
Description : Report by Batch Characteristic *
Declaration for Tables
tables: mara, " Material Master
mard, " Storage Location Data for Material
t001w, " Plants/Branches
t001l, " Storage Locations
cabn, " Characteristics
inob. " Link between Internal Number and Object
Declaration for Constants
constants : c_klart like ausp-klart value '023', " Class Type
c_obtab like inob-obtab value 'MCH1', " Database Table
c_flag type c value 'X', " Flag
c_c23 type i value '23', " Ratio
Constants for Ratio Categories
c_13 type p decimals 2 value '13.00', " For Ratio 13
c_1499 type p decimals 2 value '14.99', " For Ratio 14.99
c_15 type p decimals 2 value '15.00', " For Ratio 15
c_1699 type p decimals 2 value '16.99', " For Ratio 16.99
c_17 type p decimals 2 value '17.00', " For Ratio 17
c_1899 type p decimals 2 value '18.99', " For Ratio 18.99
c_19 type p decimals 2 value '19.00', " For Ratio 19
c_2099 type p decimals 2 value '20.99', " For Ratio 20.99
c_21 type p decimals 2 value '21.00', " For Ratio 21
c_2299 type p decimals 2 value '22.99', " For Ratio 22.99
c_23 type p decimals 2 value '23.00', " For Ratio 23
c_g23(4) type c value '>=23', " For Ratio >=23
c_ratio(5) value 'RATIO', " For Ratio
Constants for Storing Selected item field information
c_cursor1(15) value 'I_OUTPUT1-MEINS', " For Selected Base
" Unit of Measure
c_cursor2(15) value 'I_OUTPUT1-MATNR', " For Selected Base
" Material Number
c_cursor3(15) value 'I_OUTPUT1-MAKTX', " For Selected Base
" Material Des.
c_cursor4(15) value 'I_OUTPUT1-CLABS', "For Selected Base
" Stock Value
c_cursor5(15) value 'I_OUTPUT1-ATFLV', " For Selected Base
" Char.Value (Ratio)
c_cursor6(5) value 'C_G23'.
Declaration for Global Variables
data : g_exit type c, " Flag
g_clabs1(16) type c, " Quantity
g_clabs(18) type c, " Quantity
g_cursor(15) type c, " Cursor field name
g_matnr type mara-matnr, " Material Number
g_werks type mchb-werks, " Plant
g_atinn(30) type c. " Character.
Declaration for Internal tables
Internal table to hold Batch Stock data
data : begin of i_mchb occurs 0,
matnr like mchb-matnr, " Material Number
werks like mchb-werks, " Plant
lgort like mchb-lgort, " Storage Location
charg like mchb-charg, " Batch Number
clabs like mchb-clabs, " Stock Value
meins like mara-meins, " Unit of measure
atflo like ausp-atflv, " Char.Value (Ratio)
atflv like ausp-atflv, " Char.Value (Ratio)
end of i_mchb.
Internal table to hold Secondary List data
data : begin of i_mchb1 occurs 0,
werks like mchb-werks, " Plant
matnr like mchb-matnr, " Material Number
lgort like mchb-lgort, " Storage Location
charg like mchb-charg, " Batch Number
atinn like ausp-atinn, " Char.Value
clabs like mchb-clabs, " Stock Value
atflo like ausp-atflv, " Char.Value (Ratio)
atflv like ausp-atflv, " Char.Value (Ratio)
end of i_mchb1.
Internal table to get the Plant Name
data : begin of i_plant occurs 0,
werks like t001w-werks, " Plant
name1 like t001w-name1, " Name
end of i_plant.
Internal table to get the Material Description
data : begin of i_makt occurs 0,
matnr like makt-matnr, " Material
maktx like makt-maktx, " Description
end of i_makt.
Internal table to hold AUSP data
data : begin of i_ausp occurs 0,
objek like ausp-objek, " Object No
atinn like cabn-atinn, " Characteric value
atflv like ausp-atflv, " Characteristic Value
end of i_ausp.
Internal table to hold output data
data : begin of i_output occurs 0,
atinn like cabn-atinn, " Characteric value
werks like mchb-werks, " Plant
matnr like mchb-matnr, " Material Number
atnam like cabn-atnam, " Characteristic
atflv like ausp-atflv, " Char.Value (Ratio)
name1 like t001w-name1, " Plant Description
maktx like makt-maktx, " Material Description
clabs like mchb-clabs, " Stock Value
meins like mara-meins, " Base Unit of Measure
end of i_output.
Internal table to hold final Output data
data : begin of i_output1 occurs 0,
atinn like cabn-atinn, " Characteric value
werks like mchb-werks, " Plant
matnr like mchb-matnr, " Material Number
atnam like cabn-atnam, " Characteristic
atflv(32) type c, " Char.Value (Ratio)
name1 like t001w-name1, " Plant Description
maktx like makt-maktx, " Material Description
clabs like mchb-clabs, " Stock Value
meins like mara-meins, " Base Unit of Measure
end of i_output1.
Selection screen
selection-screen begin of block b1 with frame title text-001.
select-options: s_werks for t001w-werks obligatory, " Plant
s_lgort for t001l-lgort, " Stor.Location
s_matnr for mara-matnr obligatory, " Material No
s_atinn for cabn-atinn. " Character.
selection-screen end of block b1.
At selection screen
at selection-screen.
Validation of Selection Screen Fields
perform validate_screen.
Start of selection
start-of-selection.
Get the Material and Batch Stock data from MARA and MCHB Tables
perform get_mat_stock_data.
Get the Material Group Text and Plant Name from T023T and T001W Tables
perform get_plant_grp_data.
Append the data into final Output Internal Table after getting the
Characteristic Values data from INOB and AUSP Tables
perform append_final_data.
Processing if the Characteristics contain 'RATIO'
perform collect_ratio.
End-of-Page
end-of-page.
write /1(125) sy-uline.
End of selection
end-of-selection.
if g_exit <> c_flag.
Display the Report Output data
perform display_report.
endif.
Top-of-Page
top-of-page.
Write the Report and Column Headings
perform get_headings.
at line-selection
at line-selection.
if sy-lsind = 1.
perform display_batch.
endif.
Top of page during line-selection
top-of-page during line-selection.
perform heading_seclist.
Form validate_screen
Validation of Selection Screen fields
form validate_screen.
Validation of Plant
clear t001w.
if not s_werks[] is initial.
select werks
into t001w-werks
from t001w
up to 1 rows
where werks in s_werks.
endselect.
if sy-subrc <> 0.
message e899 with 'Enter Valid Plant'(002).
endif.
endif.
Validation of Material Number
clear mara.
if not s_matnr[] is initial.
select matnr
into mara-matnr
from mara
up to 1 rows
where matnr in s_matnr.
endselect.
if sy-subrc <> 0.
message e899 with 'Enter Valid Material'(003).
endif.
endif.
Validation of Storage Location
clear t001l.
if not s_lgort[] is initial.
select lgort
into t001l-lgort
from t001l
up to 1 rows
where lgort in s_lgort.
endselect.
if sy-subrc <> 0.
message e899 with 'Enter Valid Storage Location'(004).
endif.
endif.
Validation of Characteristic Value
clear cabn.
if not s_atinn[] is initial.
select atinn
into cabn-atinn
from cabn
up to 1 rows
where atinn in s_atinn.
endselect.
if sy-subrc <> 0.
message e899 with 'Enter Valid Characteristic Value'(005).
endif.
endif.
Validation of Plant, Material and Storage Location
clear mard.
select matnr werks lgort
into (mard-matnr, mard-werks, mard-lgort)
from mard
up to 1 rows
where matnr in s_matnr and
werks in s_werks and
lgort in s_lgort.
endselect.
if sy-subrc <> 0.
message e899 with 'No Data found for the Selection Criteria'(006).
endif.
endform. "validate_screen
*& Form get_headings
Write the Report and Column Headings
form get_headings.
data: l_repid type sy-repid.
l_repid = sy-repid.
call function 'Y_STANDARD_HEADING'
exporting
repid = l_repid
heading1 = sy-title.
write:/1(125) sy-uline.
format color col_heading on.
write : /1 sy-vline, 2(18) 'Material Number'(008) centered,
20 sy-vline, 21(40) 'Material Description'(011) centered,
61 sy-vline, 62(22) 'Ratio'(009) centered,
84 sy-vline, 85(18) 'Quantity'(010) centered,
103 sy-vline, 104(20) 'Base Unit of Measure'(015) centered,
125 sy-vline.
write:/1(125) sy-uline.
format color off.
endform. "get_headings
*& Form get_mat_stock_data
Get the Material and Batch Stock data from MARA and MCHB Tables
form get_mat_stock_data.
clear: i_mchb,i_output, i_output1.
refresh: i_mchb,i_output, i_output1.
select a~matnr " Material Number
b~werks " Plant
b~lgort " Storage Location
b~charg " Batch Number
b~clabs " Stock Value
a~meins " Base Unit of Measure
into table i_mchb
from mara as a inner join mchb as b
on amatnr eq bmatnr
where b~matnr in s_matnr and
b~werks in s_werks and
b~lgort in s_lgort.
if sy-subrc <> 0.
g_exit = c_flag.
message s899 with 'No Data found for the Selection Criteria'(006).
stop.
endif.
sort i_mchb by matnr werks lgort charg.
endform. " get_mat_stock_data
*& Form get_plant_grp_data
Get the Material Group Text and Plant Name from T023T and T001W
form get_plant_grp_data.
if not i_mchb[] is initial.
Get the Plant Description from t001w Table
clear i_plant.
refresh i_plant.
select werks " Plant
name1 " Name
into table i_plant
from t001w
for all entries in i_mchb
where werks = i_mchb-werks.
Get the Material Description from MAKT Table
clear i_makt.
refresh i_makt.
select matnr " Material number
maktx " Material Description
into table i_makt
from makt
for all entries in i_mchb
where matnr = i_mchb-matnr and
spras = sy-langu.
sort i_plant by werks.
delete adjacent duplicates from i_plant comparing werks.
sort i_makt by matnr.
delete adjacent duplicates from i_makt comparing matnr.
endif.
endform. "form get_plant_grp_data.
*& Form append_final_data
Append the data into final Internal Table
form append_final_data.
data : l_matbatch(28),
l_tabix like sy-tabix.
if not i_mchb[] is initial.
loop at i_mchb.
l_tabix = sy-tabix.
clear l_matbatch.
concatenate i_mchb-matnr i_mchb-charg into l_matbatch.
move-corresponding i_mchb to i_output.
Get the Plant Description from i_plant Table
read table i_plant with key werks = i_mchb-werks binary search.
if sy-subrc = 0.
i_output-name1 = i_plant-name1.
endif.
Get the Material Description from i_makt Table
read table i_makt with key matnr = i_mchb-matnr binary search.
if sy-subrc = 0.
i_output-maktx = i_makt-maktx.
endif.
Get the Characteristic Values data from INOB and AUSP Tables
clear inob.
select single cuobj from inob
into inob-cuobj
where klart = c_klart and
obtab = c_obtab and
objek = l_matbatch.
if sy-subrc = 0.
select objek
atinn
atflv
from ausp
into table i_ausp
where objek = inob-cuobj and
atinn in s_atinn and
klart = c_klart.
sort i_ausp by objek atinn.
loop at i_ausp.
clear cabn.
select single atinn atnam from cabn
into (cabn-atinn,cabn-atnam)
where atinn = i_ausp-atinn.
if sy-subrc = 0.
If the ratio value is between 13-14.99, display 13
if cabn-atnam cs c_ratio.
if i_ausp-atflv between c_13 and c_1499.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_13.
If the ratio value is between 15-16.99, display 15
elseif i_ausp-atflv between c_15 and c_1699.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_15.
If the ratio value is between 17-18.99, display 17
elseif i_ausp-atflv between c_17 and c_1899.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_17.
If the ratio value is between 19-20.99, display 19
elseif i_ausp-atflv between c_19 and c_2099.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_19.
If the ratio value is between 21-22.99, display 21
elseif i_ausp-atflv between c_21 and c_2299.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_21.
If the ratio value is greater than or equal to 23, display 23
elseif i_ausp-atflv >= c_23.
i_mchb-atflo = i_ausp-atflv.
i_mchb-atflv = c_23.
endif. " Condition for RATIO values
else. " If characteristic does contain RATIO
i_mchb-atflv = i_ausp-atflv.
endif.
i_output-atinn = cabn-atinn.
i_output-atnam = cabn-atnam.
i_output-atflv = i_ausp-atflv.
i_mchb1-matnr = i_mchb-matnr.
i_mchb1-werks = i_mchb-werks.
i_mchb1-lgort = i_mchb-lgort.
i_mchb1-charg = i_mchb-charg.
i_mchb1-clabs = i_mchb-clabs.
i_mchb1-atinn = i_ausp-atinn.
i_mchb1-atflo = i_mchb-atflv.
i_mchb1-atflv = i_ausp-atflv.
append : i_output, i_mchb1.
clear i_mchb1.
modify i_mchb index l_tabix transporting atflo atflv .
endif.
endloop.
endif.
endloop.
endif.
Checking whether the table is filled or not
if not i_output[] is initial.
sort i_output by atinn werks matnr atflv.
else.
g_exit = c_flag.
message s899 with 'No Data found for the Selection Criteria'(006).
endif.
Delete the records where RATIO is less than 13.
delete i_output where atnam cs c_ratio and atflv lt c_13.
endform. "append_final_data
*& Form display_report
Display the Report Output data
form display_report.
data: l_tabix like sy-tabix.
loop at i_output1.
l_tabix = sy-tabix.
At new Characteristic
at new atinn.
read table i_output1 index l_tabix.
format color 1 intensified on.
write: /1 sy-vline, 2(20) 'Characteristic Name:'(007),
23(40) i_output1-atnam,
125 sy-vline.
format color off.
format color 4 intensified on.
write: /1 sy-vline, 2(20) 'Plant Name :'(022),
23(4) i_output1-werks, 29(30) i_output1-name1,
125 sy-vline.
format color off.
write /1(125) sy-uline.
endat.
clear: g_clabs, g_clabs1.
format color col_normal.
write :/1 sy-vline, 2(18) i_output1-matnr,
20 sy-vline, 21(40) i_output1-maktx,
61 sy-vline.
if i_output1-atflv = c_c23.
write: 62(22) c_g23 centered.
else.
shift i_output1-atflv left deleting leading space.
write: 62(22) i_output1-atflv centered.
endif.
write: 84 sy-vline,
103 sy-vline,
110(5) i_output1-meins.
If the quantity value is negative
if i_output1-clabs ge 0.
write: 85(18) i_output1-clabs unit i_mchb-meins,
125 sy-vline.
else.
i_output1-clabs = - i_output1-clabs.
write i_output1-clabs unit i_mchb-meins to g_clabs1.
condense g_clabs1.
concatenate '(' g_clabs1 ')' into g_clabs separated by space.
write: 85(18) g_clabs right-justified,
125 sy-vline.
endif.
format color off.
hide : i_output1.
new-line.
At end of material
at end of matnr.
sum.
move : i_output1-matnr to g_matnr.
format color 3 intensified on.
write /1(125) sy-uline.
write :/1 sy-vline, 2(25) 'Total for Material :'(012),
28(18) g_matnr.
if i_output1-clabs ge 0.
write: 85(18) i_output1-clabs unit i_mchb-meins,
125 sy-vline.
else.
i_output1-clabs = - i_output1-clabs.
write i_output1-clabs unit i_mchb-meins to g_clabs1.
condense g_clabs1.
concatenate '(' g_clabs1 ')' into g_clabs separated by space.
write: 85(18) g_clabs right-justified,
125 sy-vline.
endif.
write: 125 sy-vline.
format color off.
write /1(125) sy-uline.
endat.
At end of plant
at end of werks.
sum.
move : i_output1-werks to g_werks.
format color 3 intensified off.
write :/1 sy-vline, 2(25) 'Total for Plant :'(013),
28(4) g_werks.
if i_output1-clabs ge 0.
write: 85(18) i_output1-clabs unit i_mchb-meins,
125 sy-vline.
else.
i_output1-clabs = - i_output1-clabs.
write i_output1-clabs unit i_mchb-meins to g_clabs1.
condense g_clabs1.
concatenate '(' g_clabs1 ')' into g_clabs separated by space.
write: 85(18) g_clabs right-justified,
125 sy-vline.
endif.
format color off.
write /1(125) sy-uline.
endat.
At end of characteristic
at end of atinn.
read table i_output1 index l_tabix.
sum.
format color 3 intensified on.
write :/1 sy-vline, 2(25) 'Total for Characteristic:'(014),
28(25) i_output1-atnam.
if i_output1-clabs ge 0.
write: 85(18) i_output1-clabs unit i_mchb-meins,
125 sy-vline.
else.
i_output1-clabs = - i_output1-clabs.
write i_output1-clabs unit i_mchb-meins to g_clabs1.
condense g_clabs1.
concatenate '(' g_clabs1 ')' into g_clabs separated by space.
write: 85(18) g_clabs right-justified,
125 sy-vline.
endif.
format color off.
write /1(125) sy-uline.
endat.
endloop.
endform. " display_report
*& Form DISPLAY_BATCH
Display the batch details for the seclected material *
form display_batch.
Get the batch details for the selected material
get cursor field g_cursor.
if g_cursor = c_cursor1 or
g_cursor = c_cursor2 or
g_cursor = c_cursor3 or
g_cursor = c_cursor4 or
g_cursor = c_cursor5 or
g_cursor = c_cursor6.
format color 3.
write: /1 sy-vline,
2(17) 'Material Number :'(020),
20(17) i_output1-matnr,
94 sy-vline.
format color off.
write /1(94) sy-uline.
loop at i_mchb1 where matnr = i_output1-matnr and
atinn = i_output1-atinn and
atflo = i_output1-atflv.
format color col_normal.
shift i_mchb1-charg left deleting leading '0'.
write :/1 sy-vline, 2(16) i_mchb1-lgort centered,
18 sy-vline, 19(17) i_mchb1-charg centered,
36 sy-vline.
if i_output1-atnam cs c_ratio.
write: 37(29) i_mchb1-atflv
exponent 0 decimals 2 centered.
else.
write : 37(29) i_mchb1-atflv
exponent 0 decimals 0 centered.
endif.
write : 66 sy-vline, 67(27) i_mchb1-clabs unit i_mchb-meins,
94 sy-vline.
format color off.
endloop.
write /1(94) sy-uline.
else.
message s899 with 'Invalid cursor position'(016).
exit.
endif.
endform. " DISPLAY_BATCH
*& Form HEADING_SECLIST
Write the Column Headings for Interactive Report
form heading_seclist.
write /1(94) sy-uline.
format color col_heading on.
write :/1 sy-vline, 2(16) 'Storage Location'(021),
18 sy-vline, 19(17) 'Batch Number'(017) centered,
36 sy-vline, 37(29) 'Characteristic Value'(018) centered,
66 sy-vline, 67(27) 'Quantity'(019) centered,
94 sy-vline.
write /1(94) sy-uline.
format color off.
endform. " HEADING_SECLIST
*& Form COLLECT_RATIO
Display the Characteristic ratio data
form collect_ratio.
loop at i_output.
clear g_atinn.
i_output1-atinn = i_output-atinn.
i_output1-atnam = i_output-atnam .
i_output1-werks = i_output-werks.
i_output1-name1 = i_output-name1.
i_output1-matnr = i_output-matnr.
i_output1-maktx = i_output-maktx.
i_output1-clabs = i_output-clabs.
i_output1-meins = i_output-meins.
call function 'CONVERSION_EXIT_ATINN_OUTPUT'
exporting
input = i_output-atinn
importing
output = g_atinn.
if g_atinn cs c_ratio.
If the ratio value is between 13-14.99, display 13
if i_output-atflv between c_13 and c_1499.
i_output1-atflv = c_13.
If the ratio value is between 15-16.99, display 15
elseif i_output-atflv between c_15 and c_1699.
i_output1-atflv = c_15.
If the ratio value is between 17-18.99, display 17
elseif i_output-atflv between c_17 and c_1899.
i_output1-atflv = c_17.
If the ratio value is between 19-20.99, display 19
elseif i_output-atflv between c_19 and c_2099.
i_output1-atflv = c_19.
If the ratio value is between 21-22.99, display 21
elseif i_output-atflv between c_21 and c_2299.
i_output1-atflv = c_21.
If the ratio value is greater than or equal to 23, display 23
elseif i_output-atflv >= c_23.
i_output1-atflv = c_23.
endif.
write i_output1-atflv to i_output1-atflv .
else.
write i_output-atflv to i_output1-atflv exponent 0 decimals 0.
endif.
collect i_output1.
clear i_output1.
endloop.
sort i_output1 by atinn werks matnr atflv.
endform. " COLLECT_RATIO
Reward if useful..
Regards,
Anji -
How to get the same period last year value using Fiscal Calendar?
Hi there,
I am using DAX in a Tabular Model project but I am getting stuck trying to get the following:
We are using a Fiscal Calendar (from 01 April to 31 March).
Previous Period Value
Value
2012
April
15
May
10
Jun
20
2013
April
15
30
May
10
20
Jun
20
25
I have tried to use sameperiodlastyear but there is an error saying that this function cannot be used for non contiguous dates. DATEADD is given the same error...
Could anyone help me getting the right measure expressions for [Previous Period Value]?
Thanks and best regards,
JossHi Joss,
In SQL Server Analysis Services, we can can compare revenue with the hierarchy periods (year, month, day) by using the PARALLELPERIOD function, and now you want to compare with custom periods. (NOTE: We cannot compare it with the PARALLELPERIOD function
since
PARALLELPERIOD function returns a member from a prior period in the same relative position as a specified member. So if the first time span not equal to the second one (such as the first period is 3 days, and the second period is 2 month)). Here
is a sample query about PARALLELPERIOD function for your reference.
with
set Hotels as
[Hotels].[Hotel ID].&[1015],
[Hotels].[Hotel ID].&[5640],
[Hotels].[Hotel ID].&[8800]
set Period as [Arrival Date].[Date].[Month].&[2012]&[1]:[Arrival Date].[Date].[Month].&[2012]&[12]
member [Arrival Date].[Date].[0] as sum({ Period })
member [Total Amount N-1] as (PARALLELPERIOD([Arrival Date].[Date].[Year], 1, [Arrival Date].[Date].[Year].&[2012]), [Measures].[Total Amount])
select
[Measures].[Total Amount],
[Measures].[Total Amount N-1]
} on 0,
nonemptycrossjoin
Hotels,
Hotels.[Hotel].children,
*{[Arrival Date].[Date].[0]}
} on 1
from [Booking_Cube]
Regards,
Charlie Liao
TechNet Community Support -
Suppres the validity period in a time dep hierarchy with a temporal join
Dear all,
With our customer we have an reporting presentation issue that we cannot solve. Can you please help us with a solution?
It is a hierachy display problem in a report.
We present a time dependent hierarchy structure with a temporal join. This is to have the postings in the correct periods of the hierarchy. A characteristic of this hierarchy is the validity period. This validity period is default displayed in the report. This cannot be suppressed in the query designer. Is there a way to suppress this? This is a wish form the customer.
Can you please help us with a sloution?
Thanks in advance.Ondrej,
Please refer to the below post, it is helpful.
Re: BI HR Structural Authorizations
Also, refer to the below document. It is old but provides very useful steps to be followed.
[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/business-intelligence/a-c/bw_hr%20authorization%20-%20asap%20for%20bw%20accelerator]
Update your findings.
-Mann -
Use DOM to get the element value of XML document?
I can not to use the method getNodeValue to get the element value of XML document. How can I do for it?
For example, for element
<address>125 Smith Avenue</address>
how to get the value "125 Smith Avenue" by using DOM?
ThanksThanks for all of you.
The code indicates that I need to get the node by tag name. If I do not know the distribution of the elements and want to traverse all nodes. If the node contains value, I retrieve the value. How to implement the general case.
For example, my XML file represent a directory hierarchy and looks like
<root>
<usr>
<user>user1
<file>file1</file>
<file>file2</file>
</user>
<user>user2
<file>file1</file>
<file>file2</file>
<file>file3</file>
<file>file4</file>
</user>
</usr>
</root> -
When installing CS3 Design Premium it instals Version Cue server and shared components, but I get the message "Errors: 6 component (s)" and dose not install, Photoshop, Flash, Illustrator, Indesign or Creative Suite Premium
Thank you Bturko in the future only migrate/copy/transfer your documents and settings. Adobe applications especially are not designed to be transferred from one computer to another. It is possible to recover however. I would recommend the following steps:
Run the uninstaller located in Applications/Utilities/Adobe Installers
Run the CC Cleaner Tool to ensure complete removal - Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6 - http://helpx.adobe.com/creative-suite/kb/cs5-cleaner-tool-installation-problems.html.
If you need to download a fresh copy of the installation files they can be downloaded at Download CS3 products.
Run the installer and reinstall Creative Suite 3. -
When I go to duplicate a presentation I get the following error: Unsaved Keynote Document. Autosave couldn't be moved because you don't have permission to access AutoSave Information? My permissions are set at read & write.
I noticed that I have three different log in accounts on my computer, much to my surprise. Could that be causing this problem?
That's unlikely. You would have had to save a document into another user's account and be trying to work on it - directly from their account.
"“Unsaved Pages Document.pages” couldn’t be moved because you don’t have permission to access “Autosave Information”.
Have you checked the permissions on your Autosave Information folder? Here are mine.
Maybe you are looking for
-
Site refreshed from dynamic data.
I have a site stubb out that has multiple accordian canvases each containing a tree. In my header area I have a combo box that give you a list of clients. When you select a new client, I want to reload all the trees in each accordian cavas with that
-
Trying to update. When I drag ff icon to apps folder message says replace or stop. Answer replace, then message says can't complete as I don't have permissions. I have full admin rights for imac running 10.5.8. I've reviewed preferences & security se
-
Keyfigures not visible in explorer
Hi , I am trying to build an explorer report on top of Bi query . I have created universe for this and I have created the information space using this universe in explorer where I was able to select the measures and facets & when i click on validate
-
Send & Recieve functionality not working with WebDav after installing Acrobat XI
Send & Recieve functionality not working with WebDav after installing Acrobat XI for PDF. Acrobat XI is complete installations(Trial Version).
-
Workaround ACL limitation WiSM
Hi all, ACLS configured on WiSM got a limitation of 64 lines.If I have FWSM on the same chassis, are there anyway to offload the ACL function to FWSM ?This will enable more than 64 lines ACL.If thats not possible,what is the workaround?Cannot summari