How to check the occurrence of a character in a string
Hello Experts,
I have a scenario where in I have to check the occurrence of a character in a string and based on that I have to pass a data into target field.
I was wondering whether this can achieved with mapping functions or Do I have to use an UDF.
Thanks in advance.
Regards
Advit Ramesh
Hi Advit,
You can achieve this by using standard function indexOf from the text category. Pass in the input string and the character value you want to check for as the input.
Standard Functions (SAP Library - SAP Exchange Infrastructure)
If the output is -1, then the character is not in the string, otherwise it is.
Rgds
Eng Swee
Similar Messages
-
How to check the source value is in between a string range in mapping
Hi Consultants,
I am working on IDOC to File scenario. I need to implement a specific requirement of our client. i.e. something like below;
Vendor number can be any thing like 1AA000000 / 1AA000001/1AB000000/... ect till 1ZZ999999.
if the vendor number is in between 1AA000000 -1ZZ999999 then the target value should assign as 'Internal' else should assing as 'External'.
How to compare that the value of vendor is in between IAA000000 to 1ZZ999999 in mapping?
Appreciate your help.
Thanks in advance.
Regards,
NausheenYou can try creating an UDF and using the varName.substring(); method. Then you can compare in separated pieces the string. For example
String var = "1AA000000";
if (var.substring(3).compareTo("000000") < 0 && var.substring(3).compareTo("999999") > 0)
//compare now the "AA" and "ZZ" with the same logic;
http://download.oracle.com/javase/1.4.2/docs/api/java/lang/String.html#substring(int, int)
http://download.oracle.com/javase/1.4.2/docs/api/java/lang/String.html#compareTo(java.lang.Object)
EDIT: Moreover, those functions are available in the Mapping program creation, but this should give a clue on the order it should be done.
Edited by: Lucas Santos on Mar 29, 2011 7:38 PM
Edited by: Lucas Santos on Mar 29, 2011 7:53 PM -
Hi, Occurrences Of Every Character In A String
Hi All,
I want to write a program wherein I can check the occurrences of every character in the string given.
What should I do, is there a in built function to do this.
Please helpI wrote this program and this works fine... Thanks
public class Main_Character_Occurence
public static void main(String args[])
String inputString = " Test String";
String matches = "abcdefghijklmnopqrstuvwxyz";
int sum = 0;
for (int i = 0; i < matches.length(); i++)
for (int ctr = 0; ctr < inputString.length(); ctr++)
if (matches.charAt(i) == Character.toLowerCase(inputString
.charAt(ctr)))
sum++;
System.out.println(matches.charAt(i) + "=" + sum);
sum = 0;
}The output I am getting is this
a=0
b=0
c=0
d=0
e=1
f=0
g=1
h=0
i=1
j=0
k=0
l=0
m=0
n=1
o=0
p=0
q=0
r=1
s=2
t=3
u=0
v=0
w=0
x=0
y=0
z=0 -
How to check the verity version in our PeopleSoft Installation?
How to check the verity version in our PeopleSoft Installation? I am not sure if the verity is installed or not and also if installed what is the version?
yes. it says the version is 5.0.1
Is there any difference in installation or configuration when the app and web server are in same machine and when the app and web server are installed in different servers?
============================================
D:\fs840\webserv\peoplesoft>mkvdk
mkvdk - Verity, Inc. Version 5.0.1 (_nti40, Jul 23 2004)
Usage: mkvdk [<option>...] <filespec>...
Where <option> can be a VDK switch, or any of:
-about Show the collection's about resources
-autodel Delete bulk insert file when no longer needed
-backup <dir> Specify collection backup location
-bulk Submit bulk insert file(s)
-charmap <name> Specify the character map to VDK
-collection <path> Specify the collection (required)
-create Create the collection
-credentials <user> Specify user[:passwd][:domain][:mailbox]
-datapath <path> Specify VDK datapath
-datefmt <fmt> Specify date format to VDK
-debug Enable debugging output
-delete Delete documents
-description <desc> Set the collection's description
-diskcache <num> Set VDK's disk cache size (kbytes)
-extract Extract field values from text
-help Print this usage information
-insert Insert documents (default)
-locale <locale> Specify the locale to VDK
-logfile <file> Save output in a log file
-loglevel <num> Set the VDK output level for the log
-mailboxes This option is depracated. Use the credentials option inste
ad
-maxfiles <num> Set VDK's maximum number of open files
-maxmemory <num> Set VDK's maximum memory usage (kbytes)
-mode <mode> Set the indexing mode
-modify Modify fields using field/value pairs from a bulkfile
-nohousekeep Disable housekeeping
-noindex Disable indexing
-nolock Turns off locking (dangerous)
-nooptimize Disable optimizations
-nosave Don't save collection work list
-noservice Prevents servicing of submitted work
-nosubmit Don't submit work to VDK
-numdocs <num> Number of documents to insert from bulk insert file(s)
-numpages <num> Synonym for diskcache for backward compatibility
-offset <num> Specify offset into bulk insert file(s)
-online Flag for online Bulk Modify
-optimize <spec> Optimize the collection
-outlevel <num> Set the VDK output level
-persist Service the collection forever
-purge Remove all documents from collection
-purgeback Purge in the background
-purgewait <secs> Specify delay before purge
-quiet Suppress all non-error messages
-repair Repair the collection
-servlev <spec> Advanced option for overriding service level
-sleeptime <secs> Interval between service calls for persist
-style <dir> Specify style directory for create
-submit Synonym for noservice for backward compatibility
-synch Perform work synchronously
-topicset <path> Specify VDK topic set
-update Update documents
-vdkhome <path> Specify VDK home
-verbose Output more information
-words Build word assist list
-wordindex Build word assist index
The <spec> for -optimize is a hyphenated string of:
maxmerge Perform maximal merging of partitions
squeeze Recover space from deleted documents
vdbopt Build optimized VDB's
spanword Create word list spanning all partitions
ngramindex Create ngram index into spanning word list
maxclean Really clean (not for read-write)
readonly Make the collection read-only
tuneup Fully optimize for read-write use
publish Fully optimize for read-only use
The <spec> for -servlev is a hyphenated string of:
search Enable search and retrieval
insert Enable adding and updating documents
optimize Enable opportunistic collection optimization
assist Enable building of word list
housekeep Enable housekeeping of unneeded files
delete Enable document deletion
backup Enable backup
purge Enable background purging
repair Enable collection repair
dataprep Same as search-index-optimize-assist-housekeep
index Same as insert-delete
Error: must specify collection
mkvdk done
D:\fs840\webserv\peoplesoft> -
CIN: How to check the material document posted without excise invoice
Hi Guru,
Please advise how to check the material document posted without excise invoice.
I have tried tcode J1I7 but it seems start to collect the excise invoice first and then material document.
But my case is to find the material document WITHOUT excise invoice for internal tracking purpose.
At the moment we start from tcode MB51 to get the list of material document and check in J_1IEXCHDR / J_1IEXCDTL
Best regards,
PakornHi,
Try creating a Query in Tcode SQVI by combining tables MKPF and J_1IEXCHDR/J_1IEXCDTL for your requirement.
Check these threads how to create Query.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6018c1ae-8c44-2d10-6ea9-c3fad2c82880?QuickLink=index&…
http://ptgmedia.pearsoncmg.com/images/9780672329029/samplechapter/0672329026_CH03.pdf
Regards
Binoy -
How to check the messages in solution manager?
hai experts !
how to check the messages in solution manager?
in which transaction do we see them?Hi Kiran,
From what I gather from your brief question, you are perhaps looking for CRM_DNO_MONITOR that would display all queries created from Satellite/SolMan system itself, as support messages.
If you are looking for Notifications underlying those messages, please look for DNOTIFWL.
For more specific answers, please provide more description of what you are looking for.
Trust this helps.
Regards,
Srini -
Can anyone tell me how to check the balance on an iTunes gift card that is not yet scratched?
Can anyone tell me how to check the balance on an iTunes gift card that is not yet scratched or activated?
If it's not printed on the card, then you'll need to check the receipt from the purchase of the card. There's no way to check the value from the card itself without redeeming it.
Regards. -
How will check the space taken by a single table in a tablespace ?
How will check the space taken by a single table in a tablespace ?
dba_segments is giving the same values even if I truncate the table?
Pls replyI need to know how can we find out the size of the table in the tablespace.use user_segments (bytes) column.
How much bytes it has taken ?value from user_segments, bytes column
If u delete records will the space be used for another table in same tablespace?No, it keep the space in the same table for future usage.
How can we free that space ?truncate or drop the table and reduce the size from tablespace, if you want to reclaim the space from the tablespace, OS level.
Jaffar -
How to check the resolution of a pdf file using Acrobat 9 pro?
How to check the resolution of a pdf file using Acrobat 9 pro?
PDF files don't have one resolution, but may have none or many different resolutions, one per image. You can check the maximum/minimum resoluion with preflight in Acrobat Pro, but not in Adobe Reader.
-
How to check the current EHP stack level? in SAP
Dear All,
How to check the current EHP stack level? in SAP . i have checked forum before i am posting but still comfused .
same one said SAP_APPL , EA_Appl and SAP _HR is 60n if n=1.2.3.4. if n =1 is enhanced package 1 similarly 2,3,4 .
some one said SAP_BASIS 701,702,703,704 . according ehp1,2,3,4.
Pls check the details and confirm either is ehp1 or ehp4 .
Component version is simply shows SAP ECC 6.0 in system -> status.
Software Component - Release - SP level
SAP_ABA 701 0007
SAP_BASIS 701 0007
PI_BASIS 701 0007
ST-PI 2008_1_700 0003
SAP_BS_FND 701 0008
SAP_BW 701 0007
SAP_AP 700 0021
WEBCUIF 700 0008
SAP_APPL 604 0008
SAP_HR 604 0029
SAP_HRCAR 604 0029
SAP_HRCAT 604 0029
SAP_HRCAU 604 0029
SAP_HRCBE 604 0029
SAP_HRCBR 604 0029
SAP_HRCCA 604 0029
SAP_HRCCH 604 0029
SAP_HRCCL 604 0029
SAP_HRCCN 604 0029
SAP_HRCDE 604 0029
SAP_HRCDK 604 0029
SAP_HRCES 604 0029
SAP_HRCFI 604 0029
SAP_HRCFR 604 0029
SAP_HRCGB 604 0031
SAP_HRCHK 604 0029
SAP_HRCID 604 0029
SAP_HRCIE 604 0029
SAP_HRCIN 604 0029
SAP_HRCIT 604 0029
SAP_HRCJP 604 0029
SAP_HRCKR 604 0029
SAP_HRCMX 604 0029
SAP_HRCMY 604 0029
SAP_HRCNL 604 0029
SAP_HRCNO 604 0029
SAP_HRCNZ 604 0029
SAP_HRCPH 604 0029
SAP_HRCPT 604 0029
SAP_HRCRU 604 0029
SAP_HRCSE 604 0029
SAP_HRCSG 604 0029
SAP_HRCTH 604 0029
SAP_HRCTW 604 0029
SAP_HRCUN 604 0029
SAP_HRCUS 604 0029
SAP_HRCVE 604 0029
SAP_HRCZA 604 0029
SAP_HRGXX 604 0029
SAP_HRRXX 604 0029
EA-IPPE 400 0018
EA-APPL 604 0008
EA-DFPS 600 0018
EA-FINSERV 604 0007
EA-GLTRADE 604 0008
EA-HR 604 0029
EA-HRCAR 604 0029
EA-HRCAT 604 0029
EA-HRCAU 604 0029
EA-HRCBE 604 0029
EA-HRCBR 604 0029
EA-HRCCA 604 0029
EA-HRCCH 604 0029
EA-HRCCN 604 0029
EA-HRCDE 604 0029
EA-HRCDK 604 0029
EA-HRCES 604 0029
EA-HRCFI 604 0029
EA-HRCFR 604 0029
EA-HRCGB 604 0029
EA-HRCHK 604 0029
EA-HRCID 604 0029
EA-HRCIE 604 0029
EA-HRCIN 604 0029
EA-HRCIT 604 0029
EA-HRCJP 604 0029
EA-HRCKR 604 0029
EA-HRCMX 604 0029
EA-HRCMY 604 0029
EA-HRCNL 604 0029
EA-HRCNO 604 0029
EA-HRCNZ 604 0029
EA-HRCPH 604 0029
EA-HRCPT 604 0029
EA-HRCRU 604 0029
EA-HRCSE 604 0029
EA-HRCSG 604 0029
EA-HRCTH 604 0029
EA-HRCTW 604 0029
EA-HRCUN 604 0029
EA-HRCUS 604 0029
EA-HRCVE 604 0029
EA-HRCZA 604 0029
EA-HRGXX 604 0029
EA-HRRXX 604 0029
EA-PS 604 0007
EA-RETAIL 604 0007
FINBASIS 604 0008
ECC-DIMP 600 0018
ERECRUIT 604 0008
FI-CA 604 0008
FI-CAX 604 0007
INSURANCE 600 0018
IS-CWM 600 0018
IS-H 600 0024
IS-M 600 0018
IS-OIL 600 0018
IS-PS-CA 604 0007
IS-UT 600 0018
LSOFE 600 0018
SEM-BW 604 0008
ST-A/PI 01M_ECC600 0001
Regards
Edited by: satheesh0812 on Nov 17, 2011 7:57 AMHi Sateesh,
SAP_ABA 701 0007
SAP_BASIS 701 0007
PI_BASIS 701 0007
ST-PI 2008_1_700 0003
SAP_BS_FND 701 0008
SAP_BW 701 0007
SAP_AP 700 0021
WEBCUIF 700 0008
SAP_APPL 604 0008
Based on the component information provided by you, I can conclude that your system is ECC 6.0 EHP4.
EHP4 is derived from your component SAP_APPL 604.
In addition to this your EHP4 system has NW stack on NW 7.0 EHP1.
Hence your system is ECC 6.0 EHP4 with NW 7.0 EHP1.
Hope this answers your query.
Regards,
Deepak Kori -
How to check the format (PAL or NTSC) of a DVD?
I wonder if someone can tell me how to check the format (PAL or NTSC) of DVD’s that I receive from my friends around the world. Many of them have no marking as to the format... Is there some software that can do this?
Hello Peace Freak,
have a look at myDVDedit (http://www.mydvdedit.com). It's actually designed to do postproduction on a DVD, but will also display a lot of info, such as TV standard, 16:9 vs. 4:3, etc.
Insert your DVD, then launch myDVDedit and open the VIDEO_TS folder contained in your DVD. Click the IFO tab to find the information you're looking for.
hope this helps
mish -
How to move the value from a character field to numeric or packed decimal
Hi,
can anyone explain me on how to move the value from a character field to numeric or packed decimal.
Please help me on this. Thanks...
Regards,
Rose.Hi ,
if you use keyword MOVE u may loose the decimal and thoussan separator and if u don't want to loose them just call the FM ..HRCM_STRING_AMOUNT_CONVERT.
i doubt wherther it is HRCM or HCRM just try using *
this will suit ur requirement.
Regards,
KK -
How to Check the report is Finished while calling a report from Forms 6i
Dear All,
I am Calling a report from oracle forms 6i, after runing report in " Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);"
I need to copy the pdf to store it in another place once the report is generated.
My Problem is : that i want ot Check first the report has generated after " Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);" is executed ? How to check the report is generated ot not?
As i tried to use the below procedure after "Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);"" but his does not work... nothing happens
{code}
PROCEDURE FPC_COPY_REPORT (p_report_name varchar2) IS
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status varchar2(20);
lv_id varchar2(1000);
BEGIN
repid := find_report_object('AMTP_995.RDF');
v_rep := RUN_REPORT_OBJECT(repid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
if rep_status = 'FINISHED' then
message('Report Completed'); message('Report Completed');
else
message('Error when running report.'); message('Error when running report.');
end if;
END;
{code}
Any Helpactually My code is this:
declare
ln_alert number;
pl_id ParamList;
lv_report_name varchar2(10000);
lv_path varchar2 (100) := 'C:\';
lv_shared_path varchar2(1000);
lv_copy_file varchar2(10000);
cursor cr_dir_path IS
select v_dir_path
from md_directory
where v_dir_code ='SHR';
lv_file_name varchar2(1000);
BEGIN
open cr_dir_path;
fetch cr_dir_path into lv_shared_path;
close cr_dir_path;
lv_report_name := lv_path||:fn_cntl.nb_ref_no||'_M08600000_'||to_char(sysdate,'YYYYMMDD-HHmmss')||'.pdf';
if ffn_check_fields THEN
pl_id := Get_Parameter_List('LAI');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('LAI');
if :fn_cntl.nb_report_name ='MMAT_REPORT'
then
if :fn_cntl.nb_report_desc ='EXPORT'
then
Add_Parameter(pl_id, 'PARAMFORM',TEXT_PARAMETER, 'NO');
Add_Parameter(pl_id, 'DESTYPE', TEXT_PARAMETER,'File');
Add_Parameter(pl_id, 'DESNAME', TEXT_PARAMETER, lv_report_name);
Add_Parameter(pl_id, 'DESFORMAT',TEXT_PARAMETER,'PDF');
Add_Parameter(pl_id, 'p_mat_no',TEXT_PARAMETER, :fn_cntl.nb_mat_no);
Add_Parameter(pl_id, 'p_ref_no', TEXT_PARAMETER, :fn_cntl.nb_ref_no);
Add_Parameter(pl_id, 'p_verified_by',TEXT_PARAMETER, user);
Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);
DECLARE
repid REPORT_OBJECT; v_rep VARCHAR2(100); rep_status varchar2(20);BEGIN
/* REP_OBJ= REPORT OBJECT CREATED UNDER REPORT NODE AT FORM */
repid := find_report_object('MMAT_REPORT'); v_rep := RUN_REPORT_OBJECT(repid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
if rep_status = 'FINISHED' then
message('Report Completed'); message('Report Completed');
--copy_report_object_output(v_rep,'c:\local.pdf');
-- host('netscape c:\tlocal.pdf');
else message('Error when running report.');
message('Error when running report.');
end if;
END;
end if;
end if;
if :fn_cntl.nb_report_desc ='EXPORT'
then
error_handler('This report will be Storde in ' ||lv_report_name||' and '||lv_shared_path|| ' Location',3);
lv_copy_file :='copy '||' "'||lv_report_name||'" "'||lv_shared_path||'"';
host(lv_copy_file,no_screen);
error_handler('Report Has been Generated Sucessfully.',3);
end if;
end if;
END;I will try first the another solution you have replied perviously... and will let you no the results... thanks a lot... -
How to check the tables we have created in JDBC??
I have created a table called COFFEE2 in a datasource called temp which is in SQL server...How to check the table values??
i went into administrative tools and odbc cource then i could see the data source i have created but how to see the table??
Can anyone help??
thanxHmm.. not sure that I understand the problem.
Call getConnection on the DataSource, and then execute the select query on the connection.
Kaj -
How to check the report builder version from the rdf file
Hi,
I have a rdf file but I don't the developer using which version of report builder to develop the rdf file. So, does anyone knows how to check the rdf file is developed by which version of report builder?
When I try to use the notepad to open the rdf file, it shows the string "ROS.60050". So, does it means that the rdf file is developed by Oracle report 6i?
Besides, do anyone knows if Oracle report 6i are still offer from Oralce (as I know, the latest verison of oracle report is 11g). So, in case Oralce not offer oracle 6i and I need to buy oracle report 11g, do u know it is compatiable or I need to do the migration from 6i to 11g?
Thanks!Hi,
The ROS version you are seeing in the RDF file does not mean the version where that RDF was developed. I am not aware of a way to check this but something that may help is that when you try to open a RDF developed in a higher version
of Reports with a lower version of Reports builder the following warning will be displayed
Warning. Opening a report saved with a newer version of Reports Builder.
Functionality may be lost. Continue?
"You tried to open a report with a version of Reports Builder older than the version used to
create the report. If the report uses functionality unavailable in the older version, that
functionality will be eliminated from the report.
Regarding Oracle Developer 6i. This version is not supported any more. Regarding how to upgrade Reports 6i to 11g and what to have in mind during the upgrade please review the following documentation.
References
http://docs.oracle.com/cd/E24269_01/doc.11120/e24478/toc.htm
How To Migrate Forms and Reports From 6i and/or 9i To 11g? (Doc ID 1275515.1)
Hope it helps.
Regards, RZ
Maybe you are looking for
-
Why is my mac book pro slower to boot up and browse since upgrading to OS Yosemite
Help a new Apple user, I purchased a new mac pro from Best Buy and learn how to use it pretty quickly and actually started to believe it was a great decision to switch from windows. Then the mac pro gave the upgrade to the OS Yosemite, I upgraded it
-
TS3694 1656 is my error code i cant restore my iphone or update please help
1656 is my error code i cant restore or update my iphone please help
-
BBP_PD_MSG_ADD issue in CHECK badi
Hi all,, SRM 5.0 ECS I want to display an error message in the cofnirmation screen bit in the form op a POP UP ! I tried using the FM BBP_PD_MSG_ADD in the CHECK badi but it doesnt display the message in the pop up format! The strange thing is that t
-
I have lost my disk and box for my mac
Ive lost my disk and box for cs5 which i have on my mac and want to transfere to my Mac book pro
-
C++ sample code using XPATH
Need to navigate an XML and extract xml nodes using XPATH expressions in C++ Application. Please send us a C++ code sample using Oracle 9.2.0.3 XPATH API functions to extract an XML using XPATH expression. Thanks Shiva