Problem with prorata calculation of pf contribution
Hello
I have an issue in employee pf calculation on selecting the eligible pay or pf basis whichever is less in infotype 587. When i select this option in IT-587 the pf contribution gets restricted to Rs.780
Now in case the employee is absent for a couple of days in a month then this calculation gets reduced.eg if one day absesnce is there it becomes 755(780/31*30). Here the employee pay is more than the pf basis which is Rs.6500
I need to the system to continue deducting 780 till the employee receives more than 6500, even though he may be absent.i.e prorating should not take place in such cases.
regards
sameer
Message was edited by:
sameer k
Hi
You can do at two ends
1 INEPF.
2 By rule.
I will prefer the INEPF.
Now jsut do one thing ask the ABAPer to debugg it , in INEPF it is calulating dont know exact code.
it is easy to find out .
And add the codings after the calculation.
It will be very easy.
Manoj Shakya.
Close the thread.
Similar Messages
-
Problem with the calculator and modifications needed
i have got a problem with the calculator on my iphone i.e i cannot find any DEL key or Backspace....the problem is when typing a long value if one number is entered wrong we should start again.
EXAMPLE...if i need to type 114678047 * 345612
if acidentally if i type 114678047 * 3455 ( then i should start over typing "C" key)
i should start over to type the whole data..if we have a delete key we can just correct it right away and continue.....rather than starting over
we can find this feature in all the other smart phones , i dont know why apple coudnt find that
even every scientific calculator have a DEL key...
Thanks
vickyk7FEEDBACK
If you want to give Apple feed back then do it here http://www.apple.com/feedback/iphone.html -
Problem with a calculated member browsing cube with a specific user role
Good evening to all of you .
I am not a newbie about SSAS nor an expert developer.
I use SSAS 2008 R2 Standard Edition.
I try to simplify my problem with a calculated measure.
I have a CUBE with :
[Measures].[Sales Amount]
Dimension STORES - Dimension CUSTOMERS - Dimension DATE
I have also 2 user roles :
Direction Role can see all members of all dimensions.
Customize Role has a restriction about Dimension STORES ..it can see only a STORE of all (Suppose to have 100 stores).
User that has a Customize Role, when browse cube in Excel , want to see for a specific CUSTOMER , Sales Amount of his own STORE but also the total Sales Amount of ALL STORES for that Customer...
Is it possibile to do that ???
Can you give any suggestion also using Adventure Works Cube ???
I was able to create a calculated measure like that below.
It does not work...It give the same result of Sales Amount
It seems that Customize Role win Always about every kind of calculate measure i need to create..
i.e SUM([STORES].[STORES].[ALL STORES],[Measures].[Sales Amount])
Thanks in advance.Hi maretix,
According to your description, you have a customize role which limit the user can only see data about his own STORE. Now this user wants to see the total Sales Amount for his own STORES only. Right?
In Analysis Services, when granting custom access to dimension data, it has a option "Enable Visual Total" in Advanced dimension security. By default, the
VisualTotals property is disabled (set to False). This default setting maximizes performance because Analysis Services can quickly calculate the total of all cell values, instead of having to spend time selecting which
cells values to calculate. So you always get same result which is the total for all STORES.
In this scenario, please select this option. When you enable the VisualTotals property, your custom role can only view aggregated totals for dimension members to which the role has permission.
Reference:
Grant custom access to dimension data (Analysis Services)
If you have any question, please feel free to ask.
Best Regards,
Simon Hou
TechNet Community Support -
I think I found a problem with the calculator application.
I'm a south korean highschool student and I think I found a problem with calculator application. I use iPod touch 4th generation with iOS 5.0.1. I was playing with calculator app and I found out that 0.1!(factorial) is 0.951350769866873. This can't be right bacause factorial calculation can only be definrd whan n is natural number or 0(in n!). I want apple to correct this error.
And if you are someone working with apple, please let me know the algorithm of factorial calculation(if possible). I would be grateful if I can have a chance to study the algorithm and find out what made 0.1! possible.
so question.
do anybody know how to send an email to apple? I tried but I couldn't find the address.Apple doesn't dialogue with users via email the way you want, but you can report such problems to them via
http://www.apple.com/feedback/
But in this particular case you should be aware that factorial can in fact be done for non-integers:
http://en.wikipedia.org/wiki/Factorial#Extension_of_factorial_to_non-integer_val ues_of_argument -
I have a problem with my calculator :(
hi all,
i need some help with my calculator..after i wrote the code i discovered my mistake so i made some changes on the code..the problem is that it's still applying the old code !!
( i didn't forgot to compile it, & i closed all the browsers b4 trying it )
i will appreciate ANY suggestion
P.S : my mistake was with the operations buttons ( add, sub, multip, division ) & the equal button
if it may help, this is the code ( the new one, then the old one )
the new code:
import java.awt.* ; // Container, FlowLayout
import java.awt.event.* ; // ActionEvent, ActionListener
import javax.swing.* ; // JApplet , JButton , JLabal, JTextField
public class Calculator2 extends JApplet implements ActionListener {
// graphical user interface components
JTextField field ;
JButton zero, one, two, three, four, five, six, seven, eight, nine, fraction, clear,
add, sub, multip , division, equal ,sin , cos, tan ,log ,sqrt ,exp ;
// variables
String string = " " ; // to store what is in the text field
String operation ; // to store the operation selected
double operate ; // to store the result of the operation selected
double operand1 , operand2 ; // the operands of the operation
// set up GUI components
public void init ()
Container container = getContentPane ();
container.setLayout ( new FlowLayout () );
// create a text field
field = new JTextField ( 17 );
container.add ( field ) ;
// create buttons
clear = new JButton ( "C" ) ;
clear.addActionListener ( this ) ;
container.add ( clear );
zero = new JButton ( "0" ) ;
zero.addActionListener ( this ) ;
container.add ( zero );
one = new JButton ( "1" ) ;
one.addActionListener ( this ) ;
container.add ( one );
two = new JButton ( "2" ) ;
two.addActionListener ( this ) ;
container.add ( two );
three = new JButton ( "3" ) ;
three.addActionListener ( this ) ;
container.add ( three );
four = new JButton ( "4" ) ;
four.addActionListener ( this ) ;
container.add ( four );
five = new JButton ( "5" ) ;
five.addActionListener ( this ) ;
container.add ( five );
six = new JButton ( "6" ) ;
six.addActionListener ( this ) ;
container.add ( six );
seven = new JButton ( "7" ) ;
seven.addActionListener ( this ) ;
container.add ( seven );
eight = new JButton ( "8" ) ;
eight.addActionListener ( this ) ;
container.add ( eight );
nine = new JButton ( "9" ) ;
nine.addActionListener ( this ) ;
container.add ( nine );
fraction = new JButton ( "." ) ;
fraction.addActionListener ( this ) ;
container.add ( fraction );
add = new JButton ( "+" ) ;
add.addActionListener ( this ) ;
container.add ( add );
sub = new JButton ( "-" ) ;
sub.addActionListener ( this ) ;
container.add ( sub );
multip = new JButton ( "*" ) ;
multip.addActionListener ( this ) ;
container.add ( multip );
division = new JButton ( "�" ) ;
division.addActionListener ( this ) ;
container.add ( division );
sin = new JButton ( "sin" ) ;
sin.addActionListener ( this ) ;
container.add ( sin );
cos = new JButton ( "cos" ) ;
cos.addActionListener ( this ) ;
container.add ( cos );
tan = new JButton ( "tan" ) ;
tan.addActionListener ( this ) ;
container.add ( tan );
log = new JButton ( "log" ) ;
log.addActionListener ( this ) ;
container.add ( log );
sqrt = new JButton ( "sqrt" ) ;
sqrt.addActionListener ( this ) ;
container.add ( sqrt );
exp = new JButton ( "exp" ) ;
exp.addActionListener ( this ) ;
container.add ( exp );
equal = new JButton ( "=" ) ;
equal.addActionListener ( this ) ;
container.add ( equal );
} // end of method init
public void actionPerformed ( ActionEvent event )
// button zero
if ( event.getSource()== zero )
string = string + "0" ;
field.setText ( string ) ;
// button one
else if ( event.getSource()== one )
string = string + "1" ;
field.setText ( string ) ;
// button two
else if ( event.getSource()== two )
string = string + "2" ;
field.setText ( string ) ;
// button three
else if ( event.getSource()== three )
string = string + "3" ;
field.setText ( string ) ;
// button four
else if ( event.getSource()== four )
string = string + "4" ;
field.setText ( string ) ;
// button five
else if ( event.getSource()== five )
string = string + "5" ;
field.setText ( string ) ;
// button six
else if ( event.getSource()== six )
string = string + "6" ;
field.setText ( string ) ;
// button seven
else if ( event.getSource()== seven )
string = string + "7" ;
field.setText ( string ) ;
// button eight
else if ( event.getSource()== eight )
string = string + "8" ;
field.setText ( string ) ;
// button nine
else if ( event.getSource()== nine )
string = string + "9" ;
field.setText ( string ) ;
// button fraction
else if ( event.getSource()== fraction )
string = string + "." ;
field.setText ( string ) ;
// button clear
else if ( event.getSource()== clear )
clear ();
// button add
else if ( event.getSource()== add )
operand1 = Double.parseDouble ( string );
operation = "+" ;
clear ();
// button sub
else if ( event.getSource()== sub )
operand1 = Double.parseDouble ( string );
operation = "-" ;
clear ();
// button multip
else if ( event.getSource()== multip )
operand1 = Double.parseDouble ( string );
operation = "*" ;
clear ();
// button division
else if ( event.getSource()== division )
operand1 = Double.parseDouble ( string );
operation = "/" ;
clear ();
// button sin
else if ( event.getSource()== sin )
operate = Double.parseDouble ( string ) ;
operate = Math.sin( operate );
field.setText ( Double.toString ( operate ) ) ;
// button cos
else if ( event.getSource()== cos )
operate = Double.parseDouble ( string ) ;
operate = Math.cos( operate );
field.setText ( Double.toString ( operate ) ) ;
// button tan
else if ( event.getSource()== tan )
operate = Double.parseDouble ( string ) ;
operate = Math.tan( operate );
field.setText ( Double.toString ( operate ) ) ;
// button log
else if ( event.getSource()== log )
operate = Double.parseDouble ( string ) ;
operate = Math.log( operate );
field.setText ( Double.toString ( operate ) ) ;
// button sqrt
else if ( event.getSource()== sqrt )
operate = Double.parseDouble ( string ) ;
operate = Math.sqrt( operate );
field.setText ( Double.toString ( operate ) ) ;
// button exp
else if ( event.getSource()== exp )
operate = Double.parseDouble ( string ) ;
operate = Math.exp( operate );
field.setText ( Double.toString ( operate ) ) ;
// button equal
else // if ( event.getSource()== equal )
operand2 = Double.parseDouble ( string );
if ( operation == "+" )
operate = operand1 + operand2 ;
else if ( operation == "-" )
operate = operand1 - operand2 ;
else if ( operation == "*" )
operate = operand1 * operand2 ;
else if ( operation == "/" )
operate = operand1 / operand2 ;
field.setText ( Double.toString ( operate ) ) ;
} // end of method actionPerformed
public void clear ()
string = " ";
field.setText ( string ) ;
} // end of method clear
} // end of class
the old code which have the problem ( which i make the changes on ) :
// button clear
else if ( event.getSource()== clear )
string = "";
field.setText ( string ) ;
// button add
else if ( event.getSource()== add )
string = string + "+" ;
field.setText ( string ) ;
// button sub
else if ( event.getSource()== sub )
string = string + "-" ;
field.setText ( string ) ;
// button multip
else if ( event.getSource()== multip )
string = string + "*" ;
field.setText ( string ) ;
// button division
else if ( event.getSource()== division )
string = string + "/" ;
field.setText ( string ) ;
// button equal
else // if ( event.getSource()== equal )
operate = Double.parseDouble ( string ) ;
field.setText ( Double.toString ( operate ) ) ;
thanks a lot :)Open Java console and press "x" (Clear cache)
Disable caching in java paremeters. -
Problems with shipping calculations
We have been working with BC eCommerce since the beginning of 2013.
We have been working with UPS and the checkout shopping cart get the shipping costs from UPS.
However we are experiencing a problem with big orders due to the fact that big orders require a second or even a third box and then UPS charges are higher than the calculation
here is what is happening righ now:
we can house 4 products in a box. Each product weights 10.5 pound.
In orders of 4 or less products we dont have a problem. UPS calculates 1 box of 42 pounds.
Let's say we have to ship 7 products, then we have a 42 pounds box and a 31.5 pounds box but the system has calculated a box of 73.5 pound which is lower than shipping the two individual orders.
even using ground transportaion this problem represent 5 to 10 when shipping two boxes and it will grow even bigger when we have to ship 3 boxes (almost $40).
I appreciate your ideas on how to solve this problem.
ThanksI too, am having issues with inaccurate FEDEX shipping costs.
Our FEDEX rep has provided evidence that somewhere along the way, the measurements sent to the FEDEX server, is being provided to FEDEX in metric measurments.
Which is very strange, as our store is setup in English System of Measurments (U.S. Customary System and the Britich Imperial System) meaning that our dimensions and weight within the BC system are in inches and pounds. (BC support has confirmed that the setup is correctly for inches and pound measurement)
The result is that the shipping costs generated using integrated FEDEX on BC can be significantly lower than when using the same account info on the client's FEDEX web portal. This signicantly cuts into profits - and in some cases the client can loose money after making an online sale!
Is anyone else finding this to be the case? Does anyone have any suggestions? My client is very, very frustrated - and naturally does not want to lose money on shipping. Any help appreciated. Thanks.
TheBCMan - I know you specialize in shipping calculators, have you come across this?
GeckoTales - did you ever develop or come across a work-around?
Thanks everyone. Hope someone has come across this. Am getting desparate. -
Problem with Context - calculated Value
I have a problem with my WebDynPro-Project.
The Errors which is shown by the NWDS:
"Web Dynpro Generation: Metadata constraint of Component KeyMappingComponent is violated: CalculatedAttributeProvider "//WebDynpro/Controller:de.vwfsag.keymapping.ui.KeyMappingComponent/CalculatedAttributeProvider:BusinessAttributeDataSprache", Role "Attribute": A minimum of 1 object(s) is required"
What I've done:
- changed valueproperties calculated from "true" to "false" and back.
The problem is that the set und get methods remained after resetting the calculateproperty to "false".
I've tried several time to switch the property but now I got more remained set and get methods (..._1, ..._2, ...), which I can't delete in the NWDS.
What I also tried was to change the .wdcontroller"-file of my controller-component, but this file is generated so after a rebuild the ".wdcontroller"-file is still corrupted.
I think the conclusion should be something to delete these methods or change the calculatedproperty in some files you can't access directly from the NWDS.
I hope anyone could help me out with this?
Greetz Christian
Edited by: christian.zuehlsdorf on Dec 14, 2009 6:24 PMTushar Sinha wrote:Tushar Sinha wrote:Hey Sinha,
thank you fr your answer!
>
> Just try deleting the attribute for which you tried setting the calculated property as true and then false, try repairing your project, reload and build again. Hopefully this should get you rid of the getters and setters.
That was the first thing I already tried. I deleted the whole context und then rebuild and repair and rebuild... But none of that help.
>
> Do, not manually try deleting the getters/setters manually for any attribute as it is autogenerated for an attribute.
These getters/setters only have part of the configuration with no context-attribute-bind, which in fact seems to be the problem for the build-process. -
I am a rookie in SAP i have a small problem with date.Do we have any function module to find out the first day in a month if we give out the system current date ?? Pls help me out.
Hi,
As Ganesan told,you can do.
Here is the sample code.
data v type sy-datum.
data d type DTRESR-WEEKDAY.
v+6(2) = '01'.
v4(2) = sy-datum4(2).
v0(4) = sy-datum0(4).
CALL FUNCTION 'DATE_TO_DAY'
EXPORTING
date = v
IMPORTING
WEEKDAY = d.
write d. -
Problem with subtotal calculation in ALV reports
Hi All,
I am doing one program for calculating subtoals in ALV . For this i want to display subtotal text at each envey subtotal 's row.
For that i have created one form 'SUB_SUBTOT_TEXT' and it has given to IT_EVENTS-FORM. But SUB_SUBTOT_TEXT Form is not called by IT_EVENTS event.
what are all the mandatories for displaying subtotal text.
Can any one please help me.
Thanks in Advance.Hi Sree,
*& Table declaration
&----TABLES: ekko.&----
*& Type pool declaration
TYPE-POOLS: slis. " Type pool for ALV&----
*& Selection screen
SELECT-OPTIONS: s_ebeln FOR ekko-ebeln.&----
*& Type declaration
&----* Type declaration for internal table to store EKPO data
TYPES: BEGIN OF x_data,
ebeln TYPE char30, " Document no.
ebelp TYPE ebelp, " Item no
matnr TYPE matnr, " Material no
matnr1 TYPE matnr, " Material no
werks TYPE werks_d, " Plant
werks1 TYPE werks_d, " Plant
ntgew TYPE entge, " Net weight
gewe TYPE egewe, " Unit of weight
END OF x_data.&----
*& Internal table declaration
DATA:* Internal table to store EKPO data
i_ekpo TYPE STANDARD TABLE OF x_data INITIAL SIZE 0,
Internal table for storing field catalog information
i_fieldcat TYPE slis_t_fieldcat_alv,
Internal table for Top of Page info. in ALV Display
i_alv_top_of_page TYPE slis_t_listheader,
Internal table for ALV Display events
i_events TYPE slis_t_event,
Internal table for storing ALV sort information
i_sort TYPE slis_t_sortinfo_alv,
i_event TYPE slis_t_event.&----
*& Work area declaration
&----DATA:
wa_ekko TYPE x_data,
wa_layout TYPE slis_layout_alv,
wa_events TYPE slis_alv_event,
wa_sort TYPE slis_sortinfo_alv.&----
*& Constant declaration
&----CONSTANTS:
c_header TYPE char1
VALUE 'H', "Header in ALV
c_item TYPE char1
VALUE 'S'.&----
*& Start-of-selection event
&----START-OF-SELECTION.* Select data from ekpo
SELECT ebeln " Doc no
ebelp " Item
matnr " Material
matnr " Material
werks " Plant
werks " Plant
ntgew " Quantity
gewei " Unit
FROM ekpo
INTO TABLE i_ekpo
WHERE ebeln IN s_ebeln
AND ntgew NE '0.00'. IF sy-subrc = 0.
SORT i_ekpo BY ebeln ebelp matnr .
ENDIF.* To build the Page header
PERFORM sub_build_header.* To prepare field catalog
PERFORM sub_field_catalog.* Perform to populate the layout structure
PERFORM sub_populate_layout.* Perform to populate the sort table.
PERFORM sub_populate_sort.* Perform to populate ALV event
PERFORM sub_get_event.END-OF-SELECTION.* Perform to display ALV report
PERFORM sub_alv_report_display.
*& Form sub_build_header
To build the header
No Parameter
FORM sub_build_header .* Local data declaration
DATA: l_system TYPE char10 , "System id
l_r_line TYPE slis_listheader, "Hold list header
l_date TYPE char10, "Date
l_time TYPE char10, "Time
l_success_records TYPE i, "No of success records
l_title(300) TYPE c. " Title
Title Display
l_r_line-typ = c_header. " header
l_title = 'Test report'(001).
l_r_line-info = l_title.
APPEND l_r_line TO i_alv_top_of_page.
CLEAR l_r_line.* Run date Display
CLEAR l_date.
l_r_line-typ = c_item. " Item
WRITE: sy-datum TO l_date MM/DD/YYYY.
l_r_line-key = 'Run Date :'(002).
l_r_line-info = l_date.
APPEND l_r_line TO i_alv_top_of_page.
CLEAR: l_r_line,
l_date.ENDFORM. " sub_build_header
*& Form sub_field_catalog
Build Field Catalog
No Parameter
FORM sub_field_catalog .* Build Field Catalog
PERFORM sub_fill_alv_field_catalog USING: '01' '01' 'EBELN' 'I_EKPO' 'L'
'Doc No'(003) ' ' ' ' ' ' ' ', '01' '02' 'EBELP' 'I_EKPO' 'L'
'Item No'(004) 'X' 'X' ' ' ' ', '01' '03' 'MATNR' 'I_EKPO' 'L'
'Material No'(005) 'X' 'X' ' ' ' ', '01' '03' 'MATNR1' 'I_EKPO' 'L'
'Material No'(005) ' ' ' ' ' ' ' ',
'01' '04' 'WERKS' 'I_EKPO' 'L'
'Plant'(006) 'X' 'X' ' ' ' ', '01' '04' 'WERKS1' 'I_EKPO' 'L'
'Plant'(006) ' ' ' ' ' ' ' ', '01' '05' 'NTGEW' 'I_EKPO' 'R'
'Net Weight'(007) ' ' ' ' 'GEWE' 'I_EKPO'.ENDFORM. " sub_field_catalog&----
*& Form sub_fill_alv_field_catalog
*& For building Field Catalog
*& p_rowpos Row position
*& p_colpos Col position
*& p_fldnam Fldname
*& p_tabnam Tabname
*& p_justif Justification
*& p_seltext Seltext
*& p_out no out
*& p_tech Technical field
*& p_qfield Quantity field
*& p_qtab Quantity table
FORM sub_fill_alv_field_catalog USING p_rowpos TYPE sycurow
p_colpos TYPE sycucol
p_fldnam TYPE fieldname
p_tabnam TYPE tabname
p_justif TYPE char1
p_seltext TYPE dd03p-scrtext_l
p_out TYPE char1
p_tech TYPE char1
p_qfield TYPE slis_fieldname
p_qtab TYPE slis_tabname.* Local declaration for field catalog
DATA: wa_lfl_fcat TYPE slis_fieldcat_alv. wa_lfl_fcat-row_pos = p_rowpos. "Row
wa_lfl_fcat-col_pos = p_colpos. "Column
wa_lfl_fcat-fieldname = p_fldnam. "Field Name
wa_lfl_fcat-tabname = p_tabnam. "Internal Table Name
wa_lfl_fcat-just = p_justif. "Screen Justified
wa_lfl_fcat-seltext_l = p_seltext. "Field Text
wa_lfl_fcat-no_out = p_out. "No output
wa_lfl_fcat-tech = p_tech. "Technical field
wa_lfl_fcat-qfieldname = p_qfield. "Quantity unit
wa_lfl_fcat-qtabname = p_qtab . "Quantity table IF p_fldnam = 'NTGEW'.
wa_lfl_fcat-do_sum = 'X'.
ENDIF.
APPEND wa_lfl_fcat TO i_fieldcat.
CLEAR wa_lfl_fcat.
ENDFORM. " sub_fill_alv_field_catalog&----
*& Form sub_populate_layout
Populate ALV layout
No Parameter
FORM sub_populate_layout . CLEAR wa_layout.
wa_layout-colwidth_optimize = 'X'." Optimization of Col widthENDFORM. " sub_populate_layout&----
*& Form sub_populate_sort
Populate ALV sort table
No Parameter
FORM sub_populate_sort .* Sort on material
wa_sort-spos = '01' .
wa_sort-fieldname = 'MATNR'.
wa_sort-tabname = 'I_EKPO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.* Sort on plant
wa_sort-spos = '02'.
wa_sort-fieldname = 'WERKS'.
wa_sort-tabname = 'I_EKPO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort .
CLEAR wa_sort.
ENDFORM. " sub_populate_sort&----
*& Form sub_get_event
Get ALV grid event and pass the form name to subtotal_text
event
No Parameter
FORM sub_get_event .
CONSTANTS : c_formname_subtotal_text TYPE slis_formname VALUE
'SUBTOTAL_TEXT'. DATA: l_s_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 4
IMPORTING
et_events = i_event
EXCEPTIONS
list_type_wrong = 0
OTHERS = 0.* Subtotal
READ TABLE i_event INTO l_s_event
WITH KEY name = slis_ev_subtotal_text.
IF sy-subrc = 0.
MOVE c_formname_subtotal_text TO l_s_event-form.
MODIFY i_event FROM l_s_event INDEX sy-tabix.
ENDIF.ENDFORM. " sub_get_event&----
*& Form sub_alv_report_display
For ALV Report Display
No Parameter
FORM sub_alv_report_display .
DATA: l_repid TYPE syrepid .
l_repid = sy-repid .* This function module for displaying the ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_top_of_page = 'SUB_ALV_TOP_OF_PAGE'
is_layout = wa_layout
it_fieldcat = i_fieldcat
it_sort = i_sort
it_events = i_event
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = i_ekpo
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE i000 WITH 'Error in ALV report display'(055).
ENDIF.ENDFORM. " sub_alv_report_display&----
FORM sub_alv_top_of_page
Call ALV top of page
No parameter
----FORM sub_alv_top_of_page. "#EC CALLED* To write header for the ALV
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = i_alv_top_of_page.
ENDFORM. "alv_top_of_page&----
*& Form subtotal_text
Build subtotal text
P_total Total
p_subtot_text Subtotal text info
FORM subtotal_text CHANGING
p_total TYPE any
p_subtot_text TYPE slis_subtot_text.
Material level sub total
IF p_subtot_text-criteria = 'MATNR'.
p_subtot_text-display_text_for_subtotal
= 'Material level total'(009).
ENDIF.* Plant level sub total
IF p_subtot_text-criteria = 'WERKS'.
p_subtot_text-display_text_for_subtotal = 'Plant level total'(010).
ENDIF.
ENDFORM. "subtotal_text
Hopes its helpful.
Regards,
Raj. -
Problem with array calculations
The only problem I have now is, instead of calculating the payments at 7 years/5.35%, 15 years/5.5%, and 30 years/5.75%, it's calculating them for 7 years at 5.35%, 5.5%, and 5.75%, 15 years at 5.35%, 5.5%, and 5.75%, and so on. I don't need it to do all of that, I need the years to correspond to the correct interest rate. How can I change that? Thank you so much. Here is my new code:
class PaymentArray {
public static void main(String[] arguments) {
double amount = 100000;
int[] term = {7, 15, 30};
double[] rate = {.0535, .055, .0575};
for (int i = 0; i < term.length; i++) {
for (int j = 0; j < rate.length; j++) {
System.out.println("If the initial loan amount is " + amount);
System.out.println("and the length of the term is " + term[i] + " years");
System.out.println("and the monthly interest rate is " + rate[j]);
double payment = (amount*(rate[j]/12))/(1-(Math.pow(1/(1+(rate[j]/12)),(term*12))));
System.out.println("The monthly payment will be " + payment);Bollocks! The code tags got me!
You don't need two loops.
class PaymentArray {
public static void main(String[] arguments) {
double amount = 100000;
int[] term = {7, 15, 30};
double[] rate = {.0535, .055, .0575};
for (int i = 0; i < term.length; i++) {
System.out.println("If the initial loan amount is " + amount);
System.out.println("and the length of the term is " + term[i] + " years");
System.out.println("and the monthly interest rate is " + rate);
double payment = (amount*(rate[i]/12))/(1-(Math.pow(1/(1+(rate[i]/12)),(term[i]*12))));
System.out.println("The monthly payment will be " + payment); -
Problem with performing calculations on COUNT-aggregated columns
Hi guys,
I have something weird - 2 columns with Aggregation set to Count, both are from the same Fact table. Indicators are in the same Fact table.
Count column A (with FILTER key_column USING Indicator1='yes')
Count column B (with FILTER key_column USING Indicator1='yes' and Indicator2='yes')
They show fine by themselves.
However, when I create a column C where:
Column B / Column A - I get nulls.
I tried both filtering logical content with Filter and also running CASE WHEN , etc.
Anyone else had it?Well, it certainly has to do something with IFNULL. Now, when I did what you suggested, I get correct numbers, but only after i drill-down from top level. I'll try to tweak with levels and see what's up.
Success:
not only it's important to use IFNULL, but also it's important to set level aggregation for A and B (i set it to Fiscal Year). Thanks for assistance
Message was edited by:
wildmight -
I'm trying to update the currency exchange rate but I get an error message saying that it's unable to update. I've been getting this message for the last month or so...
Any idea?
Cheers--
SusanHe he! Ever since I purchased an airplane ticket to Europe a couple of weeks ago, I've been unable to get the update too. I've been using this one on the Web. It has more currencies available than Apple's calculator too. The "calculator only supports currencies whose exchange rates are posted by the International Monetary Fund," according to the Calculator Help. Of course, it doesn't work unless you're online...
-Doug -
Problem with non currency field calculations to become curr
Hi guys,
Is there a problem if I have a QUAN field and DEC field forming to become a CURR field? I mean a have this computation below:
v_var1 = v_var2 * v_var3.
where v_var1 type QUAN, v_var2 type DEC and v_var3 type CURR...
would it incur any problem with the calculations?
Thanks!Hi,
Did you try ?
Worked for me flawlessly
tables bseg.
parameters : qty like bseg-menge,
amt like bseg-dmbtr.
data : result like bseg-dmbtr.
result = qty * amt.
write result.
The only issue is that the result will be rounded upto 2 decimals.
But if you declare result as
data : result(13) type p decimals 3.
Then there will be no issues.
regards,
Advait
Edited by: Advait Gode on Oct 3, 2008 3:59 PM -
Problem with a calc involving @MDSHIFT and Dynamic Calc
Hi all,
I have a problem with the calculation of a member in a calc script. The formula of this member is :
"R70100"
IF(@ISMBR("M01"))
("T_008"->"Cumul"->"HT"+"T_003"->"Cumul"->"HT")*"AVCT_PR" - @MDSHIFT("R70100" -> "Cumul" -> "HT" -> "M12", -1, "Year", );
ELSE
("T_008"->"Cumul"->"HT"+"T_003"->"Cumul"->"HT")*"AVCT_PR" - @MDSHIFT("R70100" -> "Cumul" -> "HT", -1, "Period", );
ENDIF
- R70100 is a member of a dense dimension.
- T_008, T_003 and AVCT_PR are spare and stored.
- "Cumul" is a dynamic member which allow us to calculate cumulative from monthly.
- Time is split into two dimensions, Period and Year.
The problem is that the @MDSHIFT doesn't seems to work with the dynamic calc as the monthly result is the cumulative correct value. I didn't know what is wrong BUT each time I launch the script, values are good for one more month.
After one run, for example, I obtained this result :
!http://zenon.apartia.fr/stuff/200910070001.GIF!
Two run later, here are the news values :
!http://zenon.apartia.fr/stuff/200910070002.GIF!
Any idea on what going on and how to correct it ? Thanks !
FrédéricA couple of questions for you:
1) Do you need the overhead of @MDSHIFT when you are only moving in one dimension? Wouldn't @PRIOR have been a lot easier? At least this is true for the ELSE condition.
2) Could you post just the results of the @MDSHIFT calculation so we (okay, this may be just for me, it's still breakfast time here and not enough coffee has been ingested yet to read a spreadsheet without recourse to the formulas) can better see the impact?
3) Have you tried using your code against a non-dynamic member? Does it make a difference?
Regards,
Cameron Lackpour -
Calc problem with fact table measure used as part of bridge table model
Hi all,
I'm experiencing problems with the calculation of a fact table measure ever since I've used it as part of a calculation in a bridge table relationship.
In a fact table, PROJECT_FACT, I had a column (PROJECT_COST) whose default aggregate was SUM. Whenever PROJECT_COST was used with any dimension, the proper aggregation was done at the proper levels. But, not any longer. One of the relationships PROJECT_FACT has is with a dimension, called PROJECT.
PROJECT_FACT contains details of employees and each day they worked on a PROJECT_ID. So for a particular day, employee, Joe, might have a PROJECT_COST of $80 for PROJECT_ID 123, on the next day, Joe might have $40 in PROJECT_COST for the same project.
Dimension table, PROJECT, contains details of the project.
A new feature was added to the software - multiple customers can now be charged for a PROJECT, where as before, only one customer was charged.
This percentage charge break-down is in a new table - PROJECT_BRIDGE. PROJECT_BRIDGE has the PROJECT_ID, CUSTOMER_ID, BILL_PCT. BILL_PCT will always add up to 1.
So, the bridge table might look like...
PROJECT_ID CUSTOMER_ID BILL_PCT
123 100 .20
123 200 .30
123 300 .50
456 400 1.00
678 400 1.00
Where for project 123, is a breakdown for multiple customers (.20, .30. .50).
Let's say in PROJECT_FACT, if you were to sum up all PROJECT_COST for PROJECT_ID = 123, you get $1000.
Here are the steps I followed:
- In the Physical layer, PROJECT_FACT has a 1:M with PROJECT_BRIDGE as does PROJECT to PROJECT_BRIDGE (a 1:M).
PROJECT_FACT ===> PROJECT_BRIDGE <=== PROJECT
- In the Logical layer, PROJECT has a 1:M with PROJECT_FACT.
PROJECT ===> PROJECT_FACT
- The fact logical table source is mapped to the bridge table, PROJECT_BRIDGE, so now it has multiple tables it maps to (PROJECT_FACT & PROJECT_BRIDGE). They are set for an INNER join.
- I created a calculation measure, MULT_CUST_COST, using physical columns, that calculates the sum of the PROJECT_COST X the percentage amount in the bridge table. It looks like: SUM(PROJECT_FACT.PROJECT_COST * PROJECT_BRIDGE.BILL_PCT)
- I brought MULT_CUST_COST into the Presentation layer.
We still want the old PROJECT_COST around until it get's phased out, so it's in the Presentation layer as well.
Let's say I had a request with only PROJECT_ID, MULT_CUST_COST (the new calculation), and PROJECT_COST (the original). I'd expect:
PROJECT_ID MULT_CUST_COST PROJECT_COST
123 $1000 $1000
I am getting this for MULT_CUST_COST, however, for PROJECT_COST, it's tripling the value (possibly because there are 3 percent amounts?)...
PROJECT_ID MULT_CUST_COST PROJECT_COST
123 $1000 (correct) $3000 (incorrect, it's been tripled)
If I were to look at the SQL, it would have:
SELECT SUM(PROJECT_COST),
SUM(PROJECT_FACT.PROJECT_COST * PROJECT_BRIDGE.BILL_PCT),
PROJECT_ID
FROM ...
GROUP BY PROJECT_ID
PROJECT_COST used to work correctly before modeling a bridge table.
Any ideas on what I did wrong?
Thanks!Hi
Phew, what a long question!
If I understand correctly I think the problem lies with your old cost measure, or rather combining that with you new one in the same request. If you think about it, your query as explained above will bring back 3 rows from the database which is why your old cost measure is being multiplied. I suspect that if you took it out of the query, your bridge table would be working properly for the new measure alone?
I would consider migrating your historic data into the bridge table model so that you have a single type of query. For the historic data each would have a single row in the bridge with a 1.0 BILL_PCT.
Best of luck,
Paul
http://total-bi.com
Maybe you are looking for
-
=Time.isTimeWindowOpenNow - is there a NOT EQUAL option?
Hi, I am trying to stop a job in a chain from running on a Friday for example. As a precondition I basically need the opposite of =Time.isTimeWindowOpenNow or I need a option to do a NOT EQUAL to expression. Is there a format to use to set a precondi
-
IDisk has information not visible in iWeb
When I go to my Web Gallery to view, download, or upload, there is no problem. When I browse my site, or friends to, there is also no problem(by site I mean http://web.mac.com/[AppleID]). Normally, all information, if hosted with .Mac, made with iWeb
-
Changed group membership in WGM 10.6.3 from the 10.6 server. The change takes overnight to work. Formerly ran WGM from my 10.6.8 mac (worked perfectly) but now I am at 10.7.5 and must use WGM on the server. Has anyone else seen this behavior?
-
Where Clause in a Query button
Hello This is a where clause in a button to do the following .. WHERE WEEK_EMP_NO In (SELECT EMP_ID FROM EMPLOYEE) AND WEEK_DAY1= :WEEK_DAY1 AND WEEK_DAY2= :WEEK_DAY2 ; ============================= My Problem is : i can't format the right parentais
-
Execute package task to call external package
Hi all, I'm developing a SSIS project, I need an "execute package task" to execute a packahe stored in the SSISDB catalog of a SQL Server 2014 Instance. If I choose "External Reference" I can choose from "File System" and "SQL Server" but if I point