How to create sql query for item master with operator LIKE with variables?
hi all,
How to create sql query for item master with
operator LIKE(Contains,Start With,End With) with variables using query generator in SAP B1 ?
Jeyakanthan
Hi Jeyakanthan,
here is an example (put the like statement into the where field)
SELECT T0.CardCode, T0.CardName FROM OITM T0 WHERE T0.CardName Like '%%test%%'
The %% sign is a wildcard. If you need start with write 'test%%' and otherwise ends with '%%test'. For contains you need '%%test%%'. You also could combinate this statements like 'test%%abc%%'. This means starts with test and contains abc.
Regards Steffen
Similar Messages
-
hi all,
i want to create a query for items in the item master data that shows the changed field, the old value, the new value, user name and the date it was changed .
can anyone help please.
ciaothanks for the reply
my clients internal auditors require that they have Exception Reports in SAP , i.e reports that can show changes made, date and by which user etc...
1. changes made to item master data
2. changes made to business partner master data
3. changes made to invoices, purchase orders etc..
this reports can be set in query form or xl reporter..
i tried but couldent find the tables ....
any sugestion will be appriciated.. -
How to write sql query for counting pairs from below table??
Below is my SQL table structure.
user_id | Name | join_side | left_leg | right_leg | Parent_id
100001 Tinku Left 100002 100003 0
100002 Harish Left 100004 100005 100001
100003 Gorav Right 100006 100007 100001
100004 Prince Left 100008 NULL 100002
100005 Ajay Right NULL NULL 100002
100006 Simran Left NULL NULL 100003
100007 Raman Right NULL NULL 100003
100008 Vijay Left NULL NULL 100004
It is a binary table structure.. Every user has to add two per id under him, one is left_leg and second is right_leg... Parent_id is under which user current user is added.. Hope you will be understand..
I have to write sql query for counting pairs under id "100001". i know there will be important role of parent_id for counting pairs. * what is pair( suppose if any user contains both left_leg and right_leg id, then it is called pair.)
I know there are three pairs under id "100001" :-
1. 100002 and 100003
2. 100004 and 100005
3. 100006 and 100007
100008 will not be counted as pair because it does not have right leg..
But i dont know how to write sql query for this... Any help will be appreciated... This is my college project... And tommorow is the last date of submission.... Hope anyone will help me...
Suppose i have to count pair for id '100002'. Then there is only one pair under id '100002'. i.e 100004 and 100005Sounds like this to me
DECLARE @ID int
SET @ID = 100001--your passed value
SELECT left_leg,right_leg
FROM table
WHERE (user_id = @ID
OR parent_id = @ID)
AND left_leg IS NOT NULL
AND right_leg IS NOT NULL
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to create ABAP Query for vendor open items
HI,
My client has requested me to create ABAP Query for vendor open items . So that it will be usefull for the users . Could anyone help me with this. I will assign you points.Thanks in advance.Hello,
Use Table BSIK <Open Items of AP > & BSAK <AP Cleared items>......
For Query you can use SQ01.
USE BSID & BSAD for AR open/clear items...
LFA1, LFB1 are vendor master data tables
This is FYI
Hope this helps.
Rgds
Rajendra -
How to write sql query for below mentioned eaxmple.
Hi,
I have requirement.
There are number of rows and I need the result through query as follows.Please help me to proved sql query for below mentioned requirement.
example: table TEST.
COLA COLB COLC COLD COLE COLF MANAGER 5 NULL NULL 3 NULL
SR.MANAGER 6 3 NULL NULL NULL
VP 5 5 4 5 5
I have to write the sql query if COLA IS MANAGER THEN CONSIDER MANGER RECORD,AND IF ANY COLUMN FILED IS NULL FOR MANGER THEN CONSIDER COLA IS SR.MANGER, AND IF ANY COLUMN FILED IS NULL FOR SR,MANGER THEN CONSIDER VP records.
I need output as below.
COLB COLC COLD COLE COLF
5(manager) 3(sr.manger) 4(vp) 3(manger) 3(vp)
Please provide the for above mentioned output.
ThanksDuplicate thread. please view the answer posted in your first thread.
how to write sql query.
And, please don't post any duplicate thread.
Regards.
Satyaki De. -
How to write sql query for below example.
Hi,
I have requirement.
There are number of rows and I need the result through query as follows.Please help me to proved sql query for below mentioned requirement.
example: table TEST.
COLA COLB COLC COLD
MANAGER 5 NULL null
SR.MANAGE 6 3 NULL
VP 5 5 4
I have to write the sql query if COLA IS MANAGER THEN CONSIDER MANGER RECORD,AND IF ANY COLUMN FILED IS NULL FOR MANGER THEN CONSIDER COLA IS SR.MANGER, AND IF ANY COLUMN FILED IS NULL FOR SR,MANGER THEN CONSIDER VP records.
I need output as below.
COLB COLC COLD
5(MANGER) 3(sr.manger) 5(vp)
Please provide the for above mentioned output.
Thanks<<if COLA IS MANAGER THEN CONSIDER MANGER RECORD>>
What does this sentence means? COLA does not cnatin a single record but the number of records with diffrent values.
Regards
Arun -
How to build sql query for view object at run time
Hi,
I have a LOV on my form that is created from a view object.
View object is read-only and is created from a SQL query.
SQL query consists of few input parameters and table joins.
My scenario is such that if input parameters are passed, i have to join extra tables, otherwise, only one table can fetch the results I need.
Can anyone please suggest, how I can solve this? I want to build the query for view object at run time based on the values passed to input parameters.
Thanks
Srikanth AddankiAs I understand you want to change the query at run time.
If this is what you want, you can use setQuery Method then use executeQuery.
http://download.oracle.com/docs/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#setQuery_java_lang_String_ -
How to create a silo for a product on a website with natural shadow?
I have 15 images that are shot on a white background and need to create a silo that has a transparent background but includes a natural shadow.
I'd also like to create an action for it.I don't know what you mean by "silo", but just in general...
Use transparency in your Photoshop design, use e.g., a Drop Shadow layer style, and save your image as a PNG-24 file, which supports 24 bit color and partial transparency. All the modern web browsers will render PNG files with transparency.
Look over this page as a quick and simple example:
http://Noel.ProDigitalSoftware.com/temp/TransparencyTest/TransparencyTest.html
-Noel -
How make a sql query for chart dynamically [I got it solved]
Hi ,
I' m in search of a method to go from a tabular form (click on a item in the record) to a chart page where the from <table> sql of the chart is varying from the item select.
eg I click on emp and navigate to a page displaying the chart with a sql
select dat, val from :p_item where p_item is the table name passed
Can I do that?
Thanks
Erwin
Message was edited by:
Erwin LFor anybody who wants to do this too
Problem
Every time a new member comes to the unit a separate holiday calendar table is created
So I want a page to be dynamically loaded when the user clicks on his name in the tabular form and navigates to the page where his calendar is displayed.
I don't want to create a new page for every person (minimize changes to the app)
My solution:
all the tables are created as cal_<userid>
I created a view on one table
create or replace view cal_individual_v as
select * from cal_bbbbb (for example)
Then I create a procedure
prc$change_view(p_user_id IN VARCHAR2) IS
t_sqlstr VARCHAR2(300);
BEGIN
t_sqlstr := 'CREATE OR REPLACE VIEW cal_individual_v AS SELECT * FROM CAL_'|| p_userid;
EXECUTE IMMEDIATE t_sqlstr;
END;
In the page rendering proceses I added a pl/sql process on before header
with
begin
prc$change_view(:p18_userid); -- hidden item on the page)
end;
That's all
I works good and is still fast
Hope it can help others
Erwin -
How to create inbound delivery for items with no confirmation control key.
hi Please help me with this..
are there any user exits to create an inbound delivery for scheduling agreement items with no confirmation control key.
my req is
i have 12 items (me33 transaction) of them three have confirmation control key populated and out of those three 2 will be deleted so only one item is left for inbound delivery creation, but i need to have all this possible for all items with or without confirmation control key.
thank youhi
for inbound delivery there is BAdi called LE_SHP_DELIVERY_PROC... in there is method called ITEM_DELETION... in this u can flag the item to delete or not..
this will be triggered for inbound as well as oubound delivery..
you can check confirmation status for the PO in the table EKES... in this table there is filed called EBTYP.. using this field u can check the PO item confirmation status..
I hope above information is helpuful for u -
How to create web servise for Material Master catalog
Hi Experts
We would like to have a web servise foe the material master catalog.
Please advise hoe we can implement this.
Thanks,
moshehi stein,
once you check below link it's helpful for your requirement :
<IRRELEVANT LINKS>
thanks,
Edited by: Prateek Raj Srivastava on Dec 12, 2011 9:34 PM -
Query for Item master part convert excisable through batch file
Hi team
I need to add one time more than 100 items. make the manual each item as excisable take more time.
Please provide the query to convert to excisible.
ThanksHi Anantha,
Updating Item through Query is not Advisable as Updating through Query is not Supported by SAP.
Try to Update Items to Excusable Item through DTW (Data Transfer Workbench)
Hope this helps
Regards::::
Atul Chakraborty -
HOW TO CREATE SEVERAL folder for the generation and READING FILE
HOW TO CREATE SEVERAL folder for the generation and READING FILE WITH THE COMMAND utl_File.
please give an example to create 3 folders or directories ...
I appreciate your attention ...
Reynel Martinez SalazarI hope this link help you.
[http://www.adp-gmbh.ch/ora/sql/create_directory.html]
create or replace directory exp_dir as '/tmp';
grant read, write on directory exp_dir to eygle;
SQL> create or replace directory UTL_FILE_DIR as '/opt/oracle/utl_file';
Directory created.
SQL> declare
2 fhandle utl_file.file_type;
3 begin
4 fhandle := utl_file.fopen('UTL_FILE_DIR', 'example.txt', 'w');
5 utl_file.put_line(fhandle , 'eygle test write one');
6 utl_file.put_line(fhandle , 'eygle test write two');
7 utl_file.fclose(fhandle);
8 end;
9 /
PL/SQL procedure successfully completed.
SQL> !
[oracle@jumper 9.2.0]$ more /opt/oracle/utl_file/example.txt
eygle test write one
eygle test write two
[oracle@jumper 9.2.0]$
SQL> declare
2 fhandle utl_file.file_type;
3 fp_buffer varchar2(4000);
4 begin
5 fhandle := utl_file.fopen ('UTL_FILE_DIR','example.txt', 'R');
6
7 utl_file.get_line (fhandle , fp_buffer );
8 dbms_output.put_line(fp_buffer );
9 utl_file.get_line (fhandle , fp_buffer );
10 dbms_output.put_line(fp_buffer );
11 utl_file.fclose(fhandle);
12 end;
13 /
eygle test write one
eygle test write two
PL/SQL procedure successfully completed.
SQL> select * from dba_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS UTL_FILE_DIR /opt/oracle/utl_file
SYS BDUMP_DIR /opt/oracle/admin/conner/bdump
SYS EXP_DIR /opt/oracle/utl_file
SQL> drop directory exp_dir;
Directory dropped
SQL> select * from dba_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS UTL_FILE_DIR /opt/oracle/utl_file
SYS BDUMP_DIR /opt/oracle/admin/conner/bdumpRegards salim.
Edited by: Salim Chelabi on Apr 4, 2009 4:33 PM -
How to create a sequence for an particular item in my apex form
Hi friends,
I created an database application, of a form with a report, and it is working fine...
But in my form, i have a requirement....The below are the existing fields in my form
issue no
created by
start date
status
priority
due date
Among these fields in my form i need to create a 'Sequence' for my field "issue no",
So that whenever i opened the form the 'issue number' must generate automatically like 1 for the first time, 2 for the second time and so on..
For that i created a sequence
CREATE SEQUENCE "ORDERS_SEQ"
MINVALUE 1
MAXVALUE 999999999999999999999999999
INCREMENT BY 1
START WITH 1000
NOCACHE
NOCYCLE;
But for validation where i need to write the sequence query for the particular item 'issue no'....i dont have any idea of where to write the validation query for the sequence..
please tell where i need to write in step wise manner..please help me friends...
As the below is my validated sequence query for item 'issue no'
'select seq.issue_id.nextval into issue_no'
This is my above validation query whether the query that i mentioned is right..if not let me know the validation query..
And also i need where to apply this validation query in steps..
Thanks in advance
Regards,
Harry...Harry,
Rik is on the right track. Here is a sample insert trigger: Would need to substitute you sequence ORDERS_SEQ with my sequence las_log_seq, how you define or use timestamps is up to you.
DROP TRIGGER LASDEV.BINS1_LAS_LOG_TBL;
CREATE OR REPLACE TRIGGER LASDEV."BINS1_LAS_LOG_TBL"
BEFORE INSERT
ON las_log_tbl
FOR EACH ROW
BEGIN
-- Description: Insert log_seq, creation_dt, creation_id,
-- lst_updt_dt and lst_updt_id.
-- Maintenance:
-- Date Actor Action
-- ==== ===== ======
-- 07-Sep-2010 J. Wells Create.
:new.creation_id := nvl( v( 'app_user' ), user );
:new.creation_dt := SYSDATE;
:new.lst_updt_dt := :new.creation_dt;
:new.lst_updt_id := :new.creation_id;
SELECT las_log_seq.NEXTVAL
INTO :new.las_log_seq
FROM DUAL;
END bins1_las_log_tbl;
/Heff -
How to create matreial document for ten line items (10 documents) by BAPI
Hi
how to create matreial document for ten line items (10 documents) by BAPI_goodsmvt_create
i created but it gives error as "no ites were transferre
and i need code also.
thanks in advancePrabhu Peram wrote:>
> >
Gareth @ Atos Origin UK wrote:
> > Prabhu,
> >
> > You have been on SDN a long time and have a decent amount of points - why do you feel the need to simply cut and paste standard SAP documentation? _-----> I least bother abt the Points, and i never ask somebody to give points to me , if u have any doubt on it , u can check all my postings ? All it does is fill up the SDN servers with replicated data which the original poster could quite easily access themselves via SE37----> Sorry I have seen ur Posting/Reply,dont assume that i do copy & paste for sake of Points.Njoy SAP.>
> > Gareth.
>
>
>
> regards
> Prabhu
Prabhu.
I didn't question you about points at all - I was making the point that you have been on SDN a long time and have a lot of points. Therefore you should know better than to simply cut and paste standard SAP help. If you don't copy and paste for sake of points, what do you do it for? It serves no purpose other than to fill up the servers here on SDN. The original poster appears to have access to a SAP system and SE37 and wants to know how to call a BAPI - they can easily go to SE37 and read the documentation themselves. Posting it here just adds noise and makes searching harder, as well as taking up more and more space on SDN servers.
Gareth.
Maybe you are looking for
-
Charges on ny account for purchases not made. I recently bought twi games and now I'm b we ing charged fir others I did not make!?
-
Ipod Nano 4th Gen not recognised in Windows Vista, Windows 7 or Itunes and screen blank
Hello, I have a quite old (3-4 years old) iPod Nano 4th Gen. The screen is blank, which means it needs charging. When I plug it into my laptop/computer then it doesn't show up which im assuming is because it needs charging. When I plug it into my plu
-
Do not use apostrophe for folder or filename in a collection
My wife creates collections (not smart collections). She created one with three images. When Bridge CS5 is closed and reopened two of the images are missing. I, of course, said user error. Bad decision. After looking at the collection_name.filel
-
Getting the following message when trying to sync 2nd gen i-touch "itunes could not connect to this ipod because an i\unknown error occurred (0xE8000065)
-
New Computer with Iphone - Help
Hi, i searched and found most of my answers but the one thing im not sure about is this. I just got a new PC becuase my old one was shot. I lost all my data i know that if i syc my iphone to the new pc i could merge my contacts but the one and most i