Getting negative value of discount on adding ar draft through DIAPI 's

Hi
I am facing a scenario where in if I am creating the AR -draft for 1 day order through DIAPI's ADD method ,The sales invoice draft that gets created shows discount =some decimal value that on rounding off is equivalent to 10 in case 10% discount is given on order at line level.
and in case i have made draft for an order having period more than 1 day then the discount values gets negative.
For each line I am assigning the discount value in following ways:
oDraft.Lines.DiscountPercent = 10
then the draft that gets created shows me
discount%= 9.125  in case I have 1 day period
and
discount%= -400 in case I have period of more tahn 1 day.
I am not understanding why is it so .I mean on what values the discount on AR - invoice draft  calulation actually depends.
why is it showing me decimal amount when i am assiging a roundoff value of 10 .
and why is it making discount negative.
Please help me out as early as possible.

Hi ,
      Can u post the coding.

Similar Messages

  • Budget get negative value

    Dear SDN
    I use bcs budget when I try to Generate Budget Data (trans' FMCYLOAD ) i get negative value although I plan Positive values with planning layout. this have a direct effect on release budget and avability check.
    Please advise,
    regards,
    Itai Natan

    Hello Itai,
    Please have a look at this note:
    739815     Sign convention in BCS
    Concerning the sign convention in BCS, it is like this :
    Expenditures are stored with the negative sign in the database
    Revenues are stored with the positive sign in the database.
    In transaction FMBB, all amount are positive either it is expenditure
    or revenues.
    There is a short explanation in the IMG documentation under the node :
    BCS Budgeting / Planning / Define PLanning Layout.
    See below:
    Budget values that are posted as expenditure budget to FM account
    assignments with the item category 3 (expenditures) in the planning must
    be written to the database with a negative plus/minus sign.
    If you do not want this to be taken into consideration during plan data
    entry, you can define a formula definition for the plus/minus sign
    in the planning layout.
    I hope this helps.
    Kind regards, Mar.

  • How to get negative values in Report?

    Hi,
    i have to do 1 FI report in that if it's debited value have to come negative. How can i do the same?

    see this example
    IF ittaxdet-shkzg = 'H'.
                     itsumtax-add_tax  = ittaxdet-hwste * -1.
                   else.
                       itsumtax-add_tax = ittaxdet-hwste.
                   ENDIF.

  • Get PricingConditions values from PricingConditionPanel class method?

    Hi,
    The class PricingConditionPanel returns the arraylist of the pricing onditions on the item with method getPricingConditions(); through the interface PricingContainer.
    I am able to get the values in the arraylist returned by the class. It actually i think points to the object of the class PricingCondtion. It returns the size of the array same as it it there in the pricing panel in Order.jsp page. Two inetfaces are there linked:
    IPCPricingConditionSet
    IPCPricingCondition[]
    I want to get the value of Discount added to the item due to the campaign key addded to the item of sales order.
    constructors for both the classes are:
    PricingConditionPanel(   PricingContainer  pricingContainer, 
                                         boolean isSAPEventActive, 
                                         UIContext uiContext)
    PricingCondition(PricingConditionPanel pricingConditionPanel,
                             IPCPricingCondition ipcPricingCondition, UIContext uiContext)
    Kindly help me to link with the both the Classes.
    Please find the code below:
    ipcItemReference.setDocumentId(docID);
    ipcItemReference.setItemId(itemID);
    ipcItemReference.setConnectionKey(connectionKey);
    IPCItem ipcItem = ipcClient.getIPCItem(ipcItemReference);
    PricingContainer prContainer = new PricingItem(ipcItem);
    UIContext uiContextObj = new  UIContext();                              
    PricingConditionPanel priceCondPanel = new PricingConditionPanel(prContainer, true, uiContextObj);
    IPCPricingConditionSet IPCPricingCondSet = prContainer.getPricingConditions();
    IPCPricingCondition[] ipcPricingCond = IPCPricingCondSet.getPricingConditions();
    log.error("Pricing cond set: "+IPCPricingCondSet.getAvailableConditionTypeNames().getDescriptions());
    ArrayList alPriceCondPanel = new ArrayList();
    alPriceCondPanel = priceCondPanel.getPricingConditions();
    int alPriceSize = alPriceCondPanel.size();
    log.error("Size of array for prices: "+alPriceSize);
    Iterator itrPriceCondPanel = alPriceCondPanel.iterator();
    int m = 0;
    int n = 0;
    while (itrPriceCondPanel.hasNext()) {
         m++;
         log.error("Element" + m + " is : " + itrPriceCondPanel.next().toString());
         log.error("Element "+n+" value is: "+alPriceCondPanel.get(n).toString());     
    Thanks
    Ekta
    Edited by: ET on Jan 21, 2009 3:47 PM

    Thanks a lot Ram!
    Please find the code below, useful for others who visit SDN for Pricing conditions details!
                   for (int i = 0; i < ipcPricingCond.length; i++) {
                        IPCPricingCondition ipcCondition = ipcPricingCond<i>;
                        log.error("Condition description for element "+i+" is: "+ipcCondition.getDescription());
                        log.error("Condition type name for element "+i+" is :"+ipcCondition.getConditionTypeName());
                        if (ipcCondition.getConditionTypeName().equalsIgnoreCase("ZCM1"))
                          String condValue = ipcCondition.getConditionValue();
                          String condTypeName = ipcCondition.getConditionTypeName();
                          String ipcCondRate = ipcCondition.getConditionRate();
                          String ipcCondDesc = ipcCondition.getDescription();
                          log.error("Condition value: "+condValue);
                          log.error("Condition type name: "+condTypeName);
                          log.error("Condition rate: "+ipcCondRate);
                          log.error("Condition Description: "+ipcCondDesc);
    Thanks a lot!
    Ekta

  • MC.9 - Negative value

    Hi Sapians,
    While running MC.9 report we are getting negative value for a particular stock even when there is a positive stock. But in MB5B we are getting the correct output.
    By debugging we found that there is a negative value in S032 table. But we could not understand how we got negative value in S032.
    Could any one through some light on where it could went wrong?
    Thanks,
    Sukumaran.E

    Hi Sukumaran,
    Negative stocks in your case is due to inconsistencies in the Info structure tables.
    The report from MC.9 is calculated on runtime, taking the current stock position from stock database tables and adjusting the goods receipts and issues backwards. The goods movement data are from the info-structure tables. If there are inconsistencies in this data, you get negative stock figures or different figures compared to MB5B report. (MB5B runs the same way but uses MSEG table instead of ifo structure tables). This explanation is for understanding the cause of the problem.
    The remedy is, updating the info structure table. This update is for correcting the data in info-structure tables. You can delete the entries in these tables and re-build them. It has to be done during a period when there are no material movement postings happening - like after office hours or holidays.
    You can refer to SAP note 79083 for detailed step by step procedure for updating info structure tables.
    Hope you are able to correct the inconsistencies!!
    Best Regards,
    Siva

  • How to get selected value from SelectOneChoice

    Hi,
    I'm facing a problem to get selected value from SelectOneChoice. I have valueChangeListener event on a (SelectOneChoice)item. After user makes a choice I want to store selected value in a bean property to pass it to a method.
    For example List item shows dname from dept table after user makes a choice I want to get deptno and populate into bean which I use to pass into my method.
    If I use valueChangeEvent.getNewValue() I always get negative value instead I want deptno selected. Sample code pasted below.
    public void setDeptno(ValueChangeEvent valueChangeEvent) {
    BindingContainer b = getBindings();
    OperationBinding oB = b.getOperationBinding("setDeptno");
    //Checking instance of because same method is called from another text inputText item.
    if (valueChangeEvent.getSource() instanceof CoreSelectOneChoice){
    CoreSelectOneChoice cN = (CoreSelectOneChoice)valueChangeEvent.getSource();
    if (columnName.getId().toString().equals("deptDname")){
    JSFUtils.setManagedBeanValue("dept.deptDeptno",valueChangeEvent.getNewValue());
    }

    if your selectOneChoice has value equal to #{bindings.deptno} bound to the iterator Dept1Iterator,
    then the backing code will look more like
                    public void setDeptno(ValueChangeEvent valueChangeEvent) {
                        BindingContainer b = getBindings();
                        OperationBinding oB = b.getOperationBinding("setDeptno");
                        //Checking instance of because same method is called from another text inputText item.
                        if (valueChangeEvent.getSource() instanceof CoreSelectOneChoice){
                            CoreSelectOneChoice cN = (CoreSelectOneChoice)valueChangeEvent.getSource();
                        if (columnName.getId().toString().equals("deptDname")){
                            FacesContext ctx = FacesContext.getCurrentInstance();
                            Application app = ctx.getApplication();
                            ValueBinding bind = app.createValueBinding("#{bindings.Dept1Iterator.currentRow}");
                            Row row = (Row)bind.getValue(ctx);
                            JSFUtils.setManagedBeanValue("dept.deptDeptno", row.getAttribute("deptno"));
                    } I haven't tested it, so it could perfectly not work at all

  • Negative Values for Stock Quantity in BI

    Dear Experts,
    I have a report based on Inventory Management Multiprovider which is executed to check the Valuated Stock Quantity for single day input entry. ( Valuated Stock Qty is a non cumulative Key figure with Inflow as Quantity Received into Valuated Stock and outflow as Quantity Issued from Valuated Stock )
    So Valuated Stock Qty for a particular day = (Quantity Received into Valuated Stock till that day) - (Quantity Issued from Valuated Stock till that day).  So i think, checking the cube data in BI will not help to resolve the issue.
    Issue: : When I execute the report in BI for some dates I am getting Negative Values for Valuated Stock Quantity which is wrong output.
    Can this issue be resolved by filling set up tables and loading it to BI, say for last month?
    Could you please suggest any other solutions available?
    Also it will be helpful if you could explain what needs to be analyzed in ECC side (with T Codes)
    Thanks in advance
    Vinod

    Hi Vinod,
    try these transactions on the ECC side:
    MMBE to view stock of a material
    MB51 to view all material documents for your selection (i.e. material)
    The business content stock reporting in BW is mainly using datasource 2LIS_03_BF for movements and 2LIS_03_UM for revaluations. For this to work you will have to have all material documents loaded into your cube.
    Also have a look at this How To paper if you haven't yet.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/f83be790-0201-0010-4fb0-98bd7c01e328
    Best,
    Ralf

  • Negative Values of Library Cache Hit Ratio in AWR Report

    Hi all,
    We are getting Negative values of Library cache hit ratio in AWR Report of 11g(11.2.0.3) with Solaris[tm] OE (64-bit).
    Please suggest us why it shows negative value.
    Instance Efficiency Percentages (Target 100%)
    Buffer Nowait %: 99.87 Redo NoWait %: 99.99
    Buffer Hit %: 92.17 In-memory Sort %: 100.00
    Library Hit %: -3,321.23 Soft Parse %: 81.95
    Execute to Parse %: 92.88 Latch Hit %: 95.11
    Parse CPU to Parse Elapsd %: 87.25 % Non-Parse CPU: 81.39
    Regards,
    Madhan
    Edited by: user12078989 on Jul 25, 2012 7:40 AM

    Hi Aman,
    DB not restarted during this time.. we don't have production access. we will get awr report automatically from customer daily. also i am getting issue in our local environment v$rowcache view gets values is negative for dc_users and dc_tablespaces parameter may be it's related production issue...

  • Negative values in report for delta

    Hello,
    I am getting negative values for service level report metrics in delta loading, intresting thing is metrics is giving correct values for almost all the order but for around 40 order I am getting -ve values in metrics (i am getting -100 % and correct value should be 100 %, it is for around 40 records only for other records I am getting it correctly), If I do the full initalization again it brings me the correct poistive values but again get some -ve values when I run the new delta loads.
    Please give your suggestion on comments on this. I will assign point to all the answers and full point to right answer.
    if you need any further information pl let me know
    Hitesh

    Hello Manga, Kedar and Eric,
    Thanks for your quick replies,
    Manga, I am checking the orders on r/3 how they were processed thanks for your suggestions
    Kedar, yes these are custom extractor using 2lis_11_v_ssl and 2lis_11_vaitm going to ods and then to infocube and I am reporting it on infocube. can you please specify in detail what exactly I should check on extracotr side/ do I need to check at first level ODS anthing specific ??
    as these metrics calculation are done using RKFs and  CKFs in query designer and those all are correct.
    Pl advise
    Any other suggestions/ comments are most welcome
    Note: I have assigned points to all the answers
    Hitesh
    Message was edited by: Hitesh Asknani
    Message was edited by: Hitesh Asknani

  • Negative values in inventory

    Hi All,
    I'm negative values in inventory,what all i did is,
    1) At BI side i loaded data for BX and compressed the request with out selecting the NO MARKER UPDATE
    2) After loading BF i compressed the request with selecting the NO MARKER UPDATE
    3) Then i unchecked the NO MARKER UPDATE.
    Now only first two requests are compressed, is it ok? how about delta loads of BF?
    Kindly help me solving the issue,is the above steps are right? if so why im getting negative values?
    Regards,
    Yunus

    Hi Yunus,
    BX is used to initialize the stock not for the historical movements.
    Initialize the stock is mandatory after that anyway you need the delta movements to be happened so BF is also required, if you don't want to load historical movements then you load only Delta loads but for both of them BF is the data source.
    check this link for inventory
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/93ed1695-0501-0010-b7a9-d4cc4ef26d31
    For movements of the material price you use 0processkey,
    Transaction key 51
    Revaluation through a material price change (for example, with transaction MR21) and the debit/credit indicator = DEBIT.
    like that there are some keys 52, 151 and 152
    To know more about these check the OSS note 492828
    Regards
    Pcrao.

  • AvailableSize() from FileConnection returns negative values

    Hello, when I call availableSize() from the internal memory (using a FileConnection object) I get the correct value, but when the same is asked from the memory stick I get negative values, is this a known issue?, is there a nice workarround for this?
    The phone is a SE Satio, the available size of the memory stick is 3775MB (the phone says), but availableSize() gives -336461824
    Thanks.

    That is so correct..., thanks.

  • Deltas fetching negative values

    *hii,this is regarding deltas fetching negative values,where as when i use full load data is  matching perfectly but when when coming to deltas it is picking negative value bcoz of cancel indicator X  it is showing negative value, so the data is mismatching.
    this is based on pp cube (production planning)
    for eg:                       cancelindicator  orderno   conformqty         targetqty
                                                                 205674                  100             100*
                                               X                 205674              - 50              -100

    hi thanks for ur reply
    datasource is 2lis_04_p_arbpl
    if we take any document  we will get cancel indicator i.e space and X . In space indicator we r getting correct data and data is matching in r/3 but X indicator  gives negative values so if we aggregate them we r getting wrong data  and it is getting zero.
    it is happening in deltas only not for full load if we take full load the data is correctly matching but in deltas it is getting wrong values
    if we delete set up tables and we load data then it is getting correct data up to that date but from next day onwards deltas are getting negative values and data is not matching

  • Crystal reports V8.5 Chart legend adding up incorrectly - when using negative values

    Post Author: dawnyanne
    CA Forum: Crystal Reports
    Hi
    if anyone can help me I would be extremely grateful!
    I have a pie chart with a legend. There are just two values that are showing but one of the values is a negative value and the total of the legend is adding up incorrectly. Here is how it is showing at the moment
    Cash                 -0.71
    Uk Equities     100.71
    Total              101.42
    here is how it should be
    Cash               -0.71
    UK Equities   100.71
    Total             100.00
    I can set the chart amounts to be percentage - but then it comes out as only one decimal place and I need two.
    Any help would be very much appreciated!
    kind regards
    Dawnyanne

    Hi Ryan
    The search string 'crystal net 40' (search box in top right corner, returns this KBA:
    2105208 - ER - CR .NET SDK has a Section limit set to 104 and subreport limit of 40
    SP 13 for "SAP Crystal Reports, Developer Version for Visual Studio .NET" can be downloaded here:
    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow me on Twitter

  • How to know when the PRICE AFTER DISCOUNT changed and get the value

    Hi,
    Everything I do to see if a value changed in the grid works except for PRICE AFTER DISCOUNT
    which seems to be inaccessible.
    Any idea how to know when exactly this value changed and do actions accordinly ?
    Also I always get 0.00 if I try to get the value of it
    This works to get in the condition of a vlaue changing but I always get 0.00 as the value of the column
    if (pVal.ItemUID == "38" && pVal.ColUID == COL_DISCOUNT.ToString() && pVal.EventType == BoEventTypes.et_VALIDATE && pVal.ItemChanged == true && pVal.ActionSuccess == true)
        try
            SAPbouiCOM.Matrix Matrix = (SAPbouiCOM.Matrix)SBO_Application.Forms.ActiveForm.Items.Item("38").Specific;
            SAPbouiCOM.EditText Editor = (SAPbouiCOM.EditText)Matrix.Columns.Item(COL_DISCOUNT).Cells.Item(pVal.Row).Specific;
            SBO_Application.MessageBox("Discount changed for : " + Editor.Value + "...", 1, "Ok", "", "");
        catch (Exception ex)
            SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");
    And this do not even get into the condition even tought I SEE the column PRICE AFTER DISCOUNT:
    if (pVal.ItemUID == "38" && pVal.ColUID == COL_PRICEAFTERDISCOUNT.ToString() && pVal.EventType == BoEventTypes.et_VALIDATE && pVal.ItemChanged == true && pVal.ActionSuccess == true)
        try
            SAPbouiCOM.Matrix Matrix = (SAPbouiCOM.Matrix)SBO_Application.Forms.ActiveForm.Items.Item("38").Specific;
            SAPbouiCOM.EditText Editor = (SAPbouiCOM.EditText)Matrix.Columns.Item(COL_PRICEAFTERDISCOUNT).Cells.Item(pVal.Row).Specific;
            SBO_Application.MessageBox("Price after discount changed for : " + Editor.Value + "...", 1, "Ok", "", "");
         catch (Exception ex)
             SBO_Application.MessageBox(ex.Message, 1, "Ok", "", "");

    just idea, maybe it will works
    Create one udf in row level and set there FS based on changes on price after discount and fill value what is in price after discount. Then the validation make on this field instead of standard SAP field.

  • Stock Posting List - Negative Value when Different Currency in PO

    Hi experts,
    We would like your help on the following scenario.
    A Purchase Goods Receipt PO and a Purchase Invoice are added in SAP 9.0, on the same date, in a different currency from the system's currency; system's is Euro and Purchase documents are added in JPY (Japanese xen), i.e. 300 JPY. When checking the "Stock Posting List" report for a number of goods that were purchased with the above documents, the report presents the line of the Goods Receipt PO with the value of 270 JPY, and the line of the Purchase Invoice with  a negative value, i.e.-15 Euro.
    Has anyone faced the same issue?
    Thank you in advance.
    Kind Regards,
    Vassilis Korolis

    Both queries have the default value of  "Only Posted Values for Navigation".
    As I was looking at this, I did realize the following though.
    Remember, I mentioned that my zcurrency_mand field has a Reference Characteristic of 0currency.
    Query 1:  The key figure that is being converted is tied to 0currency in the back end. (this is the query that works).
    Query 2:  The key figure that is being converted is tied to 0inv_curr in the back end.
    Both of the currency conversions are using zcurrency_mand.  Should query 2 be using a new variable similar to zcurrency_mand, but with a Reference Characteristic of 0inv_curr?
    If the answer is yes, I tried creating ZINV_CURR_MAND with Reference Characteristic of 0inv_curr, but am getting the following error when I try to save the changes to Query 2
    [E117(BRAIN)] Errors: Variable ZINV_CURR_MAND2 is not permitted for the target currency. 
    Thanks,
    Jennifer

Maybe you are looking for

  • No of file descriptors in solaris 10

    hi, I had an open files issue and updated the no of files descriptors with the following command(using zones on Solaris 10 running on SPARC) projmod -s -K 'process.max-file-descriptor=(basic,8192,deny)' PROJECTNAME i wanted to check is there any way

  • JRE death - fatal error (EXCEPTION_ACCESS_VIOLATION)

    This always happens at [ntdll.dll+0x1b21a] And the stacktrace is exactly the same. # A fatal error has been detected by the Java Runtime Environment: # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c91b21a, pid=976, tid=4004 # JRE version: 6.0_14-

  • 55" led tv

    Is there a way to change the HZ rate on a LED TV, or is that done automatically?  I have never seen an option to change this on my tv.  My picture some times seens grainey or not as clear as it should be, I wonder if this is normal for an LED TV 55"

  • How to use a user over the network???

    My point is, that i have a Mac on my room and let's say that i want to use my user on my mac which is in my room in another Mac which is connected to my tv. I dont think there's a way to do that, but in my opinion is why not to make it possible... lo

  • Firmware upgrades for e4200 & WRT320N routers, website is wrong?

    I want to upgrade the firmware in both of my wireless routers and when I checked the latest version on the webiste they seemed to be older then what is in my router now? See below E4200 my current firmware is 1.0.22 and the website says the latest is