SAP Query: How to filter records from SAP Query output before display
Hi Friends,
Can I delete records from an SAP query basic list before it is displayed?
For example I want to delte all the orders whose system status is "RELEASED" before the basic list of that SAP query is displayed.
I have gone through SAP help and found out that we can write some code in <b>END code</b> section which will execute before the basic list of the query is displayed. But I could not figure out how the code this...following is an excerpt form SAP help.
<b>"The END-OF-SELECTION code consists of two parts (Before list output and After list output). The first part is processed before the list is output and the second part afterwards."</b>
Can anybody help me?
Regards,
Bharat.
Message was edited by:
Bharat Reddy V
Try this simple procedure. <b>Hope</b> this should work for you.
You do the slection of the status in the List-Processing. say your final field of status flag is GF_STATUS.
Immediatly after that use this within the List-Processing.
CHECK GF_STATUS EQ '<RELEASED STATUS>'
How it works:
SELECT <> "<-------Query processing(system code).
*< Your code put in the List processing
CHECK GF_STATUS EQ '<RELEASED STATUS>' "< --only released records passed.
*>
ENDSELECT "<-----Query endselect(system code).
Please let me know the result.
Regards,
A.Singh
Message was edited by:
Amarjit Singh
Similar Messages
-
SSRS 2008 - How to filter records from the many side base an specific criteria
I have a report that displays a summary of all the actions taken for specific project, I need to restrict those records based one of those options from the left side table. If case 1 was
denied it should not show in the report. I need help with this query
Please Help me Angie
Ex:
Project name
Actions
Case 1
Received
Process
Sent for Modifications
Received w/Modifications
Denied
Case 2
Received
Process
Sent for Modifications
Received w/Modifications
APPROVED
Case 3
Received
Process
Sent for Modifications
Received w/Modifications
Inactive
Project name
Actions
Case 1
Received
AngieHi,
You can set the Rowvisibility of the detail row to hide based on the expression
=IIF(Fields!Actions.Value="Denied",True,False)
Many Thanks
Chandra
If this Answers your issue please mark as answered. -
How can distribute 5 lakhs records from sap R/3 setup tables ?
How can distribute 5 lakhs records from sap R/3 setup tables in to multiple requests in sap BI?
Hello,
what is "lakhs" ?
Please use plain English words on a world wide forum...
Regards,
Olivier -
How to extract data from SAP in FDM 11121
I came across some documents from version 11113, says there is a SAP adapter, however ,when I check 11121 there's no such adapter, does anyone know how to extract data from SAP in FDM 11121?
I download a package from Bristlecone, but I dont see any xml files in it, just a bunch of dll and I didn't find any instructions on how to set up/configure in FDM, it just explained how to register in SAP app server and client.
Hyperion 11113 has readme on sap adapter(Hyperion Readme Template), but I cannot find the same readme file in 11121, all I can find is ERP Integration Adapter document. any idears where I can find at least a readme document? -
How to Pull data from sap r/3 tables to oracle tables
how to fetch data from sap r/3 tables & data pulled to oracle table .
GIVE THE APPROPRITE ANSWER FOR THIS.
THANKS IN ADVANCE.
If it is useful for me , i am giving point.
regards ,
Navita
Edited by: NAVITA YADAV on Mar 7, 2008 2:07 PM
Edited by: NAVITA YADAV on Mar 7, 2008 2:08 PMYou need to perform some native SQL to fetch data. Before doing this connection must be exists b/w your R/3 and Oracle server.
Basis team will help you to have connection.
Check the connection name in the table DBCON.
Check the below code to handle native SQL.
SELECT SINGLE DBMS
FROM DBCON
INTO DBTYPE
WHERE CON_NAME = DBS.
IF DBTYPE = 'ORA'.
TRY.
EXEC SQL.
CONNECT TO :dbs
ENDEXEC.
ERROR Handling for Native SQL *************
IF SY-SUBRC <> 0.
MESSAGE `Docusphere connection failed.` TYPE 'I'.
EXIT.
ENDIF.
EXEC SQL PERFORMING loop_output.
OPEN C1 FOR
SELECT UK1, UK7, uk6, uk9, uk22, uk23, uk25 "field names of Oracle table
FROM IIS_DOCS_AP10D
WHERE ( UK2 = 'ZFIINVOICE' OR UK2 = 'ZFIPAYREQ' ) AND
UK19 = 'E' AND
UK20 IS NULL
ENDEXEC.
DO.
CLEAR W_OUTPUT.
EXEC SQL.
FETCH NEXT C1 into :wa1-arc_doc_id, :wa1-bukrs, :wa1-belnr, :wa1-gjahr, :wa1-wi_id, :wa1-ARCH_METHOD, :wa1-barcd.
ENDEXEC.
enddo.
Reward points if helpful................. -
HOW to retrive data from SAP Tabel
Hi Friends,
1)Can you please explain how to retrive data from SAP table(example AFRU).
2) we had requriment based on the qunatity , Product name and date we need to display KPI's .KPI is based no products manfactured per day with some conditions
Regards
SrikanthHi Udayan,
I want to retrive SAP Table data from xMII.can you please explain elabarately how to call "RFC_READ_TABLE" from xMII.
please do the needful
Thanks
Srikanth -
How to display records from a query into non-database field
Hi
I a have a problem:
I have a query with many tables and 6 column(select a,b,c,d,e,f from x,y,z,t,s,g where conditions) and I use 3 parameters.
I create 3 parameters :datai,:dataf and :partener and a button with a trigger when button is pressed.
Then a create a manualy block with six field non-database a1,b1,c1,d1,e1,f1.
Now I want to display all the records from my query into a1,b1,c1,d1,e1,f1 where a1=a,b1=b,etc. and all the records (if I have 20 record, it will display 20 records in non-database field) when I press the button.
How I made:
I create a cursor with query then
begin open cursor
loop
fetch cursor into :a1,:b1,:c1,:d1,:e1,:f1;
end loop;
close cursor;
end;
It display one record in a1,b1,c1 only and it have to display 100 records and are date for all the fields.
Can somebody help me in this problem?
Thanks.
Edited by: 928437 on Oct 1, 2012 2:55 AMCreating a view, and querying that into a database block is an excellent solution.
To use the non-database block:
You're missing the all-important Next_Record; command.
<pre> Begin
Go_block('X'); -- block X is the non-database block
Clear_Block(No_Validate);
open cursor X1;
loop
If :System.Record_status != 'NEW' then
Next_Record;
End if;
fetch X1 into :a1,:b1,:c1,:d1,:e1,:f1;
Exit when X1%NOTFOUND;
end loop;
close X1;
end;</pre> -
How to extract data from SAP 4.7 and upload data to SAP ECC 6.0
Hi,
How to extract data from SAP 4.7 and upload data to SAP ECC 6.0? Can i use BDC,BAPI,LSMW? Help me please.hi
good
both works not possible simultaneously.
If you want to do it in two separate task than you can use the GUI_UPLOAD function module to fulfill your requirement.
thanks
mrutyun^ -
How to send SMS from SAP to Any mobile
Hi Friends,
I have a requrement. How to send SMS from SAP to Any mobile?? For Example: If i created PO in SAP then i want to send a SMS to Concerned Vendor and HOD.
Please provide the pre-requisites?
NaveenHi Naveen,
there is a standard webservice globally available called Send SMS and you can consume that webservice with the help of CAF and you can send PO number as SMS, If the standard webservice do not work then you have to create your own webservice to fulfill the functionality.
Regards
Manohar -
How to fetch records from query.....
hii experts,
How to fetch data from following query.... The query is depend on the Project_Id
SELECT 'Plant Consumption' TYP, -1*ROUND(SUM (MTA.BASE_TRANSACTION_VALUE)) S_VALUE,
TO_CHAR (MMT.TRANSACTION_DATE, 'Mon-rrrr') MNTYR,
TO_CHAR (MMT.TRANSACTION_DATE, 'rrrrmm') MNT,
TO_CHAR(MMT.TRANSACTION_REFERENCE) TRX_REF,
MMT.SOURCE_LINE_ID SRC_LIN,
TO_CHAR(MMT.SHIPMENT_NUMBER) SHP
FROM (SELECT TO_CHAR( OLA.HEADER_ID) HDR1,
OLA.LINE_ID LINE1,
OLA.PROJECT_ID ,
TO_CHAR(OLA.SHIPMENT_NUMBER) SHP1
FROM OE_ORDER_HEADERS_ALL OHA,
OE_ORDER_LINES_ALL OLA
WHERE OHA.HEADER_ID = OLA.HEADER_ID
AND OHA.ORG_ID = OLA.ORG_ID
AND OLA.PROJECT_ID = :P_PROJECT_ID
AND OLA.ORG_ID = :P_ORG_ID
AND OLA.FLOW_STATUS_CODE = 'CLOSED'
) A,
MTL_MATERIAL_TRANSACTIONS MMT,
MTL_TRANSACTION_ACCOUNTS MTA,
GL_CODE_COMBINATIONS GCC
WHERE MMT.TRANSACTION_ID = MTA.TRANSACTION_ID
AND GCC.CODE_COMBINATION_ID = MTA.REFERENCE_ACCOUNT
AND MMT.TRANSACTION_TYPE_ID = 33
AND GCC.SEGMENT1 = '11'
AND GCC.SEGMENT2 = '13'
AND GCC.SEGMENT3 = '34381'
AND GCC.SEGMENT4 = '0000'
AND GCC.SEGMENT5 = '000000'
AND MMT.SHIPMENT_NUMBER IS NOT NULL
AND MMT.PROJECT_ID IS NULL
AND A.HDR1 = TO_CHAR(MMT.TRANSACTION_REFERENCE)
AND A.LINE1 = MMT.SOURCE_LINE_ID
AND A.PROJECT_ID = :P_PROJECT_ID
AND A.SHP1 = TO_CHAR(MMT.SHIPMENT_NUMBER)
GROUP BY TO_CHAR (MMT.TRANSACTION_DATE, 'rrrrmm'),
TO_CHAR (MMT.TRANSACTION_DATE, 'Mon-rrrr'),MMT.TRANSACTION_REFERENCE,MMT.SOURCE_LINE_ID,MMT.SHIPMENT_NUMBER;
-----hii
The project_number is matching column in table mtl_material_transaction mmt and A (FROM CLAUSE query). But data retreive based on
WHERE MMT.PROJECT_ID IS NULL
AND A.PROJECT_ID = :P_PROJECT_ID
PS -
How to filter results from 4 dynamic list menus depandant on how many of them are selected
I have a search page with a form with 4 list menus and 1 submit that post the results to the results page. I can create a record set that either retrieves the correct data from my database if a selection is made from all four menus Or i can create the recordset if only 3 menus have a selection or the same for 2 menus and 1 menu. However i want the user to be able to make a selection from either 1, 2, 3 or all 4 of the menus and the exact data be retrieved. At present if i try to combine the recordset using AND and ORs the results are not specific enough, for example the 4 menus are Location, Type, Price & Style if a user selects from all 4 i only want to retrieve data that matches all 4 criteria, but at the same time if the user selects only 2 of the menus the i want it to retrieve data that matches specifically those 2 variables. I´m not actually sure if i should be creating a more advanced sql query of if its the php side of things that i need to look at. This is my first dynamic site so please be aware i´m still a learner where php and sql is concerned. Please can anyone help?
Hey there,
Thanks for replying,
I too am using Dreamweaver recordset, my local server is XAMPP ( apache php mysql), i´have pasted my sql recordset below to give an idea of what i´m trying to do, however this does not work as i´m trying to select the exact data based on 4 menus PRICE TYPE LOCATION and BEDS, and also want the search to work if the user only selects options from either 1, 2, 3 or 4 of the menus, with the code as it is if the user select only two options from 2 of the menus the results don´t just find (for example) all results for location AND price they find all results for the location varibale OR the price variable rather than a match for both, if you see what i mean?
Any suggestions?
SELECT trueprice,`desc`, `propid`, `bathrooms`, `photo1`, locationtable.loc, typetable.style, bedtable.`number`
FROM detailstable JOIN locationtable ON detailstable.location=locationtable.locid JOIN typetable ON detailstable.type=typetable.typeid JOIN pricetable ON detailstable.price=pricetable.priceid JOIN bedtable ON detailstable.beds=bedtable.bedid
WHERE (location=varloc AND price = varprice AND type=vartype AND beds=varbed ) OR (price=varprice AND location=varloc AND type=vartype) OR (price=varprice AND location=varloc AND beds=varbed) OR (price=varprice AND beds=varbed AND type=vartype) OR ( location=varloc AND type=vartype AND beds=varbed) OR (price=varprice AND location=varloc) OR (price=varprice AND type=vartype) OR (price=varprice AND beds=varbed) OR (type=vartype AND location=varloc) OR (type=vartype AND beds=beds) OR (location=varloc AND beds=varbed) OR (price = varprice OR beds=varbed OR type=vartype OR location=varloc)
ORDER BY detailstable.trueprice ASC
Look forward to receiving your thoughts,
Linda
Date: Wed, 21 Oct 2009 14:36:33 -0600
From: [email protected]
To: [email protected]
Subject: how to filter results from 4 dynamic list menus depandant on how many of them are selected
Hiya,
I'm just doing my first dynamic site too, and am at a similar level to yourself.
Can you give us more info re the site. What software, eg Dreamweaver etc are you using, and is your server using PHP or ASP etc?
For what I've used, I amended the SQL side of things in the recordset in Dreamweaver. That way, you can test the SQL as you're setting up the recordset.
Let me know how you're going on anyway
Cheers
Andy
> -
How to compare result from sql query with data writen in html input tag?
how to compare result
from sql query with data
writen in html input tag?
I need to compare
user and password in html form
with all user and password in database
how to do this?
or put the resulr from sql query
in array
please help me?Hi dejani
first get the user name and password enter by the user
using
String sUsername=request.getParameter("name of the textfield");
String sPassword=request.getParameter("name of the textfield");
after executeQuery() statement
int exist=0;
while(rs.next())
String sUserId= rs.getString("username");
String sPass_wd= rs.getString("password");
if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
exist=1;
if(exist==1)
out.println("user exist");
else
out.println("not exist"); -
How to update Records from Internal table to u2018Zu2019 table?
Hi Friends,
How to update Records from Internal table to u2018Zu2019 table.
I have records in Internal table , that records want to update on u2018Zmarau2019 Table.
( my internal table & u2018 Zu2019 table structures are same.)
Thanking you.
Regards,
SubashHi,
loop at internal table.
modify <Z- table > from values < internal table Workarea>.
if sy-subrc = 0.
COMMIT work.
else.
ROLLBACK waork.
endif.
endloop.
or
UPDATE <Z- table > from table < internal table Workarea>.
if sy-subrc = 0.
COMMIT work.
else.
ROLLBACK waork.
endif.
Prabhudas -
Hi All,
how to get key from mdx query ?
example :
SELECT [Measures].[67822GFASOU7KUT6FKHSQ34FV] ON COLUMNS NON EMPTY CROSSJOIN([ZCOMPANY].MEMBERS, [ZMILL].MEMBERS) ON ROWS FROM ZODS_GL/ZODS_GL_001
the result from this mdx query are zcompany text and zmill text, how to get company key and mill key ?
Regards
JeiMinghi Jeiming,
to get key in mdx, you can try something like
[ZCOMPANY].[LEVEL01].MEMBERS
properties [ZCOMPANY].[2ZCOMPANY]
following threads may useful
Extracting texts with MDX
MDX Statement - display only keys for characterstics and their dis. attrib.
hope this helps. -
HOW TO FILTER DATA FROM MICROSOFT ACCESS
HOW TO FILTER DATA FROM MICROSOFT ACCESS BASED ON DATE AND TIME AND GIVE THE RESULT TO A TABLE ?
I need some example files , can anybody please help me ?
Solved!
Go to Solution.Just be sure to get examples specific to the Jet DBMS. It is rather "idiosyncratic" when dealing with time and date values.
One question: the timestamp is being saved in a datetime field, right?
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
Maybe you are looking for
-
PSE 7 Editor not responding. Stuck in thinking mode for eternity...
Hoping for some help with this issue. Pleeeezee I start in Organizer, choose an image to edit, click on the quick fix (shoot in Raw), do some simple changes, then if I need more fixes I click on Open Image. The Editor window pops open and then the th
-
Unable to print entire page in portrait mode
I am using Firefox 5 and running Windows 7. For the last year maybe, I haven' t been able to print from my browser in portrait mode; on a letter-size sheet, the printing fills only the top half of the page and within that, only half of the page. I ca
-
Hi, I've had a browse through the forum, and some of the posted problems do have a relation to mine, but mine are a bit more "weirder". I have a XP2000 CPU, K7N2-L, 512DDR Pc2100 RAM. I am using PCI slot1 for my modem, and AGP slot for my GF2MX. Any
-
Hi Mine is Indian Company. At present INR is the currency for the company code 1000. However as per IFRS, my company's functional currency is getting changed to USD from INR So please let me know if its possible to change the currency of the company
-
Lorem and more not working in CS4
whats the deal? It worked fine in CS3. I purchased a suite for CS4, so I did the CS3 clean procedure, installed the suite and then installed Lorem and More thru CS4 ext manager. it will work once if I select any option other than lorem ipsum text an