ABAP code to find records starting with Z or Y
Hi,
I am trying to find the records in a SAP table, where all the values for a particular field start with Z and Y. What is the coding statement for this?
I tried this but it does not seem to be correct.
SELECT field
FROM table
INTO TABLE t_itab
WHERE field LIKE 'z*'.
Can someone correct me or suggest me the best solution for this? Thanks.
Moderator message - Unfortunarely, this is not a training forum. You can get a lot of information using F1 - thread locked
Edited by: Rob Burbank on Nov 24, 2009 4:25 PM
If you have to do in urself
DATA: i_reptx TYPE STANDARD TABLE OF textpool WITH HEADER LINE.
READ TEXTPOOL 'ZJ_ALV' INTO i_reptx.
and describe the itab.. and get the lines.
In conjunction with TADIR table to get the program repository.
Similar Messages
-
Regex to find word starting with $ symbol.
Hi,
I want to find all the words in a JTextPane starting with "$" symbol followed by alphabets or digits.
Below is the code, which I have written
public void matchAllWords(String textPaneData) {
String regexStr = "\\b(\\$?(\\w+))\\b";
Pattern p = Pattern.compile(regexStr);
Matcher m = p.matcher(textPaneData);
while (m.find()) {
System.out.println(m.group());
}Suppose the text pane data is
hello $world 2$ $test_string $50.0 $5*5
I want the method to match the following words
$world
$test_string
$50.0
But the program is printing:
hello
world
2
test_string
50.0
5*5
Please help me, where am I going wrong.
Thanks in advance.
Regards,
Vaishakh
Edited by: Vaishakh on Sep 16, 2009 4:24 AMThanks, as u said http://www.catb.org/~esr/faqs/smart-questions.html#writewell
How To Ask Questions The Smart Way
Eric Steven Raymond
Rick Moen
Write in clear, grammatical, correctly-spelled language
We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal - in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes. -
XPRESS code to find all users with a specific Admin Role
I've been playing around for a while with a way to get a list of all users that have been assigned a particular Admin Role. I have a role for which I want a specific subset of users to be approvers on it, and I want to greate a Rule that will check for people with a particular Admin Role and then return that list as people to be approvers on the role.
I haven't been able to find an easy way to write this code. Anyone run across this before or have another suggestion???
Thanks.Below is the code to find user based on condition.
<set name='adminList'>
<invoke name='getObjectNames' class='com.waveset.ui.FormUtil'>
<ref>:display.session</ref>
<s>User</s>
<map>
<s>conditions</s>
<list>
<new class='com.waveset.object.AttributeCondition'>
<s>AdminRoles</s>
<s>contains</s>
<s>adminRoleName</s>
</new>
</list>
</map>
</invoke>
</set>
Edited by: Jay on Mar 7, 2012 4:03 AM -
Want Finder to start with active windows
Under previous OSX, mac would start at login with two active Finder windows, on the second display alogside Mail. Mavericks won't do this. Is there a way to have Finder start with one or more active windows? Thanks.
In addition to the previous answer, uncheck the box in System Preferences > General: Close windows when quitting an application..
-
Where can I find "Getting Started with AppleScript"?
I googled it. And it doesn't show any links from Apple. I'm trying to learn AppleScript and the Language guide says to go through the Overview first which in turn recommends going through Getting Started with AppleScript.
I even searched Mac Reference Library but it just doesn't show up!
Any help?
NeeravNo, certainly not. I mean, I don't know any AppleScript, but I can say with certainty that the answer to that question is no.
Objective-C is a programming language that is an extension of the C language. It is the language that is used to develop applications for Mac and iPhone. Other languages like C++ and Java can be used as well, but Objective-C is the language that Apple really intends for you to use for Mac and iPhone development, since it is heavily integrated with the Cocoa framework (for Mac developemt) and Cocoa Touch framework (for iPhone development). You need to know the C language to learn the Objective-C language, and you need to know the Objective-C language to work with the Cocoa or Cocoa Touch frameworks, but AppleScript is a totally separate and different animal from these things. AppleScript is a scripting language, and although it can technically be used to create applications from what I understand, it is mainly used as a mechanism for controlling applications. For example, you could use AppleScript to tell a certain application to perform a certain task everyday at a certain time. You can use it to create automated workflows and whatnot. I think that's what it's mainly meant for.
It's worth noting, however, taht there is a development environment called AppleScriptObjC. I don't really know anything about this, except that it allows for AppleScript to be used as the primary programming language.
I found a lot of this information at [Wikipedia's AppleScript page|http://en.wikipedia.org/wiki/AppleScript], so you might want to consider looking over it real quick -- it might be helpful. Here is the link to [Wikipedia's Objective-C page|http://en.wikipedia.org/wiki/Objective-c] and [Wikipedia's Cocoa page|http://en.wikipedia.org/wiki/Cocoa_%28API%29]. As someone said on these forums, Wikipedia is far from the last word on any subject, but those links might be helpful for you for just getting an idea of what these things are all about.
Hope that helps some. Please let us know if you have any other questions. -
Finding filename starts with 's' like pattern matching
HI,
I have a requirement like if i give 3* in input field.. what are the ticket numers starts with 3 it should display,,can any 1 suggest me how to do this ?for ex..tickect numbers like 3143,3153,3163 ,if i give 3* it should display all the numbers 3143 3153 3163Hi Vasavi,
I think you are looking something like this...
http://help.sap.com/saphelp_nwes72/helpdata/en/8c/20efbd1b0a463ba5914356f01de03f/content.htm
this is new feature 7.02 onwards.
http://help.sap.com/saphelp_nw70ehp2/helpdata/en/54/07ec96bd5a4764be4996fff231b4de/content.htm
Cheers,
Kris. -
Find first record starting with most extensive ability
Hi,
This question might have been asked before but I don't know how to describe it in the search field.
There are 3 records with 2 fields (id, name). These records are:
1,Amsterdam
2,Amster
3,Am
I want to find the record that holds the most possible information:
searching Amsterdam must return 1; searching Amsterdamned must return 1; searching America must return 3; searching United must return 0 (or null).
So the logic is to search for the whole string and return the id when found. If not found remove the most right character and search until found or a empty string.
Since this logic has to be a part of SQL I wonder if there is a smart way (without writing a PL/SQL function) to solve this?
I'm curious.
Geert.Hi, Geert,
So you're only interested in strings that start the same way? That is, the fact that 'Amsterdam' and 'United' have the substring 'te' in common doesn't matter, because 'te' comes in the middle of those strings.
If that's so, you can use LIKE to compare the strings.
WITH got_r_num AS
SELECT p.place_name
, a.place_id
, a.place_name AS a_place_name -- Not needed, nut may be nice
, RANK () OVER ( PARTITION BY p.place_name
ORDER BY LENGTH (a.place_name) DESC
) AS r_num
FROM possible_places p
LEFT OUTER JOIN actual_places a ON p.place_name LIKE a.place_name || '%'
SELECT place_name
, NVL (place_id, 0) AS place_id -- or, if you want NULL, just place_id
, a_place_name -- if wanted
FROM got_r_num
WHERE r_num = 1
ORDER BY place_name
;Whenever you have a problem, please post CREATE TABLE and INSERT statments for some sample data, like this:
CREATE TABLE actual_places
( place_id NUMBER (6) PRIMARY KEY
, place_name VARCHAR2 (20)
INSERT INTO actual_places (place_id, place_name) VALUES (1, 'Amsterdam');
INSERT INTO actual_places (place_id, place_name) VALUES (2, 'Amster');
INSERT INTO actual_places (place_id, place_name) VALUES (3, 'Am');
CREATE TABLE possible_places
( place_name VARCHAR2 (20) PRIMARY KEY
INSERT INTO possible_places (place_name) VALUES ('Amsterdam');
INSERT INTO possible_places (place_name) VALUES ('Amsterdamned');
INSERT INTO possible_places (place_name) VALUES ('America');
INSERT INTO possible_places (place_name) VALUES ('United');Also, post the results you want from that data, exactly as you want to see them. The query above produces this output:
PLACE_NAME PLACE_ID A_PLACE_NAME
America 3 Am
Amsterdam 1 Amsterdam
Amsterdamned 1 Amsterdam
United 0See the forum FAQ {message:id=9360002} -
Help on ABAP code to trigger an Email with HTML attachment
Hi folks,
Could any of you help me out in writing code to attach a HTML document to the internet email address.
I was able to convert the list output to HTML using FM WWW_LIST_TO_HTML.
Could some help me out how to attach HTML doc to the Email using any of the FM SO_DOCUMENT_SEND_API1 or SO_NEW_DOCUMENT_SEND_API1 or any other.
I tried some of the examples available in the forum, but I couldnot find one that actually send the list output(in HTML format) as attachment to email
points will be rewarded for helpful responses...
Thanks In Advance.
SukuHi,
REPORT zkiran_send_mail_bor .
*& Report Zkiran_SEND_MAIL_BOR
*& Send document with BOR Object as attachment
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 10 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
objdes(100).
For the BOR attachment
CONSTANTS:
c_object_describe LIKE swotobjid-describe VALUE '<OBJECT>'.
DATA:
l_object TYPE swotobjid,
l_objheader LIKE soxobj.
PARAMETERS:
p_objtyp TYPE swo_objtyp OBLIGATORY,
p_objkey TYPE swo_typeid OBLIGATORY.
Create Message Body
Main Text
objtxt = 'Test Document.'.
APPEND objtxt.
objtxt = 'You will find a BOR object attachment in message.'.
APPEND objtxt.
objtxt = 'Have a nice day.'.
APPEND objtxt.
Title and Description
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
docdata-obj_name = 'BOR Object'.
Concatenate p_objtyp '-' p_objkey into objdes.
Concatenate 'BOR Object' objdes 'as Attachment'
into docdata-obj_descr separated by space.
condense docdata-obj_descr.
Write Packing List (Main)
CLEAR objpack-transf_bin.
objpack-head_start = 0.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
Create OBJ attachment
l_object-describe = c_object_describe.
l_object-objtype = p_objtyp.
l_object-objkey = p_objkey.
CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
own_logical_system = l_object-logsys
EXCEPTIONS
own_logical_system_not_defined = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e398(00) WITH 'No Log Sys Found'.
ENDIF.
MOVE-CORRESPONDING l_object TO l_objheader.
APPEND l_objheader TO objhead.
Write Packing List (Attachment)
CLEAR objpack.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 0.
objpack-body_num = 0.
objpack-doc_type = 'OBJ'.
objpack-obj_name = p_objtyp.
objpack-obj_descr = Objdes.
APPEND objpack.
Create receiver list
reclist-receiver = sy-uname.
reclist-rec_type = 'B'.
APPEND reclist.
Send Message
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
WRITE: / 'End of Program'.
also <b>check BCS_EXAMPLE*</b>
<b>Reward points</b>
Regards -
Crazy Text in my Finder Most start with the letter "N"
Here are some screen shots...
http://www.avicreative.com/macprob/CrazyText.jpg
http://www.avicreative.com/macprob/CrazyText2.jpg
I am getting some crazy text where my "Open With" and "Copy" "Paste" are usually located as well as in my "Get info" box. The Size should be in Gigs, not "IN_G" or something like that. Has anyone has this prob?
PowerBook G4 1.5 GHz Mac OS X (10.4.6)
PowerBook G4 1.5 GHz Mac OS X (10.4.6)I've seen this happen before, and generally turning off Documents and Data in Settings > iCloud will fix it.
If that doesn't work, try the following.
1. Restart the phone and check it out.
2. Reset the phone (hold the home button and the lock button until you see an Apple Logo and then let them go).
3. Go into Settings > General > Reset > Reset all Settings and test it out again
4. If none of the above work, try creating either an iTunes backup or an iCloud backup and restore the device as new using iTunes. Here's an article to help with that: http://support.apple.com/kb/ht4137 -
How to add breakpoint in abap code
when use <i><b>java</b></i> call abap code ,
how to add breakpoint in abap code?Hi,
To start the ABAP debugger from your java client you have to set the JCO client to debug mode:
e.g.
yourJCOClient.setAbabDebugMode(true)
(hope thats the right method name:-)).
And don't forget to set also a break point of type "External" in the function module you call from your java client. For debuging, the user which calls the FM has to be a SAP User of type "<b>Dialog"</b> and has to be the rights to call RFCs, ... -
How to start with ORACLE APPS and ORACLE APPLICATION SERVER?
Hi !!
I am a little known with oracle database. But recently i have been asked to update my skills with oracle apps and oracl e application server. I do not have any prior experience with these products of oracle and I really have 0 knowledge of it.
Can anybody help me find a start with oracle apps and oracle as?
Thanks.Welcome
http://www.oracle.com/technology/documentation/applications.html
You can download from here.
Regards
Asif Kabir
-- If helpful mark the post as correct/helpful, also close the thread as answered. -
URL of BCS search results start with bdc3://
Hello,
I am using sharepoint BDC in Sharepoint 2013. I have created profile page and given permissions. I configured search. I have full crawled 2-3 times and incremental crawl. I found total records crawled are more than total record in sql database.
When I checked I found 2 records start with "bdc3://".
Please let me know how to prevent crawling the url starting with bdc3://.
Thanks,
Lovkesh PatelHi Lovkesh,
According to your description, my understanding is that you do not want to crawl the contents start with bdc3:// in SharePoint 2013.
I recommend to create Crawl Rules with bdc3://* as the path to exclude the content start with bdc3:// from crawling in Search Service Application to see if the issue still occurs.
Best regards.
Thanks
Victoria Xia
TechNet Community Support -
'Connect By' and 'Start With' in Discoverer
Hello,
I have a hierarchal query to show all child organizations under the parameter ':Parent_ID'
This is the query, I execute it in SQL Developer normally:
SELECT el.organization_id_child, ch.name,level*
FROM hr.hr_all_organization_units org,*
hr.PER_ORG_STRUCTURE_ELEMENTS el ,*
hr.hr_all_organization_units ch*
WHERE el.org_structure_version_id = 61*
AND org.organization_id = el.organization_id_parent*
AND ch.organization_id = el.organization_id_child*
START WITH el.organization_id_parent = :Parent_ID*
CONNECT BY el.organization_id_parent = PRIOR el.organization_id_child*
in the below line:
START WITH el.organization_id_parent = :Parent_ID*
The hierarchal query will start with parameter value to show all childes under that organization...
How can I use this simple query in Discoverer !! I am trying to find the START WITH in the discoverer also can not put this query in a new custom folder without removing the parameters.
Please Help...
Regards
Edited by: adelshehri on Oct 21, 2009 2:47 PMHi,
If you need to use the hierarchical query then you will not be able to pass a Discoverer parameter directly to the start with clause in the custom folder.
However, you can use a database context as a session parameter and use this parameter in the customer folder. More details on this can be found at LearnDiscoverer
Also you could put your hierarchical query into a table function passing the parent_id as a parameter to the table function. Then in your custom view you would join this to a table that returns the list of parent ids that you wish to use. e.g.
select f.organization_id_child, f.name,level
from hr.hr_all_organization_units par
, table (hierarchy_function(par.parent_id) f
where par.organization_id = :parent_id
Rod West -
what do these comands do connect by and start with ? please answer thanks
what do these comands do connect by and start with ? please answer thanks Here's an example that may help. In the EMP table you have all employees of a company; this includes
all levels, President, managers, and (regular) employees.
Let's say you want to know who works for who.
First, just to see who is in the table
select empno, ename, job from emp;
EMPNO ENAME JOB MGR
7901 CLARK MANAGER 7900
7902 MILLER CLERK 7901
7903 SMITH CLERK 7905
7904 ADAMS CLERK 7906
7905 FORD ANALYST 7907
7906 SCOTT ANALYST 7907
7907 JONES MANAGER 7900
7908 ALLEN SALESMAN 7909
7909 BLAKE MANAGER 7900
7910 MARTIN SALESMAN 7909
7911 JAMES CLERK 7912
7912 TURNER SALESMAN 7909
7913 WARD SALESMAN 7909
7900 KING PRESIDENT
[\CODE]
Now, using the START WITH and CONNECT BYSELECT LPAD(' ',2*(LEVEL-1)) || ename org_chart,
empno, mgr, job
FROM emp
START WITH job = 'PRESIDENT'
CONNECT BY PRIOR empno = mgr
ORG_CHART EMPNO MGR JOB
KING 7900 PRESIDENT
CLARK 7901 7900 MANAGER
MILLER 7902 7901 CLERK
JONES 7907 7900 MANAGER
FORD 7905 7907 ANALYST
SMITH 7903 7905 CLERK
SCOTT 7906 7907 ANALYST
ADAMS 7904 7906 CLERK
BLAKE 7909 7900 MANAGER
ALLEN 7908 7909 SALESMAN
MARTIN 7910 7909 SALESMAN
TURNER 7912 7909 SALESMAN
JAMES 7911 7912 CLERK 30
WARD 7913 7909 SALESMAN
[\CODE] -
ABAP Code in Start Routine for restricing the data records from ODS1 - ODS2
Hi
I need small ABAP Code in Start Routine Of Update rules Of ODS . Im in BW 3.5 .
I have records like below in first layer ODS and i want to restrict some records while going to second layer ODS ..
ODS1 :-
DocNO EventType Date
123 001 08/08/2008
123 003 08/08/2008
123 011 09/08/2008
I want one record in ODS2 for this document number whose EventType = 001 only and date of third record ... like below
Doc NO EventType From Date Todate
123 001 08/08/2008 09/08/2008
So how can i get like this record in the ODS2 which will get data from ODS1 . So i need to write the code in the start routine of the ODS2 .
So please give the me the code for start routine ....
Regards
SureshIts difficult in BW 3.5 to include this logic in START_ROUTINE as you cannot add the extra to_date field to the DATA_PACKAGE table.
You need to create a new global internal table with the same structure of DATA_PACKAGE with additional field to_date. then use the logic to fill in the global internal table
define a internal table new_data_package with the required structure like (docno, eventtype, fromdate todate)
data: l_w_datapkg_001 type data_package,
data: l_w_newdatapkg type new_data_package,
data: l_w_datapkg_011 type data_package
LOOP AT DATA_PACKAGE INTO l_w_datapkg_001 WHERE event_type = '001'.
l_w_newdatapkg-docno = l_w_datapkg_001-docno.
l_w_newdatapkg-event_type = l_w_datapkg_001-event_type.
l_w_newdatapkg-fromdate = l_w_datapkg_001-date.
MOVE CORRESPONDING FIELDS OF l_w_datapkg_001 INTO l_w_newdatapkg.
READ TABLE data_package INTO l_w_datapkg_011
WITH KEY docno = l_w_datapkg_001-docno
event_type = '011'.
l_w_newdatapkg-to_date = l_w_datapkg_011-date.
APPEND l_w_newdatapkg TO new_data_package
ENDLOOP.
Now the new datapackage contains the ODS2 data that u needed
Maybe you are looking for
-
When i distilling from ID CS3 on Leopard 10.5.2 a document then i have white sides in my pdf and acrobat say that an graphic error ist occurred.
-
FTP adapter fail to move 10 MB file
Hi , I am trying to move a file. 1. Size 10MB, FTP adapter. 2. No Mapping 3.Options tried ---3.1 With out having and repositary objects and using a dummy interface. ---3.2 Using the same message type for outbound and inbound with out any mappin
-
Tracking problem with Bluetooth mouse..
I recently changed batteries in my Bluetooth wireless mouse... I've done that many times in the past without incident... But this time something strange happened... I used to run the tracking speed setting at the second notch up from slow but now tha
-
dear masters In maintain operation data of WCM there is one option physical bloking, can any one tell me in simple own language whats the meaning of this and in which situation and where we can used it thanx
-
Version Management for PO(Set up Change Displays)
Hi All, We have Version Mgt. functionality for POs. Pls tell me what is the use of 'Category' field in 'Set up Change Displays' in Version Management. The path is IMG>MM>Purchasing>Version Mgt.>Set up Change Displays Appreciate if you do not provide