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

Similar Messages

  • How to add a SPACE as suffix to the last field in the downloaded text file?

    Hi Experts,
    By using GUI_DOWNLOAD am saving the data(only 3 fields) in a text file on my desk top.
    fine.
    example current record1 : 010001                      354.999            26.000
    here, after 3rd field 26.000, immediately the cursor is jumping to next line in text file.
    but, wanna a SINGLE SPACE after 26.000, say 26.000+space.
    tried with CONCATENATE, OFFSETTING, but no use(may b am using incorrectly)
    so, pls. suggect me, How to add a SPACE as suffix to the last field in the downloaded text file?
    thanq

    Sorry...Typo error...Too many in the last few days -:(
    Wanted to say AFTER -:)
    Do it like this...
    FIELD1 TYPE XXX,
    FIELD2 TYPE XXX,
    FIELD3 TYPE XXX,
    SPACE(1) TYPE C,
    That way you should end with...
    26.000+SPACE
    Greetings,
    Blag.

  • TS4498 Can i move my installation of Logic 10 to another hard drive, as its nearly full and i want to free up space so i can install the additional audio files too.

    Hi All,
           ....i've recently bought and downloaded Logic Pro X.........the software is great.......i love it. But when i bought it from apple, it gave me no choice where to install it. It just went ahead and installed it in the drive which has my operating system in it. Which, in itself is not a problem........but, in my case, the hard drive in question is almost full...........so when i decided to add the additional audio files which come with Logic...........a message was displayed that not enough free space is available for additional audio files.......please remove files to free up space!  
            I would love to free up space, but i only have a small 64gb SSD (which is where my operating system is installed). Normally, by moving files around (to another hard drive for example) would be the answer to this problem, but.........and here's the problem..........Logic, and my operating system cannot be moved to another hard drive, once installed it seems logic is there for good.
            Come on Apple!!!!!!!!!!.................i have a terrabyte of space on my other hard drive!! ready and waiting for some music files and or Logic!!!!  .........why on earth could you not of given me the option of an installation disk choice!!!!!
          .......well, it seems i'm stuffed now, and £130 lighter in the pocket. I could be the next Mody or Fat Boy Slim............but alas............it's not even looking like i'm gonna even be a one hit wonder.
         ........if anyone knows how to move logic to another destination drive, please help and when i'm famous, i'll sing at your wedding :-)

    The vast majority of applications must be install on the system drive in order to run correctly.
    Generally the applications take up very little disk space. It is usually the files they produce that need the space. Seeing as how I don't use Logic I can't do this but you might want to check how to move the files generated by Logic to another drive.
    Allan

  • ALV: how to display only subtotals and total rows in the output

    ALV: how to display only subtotals and total rows in the output
    i am getting output
    i am getting subtotals for respective fields
    but i want to display only subtotals and totals rows in the output
    i have tried the
    totals_only   parameter in slis_layout_alv
    but it is not working.

    hi,
    For TOTAL
    For the amount field / quantity field in the field catalog give DO_SUM = 'X'    for WHOLE total
    For SUBTOTAL
    For subtotal you will have to create an internal table sort..Let's say you want to do subtotal for each customer..
    DATA: lt_sort type SLIS_T_SORTINFO_ALV,
    ls_sort type slis_sortinfo_alv.
    CLEAR ls_sort.
    ls_sort-spos = 1.
    ls_sort-fieldname = 'Give the field name that you do the sum'.
    ls_sort-up = 'X'.
    ls_sort-subtot = 'X'.
    APPEND ls_sort TO lt_sort.
    fieldcatalog-do_dum = 'X'.
    for subtotals
    WA_SORT-FIELDNAME = 'ERSDA'.
    WA_SORT-SPOS = '2'.
    WA_SORT-UP = 'X'.
    WA_SORT-SUBTOTAL = 'X'.
    APPEND WA_SORT TO IT_SORT.
    Refer
    http://help.sap.com/saphelp_erp2004/helpdata/en/ee/c8e056d52611d2b468006094192fe3/content.htm
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/doesnt-function-event-subtotal_text-in-alv-713787
    regards,
    Prabhu
    reward if it is helpful

  • ADDING A DATE FIELD IN THE OUTPUT SCREEN OF Tcode FBL1N

    Hi guys..I want to add a From-->To 'DATE' field in the output screen of Tcode 'FBL1N' in the line items header part....Please tell me how to do this..??

    Hi,
    Unfortunately you can't add these fileds using with Settings>Layouts>Current header rows, you can only add the field Open items as on date.
    Rgds
    Murali. N

  • Is there any option of hiding ( no display)  a field from the output list.?

    Hi,
       i have a requirement where  i should not be display the field in the output but need to use the field in the write stmt .
    example :
    write : / itab-field1 ,
                 itab-field2.
    but in the output list i dont want the field 2 to be dispalyed  is there any way for this.
    kindly help me out.
    thanks and regards,
    vikram

    Hi Vikram,
    Just clear the field value before the write statement. It will solve the issue.
    Loop at itab into wa.
    clear wa-field1. " say suppose if you dont want to display field1 of itab
    write  wa-field1 
    write / wa-field2
    Endloop.

  • Need a pipe delimiter after every field in the file on application server

    Hi ,
    i have to transport data in internal table to a file on application server.
    I have done this successfully. But the problem is i have to put a pipe
    delimiter after every field in the file on application server.
    Could yoe plz help in  this issue.
    Thanks & Regards
    Suresh kumar D

    Hi Should,
              I think the below code should solve your problem as i also had  a similar type of requirement and this was the code i had used in my program.
      FIELD-SYMBOLS: <FS> TYPE ANY.
      DATA: L_FLINE TYPE STRING.
    Open file for output
      M_CHECK_SELSCR_FNMS O1 O.
      LOOP AT I_TARGET.
    Write records to file
        DO.
          ASSIGN COMPONENT SY-INDEX OF STRUCTURE I_TARGET TO <FS>.
          IF SY-SUBRC EQ 0.
            IF SY-INDEX EQ 1.
              MOVE <FS> TO L_FLINE.
            ELSEIF <FS> NE C_PIPE.
              CONCATENATE L_FLINE C_PIPE <FS> INTO L_FLINE.
            ELSE.
              CONCATENATE L_FLINE <FS> INTO L_FLINE.
            ENDIF.
          ELSE.
            TRANSFER L_FLINE TO W_SRVR_NM_O_O1.
            EXIT.
          ENDIF.
        ENDDO.
      ENDLOOP.
    Close file
      CLOSE DATASET W_SRVR_NM_O_O1.
      IF SY-SUBRC EQ 0.
        MESSAGE S208(00) WITH TEXT-M02.
      ENDIF.
    Regards
    Sikha

  • I have a sharepoint custom list with Title and image attachments, now i want to display image attachments in div based on the title.

    hi,
    i have a sharepoint custom list with Title and image attachments, now i want to display image attachments in div based on the title.

    i am using the below code only
     SPSite mySite = new SPSite("http://sharepoinsiteaddress");
    SPWeb myweb = mySite.OpenWeb();   
    SPList myList = myweb.Lists["Announcements"];   
    SPListItem myListItem = myList.GetItemById(1);   foreach (String attachmentname in myListItem.Attachments)
    String attachmentAbsoluteURL =    myListItem.Attachments.UrlPrefix // gets the containing directory URL
       + attachmentname;
       // To get the SPSile reference to the attachment just use this code
      SPFile attachmentFile = myweb.GetFile(attachmentAbsoluteURL);
       // To read the file content simply use this code
       Stream stream = attachmentFile.OpenBinaryStream();    StreamReader reader = new StreamReader(stream);
       String fileContent = reader.ReadToEnd();
    here i am using panel, how can i attach this attached image to panel

  • Hi gurus in scripts i want to display more then one main window on the page

    hi gurus in scripts i want to display more then one main window on the page how it is to follow any body explain to me plz.

    Hi all,
        I am printing check printing from F110 with Z-form and it has been assigne to FBZP also..
        My client need to print the check information twise that means main window data two times.
        like this: 
           First main window.  :      invice#       amt            amt
                                               9002          4000          4000
                                               9005          5000          4000
    Al so they want like to print same in down part of the main window.
           First main window.  :      invice#       amt            amt
                                               9002          4000          4000
                                               9005          5000          4000
    For this i  have created instance main window of main window like MAIN    01,  but it is not displaying the data in instnce window data
    in the instance main window. 
    Question: Could you please let me know abt the same or good solution. How to cal main window instance , i tried with  
    /:   NEW-WINDOW      in instance main window part but it also appering in main windoe also.
    could you please let me know how to call instance main window or any other solution to get teh data like my example above.
    thx

  • Junk Characters in the output XML file after Parsing

    Hi
    I am using DOM parser to parse an XML file.
    After parsing the input XML file, i am fetching some contents
    from the same and also putting the same contents in the parsed output file which is also an XML file.
    The problem here is that the after putting the contents to the output XML file from the input XML file,
    some junk character appears at the end of each and every tag in the outputfile.
    The junk character is some thing like this : " ampersand hash thirteen and a semicolon "
    (*THE MESSAGE DID NOT ACCEPT THE SYMBOLS KINDLY TRANSLATE THE ABOVE WORDINGS*
    INTO SYMBOLS)
    This character gets appended at the end of each and every tag in the output file due to which the output file
    is not recognised as an XML file.
    Please let me know as to why is this character appearing and also please suggest some solution
    for the same.
    -Thanks in Advance.
    Edited by: itskarthik on Oct 10, 2008 7:16 AM
    Edited by: itskarthik on Oct 10, 2008 7:18 AM
    Edited by: itskarthik on Oct 10, 2008 7:19 AM
    Edited by: itskarthik on Oct 10, 2008 7:19 AM
    Edited by: itskarthik on Oct 10, 2008 7:23 AM
    Edited by: itskarthik on Oct 10, 2008 7:23 AM

    Wierd.
    Try this piece of code. (You can always change it to use input file and output file instead of string if you want)
    What is your output?
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    public class XMLTest {
         public static void main(String[] args) throws Exception {
              String input = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" +
                                  "<test>\r\n" +
                                  "</test>";
              System.out.println("Input:");
              lookForCR(input);
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
              Document doc = factory.newDocumentBuilder().parse( new ByteArrayInputStream(input.getBytes()) );
              Source source = new DOMSource(doc);
              ByteArrayOutputStream bArrOut = new ByteArrayOutputStream();
              Result result = new StreamResult( new StripOutputStream( bArrOut ) );
              Transformer xformer = TransformerFactory.newInstance().newTransformer();
              xformer.transform(source, result);     
              System.out.println("\nResult:");
              lookForCR(bArrOut.toString());
              System.out.println("\nDone");
         public static void lookForCR(String input) throws Exception {
              char[] chars =input.toCharArray();
              for ( char chr : chars ) {
                   if (chr == 13 ) {
                        System.out.println("Has 0x0D character!!");
    class StripOutputStream extends OutputStream {
         OutputStream out = null;
         public StripOutputStream(OutputStream out) {
              this.out = out;
         @Override
         public void write(int b) throws IOException {
              if ( b != 13 )
                   out.write(b);
    }- Roy

  • Dynamic field on the output screen

    Hi All,
    I have a requirement to create the dynamic field on the output screen.
    In the basic list I am displaying the production order details like
    check box, production order , materials, quantity, etc.
    If I select the particular check box , the quantity pertaining to that check box line as to display on the dynamic field. If I select more than one check box, then the cummilative quantity of all the production orders has to display on the dynamic field.
    Thanks in advance.
    Ramesh.

    hi,
      you can define a dinamic fields depending on selection of check box.
      Go through the below code. I think it may help you.
    PARAMETERS:
      P_CB1 AS CHECKBOX,
      P_CB2 AS CHECKBOX,
      P_A TYPE I MODIF ID XXX DEFAULT ' ',
      P_B TYPE I MODIF ID YYY DEFAULT ' '.
    DATA:
      W_C1,
      W_C2.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-GROUP1 = 'XXX'.
          SCREEN-ACTIVE = 0.
          MODIFY SCREEN.
        ELSEIF SCREEN-GROUP1 = 'YYY'.
          SCREEN-ACTIVE = 0.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
      IF P_CB1 EQ 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'XXX'.
            SCREEN-ACTIVE = 1.
            SCREEN-INPUT  = 1.
            SCREEN-OUTPUT = 1.
            SCREEN-INVISIBLE = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF P_CB2 EQ 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'YYY'.
            SCREEN-ACTIVE = 1.
            SCREEN-INPUT  = 1.
            SCREEN-OUTPUT = 1.
            SCREEN-INVISIBLE = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.

  • How to remove the extra space in the output pdf file?

    Hi All
    In our RTF layout template we have both static content and dynamic content.
    In RTF template we have used many if-else,choose,For each loops.
    On the account of that,In the output pdf file, we are getting lot of empty space in the place of that coding(if-else,choose,For each loops).
    Is there anyway to reduce the space in the output pdf file?
    Please suggest some ideas.
    Thanks in Advance.

    White space is NOT your friend!
    Make sure you don't have any unwanted whitespace between commands and especially tagged on the end of lines. Chain your commands together with no whitespace and let them wrap, do not enter carriage returns.
    Cheers,
    Dave

  • What are all the ways that can add fields in the output list of FBL3N transaction?

    Hello dear experts,
    There is this transaction FBL3N, which you might be aware of. Now, the requirement is to add 4 new fields in the output list of the standard program.
    The fields are:
    NAME1   KNA1
    LOKKT    BSEG
    USNAM   BKPF
    TXT50      SKA1 -> SKAT
    Please tell me how to do this apart from implementing the note 310886. What are the other ways?

    I agree, start reading 984305 - Line item: Definition of special fields (T021S)
    Then for non BSEG/BKPF fields, better use BAdI FI_ITEMS_CH_DATA (1323512) and not the good old BTE 1650, the BAdI will be called once with the full internal table with special fields already filled, when the BTE will be executed for each and every record without special fields, so harder to optimize, and may require access to BKPF/BSEG for missing fields.
    Regards,
    Raymond
    PS: Did you use search tool, there are already many discussions/threads on this subject.

  • Simple??? Want "INSERT" function to return blank space after a field, how?

    All,
    Am I just having a brain fart? I have a situation where I have a field that needs to return just one space, or a value that has a space before and after it.
    Example:
    In the text ==> I am<field>going to the office. <-- notice no space between am, <field> and going
    I want it to say if FALSE, then "I am *not* going to the office."
    If true, then "I am going to the office."
    If true, I'm simply RETURN(""); <-- This returns a blank space
    If FALSE, I have tried:
    ret="not"
    RETURN(" " & ret & " ");
    This returns "I am notgoing to the office". <-- Notice no blank space after "not"?
    I've tried
    ret="not";
    ret2=(" " & ret);
    RETURN(Insert(ret2, 3, " "));
    Still the same result. What's strange is, if I do a RETURN(Insert(ret2, *2*, " "));, then it returns "I am no tgoing to the office" <-- Notice the space between the "o" and the "t"?
    Ideas?

    Trailing spaces are often removed from data. In your case, the easiest thing to do will be to use what is called the "hard space" character instead of a "real" space. This is key code ALT+0160. For all intent and purposes, it looks like a space and will print as a space, but since it is not technically the space (0032) character, it will not be trimmed from your projects. Just open the quotes, turn off the NUMLOCK and hold down the ALT key and type 0160 and then release the ALT key. This will add the hard space into your string. Then if you are like me, you will have to remember to turn the NUMLOCK back on.
    " not "
    I'm not sure how this will post into this message, but the example above is using hard space characters.
    Edited by: user9976634 on Dec 5, 2012 12:52 PM

  • I created an iCloud account and also had to get more space after I have done the purchase, I am unable to backup my phone! I have a stable wifi connection at home and all I see for hours and hours is "Backing Up .. Estimating time remaining"!!!!! Plz help

    I created an iCloud account and also had to get more space so after I have made the purchase, I am unable to backup my phone! I have a stable wifi connection at home and all I see for hours and hours is "Backing Up .. Estimating time remaining"!!!!! Plz help I'm unable to make the backup as I need to transfer all my data on my new iPhone 5S

    This may be caused by a corrupt existing backup that needs to be deleted, or by data on your device that is causing the backup to fail.  To troubleshoot these, try deleting your last iCloud backup (if you have one) by turning off iCloud Backup in Settings>iCloud>Storage & Backup, then tap Manage Storage, tap your device under Backups, then tap Delete Backup.  Then go back and turn iCloud Backup back on and try backing up again.
    If it still won't back up, you may have an app or something in your camera roll that is causing the backup to fail.  To locate which one, go to Settings>iCloud>Storage & Backup>Manage Storage, tap the name of your device under Backups, under Backup Options tap Show All Apps, then turn them all to Off (including camera roll) and try backing up again.  If the backup is successful, then the camera roll and/or one of your apps is causing the backup to fail and you'll have to located by process of elimination. Turn the camera roll On and try backing up again.  If it succeeds, turn some of your apps to On and try backing up again.  If it succeeds again, turn some more apps to On then try again; repeat this process until it fails.  Eventually you'll be able to locate the problem app and exclude it from your backup.
    In the meantime you can back up your phone to your computer by connect it, opening iTunes and going to File>Devices>Back Up.  Also be sure to transfer your purchases (File>Devices>Transfer Purchases).  Then set up your new phone and when given the option, choose Restore from iTunes Backup and follow the prompts to restore this backup to your new phone.  This will be much faster than using iCloud anyway.

Maybe you are looking for

  • How do I change the default file saving type

    I have seen this question all over the web, but none of the answers I have found apply to my version of Photoshop (CS5). I want to change the default file type when I save files.  I don't want PSD or PDF, I want PNG. I want to hit CTRL + SHIFT + S li

  • NON-Flash User Wants to Edit and "Recompile" an SWF or FLA file...help??

    Hello!! Although I am NOT new to Mac, I have NEVER attempted to edit an SWF file and I'm seeking an EASY way to do so. I think I might be CLOSE but I'm wasting time trying to figure it out so I'm posting here for some help...hopefully!! :-)) I also a

  • Business Objects and underlying technology

    Post Author: kar CA Forum: Deployment Hi, We are using Business Objects 6.5. We are in  the process of automating testing on Business Objects reports.We are planning to use Rational Functional Tester.Here comes the problem.RFT doesn't recognise any o

  • Error: Receiver Service Cannot be converted into an ALE logical system

    While doing scenario FILE to SAP R/3 by using BPM we get following error message: <IDOC_Adapter> Attribute_INV_REC_SERV SAP system is not able to receive the output.

  • Alternative to Thread.sleep() function

    Dear Experts, I am developing an application that requires sleep times on the order of nanoseconds. I tried using the Thread.sleep(long milliseconds, int nanoseconds) function, but I found that the smallest time the function will sleep for is 1 milli