Duplicating in Ledger report
Hi Guys,
This is the query i am using to run ledger report.
i am getting the desired output but its getting duplicated if there is Bill no (U_BillNo) for that transaction.
I have created udf (U_BillNo) at row level.
pls give me some solution.
SELECT distinct T1.[RefDate], T1.[BaseRef], T1.[Memo], T0.[Debit], T0.[Credit],T1.[LocTotal],T3.[U_BillNo]
FROM [dbo].[JDT1] T0
INNER JOIN [dbo].[OJDT] T1 ON T0.TransId = T1.TransId
INNER JOIN OCRD T2 on T2.CardCode = T0.ShortName
INNER JOIN PCH1 T3 ON T2.CardCode = T3.BaseCard
WHERE T2.[CardName] =[%0]
Regards,
Vamsi.
Hi Gordon,
I have created this UDF for AP Invoice in row wise and there is multiple bill no for same invoice based on diff line items.
so when i run the report the same line item is appearing two times one line item displaying with bill no and another line item without bill no.
i tried to create a subquery for bill no but its showing error like below,
Normal Query
SELECT distinct T1.[RefDate], T1.[BaseRef], T1.[Memo], T0.[Debit], T0.[Credit],T1.[LocTotal],T3.[U_BillNo]
FROM [dbo].[JDT1] T0
INNER JOIN [dbo].[OJDT] T1 ON T0.TransId = T1.TransId
INNER JOIN OCRD T2 on T2.CardCode = T0.ShortName
INNER JOIN PCH1 T3 ON T2.CardCode = T3.BaseCard
WHERE T2.[CardName] =[%0]
With SubQuery
SELECT distinct T1.[RefDate], T1.[BaseRef], T1.[Memo], T0.[Debit], T0.[Credit],T1.[LocTotal],
(SELECT (U_BillNo) FROM PCH1 WHERE T2.CardCode = T3.BaseCard) as 'Bill No'
FROM [dbo].[JDT1] T0
INNER JOIN [dbo].[OJDT] T1 ON T0.TransId = T1.TransId
INNER JOIN OCRD T2 on T2.CardCode = T0.ShortName
INNER JOIN PCH1 T3 ON T2.CardCode = T3.BaseCard
WHERE T2.[CardName] =[%0]
Pls give me a solution .
Regards,
Vamsi.
Similar Messages
-
Dear Experts
I have to code a Vendor Ledger report.
Can anyone help me what table i should use.
RegardsHi,
Try these Bapi..
BAPI_AR_ACC_GETKEYDATEBALANCE
BAPI_PROFITCENTER_GETDETAIL
BAPI_PROFITCENTER_GETLIST
Hope this will help you to solve your problem.
Regards,
Vijay -
Business One C# DI API's for General Ledger Report?
I am working on the General Ledger Report and unable to find the DI API's for C# for the following cases. If somebody can point me the API's, that would be really helpful. I have handle to the logged in company.
Get all ChartOfAccounts
Get AccountSegmentations
Get BusinessPartners
Get JournalEntries_lines
I am new to SAP. The documentation is bit unclear. I am using the following code to load the objects. Now it is unclear how to loop through the journalvouchers to load all the lines one by one.
SAPbobsCOM.AccountSegmentations segmentations = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oAccountSegmentations);
SAPbobsCOM.AccountSegmentationCategories categories = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oAccountSegmentationCategories);
SAPbobsCOM.BusinessPartners partners = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners);
SAPbobsCOM.JournalVouchers vouchers = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalVouchers);
SAPbobsCOM.JournalEntries jEntries = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries);
SAPbobsCOM.JournalEntries_Lines jLines;Hi,
Are you trying to run the report via code? If so, you can only do that using the UI objects as there is not DIAPI for reporting.
You first need to activate the menu item for the report:
connect.SboApp.ActivateMenuItem("13058");
Once you've done that, you can get the active form which will be your criteria window, use the UIAPI to set your criteria and run the report by getting the OK button object and calling the Click method.
David -
General Ledger report with Op Bal , Trans Line Items and Closing Balance
Hi Experts,
My clients needs a General Ledger report which should show Opening balance and all transactions line items with closing figure in a single report for a fiscal year in the given date range wise. Can I get a report in standard sap. Waiting for your reply.
Thanks in Advance,
Arabinda ParidaHi Parida,
There is no such report in SAP. Basically all standard report gives line items not with opening and closing balances. Anyway check mentioned transaction which may help to you.
S_ALR_87012309....It is cash journal report. Anyway you can enter GL account get opening and closing balances with all relavent transactions.
Regards
Suma -
Showing wrong Balance in TB and Ledger Report
Dear Experts,
I am facing a problem in Trial Balance & Ledger report, In 4-5 accounts the debit balance and credit balance is same still showing balance of 0.01 or -0.01
for example
Account Head Debit Credit Balance
ED1051 184.31 184.31 -0.01
to nullify the effect if I debit this account with 0.01 then its displaying balance 0.01.
what may be the reason?
Thanks
KamleshHi Kamlesh,
It sounds like there might be transactions in the db with more decimals than the current setting.
You can check this in SQL (B1 will only display 2 decimals)
If this is the case let us know the version you are using.
Jesper -
Stock Ledger Report in Day Wise not giving correct values for Opening Stock
Dear Experts,
I m working on Sock ledger report to give the day wise data.
since yesterdays closing Stock will become opening stock of today,
To get Opening Stock,
I have restricted the stock key figure with 2 variables on calday
(DATE FROM var with <=(Lessthan or equal to) and offset -1
DATE TO var with <=(Lessthan or equal to) and offset -1)
To get Closing Stock,
I have restricted the Stock key figure with 2 variables on calday
(DATE FROM var with <=(Lessthan or equal to)
DATE TO var with <=(Lessthan or equal to) )
But in the output Opening stock values are not coming correctly and for given range of dates,
for last date, opening stock is showing as Zero.
Could you please tell me how can I achieve the correct values for opening stock.
Thanks in advance.Hi Arjun,
Seems like you are making it more complicated. What is your selection screen criteria?
Ideally you should only use the offset.
You will have say Calday in rows and stock in Column
____________Opening Stock_____________Closing Stock
01/06/2009___(Closing stock of 31/05/2009)_(Stock of 01/06/2009)
02/06/2009___(Closing stock of 01/06/2009)_(Stock of 02/06/2009)
03/06/2009___(Closing stock of 02/06/2009)_(Stock of 03/06/2009)
So, from above scenario, create one RKFs and include Calday in it. Create a replacement path variable on calday and apply the offset as -1.
So, your Opening Stock will be calculated by closign stock of previous day.
- Danny -
HI,
There is any Stock Ledger Report material Wise and Date Wise with Opening , issue, Receipt & Closing Qt available.
With details Shown Below
Material Code, Date, Material Document, Goods Movement Qty, Opening stock, receipt, Issues, Closing Stock.
if useful, rewards points will be given.
Regards
Mani.Dear Vishal,
Thank You for your response.
But MB5B is Stock Statement and am looking for date wise, Material document wise, Opening, Receipt, Issues and Closing stock for the paricular material.
i hope you can understand my requirement.
Rgards
Mani -
Error at Outgoing payment and general ledger report
Hi Experts,
I am getting a error while opening Outgoing Payment and General ledger Report, Errors are : "Path Can not be Null, Parameter Name: Path" and "Error code: 100000004, Error: Unknown session" ,respectively.
These errors are only at a particular client machine.
Kindly suggest solution.
Thanks in Advance.
AshutoshHi Jambulingam/Suraj,
I checked the by giving admin rights, also with different user login, but these errors come as and when they want, i have put in this system in observation and wil update this thread accordingly.
There is no citrix server.
Thanks for your reply.
Regards
Ashutosh -
Gneral ledger Report- Remarks Problem
Hi
I am placing Some remarks in Incoming / Outgoing Payment, that has to come in general ledger report so it will be very easy to identify what kind of Entry this. This we can do it by placing In Journal remarks , But problem is It is 50 Characters only. How to resolve this...
GiriHello Giri - we use the Journal Remarks field in all documents also to tie things together in the Document Journal, the BP Account Balance window, and many other places where the Journal Remarks are displayed...you did not say what kind of information, so I am just guessing you might be thinking along the same lines we already have...
I do not think there is any way to expand the field (SDK folks will tell you, if you need to go that route)...
BUT what the company did was decide to have a standard and specific field appear in each document's "journal remarks" for each work flow in SAP B1. We also used the add-on package of BOYUM to make certain fields mandatory. Then we wrote a procedure to replace the "journal remarks" with that standard. For example, on the AR Invoice in the Sales - A/R module - the Customer Reference Number is set to mandatory. When someone enters the Customer Reference Number, the system automatically replaces the SAP journal remark of "AR Invoice - Cust Number" with the Customer Reference Number ("NumAtCard") from the header of the AR Invoice. When Incoming Payments are processed, the clerk copies that Journal Entry from the AR Invoice and pastes it in the Incoming Payment Journal Remark field...it works quite well...
As part of customer service, when the customer calls it is always good to reference their own information and look into the BP Accout Balance window or use Boyum's search function...
I know that does not solve your problem of making the Journal Remarks field larger, but maybe it is an alternative to look into???
Regards - Zal -
In General Ledger report i want "cheque Number" Column
Hi All,
I am seeing General Ledger report in-built in sap B one 2005 for one single bank G/L A/C. i want one column in this report "Cheque Numbers" which is posting in Outgoing Payment, any body help on this.
Regards,
S.Mobin.hi
please go to form setting and make visible "Ref. 3"
u will get the number
please let me know if it does not work
Avtar singh Saini . -
Display the Customer/Vendor Name in the General Ledger Report
**I have Questions about General Ledger Report in SAP Business One. How can Display the Customer/Vendor Name in the General Ledger Report.**
*Just would like to ask if its possible to display the Customer/Vendor Name in the General Ledger Report? The format simply have the Customer/Vendor Code on the said report. Is there a work around on this?*If ur selection creteria by g/l account,u can display customer/vendor name by including
offset account from form settings. -
The Customer/Vendor Name in the General ledger Report Form.
I have Questions about General Ledger Report in SAP Business One. Display the Customer/Vendor Name in the General Ledger Report.
Just would like to ask if its possible to display the Customer/Vendor Name in the General Ledger Report? The format simply have the Customer/Vendor Code on the said report. Is there a work around on this?
Please help me.Hi,
In the Standard Reports, you cannot add a new column.
As mentioned by me earlier, please check 'Offset Account Name' column in the Form Settings if the same is of help in your case.
You can check Note No. [1045356|https://websmp130.sap-ag.de/sap(bD1odSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1045356] regarding the issue. The same has been fixed in 2005 A PL23.
Kind Regards,
Jitin
SAP Business One Forum Team -
General Ledger Report Criteria Selection
Hi, just a general question in regards to running the general ledger report. I would have thought the expanded button would be user specific, as it is not it means that each user has to check and change the selection for each report incase someone else has changed it. Some reports are GL specific (which takes time to go through and tick those required) and change dates and then the expanded options, thus leading to my question (whew).
Is there anyway a user can 'save' a selection criteria so they can easily run this each day for eg without all the pre selection hassle and making sure the selection is consistent with the previously run report. Especially if the user is away and someone else has to run it.
I noticed there is a selection criteria on the tax report however it does not allow you to save it.
thanks judiJudi,
Unfortunately, there is no means for a user to save a selection criteria on the Reports.
Suda -
Ledger Report In Crystal Reporter
Dear SAP B1 Experts.
I generated a Ledger report in SAP B12007 B Inbuilt Crystal Reporter Addon , by linking JDT1 Table and OACT table. I am able to run report based on the From Date and Todate parameter and the informations are showing currectly.
But the problem is I am not able to fetch the opening balnce for the sepecified account.
For Eg :
Ledger Report for Cash Account , Parameter is 01/05/09 to 31/05/09 . So as per my reports, it is taking only the trasnaction in between the parameter Date. Here if i able to fecth the opening balance (Sum(jdt1.Dr) - Sum(jdt1.Cr) which is less than the From Date.
Opening Balance = Sum(jdt1.Dr) - Sum(jdt1.Cr where Jdt1.RefDate < From Date Parameter.
So in this scenario, what kind of formula should write to fetch the opening balance .
Can anybody help me to sort out this issue.
Thanks
Regardsdeclare @fr char(7)
declare @to char(7)
/select t.Refdate from ojdt t where t.refdate between '[%0]' and '[%1]'/
set @fr=convert (char(7),[%0],20)
set @to=convert (char(7),[%1],20)
declare @PrCl dec(19,6)
declare @de dec(19,6)
declare @cr dec(19,6)
declare @acc char(20)
declare @Pracc char(20)
Create table #W
(Acc char(20), M char(7), Op dec(19,6),De dec(19,6),Cr dec(19,6),Cl dec(19,6) )
Insert into #W (Acc,M,Op,De,Cr,Cl)
SELECT T1.[Account],convert (char(7),T1.[RefDate],20)Mo,
0,sum(T1.[Debit])De , sum(T1.[Credit])Cr,0
FROM OJDT T0 INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId
Group by T1.[Account],convert (char(7),T1.[RefDate],20)
Order By T1.[Account],convert (char(7),T1.[RefDate],20)
Declare cu cursor for
Select acc,de,cr from #W
for update
set @PrAcc=''
Open cu
Fetch next from cu into @acc,@de,@cr
While @@FETCH_STATUS = 0
Begin
If @acc!=@PrAcc set @PrCl=0
Update #W
set op=@PrCl,
cl=@PrCl-@Cr+@de
where current of cu
set @PrCl=@PrCl-@Cr+@de
set @PrAcc=@acc
Fetch next from cu into @acc,@de,@cr
End
deallocate cu
Select * from #w
where M between @fr and @to
Drop table #W
Run the above query -
Dear all,
I have to develop a ledger report item wise and Organization wise:
Item wise:
Transaction date: reciept_num/ issue_number: reciept_from, reciept_to, BF Balance, Receipt Qty, Issued Qty, CF Balance,
Which column in mtl_material_transactions is for reciept from and reciept_to?
Regards:
Muhammad nadeem
[email protected]My feeling is that you are probably better off describing the business requirement than the proposing these various table reads... my instinct is that your report may well work better if you were to start with BKPF (document header) and then the corresponding BSEG entries... the data in the BSI* and BSA* index tables comes from these two sources so if your business requirement is something like "for documents in company code XYZ posted to SAP between 01.01.2008 and 31.01.2008, provide cleared and open item totals for the following document types" then you should find that a select from BKPF via the BUKRS+CPUDT key followed by an efficient access into BSEG will probably give you the data you need... but try rephrasing your question and you should get some more relevant assistance.
To help you along your way, it's worth noting that the table names you mentioned follow a certain pattern - all of them start "BS" and the 3rd character is "I" if the item is uncleared (e.g. the AUGDT clearing date will be empty) or "A" if the item is cleared... and the 4th character is based on the "account type" (field KOART) in BSEG e.g. "K" = Kreditor... thus BSIK = Open vendor items, and BSAD = cleared debtor items. So rule 4, for example, could be rephrased as "4. if BKPF-BLART (document type) is DZ and BSEG-KOART = 'D' or BSEG-KOART = 'S' then add BSEG-DMBTR to sum4".
Jonathan
Maybe you are looking for
-
iOS 7 doesn't work on iPod touch 4g, so does the mean its the end for this device? Or are they going to make updates specially for lower devices an apps that are compatible ??
-
Problem in running Job through Sqlplus
Hi, I'm trying to run sequence of sql statments to run a job. At the end of this i'm getting error, anyone can help me out on the same. -- Creating a table with a column cob. create table gob(cob number(5)) -- Procedure to insert a value 100 in table
-
BI Precalculation Server for BI 7.0 (SAP GUI 710)? Not Available?
We recently upgraded from BW 3.5 to BI 7.0 SP 15. To support other SAP company initiatives, we also upgraded all SAP GUIs to 710. Is there no updated BI Precalculation Server for BI 7.0 with SAP GUI 710? Can we use older precalculation software wit
-
I like being able to upload a designed web gallery but find that it really begs for a way to add a navigation bar to the top or bottom with predefined hotspots. I didn't want to break anything by editing the .html file in Dreamweaver and unfortunatel
-
No sound in some video in apps on ipad2 after ios6
No sound in some video in apps on ipad2 after ios6