Cutting last char in the XI

hello experts
I have a scenario RFC2WS and sending
  <?xml version="1.0" encoding="UTF-8" ?>
- <rfc:ZRFC_POLICY_OR_INSURANCE xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
  <PASSWORD>kf001</PASSWORD>
  <USERNAME>kfirg001</USERNAME>
  </rfc:ZRFC_POLICY_OR_INSURANCE>
but in the XI I am recieving
  <?xml version="1.0" encoding="UTF-8" ?>
- <rfc:ZRFC_POLICY_OR_INSURANCE xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
  <PASSWORD>kf00</PASSWORD>
  <USERNAME>kfirg00</USERNAME>
  </rfc:ZRFC_POLICY_OR_INSURANCE>
it is always cutting the last char in the username\password. in the RFC it is defined as a String.
I couldnt find out why it is cutting the last char and help would be great.
Thanks
Kfir

Hi,
Is it possible for you to send it with Filed type as CHAR instead of String..
In RFC source code you could handle this kind of conversion.
Try with CHAR...instead of string.
Thanks
Swarup

Similar Messages

  • Compare the last Char to the First Char in a Sting

    Hello, this should be easy but I'm having problems so here goes.
    I get the user to input a Stirng and I want it to compare the last Char to the first Char. I have writen this but StartWith can take a Char?
    public static void main(String[] args) {
            // TODO code application logic here
            String strA = new String();
            int length = 0;
            char lastLetter;
            System.out.println("Please input your first String: ");
                   strA = EasyIn.getString();
                 length = strA.length()-1;
                   lastLetter = strA.charAt(length);
           if( strA.endsWith(lastLetter))
                System.out.println("The first letter matches the last");
           else
                       System.out.println("They Don't match");
    }I have tried lastLetter.endsWith(strA) but that dosn't work some thing to do with it not taking Char
    From reading you can go strA.startWith("R") and that would look for R but you can't put a char in that would be a single letter.
    I also tried to lastletter to a string but then charAt wouldn't work.

    fixed it I used substring as its a string object any one recomend a better way let me know
    public static void main(String[] args) {
            // TODO code application logic here
            String strA = new String();
            int length = 0;
            String lastLetter;
            System.out.println("Please input your first String: ");
                   strA = EasyIn.getString();
                 length = strA.length()-1;
                   lastLetter = strA.substring(length);
           if( strA.startsWith(lastLetter))
                System.out.println("The first letter matches the last");
           else
                       System.out.println("They Don't match");
    }

  • Finding last char in the string

    Hi
    i need to find out whether the last char of a string is '/' (forward slash). please let me know if there's a FM to do that. Other post me the logic for this ASAP.
    thanks

    len = strlen(char).
    len = len - 1.
    if char+len(1) = '/'.
      *write ur code
    endif.
    chk this code
    REPORT ychatest.
    DATA : str(5) VALUE '123/',
           len TYPE i.
    len = STRLEN( str ).
    len = len - 1.
    IF str+len(1) = '/'.
      WRITE : '/ found'.
    ENDIF.
    <b>Reward points if helpful and close thrad if solved</b>
    Message was edited by: Chandrasekhar Jagarlamudi

  • Remove last char

    Ok i am trying to make just a simple calculator program for a class. I am trying to get the backspace button to work. How would i delete the last char in the string.

    use a substring, the last char. will be:
    myString.length
    that will give you the length and from that you know what the last char. is

  • Deleting last char in a string...

    I have a string that is created as follows: strBuffer += k.getKeyChar();(k is KeyPressed ...KeyEvent) How can I delete the last Char in the string strBuffer?

    Hi
    // simply substring
    if (strBuffer.length() > 1)
        strBuffer = strBuffer.substring(0, strBuffer.length()-1);
    // you may also use
    if (strBuffer.length() > 1)
        StringBuffer buffer = new StringBuffer(strBuffer).
                                   deleteCharAt(strBuffer.length()-1);
        strBuffer = buffer.toString();
    }I've not tested the above code myself & I've written the above code on the go after reading your query. The above code definitely work & help you.
    Regards,
    JPassion

  • How to delete the last char in a String?

    i want to delete the last char in a String, but i don't want to convert the String to a StringBuffer or an array, who knows how to do?

    Try it in this way
    String MyString = "ABCDEF";
    MyString = MyString.substring(0,MyString.length()-1);

  • Strange behaviour of StringBuilder. Does not append the last char buffer.

    Below is the source code I am using to read a .gz file and convert it into plain text. I am using StringBuilder to store the whole plain text as a string and also writing the plain text to a file on disk. The writing on disk works perfectly fine, but for some weird reason, the StringBuilder leaves out the last part of the file (run it once and you'll see what I mean), when in fact both the StringBuilder and the OutputStreamWriter get their data from the same while loop.
    import java.util.zip.GZIPInputStream;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.OutputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    public class ProblemInStringBuilder
    public static void main(String args[]) throws Exception
    String inFilename, outFilename;
    inFilename = "somefile.gz"; outFilename = "unzipped file.txt";
    GZIPInputStream gzipInputStream = new GZIPInputStream(new FileInputStream(inFilename));
    InputStreamReader myInputStreamReader = new InputStreamReader(gzipInputStream);
    OutputStream out = new FileOutputStream(outFilename);
    OutputStreamWriter myOutputStreamWriter = new OutputStreamWriter(out);
    int len;
    char[] charBuf = new char[1024];
    StringBuilder builder = new StringBuilder();
    while ((len = myInputStreamReader.read(charBuf)) > 0)
    builder.append(charBuf);
    myOutputStreamWriter.write(charBuf,0,len);
    gzipInputStream.close();
    myInputStreamReader.close();
    myOutputStreamWriter.close();
    System.out.println(builder); // <-- problem here. Leaves out the last part of the file.
    }

    builder.append(charBuf);
    builder.append(charBuf, 0, len);From this error it seems to me you are getting extra characters at EOF (and possibly elsewhere), not missing characters.
    gzipInputStream.close();
    myInputStreamReader.close();Remove the first of those. The second one closes them both.

  • Deleting the last char of a string

    How can I Delete the last char of a string???
    example:
    asd@fdg@vvdfgfd@gdgdfgfd@gdfgdf@
    I want delete the last @!
    Tks in advance!

    hi,
    try this:
    lv_count = strlen(string).
    lv_count_last = lv-count - 1.
    replace string+lv_count_last(lv_count) in string by ' '.
    This should work.
    thnx,
    ags.
    Edited by: Agasti Kale on Jun 4, 2008 9:03 PM

  • AE videos cut to black at the end frame?

    Please help with this, it's driving me insane! as it says a above - I've an 8 sec text intro that is meant to end on the final frame.
    but it cuts to black at the end when I need it to stay on the last frame. - and ideas guys?
    this is when its gone through adobe media encoder and is a finished mp4.
    Cheers,
    Simon

    Open your AE composition and press the o key to go to the last frame. Is it black? If not, then check the last frame in the Adobe Media Encoder or check the last frame of your Render Settings in the Render Cue.
    If you create a comp that is 8 seconds long the last frame will be 7 seconds + the frame rate not 8:00. IOW the last frame of an eight second composition at 30 fps will be 7:29. 

  • Problem with attachtment XLS (last column of the xls)

    Hi,
    iam working on interface in which i will be sending an email along with attachtment where my email along with attachtment are working perfectly ,the problem is with the XLS where the last column of the XLS is taking 255 char which is the length of the field .
    How i have to  restrict it ?
    solution on this would be helpfull .
    Thanks ,
    shankar.
    I have attached the sample code too.
    FUNCTION zemail_send_attachment.
    ""Local Interface:
    *" IMPORTING
    *" VALUE(EMAILID)
    *" VALUE(SUBJECT)
    *" VALUE(ATYPE)
    *" TABLES
    *" ATTACH_FILE STRUCTURE SOLISTI1
    *" BODY OPTIONAL
    This table requires information about how the data in the
    tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT are
    to be distributed to the documents and its attachments.
    DATA objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
    This table must contain the summarized data dependent on each object type.
    SAPscript objects store information here about forms and styles,
    for example. Excel list viewer objects store the number of rows and columns
    amongst other things and PC objects store their original file name.
    DATA objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
    This table must contain the summarized content of the objects identified as binary objects.
    DATA objbin TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
    WITH HEADER LINE.
    This table must contain the summarized content of the objects identified as ASCII objects.
    DATA objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    This table must contain the document recipients.
    DATA reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE .
    This structure must contain the attributes of the document to be sent.
    DATA: doc_ching LIKE sodocchgi1.
    DATA: tab_lines LIKE sy-tabix.
    Create the internal table for body , subject
    DATA: it_body LIKE solisti1 OCCURS 10 WITH HEADER LINE.
    CONSTANTS: con_cret TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
    con_tab TYPE c VALUE cl_abap_char_utilities=>cr_lf.
    Move Body to Internal Table (body into it_body)
    LOOP AT body .
    MOVE body TO it_body .
    APPEND it_body .
    ENDLOOP.
    doc_ching-obj_descr = subject. "Subject of the Email
    Move the Subject and Body to OBJTXT
    objtxt[] = it_body[].
    DESCRIBE TABLE objtxt LINES tab_lines.
    READ TABLE objtxt INDEX tab_lines.
    doc_ching-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    CLEAR objpack-transf_bin.
    objpack-head_start = 1.
    objpack-head_num = 0.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    objpack-doc_type = 'RAW'.
    APPEND objpack.
    Convert IT to Excel format
    IF atype = 'XLS' .
    LOOP AT attach_file .
    REPLACE ALL OCCURRENCES OF '#' IN attach_file WITH con_cret ."INTO objbin.
    IF sy-tabix = 1.
    MOVE attach_file TO objbin.
    ELSE.
    CONCATENATE con_tab attach_file INTO objbin.
    ENDIF.
    APPEND objbin.
    ENDLOOP.
    ELSEIF atype = 'TXT' .
    Convert IT to Text format
    LOOP AT attach_file .
    REPLACE ALL OCCURRENCES OF '#' IN attach_file WITH con_cret. " INTO objbin.
    CONCATENATE attach_file con_tab INTO objbin .
    APPEND objbin .
    ENDLOOP.
    ENDIF.
    DESCRIBE TABLE objbin LINES tab_lines.
    objhead = subject. APPEND objhead.
    Creating the entry for the compressed attachment
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num = 1.
    objpack-body_start = 1.
    objpack-body_num = tab_lines.
    IF atype = 'XLS'.
    objpack-doc_type = atype.
    ELSEIF atype = 'TXT'.
    objpack-doc_type = 'RAW'.
    ENDIF.
    objpack-obj_name = 'ATTACHMENT'.
    objpack-obj_descr = 'TEST'. "Attachment File Name
    objpack-doc_size = tab_lines * 255.
    APPEND objpack..
    reclist-receiver = emailid.
    reclist-rec_type = 'U'.
    APPEND reclist.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = doc_ching
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    SENT_TO_ALL =
    NEW_OBJECT_ID =
    TABLES
    packing_list = objpack
    object_header = objhead
    contents_bin = objbin
    contents_txt = objtxt
    receivers = reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    OTHERS = 99 .
    ENDFUNCTION.

    I had this problem after migrating to JDeveloper 10.1.3. Problem was with inconsistent DB column types. In our case, the DB column was CHAR containing only numbers, but VO defined it as NUMBER. This caused no problem in 9.0.3 we used before.
       <ViewAttribute
          Name="ParentFlagNew"
          IsPersistent="false"
          Precision="1"
          Type="oracle.jbo.domain.Number"
          ColumnType="NUMBER"
          AliasName="PARENT_FLAG_NEW"
          Expression="PARENT_FLAG_NEW"
          SQLType="NUMERIC" >
          <Properties>
             <Property Name ="DISPLAY_LIST" Value ="1=Yes,0=No" />
             <Property Name ="DISPLAY_LIST_sk" Value ="1=Áno,0=Nie" />
             <Property Name ="Renderer" Value ="sk.transacty.cm_iface.bc4j_common.ListFieldRenderer" />
          </Properties>
          <DesignTime>
             <Attr Name="_DisplaySize" Value="1" />
          </DesignTime>
       </ViewAttribute>

  • Want to display a space after last field in the output txt file

    hi
    I want to display a space after last field in the output txt file which is generaed by my program on utility server the last field lengyt we have defined is four and in database it is of three characters and requirement is to disppaly the last fourth field as space in the output file w hich is not shown as the txt file automatically gets closed at the third place as it is the last field in the record and ind atabase records are of therss char only but user wants to display this fourth position in the notepad output file as space ( which is last field in the output file)
    eg
    name house  street country
    record output coming in file
    ram   h3      street3  thn      now this thn which is last field the notepad get closed at thn only
    i want to display one space in last field for the whole of output file
    ie ram      h3   street3  thn(space)
        sham   h4  street4   sgp(space)  so on......
    we need to show this space in the output file as blank
    regards
    Arora

    hi Atish
    i am using
    loop at gt_sagadr_outtab into wa_sagadr_outtab
    move wa_sagadr_outtab-country to wa_sagadr_text+223(226).
    endloop
    in this last field ie country i need to display the last 226 as blank as only country key is two char in database so the last space is not shown
    i am not unsing the fM as tolb by  you
    and afterwards
    i am usning
    Concatenate 'Sagadr_' sy-datum sy-uzeit '.dat' into gv_filename_sagadr.
    CALL FUNCTION 'FILE_GET_NAME'
      EXPORTING
      CLIENT                        = SY-MANDT
        LOGICAL_FILENAME              = gc_lfile
        OPERATING_SYSTEM              = SY-OPSYS
        PARAMETER_1                   = gc_param1
        PARAMETER_2                   = gc_send
        PARAMETER_3                   = gv_filename_sagadr
      USE_PRESENTATION_SERVER       = ' '
      WITH_FILE_EXTENSION           = ' '
      USE_BUFFER                    = ' '
      ELEMINATE_BLANKS              = 'X'
      IMPORTING
      EMERGENCY_FLAG                =
      FILE_FORMAT                   =
        FILE_NAME                     =  gv_filepath_sagadr
    EXCEPTIONS
      FILE_NOT_FOUND                = 1
      OTHERS                        = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    and lastly
    open dataset gv_filepath_sagadr for output in text mode encoding default.
        if sy-subrc eq 0.
         loop at gt_sagadr_text into wa_sagadr_text.
         transfer wa_sagadr_text to gv_filepath_sagadr.
         endloop.
        endif.
       close dataset gv_filepath_sagadr.
        if sy-subrc = 0.
        message S002 with gv_filepath_sagadr. "Files & created on Application server
        endif.
    SO NOT SURE WHERE TO USE THE CODE AND HOW

  • If i bounce my project the bounced file is not the same as the original. it has about ten seconds at the beginning free and the end is 10 sec cut off. what is the bug?

    if i bounce my project the bounced file is not the same as the original.
    it has about ten seconds at the beginning free and the end is 10 sec cut off.
    what is the bug?
    i start the bouncing with the transport lokator as 1 1 1   1
    and ends where it sould be over.
    but the first 10 seconds are silent then it starts with the beginning of the song and the last 10 seconds are cut off.

    hello,
    this is a screeshot of my problem.
    the first pic as it should be
    second  with my problem
    this happens after some bounces and not regular.
    i dont wont to have this.
    i have two pics i would like sending to you.
    thanx,

  • Printing in Mail Cutting last line on page in half

    I have a friend, using a Macbook Pro 15", who has noticed since the last upgrade to 10.9.4 that whenever he prints a multi page document in OS X mail that the last line on the page prints half on one page and half on the next.  Default paper size is A4 (standard in NZ). Text also splits if print to Preview. Discovered it the default paper size is changed to US letter that text no longer splits.
    To try and find out what could be causing this I tried to duplicate the problem in my MacBook Pro 17"  also up to date with  OS X 10.9.4. On my machine with paper default set to A4 prints multi page document without cutting the last line, i.e., paginates between lines. Changed my default us US Letter and it split the last line in half.  Same problem but with different form default.
    Any one know what setting is controlling whether it paginates between lines or on the line? How to stop mail from cutting the last line on the page up with half on each page?

    The line spacing isn't exact by default. I presume you use Pages 08 or 09. In the Inspector > T tab > Line < Click on the small arrows to the right and choose Exactly

  • Last Char on a line

    I have a file that cat -e shows that the last char of each line is M-J.
    (" Non-ASCII characters (with the high bit set) are printed as `M-' (for meta) followed by the character for the low 7 bits.)
    Now, I can remove this with sed 's/.$//' but, what is char M-J, if I wanted to remove this with the actual char in sed (instead of using the wildcard ".$") ?

    Glad it worked. At first I was sure the M-J was somehow really ^M so I thought it was just a DOS/Windows CRLF file, especially since the 0xCA character didn't make any sense to me. Now I see (thanx to Niel!) that the character is the non-breaking space of the MacRoman character set. Still, not a common thing to see.
    BTW, this example uses a bash feature to insert the 0xCA character into the command line, so it probably won't work with other shells. If you put this line into a shell script, be sure to add
    "#!/bin/bash" at the top.
    Quoting special characters in the shell can be tricky and you don't show your entire command line, so I can't be sure if you had quoting around what you show. I showed the entire command, which worked for me, so I assume the difference is accounted for quoting that you didn't show.

  • How to remove last char in a string by space

    I have to implement backspace application(remove a last char in a string , when we pressed a button).
    for ex: I enter the no
    1234
    instead of 1236
    So when i press a button on the JWindow... it should display
    123
    so that i can enter 6 now.
    I tried to display the string "123 " instead over "1234" but it is not working when the no background is specified. but works fine when a background color is specified.
    The string is displayed as
    Graphics2D g = (Graphics2D)window.getGraphics();
    AttributedString as = new AttributedString(string, map);
    g.drawString(as.getIterator(),x,y);
    In the map, the background is set to NO_BACKGROUND.
    Thanks and regards

    Deja vu. I saw this kind of post before, and I'm sure
    it was today.http://forum.java.sun.com/thread.jspa?threadID=588110&tstart=0
    Here it is.

Maybe you are looking for

  • Is there a service to list invoice types and all invoices for a customer?

    Hi gurus! The header/subject speakes for it self: is there a service method that lists all available invoice types? The customer uses ecc with ehp3 and I have only found a service for getting an invoice for an invoice Id. But I also want to list all

  • Line item is rejected in the contract but release order is created.

    Dear all, as i mentioned that the line item is rejected in the contract so it should not allow to create the release prder or any further process but then also it is allowing to create release order. please help is resolving the issue is it a product

  • Multiple Airplay Options?

    Can I choose multiple devices at once for Airplay? Meaning, can I choose the audio from music to Airplay to the iPad, my Apple TV and an Express powered set of speakers? When I press the Airplay icon they all come up, but so far am only able to choos

  • Change step parameters in teststand edit mode

    Hello, I would like to know if it's possible to change the parameters in a step in edit mode of teststand. I have attached a sequence with one step, in this step I want to select DMMx. After the selection I want to teststand to fill in the parameters

  • SAP HP Adapter don't synchronize business requirement and test requirements

    Hello, I need a help. We have a customized project of HPQC here and we need to replicate the business blueprint from Solman to HPQC requeriments module. We perform the step-by-step of the HP SAP Adapter installation guide and the connection was perfo