Take  only the last 10 letters

Hi Experts,
How can you say take  only the last 10 letters of a char(32).
e.g. here only 2222222222.
data lv_1(32) type c.
lv_1 = 'yyyyyyyyyyyyyyyyyyyyyy2222222222'.
Thx
Sas Erdem

Hi,
just by taking hardcoded offset would not solve your purpose dynamically as for an example if the string is of 22 characters then last 10 will be space....
if you want dynamically last 10 characters then use the code given below.
data : lv_1(32) type c,
         lv_len type i.
lv_len = strlen( lv_1 ).
if lv_len < 10.
  write lv_len.
else
  lv_len = lv_len - 10.
  write lv_1+lv_len(10).
endif.
This will surely resolve your issue for dynamic purpose
Regards,
Siddarth

Similar Messages

  • How can I get only the last 2 rows?

    How can I narrow down a query to get only the last two rows in a table ?
    Thanks,
    Mohan

    Thanks a lot Ram for your suggestion but already I have a query which returns a set of rows, of which I would like to further filter and get the last two rows
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Ramanuj Bangad ([email protected]):
    try out something like this if it helps.
    Example:
    select * from users
    where rownum <= (select count(*) from users)
    minus
    select * from users
    where rownum <= (select count(*) -2 from users )
    <HR></BLOCKQUOTE>
    null

  • I have upgrade to IOS 8 and all Fotos are ereased and on my Computer is only the last Backup and there a no Photos now what can i do?

    I have upgrade to IOS 8 and all Fotos are ereased on my Iphone and on my Computer is only the last Backup and there a no Photos now what can i do?

    You really need to try this on a computer, not on the iPad.
    Seeing how what is in the cloud is also on the iPad, if the content is not on the iPad, there is a good chance that the content is lost. But you can try logging into www.icloud.com in a web browser on a computer and log into your account and see if you can get into the Pages app. You may have to sign up for iCloud drive if you didn't do so already. Make SURE you that you read the blurb that will pop up in that window in iCloud for more information.

  • Only the last line item is shown in main window...

    Hello Experts,
    I created a custom form for the standard checque program RFFOUS_C. Now, in my MAIN window, I
    called a subroutine in a custom program which loops through the line items but the problem is
    only the last line item is being shown. I tried using CONTROL_FORM to create a new line
    but it does not work. Note that I did not customize RFFOUS_C since it is being used by
    multiple companies. Below is my code:
    SAPSCRIPT:
    510-C
    Begin of insertion DEVK940799 11/10/2008 DEL_HIDALGO
    DEFINE &LTYC_XBLNR& = ''
    DEFINE &LTYC_BLDAT& = ''
    DEFINE &LTYC_SGTXT& = ''
    DEFINE &LTYC_DMBTR& = ''
    PERFORM WRITE_LINE_ITEMS IN PROGRAM Z9999RFI_Z2574FFI_RA
    USING &REGUH-LAUFD&
    USING &REGUH-LAUFI&
    USING &REGUH-XVORL&
    USING &REGUH-ZBUKR&
    USING &REGUH-LIFNR&
    USING &REGUH-VBLNR&
    CHANGING &LTYC_XBLNR&
    CHANGING &LTYC_BLDAT&
    CHANGING &LTYC_SGTXT&
    CHANGING &LTYC_DMBTR&
    ENDPERFORM
    PROTECT
         &LTYC_XBLNR&     &LTYC_BLDAT&     &LTYC_SGTXT&     &LTYC_DMBTR&
    ENDPROTECT
    End of insertion DEVK940799 11/10/2008 DEL_HIDALGO
    PROGRAM:
    IF gt_regup[] IS NOT INITIAL.
        CALL FUNCTION 'OPEN_FORM'
           EXPORTING
    *         APPLICATION                       = 'TX'
    *         ARCHIVE_INDEX                     =
    *         ARCHIVE_PARAMS                    =
    *         DEVICE                            = 'PRINTER'
    *         DIALOG                            = 'X'
             form                              = lcc_z2574ffi_ra
    *         LANGUAGE                          = SY-LANGU
    *         OPTIONS                           =
    *         MAIL_SENDER                       =
    *         MAIL_RECIPIENT                    =
    *         MAIL_APPL_OBJECT                  =
    *         RAW_DATA_INTERFACE                = '*'
    *         SPONUMIV                          =
    *       IMPORTING
    *         LANGUAGE                          =
    *         NEW_ARCHIVE_PARAMS                =
    *         RESULT                            =
           EXCEPTIONS
             canceled                          = 1
             device                            = 2
             form                              = 3
             OPTIONS                           = 4
             unclosed                          = 5
             mail_options                      = 6
             archive_error                     = 7
             invalid_fax_number                = 8
             more_params_needed_in_batch       = 9
             spool_error                       = 10
             codepage                          = 11
             OTHERS                            = 12.
        IF sy-subrc <> 0.
    *        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        LOOP AT gt_regup INTO lw_regup.
          m_line_items 'LTYC_XBLNR' lw_regup-xblnr.
          m_line_items 'LTYC_BLDAT' lw_regup-bldat.
          m_line_items 'LTYC_SGTXT' lw_regup-sgtxt.
          m_line_items 'LTYC_DMBTR' lw_regup-dmbtr.
          DELETE ex_output WHERE value IS INITIAL.
          CALL FUNCTION 'WRITE_FORM'
           EXPORTING
             element                        = '510-C'
             function                       = 'APPEND'
    *         TYPE                           = 'BODY'
             window                         = 'MAIN'
    *       IMPORTING
    *         PENDING_LINES                  =
           EXCEPTIONS
             element                        = 1
             function                       = 2
             type                           = 3
             unopened                       = 4
             unstarted                      = 5
             window                         = 6
             bad_pageformat_for_print       = 7
             spool_error                    = 8
             codepage                       = 9
             OTHERS                         = 10.
          IF sy-subrc <> 0.
    *        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          CALL FUNCTION 'CONTROL_FORM'
            EXPORTING
              command   = 'NEW-LINE'
            EXCEPTIONS
              unopened  = 1
              unstarted = 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.
        ENDLOOP.
        CALL FUNCTION 'CLOSE_FORM'
    *       IMPORTING
    *         RESULT                         =
    *         RDI_RESULT                     =
    *       TABLES
    *         OTFDATA                        =
           EXCEPTIONS
             unopened                       = 1
             bad_pageformat_for_print       = 2
             send_error                     = 3
             spool_error                    = 4
             codepage                       = 5
             OTHERS                         = 6.
        IF sy-subrc <> 0.
    *        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.

    Hi,
    Write the at last event in the program and check if it works
      At last.
           CALL FUNCTION 'CONTROL_FORM'
            EXPORTING
              command   = 'NEW-LINE'
            EXCEPTIONS
              unopened  = 1
              unstarted = 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.
    Regards,
    Sravanthi

  • How to get the only the last raw of the table

    Hello All,
    While fetching a table into internal table, how to get only the last record of the table.?
    Thanks and Regards, Pradeep

    I hope following code will solve your problem.
    DATA : it_bseg TYPE TABLE OF bseg,
           x_bseg TYPE bseg,
           v_index TYPE i.
    SELECT COUNT(*)
      FROM bseg
      INTO v_index.
    SELECT *
      FROM bseg
      INTO TABLE it_bseg.
    READ TABLE it_bseg INTO x_bseg INDEX V_INDEX.
    First SELECT will give you the number of rows in a table in v_index. Second SELECT will fetch all table data and then READ will give you the last record of the table in a structure x_bseg.
    Reward points if the answer is helpful.

  • RFC - XI - JDBC(mapping only the last row of a record)

    Hello all,
    in a mapping response from an oracle base after a RFC call with a select statement, i have the following response :
    <StatementSelect_response>(cardinality 0..1)
    <row1>(cardinality 0..unbounded)
    <field1>1</field1>
    <field2>2</field2>
    </row1>
    <row2>
    <field1>3</field1>
    <field2>4</field2>
    </row2>
    </statement>
    i have to map those fields in a RFC_response like :
    <RFC_response>(0..1)
    <field1>
    <field2>
    </rfc _response>
    Problem : I only need to send back to the rfc_response the last records of my StatementSelect_response in order to have the following message :
    <RFC_response>
    <field1>3
    <field2>4
    </rfc _response>
    How can i select only the last row of my records plz ?
    Thanks by advance

    VJ wrote:>
    > Hi,
    >
    > public void LastRow(String[] a,ResultList result,Container container){
    >
    > int len = a.length();
    > Result.addValue(a\[len-1\]);
    >
    > }
    VJ,
    Please don't confuse him. If you want to update the thread, let me leave it aside.Coz it shouldn't cause him trouble. Can u check a.length() is correct? it has to be a.length, isn't it?
    We all here to help others, not under any motivation of compete..
    Sorry, if I hurt you..
    raj.

  • Urgent: Gif animation shows only the last frame when reloaded

    I use ImageIcon to show gif animations on screen. I want to use only non-looping gif animation files.
    Always when I show a gif animation for the first time it runs correctly through all the frames.
    However when reloading later the same gif animation only the last frame appears. I want to see all the frames of the animation, not only the last frame.
    So for the first showing of the animation this works well:
         icon = new ImageIcon("first_animation.gif");
           label = new JLabel();
           label.setIcon(icon);Then I show another animation and also it works well:
           icon2 = new ImageIcon("second_animation.gif");
           label.setIcon(icon2);Now I would like to show the first animation again but only the last frame of that first animation appears on screen:
    label.setIcon(icon);And even this alternative way to refresh does not work:
           icon = new ImageIcon("first_animation.gif");
           label.setIcon(icon);
    How can I reload the first animation again so that it shows all the frames not only the last frame???
    I have tried for ex. commands updateUI(); and setImageObserver but they don't seem to help.
    I am only a novice so...
    Please I would really appreciate your detailed advice what lines I should rewrite in my code and how?
    Thank you very much!!

    By flagging your question "urgent", you are implying that either your question is more important than other people's questions, or your time is more valuable than mine (or someone else's answering questions here). Both are not true.

  • I brought a cd and only the last 3 songs downloaded and cant download the rest without buying it again

    I brought a cd and only the last 3 song's downloaded if I download it again will I be charged again for it as it is saying the payment will come from my account

    Store>Check for Available Downloads
    If this fails:
    How to report an issue with Your iTunes Store purchase

  • Index an array of images only the last image shows

    Hi everyone,
    I try to index an array of images and all but the last element give me the error: "not an image."
    Here is a picture of the vi. The first for loop loads the images and stores them in an auto indexed tunnel. Every diagnostic I ran on this loop showed everything is fine. The second for loop should display the sequence of image stored in the auto indexed tunnel, but it does not. Instead I have the error message that elements 0 to n-1 are not images, and only the last image is displayed.
    What am I doing wrong?
    Thanks for your help.
    and the vi: 
    Solved!
    Go to Solution.
    Attachments:
    PulsedImageDisp1.vi ‏31 KB

    Speed of what? The second loop can't run until the first loop is done, and all the operations are linear. I'm guessing you're referring to the perceived speed of displaying the images one after the other so you don't have to wait for the next image to be read which is why you pre-load all the images. Otherwise, the overall speed should be the same whether you use one loop or two. Actually, to be technically accurate, the two loop version will likely be a little slower overall since LabVIEW has to allocate more memory to store all the images, while in the one loop version it is only ever dealing with one image. If the images are large then you might actually run into a memory issue with the two-loop version (arrays need contiguous memory). Just something to keep in mind and to be careful about.

  • How to remove only the last element of spreadsheet string

    I use path to string option to store image path into database and while retrieving the string is again converted into path but it gives out an error as the output of array to spreadsheet string gives out a tab at the end which is unable for the IMAQ read file to recognise.but when i use the path of the image directly into IMAQ readfile the image is opened . so how to remove the tab only at the end of output of the spreadsheet string(whose length can vary)? I have also attached my program with this.
    Attachments:
    retrieve_images_from_DB.vi ‏65 KB
    file_path_to_db_(images).vi ‏40 KB
    create_table_for_images.vi ‏45 KB

    indhu wrote:
    > Thanks for your reply!
    > But my problem is to remove only the last element(which is a tab or an
    > alphabet) from a spreadsheet string of any length.
    If you just want to remove the last character of a string just use the
    String Size function reduce the result by one and wire it together with
    the string to the Split String function.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Display only the last record per material in SAP query

    Hi,
    I have created a SAP Query using the quickviewer that is a join between 2 tables (MSEG and MKPF) that consist of material document information and date of posting.
    The results are fine however I would like only the last record per material to be displayed.
    Can anyone tell what do I need to add so for only the last record per material be displayed in the output.
    Thanks,
    Mark

    Hi Mark,
    May be if you use Control Level processing .........I think you will be able to get the result you want. Try displaying as Below,
    LOOP AT XXXXX.
    AT FIRST material.
    ENDAT.
    AT LAST material.
    *...Display what ever you want here. It will display at end of every material.
    ENDAT.
    ENDLOOP.
    Before using sort the table with key material in ascending.
    Hope what I had to say is helpful to you.
    Cheers,
    Raga Suman.

  • I have a question about the suggestion that only the last tab loaded shows up so Firefox can load faster.

    My question is this:
    If I do as you suggest in the General Tab of Preferences - see below - how do I get all the other tabs back if only the last one shows? If they are hidden, I need to know how to access them.
    Your directions which I need help with....Don’t load tabs until selected. Voila! Now, only the last tab you were working in will be loaded on startup.
    THANKS.

    The Tabs are all there, the only thing this preference does is tell firefox to only download the open tab. If you click on the other tabs, they will download too. The theory is, by only downloading and displaying one webpage, it can be displayed for you faster than if 5 webpages were being downloaded at once.

  • Formatting only the last breadcrumb in a trail

    I am using RoboHelp for HTML 8.0.0.203 to generate a .CHM file.
    I would like to know if it is possible to apply bold style to only the last breadcrumb in each trail. Can this be done, and how?
    Thanks.

    If you use table interface you can display data in the format you like.
    But for that you need to publish ur query in WAD

  • Is it possible with iphone4 to delete only the last tel number called?

    is it possible with iphone4 to delete only the last tel number called?

    At the present, no...it's all or nothing.

  • HT4075 I don't have any problems merging the documents by dragging, but when I try to save and open afterwards, only the last shown doc was saved, not the combined files I wanted to merge. I tried save and export, how can I create the file after merging?

    Hi, I'm having trouble saving the documents when merging in Preview. I don't have any problems merging the pdf documents by dragging them in preview, but when I try to save and open afterwards, only the last shown doc was saved, not the combined files I wanted to merge. I've tried save and export, but none merge the documents after saving... how can I create the file (with all the pdf files) after merging?

    That's a comment in the file. It has no effect at all.

Maybe you are looking for

  • Hiding a column in a JTable

    How can I code something so that when I click on a button, it will go and hide or show various columns from the table? I want to do this, so the JTable won't take up the whole screen. Vermelh0

  • Problem with syncing ipod

    Hi, I just bougt the new ipod and am experiencing problems when syncing my music. when transferring my library (10gb) the progress bar in itunes freezes at random and does not continue transferring songs. everything works perfect with my nano, that's

  • Buying iPod touch – how to find out whether it is a box with FW 1.1.3?

    Hi, does anyone know from which serial number on the iPod touch 16 GB model does come with firmware 1.1.3 or higher from factory? How can I find out whether firmware 1.1.3 is shipped on a sealed iPod touch in retail stores? Want to buy in Germany. Ch

  • Cancel the Release to Accounting but not the Billing Document

    Hi Gurus, Is there a way to Cancel the release to accounting billing document but it will not cancel the billing document. I can't cancel the billing documen because it is already used as a reference to one of our orders. I hope you can help me... Th

  • Data-sources in EAR

    Dear JDev team, Although some topics on the subject already exist, I'd like to say some words concerning data-sources.xml creation in EAR too. Now (Jdev9032) it is automatically created from existing Database connections. When some of these data-sour