REGEXP_REPLACE: How to use a function over the found strings?
Hello,
Consider the following:
select regexp_replace('A1BBCCA2BBCC', '(A.)', '[\1]')
from dual
'[A1]BBCC[A2]BBCC'Now I try to put a function on the replaced strings:
select regexp_replace('A1BBCCA2BBCC', '(A.)', lower('[\1]'))
from dual
'[A1]BBCC[A2]BBCC'The result is the same i.e. the function lower has been executed with my reg. expression as a parameter, not the result strings. How can I execute the function passing as a parameter not the reg. expression but the strings, that have been found? (Of course, my real need is to use a custom function, not "lower").
Thanks in advance.
Best Regards,
Beroetz
I'm sure there must be a simpler way, but this is my first thought... (although strictly speaking in this example I could get rid of the lower function and just include 'a' hardcoded.)
SQL> ed
Wrote file afiedt.buf
1 with t as (select 'A1BBCCA2BBCC' as txt from dual)
2 -- end of data
3 select replace(sys_connect_by_path(lower('A'||substr(x,1,1))||substr(x,2),','),',') as x
4 from (
5 select REGEXP_SUBSTR(txt, '[^A.]+', 1, level) as x, level rn
6 from t
7 connect by level <= length(regexp_replace(txt,'[^A.]*'))
8 )
9 where connect_by_isleaf = 1
10 connect by rn = prior rn+1
11* start with rn = 1
SQL> /
X
a1BBCCa2BBCC
SQL>
Similar Messages
-
How to use SQL functions in the queries
hey guys i wanna know how to use SQL functions in the queries is it possible or not .
Hi,
Wat exactly that set values are?
those from sql query?
How to use count():
The COUNT() function returns the number of rows that matches a specified criteria.
SQL COUNT(column_name) Syntax
The COUNT(column_name) function returns the number of values (NULL values will not be counted) of the specified column:
SELECT COUNT(column_name) FROM table_name
SQL COUNT(*) Syntax
The COUNT(*) function returns the number of records in a table:
SELECT COUNT(*) FROM table_name
SQL COUNT(DISTINCT column_name) Syntax
The COUNT(DISTINCT column_name) function returns the number of distinct values of the specified column:
SELECT COUNT(DISTINCT column_name) FROM table_name
The IN function helps reduce the need to use multiple OR conditions.
The syntax for the IN function is:
SELECT columns
FROM tables
WHERE column1 in (value1, value2, .... value_n); -
How to use db2 function in the HQL
hello
i am newbie to hibernate, now i am choosing a solution for my project, in this project, it use db2 function in the sql clause as follow:
insert into idstool.access(userid,node,password) values('userid','nodename',encrypt('password','nodename'));
i wonder if i can implement such function by using hibernate, that is if hibrenate can use the db2 function, or user-defined sql functions? if yes, how?
thanks for any helpsI think you'll find that you can do this through HQL. You also have the option of invoking a stored procedure or invoking native SQL in tandem with the normal Hibernate options.
-
How to use bluetooth function for the Mega player(522BT)
Hello all!!!!!
Pls ,help me!
I am from Myanmar.I can't use Mega player(522BT)for PC to the bluetooth function of this device.
That is ,we can only use the phone to this device.
I want to know. Pls,help me.
With Regards,
Thwe Thwe(Myanmar)Hi,
You could do something like this,
http://www.codersrevolution.com/index.cfm/2008/10/14/Flex-Charting-Format-your-X-and-Y-Axi s
hope it helps!
Regards ,
Bhavika -
How to use a user over the network???
My point is, that i have a Mac on my room and let's say that i want to use my user on my mac which is in my room in another Mac which is connected to my tv. I dont think there's a way to do that, but in my opinion is why not to make it possible... login to your user from a mac to your mac...
You can screen share by enabling it in the sharing prefs.
If you just want to use the user without screen sharing, you have to do some complicated remote user thing that I couldn't figure out how to do on my Mac Mini... -
How to use PROCESS_PARAMETER function in the Decision Maker
Hi mates,
I would really like to know if some of you has already experienced with the "Decision Maker" process (available starting from 7.0 realise). I'm interested to use this process type giving as input a runtime parameter filled in one ABAP program which has been executed before in the same process chain. The input parameter read from the ABAP program will be used in the Decision Maker in order to decide what of next processes will be exectuted.
Example
Let's consider this scenario: the program just wirtes the parameter p in the SAP memory with the ID OPT1, OPT2, OPT3
REPORT ztest08.
PARAMETER p TYPE n.
DATA: prog TYPE sy-repid.
CASE p.
WHEN '1'.
SET PARAMETER ID 'OPT1' FIELD p.
WHEN '2'.
SET PARAMETER ID 'OPT2' FIELD p.
WHEN '3'.
SET PARAMETER ID 'OPT3' FIELD p.
ENDCASE.
For this progam I've created an ABAP process variant called YTEST01 which uses an ABAP variant that is defined with p=1.
Now, in the formula editor of the Decision Maker, I set this code
PROCESS_PARAMETER( 'ABAP', 'YTEST01','OPT1', 'LOW', ' 0' ) = 1
Hopefully the Decision Maker should get the parameter p=1 from the SAP memory reached with the ID OPT1. But it doesn't, and it sends me back an error message that some error has occured during the formula.
Note that, in the formula, I left the last parameter blank.
Does someone of you already experienced with Decision Maker using PROCESS_PARAMETER operands?
Thank you very much and best regards,
Matteo
Edited by: Stefano Bertuzzi on Nov 28, 2009 5:19 PMHi,
Please check the link below:
Is it possible to start process cain with parameter?
-Vikram -
How to create a title over the top of the left-most column in a cross-tab.
This is one of those things that seems simple until you try it.
I'm almost there. I moved the cross-tab from the report header to the report footer so I can have a page title. I tried using an overlay but it didn't work for any page past the first.
I can't seem to figure out how to put a title over the left-most column though.
Thanks in advance,
JI have used a text box, after you type in the text, select the box, and move it to the front.
then select the crosstab and move it to the back. -
How to setup a vpn over the internet
Hi ,
how to setup a vpn over the internet ? Just I have using window server 2012 r2, I already install 'remote access service' also ready enable VPN service but I can't connect to vpn server over Internet(Other network), when I connect from LAN , vpn service
is enable I can connected. My ADSL router also Enable VPN access(PPTP, L2TP, IPsec). But I can't access my server over Internet :'( . What I need to do? Help me please.
Thanks,Hiya,
Did you have a look at this guide? - It gives you all the steps.
http://www.howtogeek.com/135996/how-to-create-a-vpn-server-on-your-windows-computer-without-installing-any-software/ -
How to use standard function keys as custom keys
how to use standard function keys as custom keys.
i have encountered that problem while developing a screen, there i'm supposed to use standard function key F2 ( which actually meant for choose) for clearing the screen fields where the cursor is present and f1 for saving data that entered in screen fields, etc...
kindly help me out.Hi ,
Solution to use SAP reserve function keys F1 .. F4 (mostly this requirement comes up for RF screens) can be acheived by assigning your new Function code using the Menu path Utilities --> F key Consistency in the Menu Painter (SE41) . Once you assign your cutom function code to the standard Fn keys the only remaining step is to make sure that you set a curson on any of the field on sceen by using the Key Word "SET CURSOR" .
If you dont use the key word SET CURSOR in the PBO of the screen then you might not see any response for F4.
Thanks -
How to use this function in crm5.2 - /CEM/ENT_IMPORT_DATAFROMEXCEL
i am having a problem regarding how to use this function to import values from an excel sheet.
in call funtion what to specify at place of ct_ent_action = ?
CALL FUNCTION '/CEM/ENT_IMPORT_DATAFROMEXCEL'
CHANGING
CT_ENT_ACTION =
EXCEPTIONS
FILE_ERROR = 1
IMPORT_ERROR = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Hi
The use of Standard Parner functions are as follows:
1. Ordering Address (OA): The PO will be sent this vendor and not the main vendor.
2. Goods Supplier (WL): In case of return deliveries, Goods will be returned to thsi vendor's address
3. Invoicing party (RS): The payment will be made to this vendor.
Hope this clarifies.
Thansk -
How to use these function modules
Hi all,
can anyone help that how to use these Function modules to update the status of a task, what are all the inputs i required to proceed
1. FC_USER_AUTHORITY_CHECK
<b>2. FC_USER_STATUS_CHECK
3. FC_USER_STATUS_UPDATE</b>
4. FC_USER_GET_CACTI
5. FC_USER_CHECK_FOR_OUTPUT
Thanks in Advance
GaneshHi Rob,
thanks for ur reply,
but they are not clear what they are meant to be, I understood there are some flags needed to run the Function Modules 2 & 3 which are in bold...
but how do i populate them.. i am not getting that..
thanks
ganesh -
How to use BAPI_MATERIAL_AVAILABILITY Function Module at batch level?
How to use BAPI_MATERIAL_AVAILABILITY FM to check material available at batch level?
And another question is what's the meaning of 'CHECK_RULE' in this FM. Thanks!Field name : PRREG
fcheck more details on f1 help...
check_group defines the checking procedure to be used for availability check in individual applications.
along with the checkg group, checking rule specifies the final procedure for chkg..
eg:
ST for stock transport order
AQ for SD order project srock
also chk this help doc.
http://help.sap.com/saphelp_470/helpdata/en/cf/70124adf2d11d1b55e0000e82de178/content.htm
search the forum for sample code..
How to use BAPI_MATERIAL_AVAILABILITY Function Module.... -
How to use BAPI_MATERIAL_AVAILABILITY Function Module....
Hi Experts,
I want to know actual free available quantity (ATP Qty.) for mass materials,
How to use BAPI_MATERIAL_AVAILABILITY function module ?
I have select all material from MARA and inserted in itab.
LOOP AT ITAB.
CALL FUNCTION 'BAPI_MATERIAL_AVAILABILITY'
EXPORTING
PLANT =
MATERIAL =
UNIT =
CHECK_RULE =
STGE_LOC =
BATCH =
CUSTOMER =
DOC_NUMBER =
ITM_NUMBER =
WBS_ELEM =
STOCK_IND =
DEC_FOR_ROUNDING =
DEC_FOR_ROUNDING_X =
READ_ATP_LOCK =
READ_ATP_LOCK_X =
IMPORTING
ENDLEADTME =
AV_QTY_PLT =
DIALOGFLAG =
RETURN =
TABLES
WMDVSX =
WMDVEX =
I dont know how to use it.
pl. guide us.
YusufHi,
data: iwmdvsx type table of bapiwmdvs with header line,
iwmdvex type table of bapiwmdve with header line.
parameters: p_matnr type mara-matnr,
p_werks type marc-werks,
p_meins type mara-meins.
call function 'BAPI_MATERIAL_AVAILABILITY'
exporting
plant = p_werks
material = p_matnr
unit = p_meins
CHECK_RULE =
STGE_LOC =
BATCH =
CUSTOMER =
DOC_NUMBER =
ITM_NUMBER =
WBS_ELEM =
STOCK_IND =
IMPORTING
ENDLEADTME =
AV_QTY_PLT =
DIALOGFLAG =
RETURN =
tables
wmdvsx = iwmdvsx
wmdvex = iwmdvex.
check sy-subrc = 0.
Text
ATP information
Functionality
Using this function module, you can determine the receipt quantity still available for a particular material in a certain plant according to ATP logic (MRPII).
The availability check is carried out on transferring the material number, the plant and the input table (WMDVSX). The scope of the check, that is, which stocks, receipts and issues are to be included in the check is defined by the combination of checking group (material master) and cheking rule. In the function module, the system uses the checking rule defined in Sales & Distribution (A). You can overrule this checking rule by using an interface or a user-exit (exit_saplw61v_001). A similar procedure is also valid for the plant parameters. The customer number in the user-exit means that the plant selection can be controlled via the customer. If no plant parameters are given via the interface, the system uses the parameter 'WRK' saved in the user's fixed values.
The results of the availability check are recorded in the output table (WMDVEX). This table contains dates and available receipt quantities (ATP quantities). The results of the check depends on the following entries:
If no date and no quantity is transferred, the system displays the ATP situation from today's date into the future as the result.
If only a date and no quantity is transferred, the system displays the ATP situation from the corresponding date as the result.
If both a date and a quantity are transferred, the system calculates the availability situation for the quantity specified.
In the last two cases, the parameter 'DIALOGFLAG' is supplied. This can result in the following:
' ' (blank) <=> quantity completely available
'X' <=> only partial quantity available or not available at
all
'N' <=> Material not included in the availability check
(Material not relevant to the availability check)
The system also displays the end of the replenishment lead time (ENDLEADTME).
regards -
How to use SO_OBJECT_SEND function module
Hi friends,
how to use SO_OBJECT_SEND function module in 4.0B Server .hi
good
check this code
REPORT ZTSAPMAIL.
DATA: X_OBJECT_TYPE LIKE SOOD-OBJTP.
DATA: BEGIN OF X_OBJECT_HD_CHANGE.
INCLUDE STRUCTURE SOOD1.
DATA: END OF X_OBJECT_HD_CHANGE.
DATA: BEGIN OF X_OBJCONT OCCURS 10.
INCLUDE STRUCTURE SOLI.
DATA: END OF X_OBJCONT.
DATA: BEGIN OF X_OBJHEAD OCCURS 0.
INCLUDE STRUCTURE SOLI.
DATA: END OF X_OBJHEAD.
DATA: BEGIN OF RAW_HEAD.
INCLUDE STRUCTURE SORH.
DATA: END OF RAW_HEAD.
DATA: BEGIN OF X_RECEIVERS OCCURS 0.
INCLUDE STRUCTURE SOOS1.
DATA: END OF X_RECEIVERS.
PARAMETERS: RECEIVER LIKE X_RECEIVERS-RECNAM. " Name
*BUILD MESSAGE HEADER
MOVE 'Sort field goes here' TO X_OBJECT_HD_CHANGE-OBJSRT. " Sort field
MOVE 'Name of the object goes here' TO X_OBJECT_HD_CHANGE-OBJNAM. " Name
MOVE 'Document title goes here' TO X_OBJECT_HD_CHANGE-OBJDES. " Title
MOVE 'F' TO X_OBJECT_HD_CHANGE-OBJSNS. " Functional OBJECT
MOVE 'E' TO X_OBJECT_HD_CHANGE-OBJLA. " Language
Object type of the new document
MOVE 'RAW' TO X_OBJECT_TYPE.
CLEAR X_OBJCONT.
MOVE 'Contents of mail' TO X_OBJCONT-LINE.
APPEND X_OBJCONT.
CLEAR X_OBJCONT-LINE. APPEND X_OBJCONT.
MOVE 'More contents' TO X_OBJCONT-LINE.
APPEND X_OBJCONT.
MOVE 'Still more contents'
to x_objcont-line.
APPEND X_OBJCONT.
MOVE ' ' TO X_OBJCONT-LINE.
APPEND X_OBJCONT.
Specific header (Dependent on the object type, here RAW)
REFRESH X_OBJHEAD.
DESCRIBE TABLE X_OBJCONT LINES RAW_HEAD-RAWSIZ.
MOVE RAW_HEAD TO X_OBJHEAD.
APPEND X_OBJHEAD.
*RECEIVERS table
CLEAR X_RECEIVERS.
REFRESH X_RECEIVERS.
MOVE RECEIVER TO X_RECEIVERS-RECNAM. " Name
MOVE 'B' TO X_RECEIVERS-RECESC. " Receiver type
MOVE 'X' TO X_RECEIVERS-SNDCP. " Send as a copy
MOVE 'X' TO X_RECEIVERS-SNDEX. " EXPRESS DOCUMENT
APPEND X_RECEIVERS.
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
folder_id = 'OUTBOX'
forwarder = x_forwarder
object_fl_change = x_object_fl_change
OBJECT_HD_CHANGE = X_OBJECT_HD_CHANGE
object_id = x_object_id
OBJECT_TYPE = X_OBJECT_TYPE
OUTBOX_FLAG = 'X'
OWNER = SY-UNAME
store_flag = x_store_flag
importing
object_id_new = x_object_id_new
sent_to_all = x_sent_to_all "May need to use
TABLES
OBJCONT = X_OBJCONT
OBJHEAD = X_OBJHEAD
objpara = x_objpara
objparb = x_objparb
RECEIVERS = X_RECEIVERS.
reward point if hlepful.
thanks
mrutyun^ -
How to use ADD_MAINTAIN_COMPLETE function module
how to use ADD_MAINTAIN_COMPLETE function module
please help me.
by using the above function module
how can i change the ADRT table REMARK fieldhow to use ADD_MAINTAIN_COMPLETE function module
please help me.
by using the above function module
how can i change the ADRT table REMARK field
Maybe you are looking for
-
How to use SWC_CREATE_OBJECT in Function Module
Hi All, I need to create a one function module to fill the work flow container field. this work flow builder had only one task, that task is triggering through QM Action box. I need to maintain this function module in AM Action box, FM when saving fi
-
How do I retrieve lost notes and pictures
How do I retrieve lost notes and pictures
-
Hi, I'm trying to setup a session variable to filter an Answer query based on the user login name. I've created the following - A database table that contains a user name and its related filter (Entity) - An initialization block for the session varia
-
Dreamweaver is not opening at all!
Well this is annoying/a complete stop to my work. Yesterday I upgraded my Mac system to Mavericks -- I hadn't tried to open any Adobe programs last night, but this morning I'm in an utter panic. All of my downloaded Adobe CC programs open up and wor
-
Cash Discount in Document Currency (FB03)
Hi Gurus, I have a problem when I'm creating the billing. The document account was created but the value of discount amount is empty, the base amount is empty. I don't know why, I would like to know if the problem is financial or sales and how can i