How to show negative(-) as parentheses

Hi,
Does anybody know how to display negative sign as parentheses in ABAP report (simple list or ALV).
For eg. Standard SAP shows -100.00 as 100.00-, but user wants to display it as (100.00).
Thanks
Anil

A slightly different method. This will right justify the amount and print dashes vor zero. I would probably now right justify by SHIFTing RIGHT:
*&      Form  DR_CR
*       Format numeric field into character field with "()" for -ve
*      -->P_NUM  Numeric field                                         *
*      <--P_CHAR  Formated character field                             *
FORM dr_cr USING value(p_num)
           CHANGING p_char.
  DATA: BEGIN OF string,
          f1(1),
          f2(20),
          f3(1),
        END OF string.
  DATA: off(2)  TYPE p.
  DATA: len(2)  TYPE p.
  CLEAR string.
  CLEAR p_char.
  IF p_num <> 0.
    IF p_num < 0.
      p_num = - p_num.
      string-f1 = '('.
      string-f3 = ')'.
    ENDIF.
    WRITE p_num TO string-f2.
    CONDENSE string NO-GAPS.
    IF string CA '('.
      off = 15 - STRLEN( string ).
      len = strlen( string ).
    ELSE.
      off = 14 - STRLEN( string ).
      len = strlen( string ).
    ENDIF.
    p_char+off(len) = string.
  ELSE.
    MOVE '---' TO p_char+7.
  ENDIF.
ENDFORM.                               " DR_CR
Rob
I understand from your comment that this isn't what you are looking for; however, for completeness sake, I want to add that SHIFT RIGHT won't work because you want the decimals to line up not the right character of the number.
Message was edited by: Rob Burbank

Similar Messages

  • How to show negative value in Pie Chart from Webi?

    I have below example data, I want to convert this to a pie chart in Web Intelligence, my problem is after I convert it to a pie chart, the revenue '-30' is shown as '30', looks like the pie chart is not suppor the negative value to show, I want to know if there is any workaround or solution to make the pie chart to show the negative value? Is this behavior is by design? do we have any official document to explain this?
    The product I used is BOE XI 3.1 SP3.
    Department    Revenue
    A                      100
    B                       -30
    C                        80
    Edited by: Alex Wang on Jul 13, 2010 5:51 PM

    Why are you showing this information as a pie chart? It doesn't make sense to try and display a negative slice in a pie chart. I can't really think of a logical way to try and draw a negative slice in a pie chart. With a pie chart you will need all your information to either all be positive or all negative, otherwise it doesn't work.
    What you need is to have a bar chart, with positive and negative values on the y axis.

  • How to show deductions in ap invoice

    Hi all,
    how to show deductions in ap invoice
    Scenario is:
    We raise A/p Invoice for services provided by vendor,
    ex:When the bill amount as 1000.00.
    Invoice will be raised for 800.00, and paid, but
    Remaining 200.00 will be deducted from the bill as Redemtion deposit (100.00), work control tax(100.00)
    and this will be paid to vendor after certain period of time.
    We want to show  the above scenario in  A/P invoice.
    any idea how to work on the issue.
    regards,
    Kumar

    Hi Kumar,
    This scenerio can be handled by making use of the Freight Screen, In freight create the Freight Items, Redemption Deposit and WCT. Map the respective GL accounts in the AP Column in Freight Window. When you are creating the invoice u can enter the respective amounts in the Freight window with a negative sign.
    This should solve your issue.
    Regards,
    Reno

  • Net value showing negative in excise billing for free goods items

    Dear All,
    Need value suggestions in business scenario.
    While issuing Free goods to customer in excise billing ,Net  value of ZTNN item showing negative
    Inserted R100 % condition type above Tax condtions.
    MRP is statistical and accessable value is calculated on MRP.
    How to  solve the above issue.
    Due to the Net value showing negative for Free of charge in excise billing,qty value  displaying twice the unit price value in printing
    Thanks & Regards
    H V Kumar.

    Hi
    It is depends on your pricing procedure how you defines.
    Kindly check once again in your pricing procedure.
    Test the cycle once again without entering the R100 condition type in sale order line item and check the next value.
    After enter the R100 condition type check the base value to calculate the Amount.

  • How to use negation in user defined rules?

    Hi,
    Can you please show me an example to use negation in user defined rule? I created a rule like below (the rule says if a patient has a fever problem and not have penicillin hypersensitivity, then recommend medication1):
    INSERT INTO mdsys.semr_myMedicineRB VALUES('rule1',
    '(?p rdf:type :Patient) (?p :present ?c1) (?c1 rdf:type :Fever) (?c2 rdf:type :Penicillin_Hypersensitivity)',
    '(NOT_EXISTS(p :present c2))',
    '(?p :recommendation :medication1)',
    SEM_ALIASES(SEM_ALIAS('','http://www.example/medicine#')));
    The rule successfully inserted into the rulebase. However, I cannot pass the entailment creation phase and got the errors:
    ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    ORA-06512: at "MDSYS.SDO_SEM_INF_INTERNAL", line 16453
    ORA-06512: at "MDSYS.SDO_SEM_INFERENCE", line 302
    ORA-06512: at "MDSYS.SDO_SEM_INFERENCE", line 352
    ORA-06512: at "MDSYS.RDF_APIS", line 118
    ORA-06512: at line 2
    29532. 00000 -  "Java call terminated by uncaught Java exception: %s"
    *Cause:    A Java exception or error was signaled and could not be
               resolved by the Java code.
    *Action:   Modify Java code, if this behavior is not intended.
    According to the post built-in primitives(noValue,remove) for user defined rules, it seems negation is not supported in user defined rules. Can you please advice how to implement negation in user defined rules?  Thanks a lot in advance.
    Hong

    Hi Hong,
    Let's look at this similar but simplified problem:
      if (?p  rdf:type  :Patient) and (NOT_EXISTS(?p  :present  :c2)) ==> (?p :recommendation :medication1)
    You can use something like this in the user defined inferencing:
    -- First get the numeric IDs for the relevant URIs
    recomID := sdo_sem_inference.oracle_orardf_add_res('http://..../recommendation');
    medID := sdo_sem_inference.oracle_orardf_add_res('http://..../medication1')
    rdfTypeID := sdo_sem_inference.oracle_orardf_res2vid('... full URI for rdf:type');
    patientID := ...
    presentID := ...
    c2ID := ...
    -- Now this query will find out ?p that satisfy (?p  rdf:type  :Patient) but not
    -- (?p  :present  :c2)
    sqlStmt := '
      select ids1.sid  sub
         from ' || src_tab_view || ' ids1
        where ids1.pid= ' || to_char(rdfTypeID,'TM9') || '
          and not exists (
             select 1
               from ' || src_tab_view || '
              where sid = ids1.sid
                and pid = ' || to_char(presentID, 'TM9') || '
                and oid = '|| to_char(c2ID,'TM9') || '
    insertStmt := '
      insert /*+ parallel append */
       into ' || output_tab || '(sid, pid, oid)
      select sub, '||to_char(recomID,'TM9') || ',' || to_char(medID,'TM9') || '
       from (' || sqlStmt || ')'
    More details can be found in
    http://docs.oracle.com/cd/E16655_01/appdev.121/e17895/inference_extension.htm#CHDDBGEC
    Hope it helps,
    Zhe Wu

  • Account showing negative after mvt 309

    Hi,
    we have created
    new material A valuation class 3317 material type ROH
    G/L  233001
    old material B valuation class 3314 material type ROH
    G/L 233033
    transfer material B to A mvt type 309
    after doing all this when we go to tcode F.01 i.e balance sheet
    we come to know that
    account 233033 ie for old material B showing negative
    i check the amount in G/L 233033 come to know that it go negative only after stock transfer mvt 309
    can anyone suggest what cause this, and how to correct it.
    thanks in advance
    shakir

    Hi,
    Material B(old material)
    In accounting 1:
    Valuation class -3017(G/L 233030)
    price control-V
    moving price-102.01
    standard price-109.87
    total stock -0(as total stock is transfer to material A)
    total value-0(as total stock is transfer to material A)
    previous price-100.54
    Material A(new material)
    In accounting 1:
    Valuation class -3013(G/L 233001)
    price control-V
    moving price-96.49
    standard price-99.46
    total stock -174,846.524
    total value-16,871,458.43
    previous price-99.46
    this are the value in material master
    please give ur suggestion as i can find any......
    I check the accounting document generated while transfer posting mvt 309
    Itm PK Account Account short text    Assignment Amount
    1    99  233030  IMP MATERIAL         20080108 14,621,116.03-
    2    89  233001   R/MSTKPADS         20080108 14,621,116.03
    thanks
    shakir

  • Problem with Offset account showing Negative Values

    Hi,
    In our system, Offset account is showing Negative amount. We want to ZERO this.
    This account have Price Diff. amount....Now how can do the same...
    Please guide..

    Hi,
    Using F-02 you can transfer the balance.
    e.g.
    Dr Offsetting account
    Cr Price difference/XXXX account
    Rgds
    Murali. N

  • How to show more than one record at a form-like style report?

    Hi All,
    I developed a form-like style report
    I want it to show more than one record at once (At the same page)
    I tried that by setting the value to "Maximum records per page" property for the repeating frame to 10
    but when I close the property palete and open it agian the value is returned to 1 !!!
    how to show more than one record at the same page?????
    Thank u

    Hi,
    there's perhaps another property like "page protect". If than 2 records didn't fit at one page there's a page break. Or is there any object inside the repeating frame with page-break properties? Sorry .. it's like looking into a chrystal ball ...
    Regards
    Rainer

  • How to find Negative number

    can any one pls tell me how to find negative number ?
    Thanks

    1. One easy method is to look for the giveaway dash in front of the number, e.g. "-1" is a negative number, given the "-" instead of the "1."
    2. Negative numbers can also sneakily be found by multiplying i by itself: i^2^ is a negative number.
    3. Negative numbers can hide in the exponent of e as complex numbers. e.g. e^i*pi^ is a negative number.
    4. If we're referring to Java here, perhaps the following could be of some use:
    final int ZERO = 0;
    public static void main(String[] args) {
    int a = 3;
    int b = -13;
    System.out.println(a + " is negative? " + lessThanZero(a));
    System.out.println(b + " is negative? " + lessThanZero(b));
    boolean lessThanZero(int n) {
    return n < 0;
    }

  • How to show custom error message in WebADI Excel template?

    Hi,
    I've  created a custom Web ADI integrator and associated it with a 'Procedure' based custom interface.
    WebADI Interface API Returns is set to  "Error Message".
    I'm using  raise_application_error(-20001, "Actual Error Message") for invalid rows,but custom error message from PL/SQL  is not populated on the excel template.
    Instead it is showing "SQL exception occurred during PL/SQL upload".
    Am I missing anything? How to show custom error message from Pl/SQL procedure to WebADI Excel template?
    TIA
    Narasimha

    The custom API errors are visible in the BNE log but not on the Excel.
    BNE Log=>
    12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Exception while uploading to PL/SQL API.  Error Code: 20001, Message: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
    ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
    ORA-06512: at line 1
    12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR          BnePLSQLUpload.doUpload: Stack trace: java.sql.SQLException: ORA-20001: -Please enter CONTAINER_ID -  Enter PO_NO -
    ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
    ORA-06512: at line 1
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
      at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
      at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
      at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
      at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
      at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
      at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1005)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
      at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3550)
      at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4710)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
      at oracle.apps.bne.integrator.upload.BnePLSQLUpload.doUpload(BnePLSQLUpload.java:284)
      at oracle.apps.bne.integrator.upload.BneSAXUploader.processDeepestLevel(BneSAXUploader.java:2346)
      at oracle.apps.bne.integrator.upload.BneSAXUploader.startElement(BneSAXUploader.java:1182)
      at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
      at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
      at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
      at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
      at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:234)
      at oracle.apps.bne.integrator.upload.BneUploader.processUpload(BneUploader.java:301)
      at oracle.apps.bne.integrator.upload.BneAbstractUploader.processUpload(BneAbstractUploader.java:114)
      at oracle.apps.bne.integrator.upload.async.BneAsyncUploadThread.run(BneAsyncUploadThread.java:140)
    12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 WARNING        BneOracleWebAppsContext.getTimeZone CLIENT_TIMEZONE_ID has not been set
    12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 ERROR          BneOracleWebAppsContext.getExtraJDBCConnection recieved the same connection as the base connection.  There may be transaction problems.
    How to show the same error in the excel template?
    Here is the package:
    CREATE OR REPLACE PACKAGE BODY APPS.XXPO_COSTFACTS_WEBADI_PKG
    AS
       PROCEDURE upload_data (
                              P_CONTAINER_ID IN VARCHAR2
                            , P_SAIL_DATE IN DATE
                            , P_PO_NO IN VARCHAR2                     
                             ) IS
        --declare
        lv_err_msg      VARCHAR2(240);
        lf_err_flag     NUMBER := 0;
        ln_temp         NUMBER;
        BEGIN
        --------------------- checking for mandatory parameters---------------------------
          IF (P_CONTAINER_ID IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg||'-'||'Please enter CONTAINER_ID - ';
          END IF;
          -------------Validation for Sail Date Format----------------------
          IF (P_SAIL_DATE IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg || ' ' || 'Enter Sail Date - ';
          ELSE
             BEGIN
                SELECT 1
                  INTO ln_temp
                  FROM DUAL
                 WHERE P_SAIL_DATE =  TO_DATE (TO_CHAR (P_SAIL_DATE, 'DD-MON-YYYY'), 'DD-MM-YYYY');
             EXCEPTION
                WHEN NO_DATA_FOUND THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format';
                WHEN OTHERS THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format'|| SQLERRM;
             END;
          END IF;
          -------------Validation for PO_Number----------------------
          IF (P_PO_NO IS NULL) THEN
             lf_err_flag := 1;
             lv_err_msg := lv_err_msg || ' ' || 'Enter PO_NO - ';
          ELSE
             BEGIN
                SELECT count(1)
                  INTO ln_temp
                  FROM PO_HEADERS
                 WHERE Attribute4 =  P_PO_NO;
             EXCEPTION
                WHEN NO_DATA_FOUND THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' No Oracle PO for Biceps PO#'||P_PO_NO;
                WHEN OTHERS THEN
                   lf_err_flag := 1;
                   lv_err_msg := lv_err_msg || ' Error getting the Oracle PO for Bicpes PO#'||P_PO_NO||' Error-' || SQLERRM;
             END;
          END IF;
         -----------------------Insert Record----------------------------
         IF lv_err_msg is NULL THEN
         BEGIN
             INSERT
              INTO XXP2P_HW_COST_FACTORS_STG
                     CONTAINER_ID
                    ,SAIL_DATE
                    ,PO_NO
                    , ERROR_FLAG
                    , ERROR_MSG
                   ,CREATED_BY
                    ,CREATION_DATE
                    ,LAST_UPDATED_BY
                    ,LAST_UPDATE_DATE
                    ,LAST_UPDATE_LOGIN              
                VALUES
                     P_CONTAINER_ID
                    ,P_SAIL_DATE
                    ,P_PO_NO              
                    ,lf_err_flag
                    ,lv_err_msg
                  ,FND_GLOBAL.USER_ID
                    , trunc (sysdate)
                    ,FND_GLOBAL.USER_ID
                    , trunc (sysdate)
                    ,FND_GLOBAL.LOGIN_ID              
                  --  commit;
                  DBMS_OUTPUT.put_line
                    '-' || 'After ap_invoices_interface'
            EXCEPTION
            WHEN OTHERS THEN
              ROLLBACK;
              lf_err_flag := 1;
              lv_err_msg  := lv_err_msg || ' ' || 'error loading CONTAINER_ID-' || P_CONTAINER_ID || SQLERRM;
              raise_application_error(-20001, lv_err_msg);
            END;
        ELSE
              raise_application_error(-20001, lv_err_msg);
        END IF;
      END upload_data;                        
    END XXPO_COSTFACTS_WEBADI_PKG;

  • How to show modal window without popup in a web page using javascript

    Hi,
    How to show modal window without popup in a web page using javascript, means when the modalwindow is opened it should not ask for popup blocker alert......
    pls help me.....

    Thanx for ur reply,
    Actually the senario is when i click on a button, another jsp page should be displayed in a modal window without popup, but the functions alert() and confirm() will not accept the url path of the another jsp page...

  • How to show "ALL" Values by default in Page Drop-Down Lists in Pivot Tables

    Hi Everyone,
    Iam stuck with 1 problem please can any 1 help me if u know the solution.
    Here is my problem:
    How to show "ALL" Values by default in Page Drop-Down Lists in Oracle BI Pivot Tables?
    For example, if you place Region in the pages area, a Region drop-down list allows the user to select a particular region, and see the data for only that region, rather than seeing all the Regions,But by default its not showing "ALL" option in the drop down list ,rather than doing that its showing result for only 1 region by default.
    And an other problem with this pages area is, if we palce the multiple attributes in the Pages area in the pivot table, the (Fields)result is showing in vertically, the attributes 1 by 1(Every attribute in a new line) ,rather than showing like that, is there any way to show the results in horizantally?(We want to have it as a seperate drop drown list for every field horizantally not as a concatenated list).

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • How to show all view tab (Main Report and all Sub Report) in Visual FoxPro 9

    I use ActiveX from Crystal Report Developer XI for viewer in Visual FoxPro 9 and I already know how to show Main Report by using command:
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=thisform.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    Inside the MyReport.rpt there is two subreport name :
    1. MySubReport1
    2. MySubReport2
    My Question is :
    How to show all view tab (Main Report and all Sub Report) at the 1st time we call ViewReport?
    I try to using command :
    oRptRun=createobject("CrystalRuntime.Application")
    oRptView=thisform.oleRptViewer
    oRptOpen=oRptRun.OpenReport('MyReport.rpt')
    oRptSub=oRptOpen.OpenSubreport("MySubReport1")
    oRptSub=oRptOpen.OpenSubreport("MySubReport2")
    oRptView.ReportSource=oRptOpen
    oRptView.ViewReport
    but only show Main Report (view tab name : Preview)?
    Did I miss any command before I call oRptView.ViewReport?

    Your right, there is only one tab to view the report.
    To open the subreports you will need to click on them in the main report. I don't know of a way to open them programmatically like you are doing here
    http://diamond.businessobjects.com/robhorne</a>

  • How to show all the search result in a report page

    I have a report page which the user can enter first or last name to find the matched employees. The current report only show maximum of 15 matched results. How to show all of them in one page if more than 15.
    Also, the employee name on the report is a link, how to make the link to be conditional. ( I mean it can be a link or not based on another column)
    Thanks.
    Jen

    Hi, you can change the number of rows on the report definition page (15 is the default value)- that's also where you can change pagination and max. number of rows etc.
    About the second question - you will have to use Case or Decode in your report query and have the value as link or not based on the condition column, something like:
    Select Decode(condition_column, 'link_value', '<a href="f?p=YOUR_APP:PAGE_TO_LINK_TO:'  || :SESSION || ':::::">display_column</a>' , display_column) From .....
    Hope this helps.

  • How to show filtered parameter in dropdown form in crm 2013

    Hi,
    I want to create a report in crm 2013. When I report is run then filtered parameter fill record from database in dropdown form and when I select record from dropdown then generate report of selected record. Please tell me how to show record in filtered parameter
    from database within crm. In below image paramter is text field. How to auto fill filtered parameter from database.

    Hi Aamir,
    Check if the below link helps!!
    https://social.microsoft.com/Forums/en-US/ad8a3bc2-dbec-4597-adfd-8bd6c34f5e9a/drop-down-parameter-in-crm-2011-custom-report?forum=crm
    Thanks,
    Prasad
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

Maybe you are looking for

  • Basic iCal functionality-list view

    Does iCal have a list view? I am looking for a view of an individual calendar where I can see all the events and respective dates for that calendar. I have a lot of old calendar and can find no way of seeing all the old entries in those calendars. I

  • PI 7.0 Error 500 Internal server error

    Exception Details Exception class: com.sap.aii.utilxi.prop.api.PropertiesException Message Unable to read configuration data (ExchangeProfile/aii.properties) Stacktrace Thrown: MESSAGE ID: com.sap.aii.utilxi.prop.api.rb_all.NO_PROPERTIES com.sap.aii.

  • [nQSError: 46044 error in obiee

    Hi Team When i am opening a developed report in in Compound layout i am getting [nQSError: 46044 error in obiee] ,whereas when the same report is placed in the dashboard it is giving the desired output. So basically i am trying to say that , the repo

  • IDVD files way too big

    Hey, I tried to burn 2 avi files on a 4.7GB dvd; the files had the size of 650,1MB and 650,9MB. When I clicked the burn botton it said there's too much to burn. Then I discovered that iDVD made the total package 6,2GB... How the hack is that possible

  • Dashboard image link with repository variable "script injection" warning.

    Hello, in order to make the migration easier we want to parameterize the URLs so they are centrally managed in the repository and not on every single dashboard page. Since I figured out the following works for a dashboard text item: '@{biServer.varia