Query in fbl reports
Hii experts, we have a gl named CENVAT (Purchase) Clearing Account.. in that document Re is processed when J1iex is done and some line items in that are generated automatically... soo fbl reports.. specially for this a/c ... Purchase doc. is blank for document Re... now i have changed the sort key from posting date to purchase document no..now the assignment fields comes blank or 0000 in document type re...please help to solve the issue
Regards,
Abhay
HI Abhay,
I am also pasting the code here.. You can give it to your Abaper and use the exit in substitution to substitute on ZUONR field.
FORM u900.
PLEASE DELETE THE FIRST '*' FORM THE BEGINING OF THE FOLLOWING LINES *
IF THE ACCOUNTING MODULE IS INSTALLED IN YOUR SYSTEM: *
*RM08M-EBELN
*SAPLMR1M
FIELD-SYMBOLS : <fs_ebeln> TYPE RM08M-EBELN .
FIELD-SYMBOLS : <fs_ebelp> TYPE RM08M-EBELP .
FIELD-SYMBOLS : <w_ebelp> TYPE ANY .
DATA : l_fname1(50) TYPE c,
l_fname2(30) TYPE c VALUE '(SAPLFACI)ACCIT_FI-TAXPS',
ebelp LIKE bseg-ebelp.
l_fname1 = '(SAPLMR1M)RM08M-EBELN' .
ASSIGN (l_fname1) TO <fs_ebeln> .
IF sy-subrc = 0 AND <fs_ebeln> IS NOT INITIAL .
IF bseg-hkont = '0010018400'.
l_fname2 = '(SAPLFACI)ACCIT_FI-TAXPS' .
ASSIGN (l_fname2) TO <w_ebelp> .
ebelp = <w_ebelp>+2(4) * 10.
bseg-xref1 = ebelp .
bseg-zuonr = <fs_ebeln>.
ELSE.
bseg-zuonr = <fs_ebeln>.
ENDIF.
endif.
ENDFORM. "U900
Regards,
Kavita
Note : Chnage the GL in the code as applicable for your organization
Similar Messages
-
Hi!
Is it possible to modify a select query for a report in the following way:
I have created two fields where users input values and operators.
Operators selection is a static list consisting of: =, like , in
Value field is a text field.
The current query is:
SELECT
A,
B,
C
from TABLE
I would like to add:
WHERE
A : P1_OPERATOR : P1_VALUE
but it doesn't work; I get a notification that the operator is incorrect.
It has a defaulft value = and when I set let's say 5 in the value field the whole query should be:
SELECT
A,
B,
C
from TABLE
WHERE
A = 5
Regards!Hmm, I get the following error:
Updatable report parse error:
ORA-20001: Query must begin with SELECT or WITH
The only difference I see is that your type is SQL Query (PL/SQL function body returning SQL query) while I have SQL Query (updateable report) hardcoded.
I have APEX 4.2.2, I'm not quite sure how to change this...
This is my code:
begin
:P7_QUERY := 'select ROWID,BNK_ID,MSR_PRD_ID,SRC_STM_ID,ID,ID_RETKA,RSP,OZNAKA_RETKA,DATUM_STANJA,OZNAKA_IZVJESCA,OZNAKA_KOMITENTA,MBR_KOMITENTA,KOMITENT_NEREZ,ZUPANIJA,DRZAVA,SEKTOR_NEREZIDENTA,VRSTA_POVEZANOSTI,INSTRUMENT,ISIN,VALUTA,OTKAZNI_ROK,IZVORNO_DOSPIJECE,VRSTA_INDEKSACIJE,VALUTA_INDEKSACIJE,PORTFELJ,UTRZIVOST_KREDITA,ZNACAJKE_KAPITALA,RIZICNA_SKUPINA,UGRADJENI_DERIVAT,ODNOSNA_VARIJABLA,PREDZNAK,IZNOS,IZNOS_ACTUAL,VRSTA_IZNOSA,KOMITENT_PBR,UDJELI_POVEZ_C,AR_ID,AU_ID,ACT_AR_BAL_KN,ACT_AR_BAL,AR_BUSS_ID,MTI_CCY_TP_ID,REG_NO,REG_SFX,JMBG_ID_NO,IP_ID,NO_DYS_OO,TAX_ID_NO,INSTRUMENT_OLD,PREDZNAK_OLD,IZNOS_ACTUAL_OLD,ACT_AR_BAL_KN_OLD,ACT_AR_BAL_OLD,NAPOMENA,NOVI_POSAO_F,LISTA_SUMARNA,LISTA_REKAP,POSTOTAK1,POSTOTAK2,POSTOTAK3,DZS_IDY_CL_ID,HNB_IP_CL_ID,EXG_RT_CRD_RSK_F from DWP.IZV_SLOG_DET
where ' || :P7_X_FC1 || :P7_X_O1 || :P7_X_O1;
return :P7_QUERY;
end;
I have also set Use Generic Column Names (parse query at runtime only) nad P7_QUERY as page item to submit.
Regards,
Ivan -
How to add a new field in Query Builder or Report
Hi,
I am writing a report using Oracle 6i query builder and report.
example:
QTY_1 QTY_2 QTY_3
QTY_1 and QTY_2 are table fields and QTY_3 Is not. I need to show the value of (QTY_2-QTY_1) in QTY_3.
I need to create a field QTY_3 which is not in the database table. How do I do that?
JunHi,
Try using formula to return the qty_1 - qty2.
or
select qty_1, qty_2, (qty_1 - qty_2) qty_3
from table;
regards,
CB -
See sql query from crystal report without crystal report
see sql query from crystal report without crystal report
Hi,
Depends on datasource type but you could have a look at ODBC trace or if you have access to the SQL Server you could use profiler to monitor the session.
Regards,
Craig
And this will only be of use if you know which Server/Insstance/Database the Report is connecting to...
Please click "Mark As Answer" if my post helped. Tony C. -
Cursors are not closed when using Ref Cursor Query in a report ORA-01000
Dear Experts
Oracel database 11g,
developer suite 10.1.2.0.2,
application server 10.1.2.0.2,
Windows xp platform
For a long time, I'm hitting ORA-01000
I have a 2 group report (master and detail) using Ref Cusor query, when this report is run, I found that it opens several cursors (should be only one cursor) for the detail query although it should not, I found that the number of these cursors is equal to the number of master records.
Moreover, after the report is finished, these cursors are not closed, and they are increasing cumulatively each time I run the report, and finally the maximum number of open cursors is exceeded, and thus I get ORA-01000.
I increased the open cursors parameter for the database to an unbeleivable value 30000, but of course it will be exceeded during the session because the cursors are increasing cumulatively.
I Found that this problem is solved when using only one master Ref Cursor Query and create a breake group, the problem is solved also if we use SQL Query instead of Ref Query for the master and detail queries, but for some considerations, I should not use neither breake group nor SQL Query, I have to use REF Cursor queries.
Is this an oracle bug , and how can I overcome ?
Thanks
Edited by: Mostafa Abolaynain on May 6, 2012 9:58 AMThank you Inol for your answer, However
Ref Cursor give me felxibility to control the query, for example see the following query :
function QR_1RefCurDS return DEF_CURSORS.JOURHEAD_REFCUR is
temp_JOURHEAD DEF_CURSORS.JOURHEAD_refcur;
v_from_date DATE;
v_to_date DATE;
V_SERIAL_TYPE number;
begin
SELECT SERIAL_TYPE INTO V_SERIAL_TYPE
FROM ACC_VOUCHER_TYPES
where voucher_type='J'
and IDENT_NO=:IDENT
AND COMP_NO=TO_NUMBER(:COMPANY_NO);
IF :no_date=1 then
IF V_SERIAL_TYPE =1 THEN
open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
FROM JOURHEAD
WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
AND IDENT=:IDENT
AND ((TO_NUMBER(VOCH_NO)=:FROM_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NULL)
OR (TO_NUMBER(VOCH_NO) BETWEEN :FROM_NO AND :TO_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NOT NULL )
OR (TO_NUMBER(VOCH_NO)<=:TO_NO and :FROM_NO IS NULL AND :TO_NO IS NOT NULL )
OR (:FROM_NO IS NULL AND :TO_NO IS NULL ))
ORDER BY TO_NUMBER(VOCH_NO);
ELSE
open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
FROM JOURHEAD
WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
AND IDENT=:IDENT
AND ((VOCH_NO=:FROM_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NULL)
OR (VOCH_NO BETWEEN :FROM_NO AND :TO_NO and :FROM_NO IS NOT NULL AND :TO_NO IS NOT NULL )
OR (VOCH_NO<=:TO_NO and :FROM_NO IS NULL AND :TO_NO IS NOT NULL )
OR (:FROM_NO IS NULL AND :TO_NO IS NULL ))
ORDER BY VOCH_NO;
END IF;
ELSE
v_from_date:=to_DATE(:from_date);
v_to_date:=to_DATE(:to_date);
IF V_SERIAL_TYPE =1 THEN
open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
FROM JOURHEAD
WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
AND IDENT=:IDENT
AND ((voch_date between v_from_date and v_to_date and :from_date is not null and :to_date is not null)
OR (voch_date <= v_to_date and :from_date is null and :to_date is not null)
OR (voch_date = v_from_date and :from_date is not null and :to_date is null)
OR (:from_date is null and :to_date is null ))
ORDER BY VOCH_DATE,TO_NUMBER(VOCH_NO);
ELSE
open temp_JOURHEAD for select VOCH_NO, VOCH_DATE
FROM JOURHEAD
WHERE COMP_NO=TO_NUMBER(:COMPANY_NO)
AND IDENT=:IDENT
AND ((voch_date between v_from_date and v_to_date and :from_date is not null and :to_date is not null)
OR (voch_date <= v_to_date and :from_date is null and :to_date is not null)
OR (voch_date = v_from_date and :from_date is not null and :to_date is null)
OR (:from_date is null and :to_date is null ))
ORDER BY VOCH_DATE,VOCH_NO;
END IF;
END IF;
return temp_JOURHEAD;
end; -
Error when opening a BW query with Crystal Reports
Hi all,
I am having problems when opening a BW query with Crystal Reports, the strange thing is that it only happens with
the bo user I have created. If I use a user that already exists and that has SAP_ALL authorization it works.
I don't know if this could be an authorizations issue, but I have created a role with all the authorizations stated in the manual.
The error I am getting is the following:
"An error occurred while generating a new report template. Error in UNKNOWN.RPT file"
Does anyone know what this could be?
ThanksWell,
I cannot access the system now. But I think it is not an issue of authorization, because I assigned all the good user's role to the bo user,
and even with that, it still don't work.
Thanks -
RWI 00200 Error while scheduling the Bex Query based Webi report
Dear All,
I am facing the below error while scheduling the Bex Query based Webi report.
Error:RWI 00200
We are using BO XI 4.0 Sp05.
Please adviseHi,
I am on BO 4.0 SP05 Patch 6. Webi reports are just showing processing but not giving results. When I try to create new report it is throwing java security error.
Tried applet patch upgrade(From link : https://websmp207.sap-ag.de/~sapidb/011000358700000902752013E) for webi certificate but didn't help.
Please suggest what could be done.
Thanks and Regards,
Ankit Sharma -
Problem with using a Spatial Query in a report region
All: I am trying to create a report region using the below query. The query is syntactically correct and returns 10 rows. I have checked it out in SQL Developer AND in APEX SQL Workshop. It returns rows in 1-2 seconds.
However, after putting the query into a report region, the APEX page locks up when it runs. I've tried masking it in a view, using other functions. I can places the spatial function in the select clause and it works. However, placing the function in the Where clause causes the page to lock up.
Any thoughts?
Thanks,
John
select lastname, address
from changetracking.individuals
where sdo_nn (spatiallocation, MDSYS.SDO_GEOMETRY(2001,8265,MDSYS.SDO_POINT_TYPE(-87.55728,33.137569,null),null,null), 'sdo_batch_size=10') = 'TQImaging is not officially supported in the Measurement & Automation (MAX) toolkit, though you may find some luck with our free legacy QImaging LabView interface here: http://www.qimaging.com/support/downloads/software/windows/QCamLabViewInstaller221.exe depending on the version lf LabView you're using.If you're looking for something that is actively updated and supported, you may want to get back in touch with Fred at +1.800.874.9789 and ask about our SITK LabView interface as well.
PMQI_Josh,
Yes I've already installed the LabVIEW interface beforehand. Also the version of LabVIEW I'm currently using is 8.6. I'll get in contact with Fred to see if there's a solution to this problem. Thank you. -
How to write REF-CURSOR Query in Oracle Reports
Hello Guys!!
I have a form in which you can select regions/divisions/locations etc by the use of check boxes. And the selected values will be inserted into a table, and based on the selected values of the table the report is run.
The issue I have is with the query inside the Oracle reports(attached to this file).
The query works fine until the last two EXISTS conditions.
IF a region exists In the table report_param then it works fine but if there are no divisions in it , then the query returns no values, which is not correct.
Someone has advised me to use a ref-cursor query inside reports tool, which I am not aware off. So, anykind of suggestions or advises are welcome. Please let me know about it as it is very urgent issue for me. Anykind of help would be greatly
appreciated.
Thanks,
Vishal
-------------------------------------------------------Query in Oracle Reports---------------------------------------------------------
select c.key_segment, p.supplier_id,
decode(:in_col_nm, 'BRAND',nvl(p.product_brand,'<Unknown Brand>'), 'PLN',nvl(p.product_legal_name,'<Unknown Legal Name>')) COL_NM,
sum(a.ext_price) sales_dols,
sum(comp_allow_pkg.get_comp_allow_stddiv(a.control_loc_id, a.product_id, a.sold_to_customer_id,
a.doc_dt, a.ext_price, a.units)) cust_reb_dols,
sum(a.units) units,
sum(a.ext_cost) cost_dols
from sales a, key_segment_plns c, product p, rep_wrtr_dw_cust h
where a.doc_dt between :in_start_dt and :in_end_dt
and a.customer_oc = h.control_loc_id
and a.sold_to_customer_id = h.sold_to_cust_id
and a.ship_to_customer_id = h.ship_to_cust_id
and ((:in_dg_cd = 'B' and h.dealer_grower_cd in ('D','G')) or h.dealer_grower_cd = :in_dg_cd)
and a.product_id = p.product_id
and p.product_gl_class_cd = 'CHEM'
and p.product_legal_name = c.product_legal_name
and c.key_segment in ('GLYPHOSATE','PLANT HEALTH/RUST FUNGICIDES','PYRETHROIDS','STROBI FUNGICIDES')--&IN_KEY_SEGMENTS
-- and (:in_oc = 'ALL' or (a.control_loc_id in (select control_loc from control_loc_comb_ocs where control_loc_comb = :in_oc)))
-- SALES DATA FILTERS TO MATCH ACCUM_SALES_DG_MV
and a.sale_type_cd in ('02','08')
and a.document_type_cd in ('I','C','D')
and (substr(a.product_id,-1) in ('0','1') OR nvl(upper(trim(p.product_brand)),'X') = 'TECH FEE')
and a.units <> 0
and a.unit_cost <> 0
and a.unit_price <> 0
-- NEW FILTERS ADDED 9/11/07: LOCATION(BRANCH), BUSINESS TYPE, RSM/ASM/REP
and ((:in_loc = 'ALL') or (nvl(a.warehouse_id,'<blank>') in (SELECT param_value
FROM report_param
WHERE report_id = :IN_REPORT_ID
AND session_id= :IN_SESSION_ID
AND USER_ID = :IN_USER_ID
AND param_name='LOCATION_TYPE')))
and ((:in_uhs_ag = 'ALL') or (:in_uhs_ag = 'NA' and p.product_uhs_ag != 'A') or (p.product_uhs_ag = :in_uhs_ag))
and ((:in_sales_rep = 'ALL') or (nvl(a.territory_id,'<blank>') in (SELECT param_value
FROM report_param
WHERE report_id = :IN_REPORT_ID
AND session_id= :IN_SESSION_ID
AND USER_ID = :IN_USER_ID
AND param_name='SALES_REP_TYPE')))
and EXISTS
(SELECT '1'
FROM locations l, report_param rp
WHERE rp.report_id = :IN_REPORT_ID
AND rp.session_id= :IN_SESSION_ID
AND rp.user_id = :IN_USER_ID
AND rp.param_value = l.region
AND rp.param_name = 'REGION_TYPE'
AND a.warehouse_id = L.ARS_LOCATION)
and EXISTS
(SELECT '1'
FROM locations l, report_param rp
WHERE rp.report_id = :IN_REPORT_ID
AND rp.session_id= :IN_SESSION_ID
AND rp.user_id = :IN_USER_ID
AND rp.param_value = l.region
AND rp.param_name = 'DIVISION_TYPE'
AND a.warehouse_id = L.ARS_LOCATION)
group by c.key_segment, P.supplier_id,
decode(:in_col_nm, 'BRAND',nvl(p.product_brand,'<Unknown Brand>'), 'PLN',nvl(p.product_legal_name,'<Unknown Legal Name>'))Hi,
I need your help to create a report using Ref-Cursor. please see the below thread
Report using ref cursor or dynamic Sql -
Select Query in Crystal Report
Dear all,
I have a report to be developed in which i have to fire more than 2 select quires. I am adding this quires in "Add Command" window, it doesn't give any error but gives output of first query only.
I have tried to use multiple commands in report but the query fields are not having any common field in it so i am not able to link it.
Is there any other way to use more than one query in crystal report?
Thanks in advance.
Ashish TambeDear Charles,
I am willing to develop a report in which i need to select diff data from diff table such as OOPR,ORDR,OINV and many more.based on diff conditions and it may happen that a query can give more than 2-3 records then i need to make summation for that. On the basis of this summation and some more formulas in CR i need to make some conclusions.
This cannot be done in single query. so i need to fire more than one select query.
Regards,
Ashish Tambe -
Can i call a BEx query in ABAP report and display in ALV grid. if so please give me the syntax.
Thanks
Akila.RLook at the FM "RSDRI_INFOPROV_READ".
With this you can read data into a internal table of your program.
With this FM, you can do a selective read and select only the key figures and characteristics that you wish to read in your ABAP.
I am not ure, if you can call a BEx report in your ABAP. But with what I mentioned here, you can acheive what you want.
Ravi Thothadri -
Multi-query group above report creates more pages
Hi,
I have a multi-query group above report (paper only), the parent group creates 5 rows(subframes) all onto the same page, but then creates 4 more IDENTICAL pages!!?
at the end I have 5 repating frames and 5 pages.
If I set Maximum Records per Page to 1, I have 5 pages (IDENTICAL) with the first frame only...
any idea?
cheers
Matteohello,
you will have to create a counter, that tells you the numbers of students (summary-column, function : count, reset on : course) and create a format-trigger on the heading that hides it when the number of students is 0.
regards,
the oracle reports team --pw -
SAP Query dwonload through report
Hi All,
I have a SAP Query. I want to download the output of the SAP query on application server using report.
please let me know how to use SAP Query in report. Please provide some sample code if you have.Do you have option of copying the query to Z report and then incorporate the logic of writing on application server in the Z report...
-
I have SSRS parametarized report in that one data set have repeated values with query parameter . but while am mapping that query
parameter to report parameter i need to pass distinct values. How can i resolve thisHi nancharaiah,
If I understand correctly, you want to pass distinct values to report parameter. In Reporting Service, there are only three methods for parameter's Available Values:
None
Specify values
Get values from a query
If we utilize the third option that get values from a dataset query, then the all available values are from the returns of the dataset. So if we want to pass distinct values from a dataset, we need to make the dataset returns distinct values. The following
sample is for your reference:
Select distinct field_name from table_name
If you have any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
How to enable show SQL Query in Crystal report tool
Hi,
How can we enable the show SQL Query under Database tab in crystal report...
We have a requirement to modify the SQL query in Crystal reports.
Thanks,
GanaGana,
CR has an "Add Command" feature that will allow you to use hand-coded SQL as your data source.
Look at Defining an SQL Command in CR's online help (F1).
If a command was used in the original report creation, it's a simple matter to go in and edit that SQL.
If the report was not originally built w/ a Command you may find it difficult to switch over. In most cases it easier to start over from scratch, creating a new, blank report, that uses the command.
Jason
Maybe you are looking for
-
Show the PO and Invoice Number along with Distribution Line Info
Does any one have some code that can show the PO and Invoice number along with the distribution line detail? I'm tring to get to the po.po_vendors for segment1 and po.po_distributions_all but it screws up at the po.po_lines_all table which needs oute
-
I'd like to know a fair asking price for my macbook pro before i throw it up for sell.
Hello everybody! if you dont mind i am asking for what you would ask for the macbook i have for sell! i opened it brand new december 23, 2012 with plans of taking an online course starting jan 7, 2013 on january 4th ,2013 i was admitted to the hospit
-
Authorization for Bex7.0
Dear Friends, My requirement for reporting authorization: 1.users should not be able to modify the query's created by other users 2.Users can create/modify their own queries. I have created a Role "ZRUN_QUERY" using PFCG.Its working fine in Bex 3.x
-
Wheres the option to buy laptops with Linux pre installed?
I've herd of Lenovos good support for Linux, but when I try to surf Lenovos homepage, there's no way to chose a Lenovo without Windows "Genuine" <**bleep**>. Tried to use the homepage for Thinkpad and came to this page: http://www.pc.ibm.com/se/think
-
All - Is there any pros and cons to have more main table for master data in sigle repository. say 4-5 main table ? Here most of the look up can be common in many cases. I am confusing to move ahead. as in what impact on Database, Roles , users, Load