Adding negative amount in C_TH_DATA

Hi All,
currently I'm creating function exit for adding new record in table c_th_data.
In exit there is 1 field with type amount.
the proble is every time amount field have negative value, it converted into 0 (zero).
I'm using field symbol. in work area structure it's still in negative but when it's stored temporary table ( <t> ), the value is zero.
Any advice?
  LOOP AT c_th_data INTO <s_data_wa>.
*    CREATE DATA lr_struc LIKE <l>.
*    ASSIGN lr_struc->* TO <s>.
    MOVE-CORRESPONDING <s_data_wa> TO WA_CHECK.
    MOVE-CORRESPONDING <s_data_wa> TO WA_CHECKN.
    READ TABLE T_SEG INTO WA_SEG WITH KEY FISCYEAR = WA_CHECK-0FISCYEAR
                                 COSTCENTER_SEND = WA_CHECK-0COSTCENTER.
    IF SY-SUBRC EQ 0.
      LOOP AT T_SEG INTO WA_SEG FROM SY-TABIX.
        IF WA_SEG-FISCYEAR NE WA_CHECK-0FISCYEAR OR
           WA_SEG-COSTCENTER_SEND NE WA_CHECK-0COSTCENTER.
           EXIT.
        ENDIF.
        READ TABLE T_ALLSC INTO WA_ALLSC WITH KEY ALLSTRUC = WA_SEG-ALLSTRUC.
        IF SY-SUBRC EQ 0.
          LOOP AT T_ALLSC INTO WA_ALLSC FROM SY-TABIX.
            IF WA_ALLSC-ALLSTRUC NE WA_SEG-ALLSTRUC.
              EXIT.
            ENDIF.
            IF WA_CHECK-0COSTELMNT GE WA_ALLSC-COSTELMNT_FROM AND
               WA_CHECK-0COSTELMNT LE WA_ALLSC-COSTELMNT_TO.
                  MOVE-CORRESPONDING WA_CHECK TO WA_CHECKN.
                  WA_CHECKN-0COSTELMNT = WA_ALLSC-COSTELMNT_***.
                  WA_CHECKN-ZAIP_AMNT = WA_CHECK-ZAIP_AMNT * WA_SEG-FACTOR / 100.
                  WA_CHECKN-ZAIP_AMNT = WA_CHECKN-ZAIP_AMNT * -1.
                  MOVE-CORRESPONDING WA_CHECKN TO <s_data_wa>.
**     in <s_data_wa>.  value stil negative*       
                  *INSERT <s_data_wa> INTO TABLE <t>.     " in <t> the value zero*             
              ENDIF.
          ENDLOOP.
        ENDIF.
      ENDLOOP.
    ENDIF.
  ENDLOOP.
  INSERT LINES OF <t> INTO TABLE c_th_data.

Hello Hengky,
it looks a bit strange. You are missing code that defines the data/type several variables (<s_data_wa>, wa_check and <t>). These might not match exactly the type of C_TH_DATA.
Regards,
Marc
SAP Techology RIG
PS: I don't think you really need READ TABLE... LOOP... FROM SY-TABIX. Just use LOOP WHERE... If the table is sorted by the fields in the where condition, the performance will be the same.

Similar Messages

  • Cannot create AR Invoice negative amount with WithHolding Tax negative amount via DI API

    Hi All,
    I tried to create AR Invoice Document via DI API, but with negative amount and negative withholding tax amount.
    Document added successfully, but when i open the document in SAP, and i open WTax Table information, withholding tax amount become zero,
    Please see image below.
    But when i add the same document through SAP Screen, i can fill WTax Amount with negative amount.
    SAP Version 9.0 PL 5
    Please kindly help,
    Thanks
    Best Regards
    Siddharta

    Hello.
    If this is different to the behavior of the B1 application it should be considered a bug - like any such difference between DI API and app.
    HTH

  • Negative Amount

    I am trying to enter a negative amount for payments under order items, but I keep getting this error message:
    "The minimum accepted payment amount for 'Financing' is '0'. Please enter an amount greater than '0' to continue.(SBL-SFS-00167)".
    The payment method & type I'm using here is "Financing" & "CareCredit". But, when I enter the payment method & type as "Credit Card" & "Visa", I can enter a negative amount without any errors.
    I think this requires some configuration to override. Can anyone help me with this issue?
    Thanks,
    Raghu

    Hello,
    data in field is xx,yy.zz. having length 8.
    want to convert it to fix length with adding 00 ie it should be 00xxyyzz without , & .
    how to do that.
    Thanks.

  • Negative amount in sales order

    Dear experts,
    We are in support project,
    ours is order related billing,
    we get a error message in a sales order, when we enter a base value is "zero", and add a discount in the same sales order with absolute amount which is a negative value,
    this displays a error message as "negative amount is not allowed", then sales order is terminates, we do not able to save the sales order,
    however the user forwards me a successful case, the  sales order created with negative value and subsequent invoice for that sales order,
    when i check it from my side,the same error flows, when i tend to go item level,when i view document floe the sales order and invoice is created.
    Please guide me to control this error message.
    Regards
    baalakrushnan.da

    Hi,
    In the condition type for price,there is a field for pricing procedure check which pricing procedure is assigned there.In the standard condition PR00 there will be PR0000,check in ur pricing condition,i think the terminating of the sales order and negative value may be bacause of that,or if due to the validity date of the pricing condition.
    Regards,
    Ramesh.

  • Dealing with negative amounts in payment proposal runs in f110

    Hi Techies,
    In the payment proposal run through f110 transaction is it possible to raise an exception and show the negative amounts seperately?

    Dear Ashok,
    The scenario is that during the payment proposal run,
    if there are two amounts with different due dates, say
    10.07.2008     8900 euros to pay
    20.07.2008     -800 euros ( the total of the documents at this due date is minus than zero)
    Now the program gives one record which says 8100 euros to pay.
    But our requirement is that, insted of displaying a single record that adds up the amounts, the negative amount is to be shown seperately like this:
    Due date      10.07.2008     8900        euros to pay
    Due date     20.07.2008      -800     Exceptions
    As this is a standard SAP functiionality, i would like to know any possible ways to achieve this requirement.
    Regards,
    Madhuri

  • How do I Credit Note negative amount line item in Invoice

    Hi Experts,
    I have an AP Invoices that have a negative line item total.
    Now that I realize there is something wrong with this AP Invoice, I will like to CN it. But I was stopped by SAP, because I cannot CN a negative amount line item.
    Can anyone advice me how can I Credit Note (in any sense) this negative line item?
    Much Thanks!
    Warmest Regards,
    Chinho

    Hi Chinho,
    I believe this functionality is to be made available in version 8.8. The SAP workaround for 2007 is:
    To cancel an invoice with negative line, please use the workaround as
    per below:
    1. For the rows with the positive Row Total, create an "independent"
    Credit Memo (not based on an Invoice).
    2. For the rows with the negative Row Total, create another Invoice
    with a positive Row Total opposite to the original negative Row,
    and reconcile between the two rows manually via Internal
    Reconciliations. (This option is available in Banking module in
    2005 version and in Business Partner module in 2007 version.)

  • Sort negative amount in webdynpro ABAP (EHP5)

    Hello,
    We ahve recently installed EHP5. We are now re-implementing Enterprise Compensation Management (ECM) with the new WebDynpro ABAP MSS iViews.
    We have the following issue: one of our column in the compensation planing iView displays positive and negative amounts. the problem is that when we sort this column (ascending or descending), the negative amounts do not appear in the correct order. This is an example how it comes:
    6,050.05
    7,159.59
    8,910.65
    8,980.85
    1,707.10-
    10,110.90
    13,644.30
    16,645.69
    17,135.79
    2,013.95-
    anyone having the same issue?
    Many thanks
    Lucas

    Hello Lucas,
    the numeric content of the relevant columns is interpreted as 'String-like' and sorted in that way, i.e.
    the digits of a number are compared to the digits of another number from left to right. This leads to wrong sorting results as the amount of digits a number consists of is not equal for each number within the same column. Usually issues like this occur if the function module which supplies the content marks the column as sortable (COLTYPE = 'SORTABLE'  but only table COLUMN_CONTENT is filled. Columns marked as SORTABLE which don't contain content that can be sorted 'straight foreward' by
    comparing the characters of one column entry to another from left to right MUST supply a second table SORT_COLUMN_CONTENT which contains the content converted in a sortable way. In your case table SORT_COLUMN_CONTENT must be filled with the numbers enriched with leading zeros, i.e. 000009270000 instead of 92,700.00 which is the 'display value'. please check if correct SORT_COLUMN_CONTENT is provided.
    If this is the case,
    Otherwise please provide correct SORT_COLUMN_CONTENT Further Information about sorting of columns can be found in the Configuration Guide for the Object- and Dataprovider on the Service Market Place (http://service.sap.com/mss).
    Best Regards,
    Deepak.

  • Paymont form via fpl9 for negative amount

    Hi,
    our customer wants to generate a payment form also when the account balance of the customer is negative.
    however, I'm getting an error message that:
    Creation of payment form not possible, amount is negative
    Message no. >6397
    Thanks,
    Vered

    Hi Vered,
    If I'm not mistaken (and I don't think I am ), that message comes from Function module FKK_SAMPLE_0756 - "FI-CA Correspondence - Sample Module for Payment Form Request".
    To override this bit of SAP standard logic, to the very least you'd have to program and assign in FQEVENTS own function module (without the check on negative Amount) to FI-CA Event 0756. We don't have payment forms for negative amounts in our system, but I believe it's doable - the rest of standard logic should function OK with negative payment amount.
    cheers,
    Janis

  • Purchase order approvals for Negative amount

    Hello All,
    Want your assistance on the above mentioned topic.
    We have a business requirement to have Purchase order approvals for Negative amount. I understand from the Below SAR that JD Edwards 9.1  doesn't support PO approvals on Negative amount
    Bug 11022294 : APPROVAL ROUTES FOR DEBIT MEMO - SAR: 8940968
    Appreciate if you can suggest best practice or workaround to meet this requirement.
    Thanks & Regards
    Nikhil M. Pawar.

    Dear Ashutosh,
    Couple of points from my side. We have a similar scenario at a client where I am working. In construction, there are three stages.
    a) Practical Completion
    b) Partial Completion and
    c) Final Completion.
    In the case above, you are not deducting an amount from existing PO, you would be applying a penalty on the Vendor for Failure for not meeting the Practical/Final Completion Certificate requirements. Based on the legal understanding, usually the penalty may vary above and beyond of 10% of value of work not done/ delivered. (This is company to company)
    So we establish that the scenario above is not a case for PO, but for Penalty. Now penalty in construction business again is of three types (My understanding again from experiences)
    a) Time/Schedule based penalty - Levied on vendor due to delays (Ranging for 100 SAR/ Day to 400 SAR/Day - if you are in Saudi)
    b) Cost/ Quantity Based penalty - Deviation from Standard Plan/ over consumption against budgeted quantity in Bill of Ladding
    c) KPI/ Quality Based Penalty - This can be a levied for number for reasons, including non completion of agreed deliverable in Contract. (This can be even 150% of contract value)
    Now, penalty is a revenue to the Organization so this needs to be accounted differently. You apply a Penalty against a PO and create a Debit memo and show the penalty as revenue in the books. This cannot be done if this is entered as a PO.
    So, my point is, you need a customization to capture the penalty and apply it against the PO and account it as a debit memo in Finance side.
    Please let me know your thoughts, I will be glad to hear if I need to be corrected.
    Rgds,
    Abhi

  • Negative amount in the open deliveries field

    Hi All
    Iu2019ve also come across a negative amount in the open deliveries field on the business partners master data screen but there are no open deliveries no orange arrow to click on and it's grayed out for this selected business partner could anybody help with how to fix this issue.
    Regards
    Ronald

    Hi,
    Please run the detect query mentioned in the Note No. : 999124 and if it returns and result, you need to open a support ticket on the portal to get the issue investigated.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Negative amount in IR8A File

    Hi,
    Why do I get negative amount in IR8A file specifically in benefits in kind balances(MOA 275 & MOA 351)? How do I fix them?
    Thanks,
    Jerico

    Thanks harish for ur inputs.
    OMPP
    SMPN
    SMPR
    OMPP,SMPN,SMPR wagetypes are knowcking off (sum of smpn+smpr is entered as -ve OMPP) or ofsetted for past periods like jan,feb months ..for march it is not the case and in april  month there is XXXX wagetype as SMP Payment Adjust (NEW) which has -ve value.can it be used as norm?
    have ur come across similar issue in the past ?pl let me know if there is a work around...
    thanks for ur help.
    no worries,karthik

  • Unable to enter a negative amount for payment

    I am trying to enter a negative amount for payments under order items, but I keep getting this error message:
    "The minimum accepted payment amount for 'Financing' is '0'. Please enter an amount greater than '0' to continue.(SBL-SFS-00167)".
    The payment method & type I'm using here is "Financing" & "CareCredit". But, when I enter the payment method & type as "Credit Card" & "Visa", I can enter a negative amount without any errors.
    I think this requires some configuration to override. Can anyone help me with this issue?
    Thanks,
    Raghu

    Hi,
    It's known bug.
    Bug number is 10499290.
    Visit/contact oracle support for more information.
    Good luck
    T.Abed

  • Project Closed with a negative amount

    Hi Experts,
    I need your help, I have a project in which I have a negative amount showed in T.Code CN41 as Ttl Commitment, but I have checked in CJ74/CJ76 and nothing appears. I also run KOB2
    Could you help me to fin that negative value.
    Regards,
    Marcos

    Your issue explanation is not quite clear. I think technically system cannot record negative commitment it can be only zero at max.
    however it is still possible to Project objects have negative cost get reported in acutal line item report. This normally happens when you are settling in excess of actual.
    Information required from your side is
    Are you referring commitment or  Cost ?
    The same is reported on which cost object i.e. WBS, Internal Order etc..
    With Regards
    Nitin P.

  • Negative amount on sales document

    Hi ,
    Based on the document type of sales document required to be created ,debit credit memo/sales order/credit memo  are the different types of business objects.
    The FM used to create sales document is SD_SALESDOCUMENT_CREATE.
    Requirement : I need to create a sales order with negative amount.
    1. when I use the above FM for BUS2096 - I am able to create a negative amounted SD in R3. Perfect
    2. when I use the same FM to create BUS2094 / BUS2032 type of SD with a negative amount, the value stored in SD is   
        changed to  a positive value.
    Is this a config issue , or do i need to search for any user exits where I could force a negative value for the SD.
    Thanks in advance.
    Edited by: Thomas Zloch on Mar 11, 2010 4:28 PM - replaced "-ve" by "negative"

    I had the same problem, and I would like to answer the solution in case somebody else has same issue.
    The problem is related with configuration. If you set up the credit note as a credit note and the item category is not marked as return; the pricing function multiply to -1 changing the amount to negative.
    Field: VBAP-SHKZG
    Set up the item category as return if the position is related with a credit note (also if it is without stock movement).
    Regards,
    Jorge Rosa.

  • LMS 4.1 -- Adding larger amount of devices ( 10) results in webUI freeze and not collecting Inv/Conf-Data

    Hi all,
    with LMS 4.1 running on solaris 10 I discovered the follwing.
    Adding larger amount (>10) of devices one after the other (via DCRCLI) results in IC_Server no longer collecting the Inventory-Data nor ArchiveMgmt will collect Configs and after some while DataCollection (ANI) will get stucked in endless loop.
    After that (navigating in CW2k-WebUI) the UI freezes.
    Is that a known problem with Interprocess-Communication and Eventbus in LMS 4.1???
    Any feedback is welcome.
    Best Regards
    Lothar

    After stopping the system I discovered that RmeDbEngine won't stop.
    Issuing dbstop command also results in RmeDbEngine still running.
    We had to kill process with signal 9.

Maybe you are looking for

  • COPA  new value field transport

    Hi Is there any way to trnsport only the single value field in COPA to other instance? Regards HK

  • Blank PageWhen Opening Safari

    I just did the software update for Safari.  I am running Snow Leopard on my machine.  When I open Safari, all I get is a blank screen.  I have lost my homepage.  I checked Safari Preferences and it shows my home page listed but it will not come up, j

  • Error in connecting to Oracle webcenter DB with Endeca

    Hi, I gave the passthrough values and the rest of the details in the developer studio. However, on running baseline, I am getting the below error: Apr 15, 2013 5:22:23 PM com.endeca.soleng.itl.jdbc.AdvancedJDBCColumnHandler <init> WARNING: Could not

  • Help with Capture Drive

    When I try to capture from my DV cam I get an error message " current capture drives are too full..." I tried to remove files/set another scratch disk location but the same error appears. What should I do?   Mac OS X (10.4.9)  

  • How to make programs available to all users

    How to make programs available to all users