NULL Value in Journal Entry and Wrong Tax Summary

Hi people,
I need your expert help for a big problem that appens to some customers.
They run SAP BO 8.8 SP:00 PL:12
This is the scenario:
You insert a new documet,  A/R Invoice or A/P Invoice is the same, problem appear in all of them.
After you insert the document, using SQL Server Management try this Select statment:
Select * from JDT1 where JDT1.debit is null OR JDT1.credit is null
A list of record where listed. And, this is the problem, NULL values are all in the VAT Lines in debit or credit colums.
If you try to make a SUM(debit-credit) you discovery that, 1000,00-null=null
Consequently, TAX Sumary report, that probably use arithmetic operation like me in SELECT statment,  count a wrong number when null values in DEBIT or CREDIT column in JDT1 for VAT declaration.
How could I solve? And how i can make invoices store 0 rather than NULL in the VAT Line?
Thanks in advance for your tips and solutions

Thaks Neetu for your answer.
I thinks there is a misurandertanding.
My problem is not SQL.
My problem is the SAP TAX Report.
I used SQL only for check data and discover why SAP raise a wrong TAX Summary report.
So, my question is: Why invoices write null values in journal entry, and how I can solve the problem that TAX summary report use null value in operations so the results are wrong.
Thanks,
Jonny Cortonicchi

Similar Messages

  • Need help Take out the null values from the ResultSet and Create a XML file

    hi,
    I wrote something which connects to Database and gets the ResultSet. From that ResultSet I am creating
    a XML file. IN my program these are the main two classes Frame1 and ResultSetToXML. ResultSetToXML which
    takes ResultSet & Boolean value in its constructor. I am passing the ResultSet and Boolean value
    from Frame1 class. I am passing the boolean value to get the null values from the ResultSet and then add those
    null values to XML File. When i run the program it works alright and adds the null and not null values to
    the file. But when i pass the boolean value to take out the null values it would not take it out and adds
    the null and not null values.
    Please look at the code i am posing. I am showing step by step where its not adding the null values.
    Any help is always appreciated.
    Thanks in advance.
    ============================================================================
    Frame1 Class
    ============
    public class Frame1 extends JFrame{
    private JPanel contentPane;
    private XQuery xQuery1 = new XQuery();
    private XYLayout xYLayout1 = new XYLayout();
    public Document doc;
    private JButton jButton2 = new JButton();
    private Connection con;
    private Statement stmt;
    private ResultSetToXML rstx;
    //Construct the frame
    public Frame1() {
    enableEvents(AWTEvent.WINDOW_EVENT_MASK);
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception {
    //setIconImage(Toolkit.getDefaultToolkit().createImage(Frame1.class.getResource("[Your Icon]")));
    contentPane = (JPanel) this.getContentPane();
    xQuery1.setSql("");
    xQuery1.setUrl("jdbc:odbc:SCANODBC");
    xQuery1.setUserName("SYSDBA");
    xQuery1.setPassword("masterkey");
    xQuery1.setDriver("sun.jdbc.odbc.JdbcOdbcDriver");
    contentPane.setLayout(xYLayout1);
    this.setSize(new Dimension(400, 300));
    this.setTitle("Frame Title");
    xQuery1.setSql("Select * from Pinfo where pid=2 or pid=4");
    jButton2.setText("Get XML from DB");
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    catch(java.lang.ClassNotFoundException ex) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(ex.getMessage());
    try {
    con = DriverManager.getConnection("jdbc:odbc:SCANODBC","SYSDBA", "masterkey");
    stmt = con.createStatement();
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    jButton2.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(ActionEvent e) {
    jButton2_actionPerformed(e);
    contentPane.add(jButton2, new XYConstraints(126, 113, -1, -1));
    //Overridden so we can exit when window is closed
    protected void processWindowEvent(WindowEvent e) {
    super.processWindowEvent(e);
    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
    System.exit(0);
    void jButton2_actionPerformed(ActionEvent e) {
    try{
    OutputStream out;
    XMLOutputter outputter;
    Element root;
    org.jdom.Document doc;
    root = new Element("PINFO");
    String query = "SELECT * FROM PINFO WHERE PID=2 OR PID=4";
    ResultSet rs = stmt.executeQuery(query);
    /*===========This is where i am passing the ResultSet and boolean=======
    ===========value to either add the null or not null values in the file======*/
    rstx = new ResultSetToXML(rs,true);
    } //end of try
    catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    ======================================================================================
    ResultSetToXML class
    ====================
    public class ResultSetToXML {
    private OutputStream out;
    private Element root;
    private XMLOutputter outputter;
    private Document doc;
    // Constructor
    public ResultSetToXML(ResultSet rs, boolean checkifnull){
    try{
    String tagname="";
    String tagvalue="";
    root = new Element("pinfo");
    while (rs.next()){
    Element users = new Element("Record");
    for(int i=1;i<=rs.getMetaData().getColumnCount(); ++i){
    tagname= rs.getMetaData().getColumnName(i);
    tagvalue=rs.getString(i);
    System.out.println(tagname);
    System.out.println(tagvalue);
    /*============if the boolean value is false it adds the null and not
    null value to the file =====================*/
    /*============else it checks if the value is null or the length is
    less than 0 and does the else clause in the if(checkifnull)===*/
    if(checkifnull){ 
    if((tagvalue == null) || tagvalue.length() < 0 ){
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    else{
    users.addContent((new Element(tagname).setText(tagvalue)));
    root.addContent(users);
    out=new FileOutputStream("c:/XMLFile.xml");
    doc = new Document(root);
    outputter = new XMLOutputter();
    outputter.output(doc,out);
    catch(IOException ioe){
    System.out.println(ioe);
    catch(SQLException sqle){

    Can someone please help me with this problem
    Thanks.

  • Duplicate rows on Query with journal entries and AP documents

    Hi Experts,
    I ahve the below query allowing me to have some information from journal entries and retrieve some other from AP docuements and PO.
    The thing is the query duplicates rows because the AP docuements have several rows but i don t know how to do to remove them (i guess this has to do with JOIN function...)
    SELECT
    T2.[GroupMask] as 'Account Family',
    T2.[FatherNum] as 'Parent Account',
    T2.[AcctCode] AS 'Account Code',
    T2.[AcctName] AS 'Account Name',
    T0.[TaxDate] AS 'Document Date',
    T0.[Number] AS 'Number',
    T0.[DocSeries] AS 'Document Series',
    T0.[BaseRef] AS 'Base Reference',
    T0.[TransId] AS 'Transaction Number',
    T0.[Ref2] AS 'Reference 2',
    T1.[ContraAct] AS 'Offset Account',
    T4.[BaseRef] AS 'PO code',
    T1.[Project] AS 'Project Code',
    T1.[ProfitCode] AS 'Distribution Rule',
    T1.[OcrCode2] AS 'Costing Code 2',
    T1.[OcrCode3] AS 'Costing Code 3',
    T1.[OcrCode4] AS 'Costing Code 4',
    (T1.[SYSdeb]-T1.[SYSCred])  AS 'Total Amount EUR',
    (T1.[FCDebit]- T1.[FCCredit]) AS 'Total Amount (FC)',
    T5.[DocTotalSy] AS 'PO Amount (EUR)'
    FROM  [dbo].[OJDT] T0 
    INNER  JOIN [dbo].[JDT1] T1  ON  T1.[TransId] = T0.[TransId]  
    INNER  JOIN [dbo].[OACT] T2  ON  T2.[AcctCode] = T1.[Account]  AND T2.[AcctCode] = T1.[Account]  
    INNER JOIN [dbo].[OPCH] T3 ON T3.[DocNum] = T0.[BaseRef]
    INNER JOIN [dbo].[PCH1] T4 ON T3.[DocEntry] = T4.[DocEntry]
    LEFT JOIN [dbo].[OPOR] T5 ON T5.[DocNum] = T4.[BaseRef]
    WHERE
    (T2.[AcctCode] > (N'599999' ) ) AND  (T2.[AcctCode] < (N'799999' ) )
    AND (T0.[TaxDate]>= [%0] ) AND (T0.[TaxDate]<= [%1])

    Try This
    SELECT T2.[GroupMask] AS 'Account Family',
       T2.[FatherNum] AS 'Parent Account',
       T2.[AcctCode] AS 'Account Code',
       T2.[AcctName] AS 'Account Name',
       T0.[TaxDate] AS 'Document Date',
       T0.[Number] AS 'Number',
       T0.[DocSeries] AS 'Document Series',
       T0.[BaseRef] AS 'Base Reference',
       T0.[TransId] AS 'Transaction Number',
       T0.[Ref2] AS 'Reference 2',
       T1.[ContraAct] AS 'Offset Account',
       T4.[BaseRef] AS 'PO code',
       T1.[Project] AS 'Project Code',
       T1.[ProfitCode] AS 'Distribution Rule',
       T1.[OcrCode2] AS 'Costing Code 2',
       T1.[OcrCode3] AS 'Costing Code 3',
       T1.[OcrCode4] AS 'Costing Code 4',
       sum(T1.[SYSdeb]-T1.[SYSCred]) AS 'Total Amount EUR',
       sum(T1.[FCDebit]- T1.[FCCredit]) AS 'Total Amount (FC)',
       T6.[DocTotalSy] AS 'PO Amount (EUR)'
    FROM OJDT T0
    INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId
    INNER JOIN OACT T2 ON T1.Account = T2.AcctCode
    INNER JOIN OPCH T3 ON T0.TransId = T3.TransId
    INNER JOIN PCH1 T4 ON T3.DocEntry = T4.DocEntry
    INNER JOIN POR1 T5 ON T4.[BaseEntry] = T5.[DocEntry]
    AND T4.[BaseLine] = T5.[LineNum]
    INNER JOIN OPOR T6 ON T5.DocEntry = T6.DocEntry
    GROUP BY T2.[GroupMask],
       T2.[FatherNum],
       T2.[AcctCode],
       T2.[AcctName],
       T0.[TaxDate],
       T0.[Number],
       T0.[DocSeries],
       T0.[BaseRef],
       T0.[TransId],
       T0.[Ref2],
       T1.[ContraAct],
       T4.[BaseRef],
       T1.[Project],
       T1.[ProfitCode],
       T1.[OcrCode2],
       T1.[OcrCode3],
       T1.[OcrCode4],
       T6.[DocTotalSy]
    Regards,
    Kennedy

  • Duplicate Journal Entry and system crash

    Hi All,
    Just wondering anyone experience when duplicate the journal entry and change the posting date and system will just hang and follow by crash?
    Please advise.
    Best Regards,
    Foong Yee

    Hi Foong Yee Tai...
    Check with the Following SAP Note...
    1616687 - B1 shuts down when updating amount in Journal Entry
    Regards
    Kennedy

  • Journal Entry for Service Tax Non-Deductible.

    Dear Experts,
    I have created an A/P Invoice for a Service item with Service Tax Non-Deductible(100%). For that we got the journal entry as below.
    Journal Entry
    Edu. Cess on Service Tax Payable Dr.                   00
    HCess on ST Payable Dr.                                        00
    Service Tax Payable (Non-Deductible) Dr.              00
    Inbound Freight and Carriage Dr.                       10000
    Service Tax Payable (Non-Deductible) Dr.            258
                    Vendor A/c                                                     10258.
    But my client is asking for the credit figure to be splited to Vendor A/c - 10000 and Service Tax Payable (Non-Deductible) A/c - 258.
    He wants the Service Tax amount not to be credited to the Vendor A/c; but to be kept in the Service Tax Payable account.
    Is this correct and possible? Please advice.
    Regards,
    Anandh.
    Edited by: anandharajaa on Apr 8, 2011 7:32 AM

    Hi
    I never seen this kind of scenario....
    If your involving any tax in Document then it will Cr. or Dr. to respective vendor or customer and it is the logic too , they have to pay for that... IF they are not payable then will your company pay for that to Govt. It will be lose to company only....
    So in Straight the way you need is wrong according to me, May  be  i don't know your are current scenario might be like this... if it so pls explain further ....
    Giridharan V

  • Bank statement Nr in journal entry and Payments

    In Notenumber 1374872 (SP 01/PL7) a change has been implemented that the number of the payment run is copied to the remarks of the payment and the journal entry. I think it will be good idea to do the same for the number of the bankstatement in bank stament processing. Hereby the text for the note 1374872. The reason why and the solution are the same.
    Regards,
    ProSigma BV
    Cees Hameete
    Symptom
    To find the number of the payment wizard run in payments and journal entries, bookkeepers currently have to open the journal entry, navigate to the payment document, and then search manually in the executed payment wizard runs to find the correct number.
    Other terms
    Incoming payment; outgoing payment; payment wizard; journal entry
    Reason and Prerequisites
    Functionality description
    Solution
    To improve usability and provide integrated journal remarks information, SAP Business One was changed as follows:
    When an incoming or outgoing payment is generated using the payment wizard, the application adds the payment wizard run number to the "Journal Remarks" field of the payment document and to the "Remarks" field in the journal entry on both header and row level.
    The values in the "Journal Remarks" and "Remarks" field have the following structure:
    Incoming Payments - [Customer Code] - [Payment Wizard Run Number]
    Outgoing Payments - [Vendor Code] - [Payment Wizard Run Number]
    SAP intends to provide a patch or patches in order to solve the problem described.
    The section Reference to Related Notes below will list the specific patches once they become available.
    The corresponding Info file of the patches in SAP Service Marketplace will also show the SAP Note number.
    Be aware that these references can only be set at patch release date.
    SAP will deliver patches only for selected releases at its own discretion, based on the business impact and the complexity of the implementation.

    I completely agree with your proposal.  We have the same problem at the moment.  I hope SAP will implement a solution for this.

  • Function Module: to get Cash Journal Entries and Balances

    Dear Guru's,
    We need to develop a function module to display cash journal opening balance line item entries and closing balance of specific period.
    we have found document entries through table TCJ_DOCUMENTS or TCJ_POSITIONS now require help to generate opening and closing balances.
    Please help for the solution.
    AAR

    Hi,
    check FM FCJ_GET_DATA_FOR_SCREEN. Next time you can try to figure out by yourself. The program for transaction FBCJ is not that complicated and you can easily find this FM used there.
    Cheers

  • PARK & POST  Journal Entry and auto reversal

    Dear All,
    Our auditors has offered the following changes to be implemented in SAP system.
    1. JE approval: Configure the system functionality to place journal entries in a u201Choldu201D status when entered into the system, then the supervisor/manager review and approval then required to release the journal entry from the u201Choldu201D status and post the entry to the general ledger. The reviewer should not have the ability to initiate a journal entry.
    2. JE reversals:  Utilize the functionality to automatically reverse journal entries, booked in prior month as u201Creversing,u201D when new period is opened.
    3. 3-way match: Utilize the SAP functionality to perform an automated 3-way match process between invoice, purchase order, and goods receiving documentation. If invoices meet the 3-way match criteria based on established variance thresholds, invoices should automatically be approved for payment. If variances are noted, which exceed tolerance thresholds set by Management within the system, work flows should be used within the system to automatically route the invoice for the require approval.
    How this changes can incorporated in the system.
    Do suggest.
    Regards,

    For point 1, there is a functionality in SAP where all parked documents will be blocked and then released by the authorized person. There is a standard workflow for that. You may want to check Make and CHeck Settings for Document Parking. If this doesn't satisfy, then there's a need to create a customized workflow. Plus authorizations must be checked so that the users will not be able to Post but only Park. Note that, there is another functionality in Document posting called "Hold" this one, system doesn't assign any financial document. You can assign any reference/number to the document.
    For point 2, there is a Mass Reversal functionality in SAP called the F.80. For accruals, you may use FBS1 which you can input the reversal date and run F.81 to run the reversal.
    For point 3, it is a standard SAP functionality. You must set tolerance as to qty or price variance and the system automatically blocks the invoice for posting and the authorized person is required to release the approved invoices to remove the block for payment. In SAP, when you enter the PO for a particular invoice, it will give you how much or how many is actually goods received for that particular PO. in that sense you will be able to see whether the invoice is completely billed for the whole PO or not.

  • Documents, Journal entries and DTW

    Hello,
    Is there a way that when I import a journal entry, DTW tells me that I can't because this JE is coming from a document and the JE already exists ?
    I saw that there is the field "Origin No." (table OJDT, BaseRef) which is displayed when a document is created in SBO.
    But is there a way to import this number (coming from the document) in this field using DTW ?
    Thank you
    Thibault

    Hi again
    The best would be to import all your documents. Then once you are done make a dump of all the documents and journals created, use sql and link them in sql already. The new journals you are going to import, use vlookup in excel to match keys and debit and credits to pick up possible duplication.
    Hope this helps

  • Null value in Session vars and request.getParameter

    We're migrating our application from iPlanet.
              Under iPlanet, when we looped through a resultset and set the values to
              session variables - it worked fine, even when a resultset value was null,
              but in WebLogic, I get the following error:
              java.lang.IllegalArgumentException: key/value is null
              Is there anyway to "turn this off" so it behaves like iPlanet?
              My second question is that we have many JSP's that check to see if a
              parameter is null in javascript:
              Here's the code:
              function onLoad() {
              document.form.elements[0].focus();
              // Check to see if the user is coming from a shortcut
              var imageName = "<%=request.getParameter("imageName")%>";
              if (imageName == "null") {
              selectTop("<%=select_image%>");
              } else {
              selectTop(imageName);
              <% if (tableIndex == 2) { %>
              loadShortcutIcon(13,100);
              <% } %>
              in iPlanet, when the parameter "imageName" is not in the URL, the javascript
              variable gets set to "null" - but in WebLogic, it is set to a blank string -
              "". Is there anyway to make this return null like iPlanet?
              Thanks,
              Matt
              

    Hi,
    the URL parameter is added just for the request to the page. When you press the command button then you issue a new request that does not have a URL parameter added. To work around this, you can use a PhaseListener that stores the URL request parameter in the session for later use
    Frank

  • Replacing null values in optional prompts and passing to stored proc

    Hi,
    I want to create a stored procedure with OPTIONAL prompts. When user does not pass a value for that parameter, I want to set the value for that parameter by selecting from a column in table then I WANT to use that paramvalue in sql within cursor of stored proc. How do I do that?
    In short, I want to do the following Here is the psuedocode:
    Create or replace procedure test (param IN varchar2 DEFAULT NULL)
    As
    var_param varchar(20);
    select param into var_param from dual;
    If param is null then select custid from table1 else var_param
    OPen ref_cursor for
    Select xyz from table2
    where fyy = var_para
    Can someone let me know the syntax on how to do this in stored proc?
    Regards,
    hena
    Edited by: 904385 on Dec 25, 2011 7:04 AM

    Hi,
    Merry Christmas, and welcome to the forum!
    Here's one way to do what you requested:
    CREATE OR REPLACE PROCEDURE     test
    (    param     IN     VARCHAR2     DEFAULT     NULL
    AS
        ref_cursor     SYS_REFCURSOR;
        var_param     VARCHAR2 (20)     := param;
    BEGIN
        IF  var_param  IS NULL
        THEN
         SELECT     custid
         INTO     var_param
         FROM     table1
    --     WHERE     ...     -- Unless table1 has only 1 row
        END IF;
        OPEN  ref_cursor
        FOR   SELECT  xyz
           FROM       table2
           WHERE       fyy     = var_param;
    END     test;Whatever you're trying to do, this is probably niot the simplest or most efficient way to do it.

  • How to use the same variable value for data entry and the planning sequence

    Hi,
    the scenario is the following:
    Using the WAD template a user enters cost center plan data. The cost center is selected by the chosen value for the variable "V1".
    Afterwards he shall push a button which starts a planning sequence (including saving the data and further functions). This planning sequence uses a filter that also contains the variable "V1".
    What or where has it to be defined that the planning sequence uses automatically the same value for the variable "V1" as selected for the data entry?

    You have to define in the planning function. The planning sequence is only a sequence and it read the planning functions underneath it.
    Ravi Thothadri

  • Any diffrent access for the null value between oracle 9i and 11g?

    I'v got a tmp result set by a SQL that with a group by rollup (code) clause, and the last row is the totle number and column 'code' is null.
    when i left out join (use (+)) the result set with the code table , in 9i,i can not get the last totle number row,but in 11g,can get the last totle number row.
    why? any one can help me?

    Can you post an example of what you mean?
    Please read {message:id=9360002} with the necessary details so we can understand your issue more clearly.

  • Journal entries and regulation requirements

    Hi experts ,
    One of our subsidiaries is located in Taiwan and we are planing to implement SAP there.
    We were told that according to the local regulation , we can't create JE in minus.
    Did you hear about something like that ? Can it be override somehow ?
    Thanks !
    Yoav
    Edited by: Yoavron on Jun 29, 2010 9:14 AM

    Hi,
    To find out about SAP B1 fitness for particular country please examine Globalization Knowledge Base document on the Document Resource Center in the portal.
    To avoid in the journal, specially reversal journal please untick option "Use Negative Amount for Reverse Transaction" in the company setting.
    Cheers

  • FMS- Journal Entry and AP Invoice

    2007B
    I ve created a UDF 'AP Remarks' in the JE Header level.
    I need the data in 'remarks' field of the AP invoice to be copied to the UDF in JE
    what is the FMS query for that?

    You can use the next query:
    If $[OJDT.TransType]=18
    Select I.Comments
    From OPCH I
    Where I.DocEntry=$[OJDT.CreatedBy]
    (But the Auto Refresh function works only connected to a manually modified field.)

Maybe you are looking for

  • Address Book application no longer launches

    I broke my laptop a few weeks ago and had the data manually retrieved and put on a hard drive. I bought a new macbook pro earlier and I was manually transferring the application files when i think i accidentally overwrote the address book application

  • EP6 SP9 - 'Personalize Portal' link does not work

    Hi, We've just installed EP6 SR1 SP9 and applied patch 4. The portal seems to work fine, except for one thing: The 'Personalize' link on the top right, above the TLN, doesn't seem to work. When clicking the link, nothing happens. No popup, no error m

  • HT5517 changing airplay speakers doesn't work, also photostream

    I have a network of airplay speakers that work perfectly all over my house from my iPhone and mac perfectly.  I was playing around with my newest generation Apple TV 1080P, and while it finds all of the rooms, when I select another room no sound come

  • Ate a website that does not support Safari. What are my optional browsers?

    I need to navigate a website that does not support Safari. What other browser are available to me if I am running OS X.4?

  • Custom Sentry Function

    All, Is there any documentation on writing custom sentry functions? I've been able to find some miscellaneous blog entries, but nothing definitive. Thanks, -David