How to handle the Comma in string

Hi All,
I have one req in which I am getting the like this
<TEXT>El rol permite tratar (visualizar, modificar, activar, desactivar) los</TEXT>
at receiver side my file is getting created in .CSV file.
in in Coloum the for TEXT is coming like this
col1                                                          col2         col3
El rol permite tratar (visualizar        modificar    activar
according to the req the hole value should come under one coloum...
col1
El rol permite tratar (visualizarmodificaactivar
Plz suggets
Regards

thanks abhishek,
it worked

Similar Messages

  • How to remove the comma from string

    Hi,
    I Have string like below :
    String some1="123,44.22";
    I want to remove comma from string and final output should be 12244.22.
    public class getOut{
    public static void main(String args[]){
    String some1="123,44.22";
    getChars(int 0,some1.length(),char[] dst,0);
    can somebody in the forum give me idea how to remove comma from the String and
    have a string without comma.
    Thanks
    Jack

    int idx = oldString.indexOf(',');
    if(idx >= 0)   
          newString = oldString.substring(0, idx) + oldString.substring(idx + 1);or for jdk 1.4 and later
    str = str.replaceAll(",", "");

  • How to handle a comma in a field in CSV file during FCC ?

    Hi,
    I am having a requirement where we have to convert a CSV file into XML using File Content Conversion . The issue is one of the field in the file is having a comma inside. So the XML parser is taking it as a field separator and throwing an error.
    The contents of the file are as follows:
    "02975859","New Key","9","Failed, rejected by RTI server"
    How to handle a comma inside field "Failed, rejected by RTI server".
    Any help would be appreciated.
    Regards
    Pravesh

    Hi ,
    You have to write an java mapping programm to perdromance this task , in a estandar way i think is not possible , because the fiel adapter have just one option for the delimiter character.
    Here's some code that could help you
    Supouse a file in this way:
    1,rahul,siemens,mumbai
    2,consultant,12032005
    1,viswanath,sisl,hyderabad
    2,systemeng,23052005
    package TXTMapping;
    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.util.Map;
    import com.sap.aii.mapping.api.StreamTransformation;
    public class TMapping implements StreamTransformation {
    private Map map;
    public void setParameter (Map param){
    map = param;
    public void execute (InputStream in, OutputStream out){
    try{
    out.write("<?xml version ='1.0' encoding='UTF-8'?>".getBytes());
    out.write("<ns0:Output_Data xmlns:ns0=\"urn:javamapping_test\">".getBytes());
    String line = null;
    BufferedReader bin = new BufferedReader(new InputStreamReader(in));
    StringBuffer buffer = new StringBuffer();
    while((line = bin.readLine())!= null){
    String Company = null;
    String Name = null;
    String Place = null;
    String Desgn = null;
    String Since = null;
    char[] str= new char[100];
    str = line.toCharArray();
    String[] Data = new String[10];
    int S1 = 0;
    int s2 = 2;
    for (int i=2; i<line.length(); i++)
    if (str<i>==',' && str[0]=='1')
    Data[S1]= line.substring(s2,i);
    S1=S1+1;
    s2 = i+1;
    if (i == line.length()-1 && str[0] == '1')
    Data[S1]= line.substring(s2,i+1);
    Name = Data[0];
    Company = Data[1];
    Place = Data[2];
    out.write ("<Data>".getBytes());
    out.write ("<Header>".getBytes());
    out.write (("<Name>"Name"</Name>").getBytes());
    out.write (("<Company>"Company"</Company>").getBytes());
    out.write (("<Place>"Place"</Place>").getBytes());
    out.write ("</Header>".getBytes());
    if (str<i>==',' && str[0]=='2')
    Data[S1]= line.substring(s2,i);
    S1=S1+1;
    s2 = i+1;
    if (i == line.length()-1 && str[0] == '2')
    Data[S1]= line.substring(s2,i+1);
    Desgn = Data[0];
    Since = Data[1];
    out.write ("<Item>".getBytes());
    out.write (("<Designation>"Desgn"</Designation>").getBytes());
    out.write (("<Since>"Since"</Since>").getBytes());
    out.write ("</Item>".getBytes());
    out.write ("</Data>".getBytes());
    out.write("</ns0:Output_Data>".getBytes());
    catch(Throwable t){
    t.printStackTrace();

  • How to handle the extended vo in the extended controller

    Hi,
    I want to know how to handle the extended vo attributes in the extended controller.
    I extended CompetenceElementsVO as 'CompetenceElementsEx' with 2 transient attributes called col1 and col2.
    Here i want to pass value according based on some condition. for this i want to know how to handle these attributes.
    I tried by using the extended vo name in the controller, if i use means then it is throwing error after the extended controller is implemented.
    Same time if i try to refer this attributes from the original vo definition, jdev itself showing error.
    please tell me how to handle this?
    Thanks in advance,
    SAN

    Hi San,
    You have to extend the controller where your region is associated with,
    And in that controller you get the AM(if there is more than one AM and your VO is associated with a child AM, first you have to get your required AM) and then
    get the ViewObject(standard).
    Then you should be able to get your newly added attributes.
    Please find the below sample code to get the AM handle and VO from there, update the code according to your requirement,
         Get all the VOs under the Root AM
         writeLog(pageContext, "Room AM"+ pageContext.getRootApplicationModule());
    String[] rootViewNames = pageContext.getRootApplicationModule().getViewObjectNames();
    /* writeLog(pageContext," Length of the VOs from Rootm AM "+rootViewNames.length);
    for (int j =0 ;j<rootViewNames.length ;j++ )
    writeLog(pageContext,j +" Value "+rootViewNames[j]);
         // Get requested AM from Root am
    public OAApplicationModule getRequestedAM(OAPageContext pageContext, String requestedAMName)
    writeLog(pageContext,"Requested AM called to check the AM "+requestedAMName );
    String amName = "";
    String objectivesAMName = requestedAMName;//"ObjectivesAM";
    String nestedAMArray[] = pageContext.getRootApplicationModule().getApplicationModuleNames();
    pageContext.writeDiagnostics(this,"Root AM=>"+pageContext.getRootApplicationModule().getName() + " Child AMs=>"+ nestedAMArray.length,1);
    OAApplicationModule currentAM = null;
    currentAM = (OAApplicationModule)pageContext.getRootApplicationModule();
    for(int i = 0; i < nestedAMArray.length; i++)
    amName = nestedAMArray;
    pageContext.writeDiagnostics(this,"Nested AM Name=>"+amName + "and amName.indexOf(objectivesAMName) "+amName.indexOf(objectivesAMName),1);
    currentAM = (OAApplicationModule)pageContext.getRootApplicationModule().findApplicationModule(amName);
                        //Get the view names
                   String[] viewNames = currentAM.getViewObjectNames();
    for (int i =0 ;i<viewNames.length ;i++ )
    writeLog(pageContext,i +" Value "+viewNames[i]);
    if(!(amName.indexOf(objectivesAMName)==-1))
    pageContext.writeDiagnostics(this,"Found Handle to My Nested AM " + amName ,1);
    break;
    return currentAM;
    Get the VO from the AM
    OAViewObject objAssessmentVO = (OAViewObject)yourAM.findViewObject("yourVO");
    Thanks.
    With Regards,
    Kali.
    OSSi.

  • How to handle the java.policy file ?

    Can somebody tell me how to handle the java.policy file?
    I always get java.net.SocketExceptions and java.security.AccessControlExceptions while connecting to an appserver from an applet.
    What do I have to write in the java.policy file, where do I have to place it and do I have to call it in some way form my applet?
    Thanks in advance.
    don call

    The java.policy file goes in your jre installation directory in .../jre/lib/security (there should be one there already).
    I used it to allow otherwise restricted permissions for an applet using javax.comm. Add something like the following to the file:
    grant codeBase "URL:http://yourDomainName/rootDirectoryOfYourApp/*" {
         permission java.security.AllPermission;
    This will give the applet downloaded from your site all permissions. You might want to give only certain permissions, I don't know.
    Teri

  • How to handle the bad record while using bulk collect with limit.

    Hi
    How to handle the Bad record as part of the insertion/updation to avoid the transaction.
    Example:
    I am inserting into table with LIMIT of 1000 records and i've got error at 588th record.
    i want to commit the transaction with 588 inserted record in table and log the error into
    error logging table then i've to continue with transaction with 560th record.
    Can anyone suggest me in this case.
    Regards,
    yuva

    >
    How to handle the Bad record as part of the insertion/updation to avoid the transaction.
    >
    Use the SAVE EXCEPTIONS clause of the FORALL if you are doing bulk inserts.
    See SAVE EXCEPTIONS in the PL/SQL Language doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/tuning.htm
    And then see Example 12-9 Bulk Operation that continues despite exceptions
    >
    Example 12-9 Bulk Operation that Continues Despite Exceptions
    -- Temporary table for this example:
    CREATE TABLE emp_temp AS SELECT * FROM employees;
    DECLARE
    TYPE empid_tab IS TABLE OF employees.employee_id%TYPE;
    emp_sr empid_tab;
    -- Exception handler for ORA-24381:
    errors NUMBER;
    dml_errors EXCEPTION;
    PRAGMA EXCEPTION_INIT(dml_errors, -24381);
    BEGIN
    SELECT employee_id
    BULK COLLECT INTO emp_sr FROM emp_temp
    WHERE hire_date < '30-DEC-94';
    -- Add '_SR' to job_id of most senior employees:
    FORALL i IN emp_sr.FIRST..emp_sr.LAST SAVE EXCEPTIONS
    UPDATE emp_temp SET job_id = job_id || '_SR'
    WHERE emp_sr(i) = emp_temp.employee_id;
    -- If errors occurred during FORALL SAVE EXCEPTIONS,
    -- a single exception is raised when the statement completes.
    EXCEPTION
    -- Figure out what failed and why
    WHEN dml_errors THEN
    errors := SQL%BULK_EXCEPTIONS.COUNT;
    DBMS_OUTPUT.PUT_LINE
    ('Number of statements that failed: ' || errors);
    FOR i IN 1..errors LOOP
    DBMS_OUTPUT.PUT_LINE('Error #' || i || ' occurred during '||
    'iteration #' || SQL%BULK_EXCEPTIONS(i).ERROR_INDEX);
    DBMS_OUTPUT.PUT_LINE('Error message is ' ||
    SQLERRM(-SQL%BULK_EXCEPTIONS(i).ERROR_CODE));
    END LOOP;
    END;
    DROP TABLE emp_temp;

  • How to open the comm ports?

    Hi,
    im using javacomm to detect my comm ports.i have two serial
    and a parallel port (com1,com2 and LPT1) but it found no ports and throws
    as follows,
    found: javax.comm.CommPortEnumerator@e83912
    found: 0 open ports
    i placed .properties file in ..\jdk1.5.0\jre\lib
    comm jar file in ..\jdk1.5.0\jre\lib\ext
    and WIN32COM.DLL in ..jre\bin
    am i doing right?
    Here is the code,
    import javax.comm.CommPortIdentifier;
    import javax.comm.SerialPort;
    import javax.comm.PortInUseException;
    import java.util.Enumeration;
    import java.util.Vector;
    public class TestEnumeration {
    public static void main(String args[]) {
    Vector portslist = TestEnumeration.getAvailableSerialPorts();
    System.out.println("found: "+portslist.size()+" open ports");
    public static Vector getAvailableSerialPorts() {
    CommPortIdentifier pId=null;
    SerialPort sPort=null;
    Enumeration pList=null;
    boolean foundport=false;
    pList = CommPortIdentifier.getPortIdentifiers();
    String port=null;
    Vector ports=new Vector();
    if(!pList.hasMoreElements()) {
    System.out.println("found: "+pList);
    return ports;
    while (pList.hasMoreElements()) {
    pId = (CommPortIdentifier) pList.nextElement();
    if (pId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
    foundport=true;
    try {
    sPort = (SerialPort)pId.open("serialport", 1000);
    } catch (PortInUseException e) {
    foundport=false;
    System.out.println(pId.getName()+ " is closed");
    } finally {
    if(sPort!=null) {
    try { sPort.close(); } catch(Exception e) {}
    if(foundport) {
    ports.add(pId.getName());
    System.out.println(pId.getName()+ " is open");
    return ports;
    please help me on how to open the comm ports..

    Try this, It workd for me. Before doing this make sure you have serial ports on you r computer by following these steps:
    open "regedit"
    go to "HKEY_LOCAL_MACHINE" > HARDWARE > DEVICEMAP
    and check if there is any serial ports. If htere is any, then use following program to enumerate throught the ports:
    class SimpleRead() {
    portList = CommPortIdentifier.getPortIdentifiers();
         while (portList.hasMoreElements()) {
         portId = (CommPortIdentifier) portList.nextElement();
         if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
              if (portId.getName().equals(defaultPort)) {
              System.out.println("Found port: "+defaultPort);
              portFound = true;
              SimpleRead reader = new SimpleRead();
         if (!portFound) {
         System.out.println("port " + defaultPort + " not found.");
    }

  • How to handle the cancel option of the showInputDialog

    Hi guys,
    I wonder how to handle the cancel option of the showInputDialog. Let is say i am getting a n input from the user and instead of entering any data he cancels the opterations ..
    how to cope with it?
    abdul

    Test for null!
    Example:
    String name = JOptionPane.showInputDialog(parent, "Type your name", "Name Dialog", JOptionPane.INFORMATION_MESSAGE);
    if(name != null) {
    //if the user clicked ok, write action code here...
    } else {
    // the user click cancel, do what you need here...
    Hope this helps!

  • How to handle the OK button of the parameters prompt of a crystal report

    Hi,
    how to handle the OK button of the parameters prompt of a crystal report in vba.NET?
    I want to use the parameter prompt from the crystal report itself and I want to know when the report is ready. I need to export programatically by sending email to a list of employees after the parameters has been set. The emails I send depends on the results of the report.
    Im using a CrystalReportViewer control  in VS2010 and Crystal Report for VS2010 v13.0.1.220.

    Right. But the parameter screen is driven by the viewer. Unless you create your own parameter screen and pass the parameters to the report via code.
    Another thing I am not sure about:
    "Then by code I want to read all the employees id from the report and send email to them with specified pages of the report. (1 page per employee)"
    How do you plan on reading the employee ID from the report? I am not aware of any API that will read a value in a report so that you can then decide what page to send to whom.
    I think you're approaching this kinda backwards. A question to ask is; can you do what you are trying to do in code in the CR designer? If not, using APIs will not work either. I suspect your approach should be a report that uses an employee filter. Run the report for employee x, get the report populated with the data for that employee and email it. Repeat for employee x1, employee x2, etc.
    - Ludek

  • How to handle the control records in case of file to idoc scenario.

    Hi All,
    can you please clarify me how to handle the control records in case of file to idoc scenario.

    Hi,
    In File to Idoc scenario even though you selected apply control record values from payload and you are not getting those correct values which you have provided in the mapping.
    Also check the checkboxes Take sender from payload and Take receiver from payload along with the Apply control record values from payload checkbox
    Regards
    Seshagiri

  • How to handle the different pricing conditions changes in BI.

    Dear Friends
    can any one send me  Regarding
                    How to handle the different pricing conditions changes in BI.
    Thanks & Regards
    Ramana

    Hi,
    Take a look at the 0sd_o06 ODS and 2lis_13_vdkon datasource for sales billing conditions.
    http://help.sap.com/saphelp_nw70/helpdata/EN/36/8188408bc0bb4de10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/7f/0f8c4037fba62be10000000a1550b0/frameset.htm
    Regards.

  • How to handle the stale cheques in EBRS

    Dear Guru's
    Can any bady explain me how to handle the stale cheque cases in EBRS, and what are the possible transaction codes using for that.
    Any help can be greatly appreciated.
    Regards,
    kishroe

    Hi
    any bady know about this plz respond.
    Thanks in Advance
    kishore

  • How to handle the call transaction in method of a custom business object

    Hello all,
    There is a custom report " RPTCORAPP" for approving leaves . As per my requirement i have develop a copy of leave workflow and for approval process i have call  "RPTCORAPP" in Custom method of custom object. i have made a transaction for this custom report for approving attendances. I am calling this method though call transaction statement within method.
    Problem: while approving the attendance workitem is not disappearing from the portal. Problem is due to call transaction statement.
                   once workitem come to the user, user click on it. control goes to the report, which display all the leave to approve on
                   the portal.
                   If after approving/ rejecting attendance user close the screen.workflow remain in the "process" status.Control wont come  back after call transaction statement in the method.
                 At the same time if user clicks on back button inspite of closing the screen. it is working fine. workitem disappears from the portal.
    How to handle the scenarion. if after approving/rejecting, i want the control to come back to the NEXT STATEMENT after call transactionstatement in my method.
    Please help it out........:)

    Hi swami,
    thanks for reply. but i am not using BDC in my method. iam just calling a custom transaction thriugh statement
    Call transaction 'ZHR_APPROVE_CLINOUT'. This transaction directly run the report RPTCORAPP and display all the request.

  • How to handle the table control in bapi?

    how to handle the table control in bapi? example va01.
    i pass multiple line item what is the procedure?
    header detail same .
    eample ship to party
           sale to party.
    line item mulptiple
    10 mat1
    2o mat2
    30 mat3.
    in bapi we can pass sinle line item.
    any way to handle multiple line item pass through the bapi.
    Message was edited by:
            Karthikeyan Pandurangan

    BAPI is not going through the screen flow logic so you need not to worry about the table control. Just check in the BAPi there must be one table parameter for line items just pass one int table with your data to that table parameter it will automatically update the tables.
    Regards
    shiba dutta

  • How to handle the #error in ssrs expression

    hi 
    Please any one help me to resolve this #error ,
    I have a calculated filed in that expression i given a if condition like below 
    data of column is coming like this 0 , 0.0 
    =IIF(Fields!Column1.Value=0,0,((Fields!Column2.Value - Fields!Column1.Value)/( Fields!Column1.Value)))
    how to handle the #error 
    Please let me know any one 

    Hi deepuk23,
    According to your description, when you use the IIF() function in the report you got some error,right?
    The issue can be caused by the column1 and column2 have different datatype, I assumed that one is integer and another is float, when the Column1 is 0 or null,  because IIF() function always evaluates both the true part and the false part, even
    though it returns only one of them, it will throw out the error. 
    To resolve the issue, you should use a nested IIF() function to avoid the zero-divisor in any rate like below:
    =IIF(Fields!Column1.Value=0,0,((Fields!Column2.Value - Fields!Column1.Value)/(IIF(Fields!Column1.Value=0,1,Fields!Column1.Value))))
    For more information, please refer to this article:
    FAQ: Why does the “Attempted to divide by zero” error still happen?
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

Maybe you are looking for

  • How to send multiple documents using SENDMAIL step

    Hi Experts,                      I have  a requirement to send a notification to multiple users using SENDMAIL step. How can I do this? I thought to create a method in the BO and to export ACTOR_TAB to wrkflow but the problem is I am unable to create

  • BB Bold 9780 OS6

    I recently purchased a Bold 9780 OS6, and encounter problem when using browser; i.e. Access Blocked. With my previous Bold 9700, such problem can be solved when one change the browser setting to internet Explorer instead of BB Explorer. Please help.

  • Inputs for Gaming?

    is there any way of connecting my xbox to my imac i know they have tv converters and stuff but im curious if those would work to connect my xbox? please help thank you.

  • Problem in alv dispaly filedcat-edit

    Dear,       i am using filedcat-edit to change the output of alv display but after changing the quantity  and when i pressing  save button it is converting quantity   8.000 to 0.008 . kindly help me. thannk u,

  • PY-ID Previous employment details

    Hi, I read from SAP Help that the system reads PTKP details from infotype 0694 only if we have set the feature IDPTK. Can someone advise what should be the entries to set in the feature IDPTK? It was also mentioned in SAP Help that "If an employee jo