Query Report:To Retrieve Data from A/R Invoice and A/P Invoice

Hii Experts,
      I am a new Sap B1 Trainee.I am facing a problem when retrieving data from A/R Invoice and A/P Invoice in order to track
Expenditure and Revenue according to a Bussiness partner,
I am using union to retrieve the information,but it is saying a error that  Error Converting Varchar to Numeric and also
i would like to know how can i show the total final payment by reflecting Downpayments in A/R Invoice and A/P Invoice
With Regards
Cherry.

Hii.
My Sap B1 version is 8.8.1 and patch level is 20. Actully i need a scenario where i can able to show both Expenditure and Revenue of a particular bussiness partner and profit/loss in a single query report.
I need some tips regarding this,When i am doing union i am getting conversion error converting varchar to numeric when i take
Sum(Line Total) from OINV and Sum(line total) OPCH group by docdate and docentry and BP .
and another scenario is how to deduct A/P downpayment or A/R downpayment from A/P invoices and A/R invoice to get the final Revenue and Expenditure ..
Thanks & Regards
Cherry

Similar Messages

  • Problems with retrieving data from tables with 240 and more records

    Hi,
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
    I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
    First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
    I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
    I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
    So for the retrievals that hang I have something like:
    (3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
    (3260008): FETCH NEXT:(DBI_FETCHNEXT)
    and this is the last line,
    while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
    On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
    Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
    I will appreciate any comments/hints/help.
    Thank you very much.

    pgoel wrote:
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
    Thanks.

  • Retrieving data from a relational table and CLOB as a whole XML file

    I created the table lob_example and I have managed to insert XML document into it using XML SQL Utility. In this document I put contents of <DESCRIPTION> tag into CDATA section.
    LOB_EXAMPLE
    Name Null? Type
    ID NOT NULL NUMBER
    DESCRIPTION CLOB
    NAME VARCHAR2(40)
    But I could not retrieve this data properly. I can think of only one solution - to parse and build the whole XMLDocument. I found the suggestion of another solution to use Oracle8i views to do that in http://technet.oracle.com/tech/xml/infoocs/otnwp/about_oracle_xml_products.htm, but this text is not clear enough for me.
    I would like to quote the fragment from document mentioned above, which is ambiguous for me:
    "Combining XML Documents and Data Using Views
    Finally, if you have a combination of structured and unstructured XML data, but still want to view and operate on it as a whole, you can use Oracle8i views. Views enable you to construct an object on the "fly" by combining XML data stored in a variety of ways. So, you can store structured data (such as employee data, customer data, and so on) in one location within object -relational tables, and store related unstructured data (such as descriptions and comments) within a CLOB. When you need to retrieve the data as a whole, you simply construct the structure from the various pieces of data with the use of type constructors in the view's select statement. The XML SQL Utility then enables retrieving the constructed data from the view as a single XML document."
    The main question is - how to use type constructors in the view's select statement?

    Hello
    Sorry for asking the same question again, but any responses would be greatly appreciated.
    How to use type constructors in the view's select statement?
    I could not find any answers for this question on Technet. Maybe the other approaches are more efficient to combine the part of data from CLOB with data from other column types?
    Thank you

  • Retrieve data from one numbers file and insert it in another?

    My goal is this:  I want to essentially link two numbers files.  I need data from several different tables in different sheets to automatically populate cells in a totally separate numbers file. 
    Here is why:  I have very detailed orders that all feed (link) to summary pages that are shared with clients.  I also need that same summary information, however, to feed to another file that calculates the margins.  The summary pages (sometimes dozens of pages) are critical for clients to see, but as you can imagine, the margins tables must never be seen by the clients. My preference is to have them be totally separate files so it eliminates the possibility of the margins table every being accidentally sent to clients.
    I'm wondering if applescript is the only or best way to accomplish this, or if there might be a more simple solution.
    Thanks in advance.
    Bob

    It may be done with a script but as I have no info about the structure of the document and about which values must be passed, I can't help you.
    More, I doubt that you are sending the Numbers document to your clients because this app isn't widely used.
    My guess is that you print the file in a PDF.
    The number of pages in the PDF will dramatically change if you include the sheets containing the margins so, it would be easy to check if you built a wrong document.
    To do the trick with a script, it seems that the easiest scheme would be:
    duplicate the original file
    add the columns required for the calculations
    create the formulas and insert them
    copy the relevant columns
    paste them in the original document.
    I'm reluctant to work this way. The risk of errors is too big.
    Here is an alternate scheme.
    In your document, change the layout so that columns which are supposed to be seen by clients are contiguous.
    This way, you may easily hide the columns which you want to keep 'secret'.
    I don't know the way you are working but with a bit of luck, once the formulas are built, maybe you have no need to unhide the 'margins columns'.
    Yvan KOENIG (VALLAURIS, France) mercredi 4 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : http://public.me.com/koenigyvan
    Please : Search for questions similar to your own before submitting them to the community
    For iWork's applications dedicated to iOS, go to :
    https://discussions.apple.com/community/app_store/iwork_for_ios

  • Retrieve data from a powerbook 150 and 170

    hi all,
    i have a powerbook 170 that starts up with the flashing-question-mark-disk icon and a powerbook 150 that does not start up at all. i have data on both that i would like to retrieve (old hypercard stacks; anybody know of a modern reader?).
    what is the best way to achieve this?
    is it easy to open up the powerbooks and just remove the hard drive? and would it then be easy to buy a cable to connect the bare hard drive into a moden USB port?
    thanks!

    hi jan,
    i've made some progress regarding my older powerbooks!
    (1) i pulled the IDE hard drive out of my 150 and am waiting to borrow a friend's IDE-to-USB adapter.
    (2) i've made several attempts to cure my 170 of its flashing disk icon upon startup:
    (a) i found an old mac disk labeled "Norton Utilities Mac v. 3.0 Emergency Disk," and when i startup from that, i first get the happy mac icon, then the "Welcome to Macintosh" screen, but shortly after i get a window with a bomb icon and a single button that has no text on it. when i click the button (which is the only thing i can do, at that point), the emergency disk is ejected and the powerbook restarted. the same thing occurs when i start up with the emergency disk while holding down the shift key (to turn off extensions) or the spacebar.
    (b) i've tried booting from various iterations of "Disk Tools" for system 7, as you suggested, using a PC running the commercial application TransMac to generate the actual boot disks. both of the Disk Tools image files from this website (http://main.system7today.com/articles/tutorials/disktools.html) initially give me the happy mac icon, but soon the disk is ejected and the all-too-familiar disk icon returns. however, instead of a flashing question mark, i now have a flashing X over the disk icon...
    (c) i tried every single boot disk i could download from this website (http://home.earthlink.net/~gamba2/bootdisks.html), but none of them even give me the happy mac icon - the disks are simply ejected.
    (d) i even downloaded a Network Access disk image for system 7.5, but this too was simply ejected with no happy mac icon...
    so now i'm at a point where i'm wondering:
    (1) am i simply using the wrong boot disk?
    (2) is TransMac improperly creating boot disks? (i'm thinking no, because i used it to generate two Disk Tools disks that at least gave me the happy mac initially...)
    the norton emergency disk gives me hope that this startup issue can be resolved.
    sorry for such a long post. i hope you have some ideas for me!

  • How to retrieve data from a function module and use it in sap script??

    I have a report program, which calls a function module. This function module internally calls an include program. In this program, I have a variable which is to be used in the sap script. How can I send this variable to the sap script

    Hi,
    In your case, Include prog is part of FM, no need to treat it as an Entity.
    Now, Your Answer -
    In SCRIPT - IN Page Window -->
         PERFORM GET_MVAT_TIN IN PROGRAM Z_SCRIPT_PERFORMS_ABAPDB3
         USING &VBDKR-KUNRE&
         CHANGING &STCD1&
         CHANGING &STCD2&
         ENDPERFORM
         IF &STCD1& <> ' '
         <B>MVAT Number :</> &STCD1&
         ENDIF
    Then go to SE38 --> Creat prog with type - Subroutine pool
    In that Write FORM statement for this PERFORM.
    FORM get_mvat_tin TABLES inttab STRUCTURE itcsy
                             outtab STRUCTURE itcsy.
      DATA : v_kunre TYPE kna1-kunnr,
             v_stcd1 TYPE kna1-stcd1,
             v_stcd2 TYPE kna1-stcd2.
      LOOP AT outtab.
        CLEAR outtab-value.
        MODIFY outtab.
      ENDLOOP.
      READ TABLE inttab INDEX 1.
      v_kunre = inttab-value.
      IF v_kunre CA sy-abcde.
      ELSE.
        UNPACK v_kunre TO v_kunre.
      ENDIF.
       " Here You can take your Funcion module ***************************
      SELECT SINGLE stcd1 stcd2 FROM kna1 INTO (v_stcd1, v_stcd2)
                                         WHERE kunnr = v_kunre.
      IF sy-subrc = 0.
        READ TABLE outtab INDEX 1.
        WRITE v_stcd1 TO outtab-value.
        MODIFY outtab INDEX 1.
        READ TABLE outtab INDEX 2.
        WRITE v_stcd2 TO outtab-value.
        MODIFY outtab INDEX 2.
      ENDIF.
    ENDFORM.                                

  • Retrieve data from a text file and insert in table

    hi,
    i am writing an application which when executes would creates a user table and populates it with the data i.e. username and passwords taking it from a text file.
    i would like to know if anybody can help as to how can i retreive the user name and password for every insert statement that will be fired to populate the user table.
    thanks in advance for the help

    for csv try a little search:
    http://search.java.sun.com/Search/java?col=javafrm&qp=%2Bforum%3A31&qt=csv+import
    search for ini files:
    http://search.java.sun.com/Search/java?qt=ini+file&col=javafrm&rf=0&qp=%2Bforum%3A31
    hope this helps
    tobias

  • How to retrieve data from the serial port and decode it each 2 bytes is a long variable and 1 frame is about 6 bytes

    I send the frame by a microcontroller ( 8bits) the fram contains 6 bytes, 2bytes conform a long variable, I want to decode the frame and make operations with these long variables and then plot them

    Hey jpvans,
    I would first suggest using NI-VISA to talk to the serial port. Then, you can use the LabVIEW Type Cast or the Flatten to String and UnFlatten From String VIs to convert the data.
    You can setup the read so that it reads just two characters at a time to form an individual long or you can set the read up to read it all and then use the string functions like String Subset to cut the information into chunks.
    I hope this helps out.
    JoshuaP

  • Basic TableUI element to Retrieve Data from DB in WEbDynPro For Java

    Hi Experts,
    I am new to WebDynPro for java.Can any body please help me out from this issue.
    I am trying to display records from DataBase by Using Table UI element.
    DBTable Contains 10 rows.
    I have created a Node and Attributes(for every column) .
    I am using JDBC code to retrieve data from database and assigning to Attributes.
    But in Table UIElement its displaying only last record from database as first row in UIElement.
    Its over writing previous rows.
    Can any body please help me the correct procedure to retrieve data from DataBase.
    Thanks and Regards,
    Shashikiran.B

    Hi,
    Iterate through the result set object
    populate the context node
    Ex:Replace the context nodeName with that of yours.
    ResultSet resultSet = stmt.getResultSet();
           //Iterate through the resultset
           while(resultSet.next())
                //Create element of the context node
               IWDNodeElement nodeElement = wdContext.nodeOrders().createElement();
               //assign value from the database to the context attribute
               //Replace attributeName with your attribute name
               //Replace value with resultSet.getShort("<ColumnName>")
               nodeElement.setAttributeValue(attributeName, value);
               //Add the element to your node
               wdContext.nodeOrders().addElement(nodeElement);
    Regards
    Ayyapparaj

  • Adding data from a rolling camera and entering it into a file

    i have managed to get my software to read camera input from a usb port! I would like it to be able t pause the rolling image and trnsfer a image of me into a file named owner, so it reconises me! NOTE! it should only have to take my profile when it is started for the first time! then i would like it to be able to acsess the file so it knows that i am the owner!
    how would i go about doing this!
    baring in mind it would need to permantly know who i am afterwards!
    to make it reconise me after the initial setup! would you sagest i se a random accses file so that it can acses it or not!
    and would i need to put a loop so that it can acses the file to know who i am all the time!
    I hope this makes sense!
    many thanks

    Hi and welcome to the forum.
    Is there a way to retrieve data from a blob field and save it to temp table.Why would you want to do that?
    Can you provide some more details regarding your requirement?
    (Don't forget to mention your database version as well)
    Also, I wonder why you've added a 'decompress' tag to your question?
    edit, after seeing Tubby's reply
    Dang, the connection must be frozen here ;)
    Edited by: hoek on Jan 6, 2010 9:06 PM

  • Error while trying to retrieve data from BW BEx query

    The following error is coming while trying to retrieve data from BW BEx query (on ODS) when the Characters are more than 50.
    In BEx report there is a limitation but is it also a limitation in Webi report.
    Is there any other solution for this scenario where it is possible to retrieve more than 50 Characters?
    A database error occured. The database error text is: The MDX query SELECT  { [Measures].[3OD1RJNV2ZXI7XOC4CY9VXLZI], [Measures].[3P71KBWTVNGY9JTZP9FTP6RZ4], [Measures].[3OEAEUW2WTYJRE2TOD6IOFJF4] }  ON COLUMNS , NON EMPTY CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( CROSSJOIN( [ZHOST_ID2].[LEVEL01].MEMBERS, [ZHOST_ID3].[LEVEL01].MEMBERS ), [ZHOST_ID1].[LEVEL01].MEMBERS ), [ZREVENDDT__0CALDAY].[LEVEL01].MEMBERS ) ........................................................ failed to execute with the error Invalid MDX command with UNSUPPORTED: > 50 CHARACT.. (WIS 10901)

    Hi,
    That warning / error message will be coming from the MDX interface on the BW server.  It does not originate from BOBJ.
    This question would be better asked to support component BW-BEX-OT-MDX
    Similar discussion can be found using search: Limitation of Number of Objects used in Webi with SAP BW Universe as Source
    Regards,
    Henry

  • Retrieving data from a BW Query runs endlessly in Crystal

    Hi,
    I have installed Crystal Reports 2008 SP2 with SAP BO Integration Kit 3.1. When I create a new file from a SAP BW 7 Query I everything works fine (field selction etc) until I run it and try to extract data from the database. I can enter the parameters and enter the login data for the BW connection. After that I can see the entry "retrieving data from the database" in the status bar and that's it. The screen kind of freezes and I don't get any result. I can wait for 2 hrs no result. In the end I cannot even get back to screen. I have to close it through taskmanager.
    I have tested the query with transaction RSRT and the same parameter value I chose in Crystal reports and there I get a result. Therefore the entry values should be fine.
    Did I install anything wrong, did somebody encounter this problem as well?
    Thanks a lot in advance for any help provided
    Kind Regards,
    Melanie

    Hi,
    I entered the SQL statement in transaction MDXTest but it is running since 7 minutes.
    >> Transaction MDXTEST has an option to generate a test sequence and is not there to test SQL statements. You need to enter a valid MDX statement.
    Function module "/Crystal/MDX_GET_STREAM_INFO" not found
    >> then I would suggest you make sure that all the Transports from the SAP Integration Kit have been properly imported - see the Installation Guide for the SAP Integration Kit for details.
    Ingo

  • Crystal Reports - Failed to retrieve data from the database

    Hi There,
    I'm hoping that somebody can help me.
    I've developed a crystal report from a stored procedure which I wrote. I can execute the stored procedure within SQL Server and within the Crystal Reports designer without any errors. Furthermore, I have imported the report into sap and can run it within SAP from the server without any errors. SAP version 8.81 PL5
    The issue is that when it's run from a client machine, I get the following error: "Failed to retrieve data from the database. Details: Database Vendor Code: 156. Error in the File RCR10010 {tempfile location}
    Here's a list of things which I have tried, all to no avail:
    - Checked user permissions to ensure that they have proper authorizations
    - Re-set the datasource connection and re-imported the report to SAP.
    - Exported the report and reviewed the datasource connection and re-imported to SAP.
    - Tried to run the report on multiple machines to ensure that it's not machine specific
    - Tried to run the report using different users to ensure it's not user specific.
    - Tested other reports built from stored procedures on client machines to ensure that they work.
    Any assistance in this would be GREATLY appreciated.
    Thank you

    After further testing, we found that the report could be run within SAP on any work station which had the CR designer installed on it.
    As it turns out, the procedure which I wrote has temp tables in it.  The runtimes built into the SAP client install do not support creating temp tables when executing the report from within SAP.  Which is why the report could not retreive data.
    To work around this, I installed external runtimes which were the same version of the Crystal Report and now the report can be run within SAP from any workstation which has the external runtimes (and not just the runtimes within the SAP client).
    I hope this makes sense.

  • Failed to retrieve data from the database crystal reports 2008 in SAP  B1

    Hello friends,
                 I am using Crystal report 2008 with SAP B1 PL 8.8. When I run any report,  it runs correctly from Crystal Report. But whenever I try to open the same report through SAP ( Tools -> Preview External Crystal Report ), it prompts the parameters for that report and then open up the crystal report window and throws an Error message ("failed to retrieve data from the database. Details [Database Vendor Code: 156]").
               Please any one suggest me the corrective solution.
    Thanks in Advance,
    Keyur Raval.

    I had the same problem in SAP B1 2007. Report worked fine except when it was open from B1. Generally there may be different problems. In my case the same problem was caused by using some procedure which was in a specific schema. Changing the schema into "dbo" solved the problem.
    Radoslaw Blaniarz

  • Crstal Reports: "Failed to retrieve data from the database"

    Running a report in crystal report from SAP 8.81 using the following parameters: CardCode, GroupCode, Date gives the following error: "Failed to retrieve data from the database" "Conversion failed when to converting the nvarchar value to data type int 12/31/2005 [Database vendor code: 245] ".
    The store procedure in SQL Server executes smoothly and  If you run the report with the date = 12/31/2005 in the parameter also returns expected results.
    Thanks.

    Hello,
    Is this in Business One? If so CR is an OEM build and that forum/product supports that version.
    Please post your question to: http://forums.sdn.sap.com/index.jspa#44
    It could simply be you need to use a formula to convert the field. Click on the Formula Editor and the hit the F1 key and search on "date". Lots of info on how to convert todate and from date tostring...
    Thank you
    Don

Maybe you are looking for

  • How to video call with other phone using Iphone 4??

    Hii Anant Patel here. How to use iphone 4 for video call to other phone like nokia or others.??

  • Can´t create apps with CCP

    I get the following error when I try to create a new package in CCP 6/18/2013 13:27:26[INFO] AdobePackageBuilder - Build Version - 1.0.0.55 6/18/2013 13:27:26[INFO] AdobePackageBuilder - Logging Level verbosity Set  to 4 6/18/2013 13:27:27 [WARN] Ado

  • GOLive to DWCS2

    I have recently upgraded our software to CS3 and it seem to have successfully migrated my GoLive file into DW (selected original site as root folder). Now my question is, if I upload to server, will it overwrite everything on the server or continue a

  • [CS2][AS] PDF Export timeouts...

    I have a massive applescript that preps Indd files for print or export, everything works great except the export will timeout. I have tried using "with timeout" of varying lengths, even up to 3 days. with timeout 86400 seconds or with timeout 72* hou

  • After installing a MAC update, Firefox has been uninstalled - how could this have happened?

    I installed a recommended update (on MAC OS X 10.7.5), comprising updates for Word, Excel and Microsoft Messenger. When the installation process was completed, Firefox had been de-installed without any notification. Why? Has anyone had the same exper