Modifying a particular line (content) of data in a file.

Hi All,
I've a requirement with file modifications, but i'm new to Labview so couldnt correctly fix it...
My req is something like this.....
I've a file named mytemplate1.txt which is added to this post....
In that i've a line, i.e no. in attacehd is 153
"modelLanguageCode=ENU"
In that i wanna put a control to the bolded one above.
So whenever i modify that control to SPA, GER, JPJ .....
It should update the content respectively.
I tried with different file functions available in Labview 8.2 but unable to find the solution ...
So my temporary approach for this is
Concatenate string
where
Part 1 is data above modelLanguageCode=
part 2 ENU
part 3 data after "modelLanguageCode=ENU"
But this doesnt looks ideal for my req.
So please suggest any good solution....
-Suneel.
Attachments:
mytemplate1.txt ‏5 KB
datalog.jpg ‏121 KB

Have a look at the attached example.
Craig
Message Edited by craigc on 07-15-2008 03:50 AM
Message Edited by craigc on 07-15-2008 03:51 AM
LabVIEW 2012
Attachments:
Example11.png ‏5 KB
Example11.vi ‏40 KB

Similar Messages

  • Why would only the first line of my data set txt file work?

    Hi -
    I had a lot of success using variables and external data sets until today.
    I have an external text file that I have imported as a data set (Image/Variables/Data Sets/Import...).  All of the variables have been defined and confirmed (at least PSD hasn't told me it can't find something which is the typical error msg.)
    This external text file, with the extension ".txt" has 12 lines on it, each line is 7 comma separated values, and each line is ending in a carriage return.
    YESTERDAY when I used File/Export/Export Data Set as Files... the procedure went beautifully for the 8 times I used it.  TODAY I only get the first of the 12 lines completed and then the export stops.  There are no error messages or other signs that Photoshop has choked on something so I guess something is wrong with my text file... BUT WHAT??
    Any insight on any step in this would be helpful.  You all know that if I'm using this feature it's because I have TONS of repetition ahead of me if it doesn't work.
    TIA your expertise,
    JL

    Fixed it!
    When Exporting as Data sets as files... the step I missed was to select "All Data Sets" from the Data Set drop down.
    Thanks all.
    JL

  • Been using Macs since classic. Using MBP, OS 10.7.5. Trying to figure out how to print/save folder contents (Name, Date Modified, Size Kind) of entire (non-visible) folder? Any apps that can do this?

    Been using Macs since before classic. Using MBP, OS 10.7.5. Trying to figure out how to print/save folder contents including what's not visible on screen (Name, Date Modified, Size Kind) in entire folder?
    Screen shots are getting old hat.
    Tried select all, copy, paste into pages, but it didn't display date modified, size & kind, and also included images of selected files, which is too large. 
    Any apps/shortcuts/utilities that can do this?  Thanks in advance.

    Hello Achates:
    I did not read the rather long post. If you wish to reinstall OS X 10.4, use your software install DVD. Backup is essential. To minimize your risk, I would use an archive and install:
    http://docs.info.apple.com/article.html?artnum=107120
    In that way, you will have a fresh copy of OS X and your current settings will be preserved.
    Incidentally, I do not agree that the printer problem is best solved by reinstalling OS X. I have had HP printers for sometime and, on one occasion, had difficulty after an upgrade. HP technical support walked me through uninstalling all traces of the HP driver and then reinstalling.
    Barry

  • Editable ALV - Particular Lines Display and Edit Problem

    Hi,
    I have developed a program which updates the Custom tables in the database.
    I am using cl_gui_alv_grid in the module pool program. I am making all the fields editable using ls_fcat-edit = 'X'.
    But as per my requirement in the change mode of the same data base entry, the user should not be able to change the existing data (like PO line items).
    My requirement is for a particular Purchase Order if there are line items, when I open the Purchase Order in the change mode all the existing line items should be in display mode and I need to provide the user to add more lines.
    Say the PO has 3 line items, in the Grid, it should be like all the existing 3 line items should be in display mode and rest of the lines should be in editable mode which will give the option for the user to add more line items for the same PO.
    Here it is not Purchase Order,  I just compared as an example.
    Logic I am using.
    I am building the internal table with a serial numbers from 1-99 and this particular column will be in display mode in the ALV Grid. Using the class cl_gui_alv_grid.
    Capturing all the data entered using event handler with method handle_data_changed.
    Please tell me how do I set the particular lines in display mode and others in editable mode within the same internal table.
    Thanks

    Hi Prabhu,
    thanks for the logic, but for some reason the it is not working for me.  Please see the below logic and let me know what I am missing.
    I am not passing anything related to style to the method Set table for first display.
    Is this correct  it_outtab            = gt_outtab[].
    or because of the below method
    CALL METHOD g_grid->set_ready_for_input the lines are not actually coming in display mode
    DATA : BEGIN OF gt_outtab OCCURS 0.
    INCLUDE TYPE zaodoperation.
    DATA: celltab TYPE lvc_t_styl ."--->for styles.....
    DATA: END OF gt_outtab.
    DATA ls_celltab TYPE lvc_s_styl .
      DATA lt_celltab TYPE lvc_t_styl .
      DATA v_tabix TYPE sy-tabix.
      IF gt_outtab[] IS NOT INITIAL.
    *Setting the non editiable mode
        LOOP AT gt_outtab INTO gs_outtab.
          IF gs_outtab-heatnum IS NOT INITIAL.
            LOOP AT gt_fieldcat INTO gs_fieldcat.
              ls_celltab-fieldname = gs_fieldcat-fieldname.
              ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled."-->no edit.....
              INSERT ls_celltab INTO TABLE lt_celltab.
            ENDLOOP.
            INSERT LINES OF lt_celltab INTO TABLE  gs_outtab-celltab.
            MODIFY gt_outtab FROM gs_outtab.
            CLEAR : gs_outtab.
    *      else.
    *        v_tabix = sy-tabix.
          ENDIF.
    *      delete gt_outtab INDEX v_tabix.
        ENDLOOP.
      ENDIF.
    CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          is_layout            = gs_layout
          it_toolbar_excluding = gt_exclude
        CHANGING
          it_fieldcatalog      = gt_fieldcat
          it_outtab            = gt_outtab[].
    * set editable cells to ready for input
      CALL METHOD g_grid->set_ready_for_input
        EXPORTING
          i_ready_for_input = 1.
      CALL METHOD g_grid->register_edit_event
        EXPORTING
          i_event_id = cl_gui_alv_grid=>mc_evt_enter.
    Thanks

  • How to delete and edit particular line in a file and save it in same file ?

    Hi,
    I want to delete and edit text at particular line in a file.
    But edit and delete should reflect in same file.
    I have done googling for this but it results with using another file, that i dont want as i need to save changes in same file.
    How can i do this?
    Thanks in advance
    Edited by: vj_victor on May 24, 2010 3:33 PM

    I just want to make sure, this is the only way to do what i mentioned ? or it could be done another way !a) write the data to a new file
    b) delete the old file
    c) write the data to a newer file
    d) delete the new file
    e) rename the newer file to the old file name.
    For a hint about still more ways to do this, search for the complete lyrics of One man went to mow, Went to mow a meadow...
    db

  • Which all tables suffice all line item GL data requirements

    Please clarify this requirement for Line Item Data from  New GL. my client BMW Inc have configured  New GL in ECC 6.0  if i pull all the records to BW from FAGLFLEXA (Line Item Table) is that sufficient to meet the <b>all line item GL data</b> or is there any other tables missing that also shall be combined to bring the Line item GL  data. Please help me for this if u can check with any of your friends in FICO.  
    2. I have seen that BSEG AND BKPF are used earlier in old FI  versions so what is there now in New GL ECC 6.0 that will suffice for these BSEG AND BKPF  or still i have to pull records by using these tables. for GL Line Item Data.
    If you can help me to give the short  overview of  New GL posting process it would be great.
    Thanks
    Regards
    Soniya Kapoor

    Hi Soniya,
    FAGLFLEXA & FAGLFLEXT would contain all FI line item
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/a8/e26840b151181ce10000000a1550b0/content.htm
    Pls assign points as way to say thanks

  • Reading of particular lines from appl. server

    hi all,
    i have different types of record types in the application server
    i need to read the line like
    i have one header in that i have two line items and the cycle goes on for n number of headers to post with the transaction fb60
    so i need to read the record type of the line and by using that i should post the details into fb60 transaction.
    the condition is like this
    •     Read the data file into an internal table.
    •      Loop the internal table.
    •     For each ‘A’ Record
    o     The company code values entered on the selection screen will be validated with the values in the Flat file. Data for Company codes other than the values on selection screen will not be processed
    Condition: if company code not found fill response file    data and exit
    o     Fill Company code, Vendor number into document header segment from internal table.
    Condition: if company code not found fill response file    data and exit
    o     Fill variables of invoice number, CR flag, currency code, invoice amount from internal table.
    Condition : if length of invoice number is less than 16 then move invoice number to reference document number else move invoice number to header text.
    o     Select belnr from table BKPF into an internal table with  company code, fiscal year and invoice number.
    o     Check for CR flag. If CR flag is initial then header document type is of type KR (Vendor invoice) else header document type is of type KG (Credit memo).
    o     Fill vendor line items( itemno_acc, vendor_no ) of i_accountpayable from internal table.
    o     Fill the currency line( item no, currency) of bapiaccr01  for vendor line item.
    o     Format total amount with two decimal places.
    Condition: if CR flag equals CR then document is    Credit memo and amount in document currency is positive  else document is vendor invoice amount in document currency is negative.
    &#61607;     Whenever new Header record (‘A’ record) is encountered calculate taxes using following steps.
    &#61656;     Calculate tax for all line items except vendor line item using function module   ‘CALCULATE_TAX_FROM_NET_AMOUNT’
                 Exporting                Company code
                                          Tax code
                                  Tax jurisdiction
                                 Currency key
                                          Amount
                 Importing                 Tax calculated (total) 
                        Tables              Tax values and percentage rates
    Condition: if tax calculated is zero then fill field Amount in Line Item Currency Fields table of BAPI with line item amount. If tax calculated is not zero then check the table (tax values and percentages). For each line in the table, If the G/L account field is initial then add the tax amount to the line item Amount in Line Item Currency Fields table of BAPI. Else add a new line to the Tax Line Items table with the tax amount and Line item amount to Amount field in Line Item Currency Fields table of BAPI. If the tax code contains similar type of tax, modify (itemno_acc, currency, doccur, amt_base) of Line item currency fields , else do an append.
    &#61656;     Check for tolerance limit
                                                          Add the Line item amounts and tax line item amounts into a variable and compare with the header amount.
                        Condition: The difference between Header amount and (sum of Tax line item amounts & line item amounts) should be between +5 or -5 of document currency in order to be processed for tolerance limit factor. If the difference is within tolerance and If difference is negative, subtract the Difference amount from maximum tax line item. If difference is positive, add the difference amount from maximum tax line item.
    •     For each ‘D’ Record
    o     Fill  the fields ( itemno_acc, gl_account, pstng_date, costcenter) of  G/L Account Line Items table .
    o     Select tax jurisdiction code from table CSKS where ( cost center) equals G/L Account Line Items-costcenter
    Condition: if no tax jurisdiction code found then fill the response fill with message ‘Tax jurisdiction code could not be determined’ else fill tax jurisdiction code of G/L Account Line Items with jurisdiction code.
      Fill (posnr ,bukrs, txjcd, hkont,budat,waers) of i_taxitem_in .
    •     For each ‘DX’ Record
    o     Read internal table i_taxitem_in  with key posnr = item number.
                   Condition: if success  fill tax code from internal table.
                   Modify tax line item i_taxitem_in  with tax code.
    o     Read internal table i_accountgl with key itemno_acc   = item number.
    If success modify GL account line items of i_accountgl with tax code.
    •     Check whether the vendor has an alternate vendor either in LFA1 or LFB1 Table.
    •     For all entries in i_belnr Select single  lifnr from table BSEG  with company code, fiscal year, account type ( ‘k’), vendor number and document number(belnr).  Company code, vendor number, fiscal year data is available in Document Header. Document number is in table i_belnr.
    Condition: if select statement  is success then a duplicate entry found, fill the response  file with message ‘ Duplicate entry found‘.
                              If flag is initial(if no error is found till this stage)
    •     Call ‘BAPI_ACC_INVOICE_RECEIPT_POST’
                                       Exporting
                                        documentheader = work area doc header
                                       Importing
                                  obj_key   = objkey (invoice number)
                                      Tables
                                                  accountpayable     =  i_accountpayable  
                                    accountgl               =  i_accountgl
                                          accounttax             =  i_accounttax
          currencyamount     =  i_currencyamount                                 
            return                   =  i_return
    •     Check whether the BAPI call is successful or not:
    If successful, then do a commit using function module              
                           'BAPI_TRANSACTION_COMMIT'
                      Fill the response file with  vendor number, document number, company code, success message.
         Else
    Fill the response file with BAPI return message
    4.     Repeat step 3 till all the lines are processed in the flat file.
    5.     Once the flat file is processed, the format the response according to the format specified in Appendix B  and then create a file at ‘celestica/interface/am/out/comm' and transfer all the response into that file.
    6.     Run the FTP program ZUIGFTPV5_2 with a variant ‘NON_PO_INVOICE’ and return back ( refer 13.1.1 for variant details). This Step transfers the file to the FTP Location and also archives the file at path specified in the variant.
    7.     Repeat steps 2-7 till all files are processed.
    if you can help me out then pls respond by mentioning the internal tables that i am supposed to use.
    thanks and regards,
    ibrahim

    Hi,
         First you can download the excel file to internal table form by using TEXT_CONVERT_XLS_TO_SAP.Then use the below logic LOOP AT itab INTO watab.
       if watab-col01 = 'H' OR watab-col01 = 'I' .
    AT END OF col01.
          IF watab-col01 EQ 'I'.                             "Counter reset for next document
          ENDIF.
        ENDAT.
    Endif.
    ENDLOOP.
    *Reward points
    regards

  • JSF - Read a text file and diplay lines of text data on the web page

    Hello,
    For one of my projects, I need to display lines of text data on the web page using Java Server Faces Technology. The raw data could be from simple text files or sockets or anything. (Getting the data is not my issue but displaying is). Could anybody send answers with sample code. In servlet, one could do this by -
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException{
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println(DATA);
    out.println(DATA);
    out.println("</html>");
    I am looking for similar solution.
    Thanks in advance
    DK

    Thanks mjolinor.  Works great!
    Two questions.
    1. Could you plz suggest how this could be modified so this code would read the file in or accept it from the pipeline instead of wrapping the (@' around the data?
    2. Could you plz briefly describe some of the details of the code so I can further research and understand.
    Thanks for your help.
    Thanks for your help! SdeDot
    1. It already reads in the file.  The (@' .. '@) bits are just there to create a file using your test data to demonstrate that it works.
    2.  Not user what kind of "details" you want.  There really isn't much there, and get-help on the cmdlets used should provide information on what's going on with them in that script.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Payment terms  for particular line item

    Hi gurus
    i have defined payment terms and assigned to customer master, when ever i am creating sales order payment terms are getting in the sales order if i want to change the payment terms for particular line item what is need to be done
    please let me know asap
    thanks n regards
    srinvias

    Hi,
    There are few ways:
    - You need to check in respective Item Category, the field "Business Item data" should be unchecked, this will allow you to change the Payment Terms at Item Level.
    -Even if the above settings are not being done, you can have the Payment terms fetched from Condition record maintained for that item. Mind that you need to maintain the Payment terms in Condition Records of the pricing of the item.
    Do reward answers with suitable points.
    Regards
    SD

  • How to read the particular line in a file !!!

    i want to read the 5th , 8th or some other line number of the file. This file is consists of many data arranged by line number. I'm able to retrieve the LineNumber of the file but i'm not able to point the curser to that particular line so it can read that line only.
    i'm pointing the cursor to that particular linenumber as in.setLineNumber(5) it moves to that particular line but after that when i try to read that particular line i'm not able to read that line.
    could any one tell me which is the other way to read that particular line or in this only where i'm doing wrong...
    i need this urgent....

    As is typical of people who claim their problem is urgent, you posted this in the wrong forum (it doesn't have anything to do with JSP) and you left out any details that might help us understand what you are blathering about.
    So take a deep breath. It isn't urgent. There is no rush. Now formulate a proper description of your problem and post it in the proper forum.

  • How to edit line data in AL11 file

    Hi Friends,
    I am facing some problem for below requirement,
    we are uploading data into AL11 files into BW-ODS, but sometimes whiles loading they are facing with error data, now we are trying to edit the particular line, i am able to edit and am able to transferring into same file, but stil old line be there only,
    here how can we delete one line in AL11?
    we have one solution for this we can edit data in PSA first and later upload into target....but in PSA data is complete trucationg...
    That's why we are searching this type of solution..
    Please help me on this...
    I will appreciate your help...
    Regards,
    Sri

    Finally we got 1 solution, please find solution below:
    when we displaying output on screen we used write:/ ltext input on,,
    by with output will display in edit mode, after we change this data, we need to press save button( this save button will be created with PF STATUS), by at user command option, i used below lines if code to save what we edited on output screen.
      line_num = 1.  do a times.,   clear ltext2., READ LINE line_num FIELD VALUE ltext2., if sy-subrc eq 0.  condense ltext2.  concatenate  ltext1 ltext2 into ltext1.  line_num = line_num + 1.  clear ltext2. else.   exit.  endif. enddo.
    here why used 'a', usually in AL11 data line has more than 1000 chars, it is diffcult to display in reading manner on output screen,
    thats wht i splitted line data into some line, each line with 125 chars,
    suppose i have line with 400 chars, i splitted line into 4 lines, so we need to move DO with 4 times...
    after concatecated 4 lines into sinlge line again i transferred into AL11.
    ...This is the solution what we got,
    please share if other solutuon is there..
    And Thank you all of you who shared your thoughts ...
    Sri.
    Edited by: Sri on Nov 5, 2009 2:18 PM

  • How to change the "content created" date/time in FCPX?

    Since I've had problems importing my whole iMovie event library into FCPX I decided to run some tests with importing individual files (part of iMovie events and originally imported from camera into iMovie). Some of them for some reason got the wrong "content created" date/time in them while in iMovie they have the right date/time set. Does anybody have an idea on how to change the "content created" timestamp?

    I had a bunch of DV files that imported stamped with the file modification date and time.  I did not find a way to change it in FCPX. With FCPX not running, I used A Better Finder Attributes to modify the creation and modification dates of the files in the event folder. FCPX reconnected to them but the event still showed the old range of dates so I created a new event and moved the clips to it. Maybe ther is a beter way but that is how I did it.

  • Order Line Schedule Ship Date

    Hi ,
    How is the schedule ship date in order line calculated?
    Currently its taking from Request date when i try to schedule it from tools .
    I tried to modify this through defaulting rules but it doesnt take effect.
    The requirement is :
    Schedule ship date=Request date +Transit Time
    How do i take the transit time from the ship method ?
    Thanks

    Why Cant the Schedule ship date be less than Request date in Order line when Request Type is Arrival?
    I followed the document 262124.1 which was mentioned in the document 251449.1.
    The setup is only partially working for me .
    For example the document mentions:
    Scenario :
    Ist Case(Works Fine)
    If Order Date Type - Ship, then we add the Transit Time to the Scheduled Ship Date to get the  Scheduled Arrival Date
    Request Date =23-Sep-2010
    Transit Time =3 days
    Request type in Customer ship to= Ship
    After booking:
    Schedule ship date=23-Sep-2010
    Schedule Arrival Date=26-Sep-2010
    2nd Case (Doesnt Work)
    If Order Date Type - Arrival, then we subtract Transit Time from the Scheduled Arrival Date to get the Scheduled Ship Date for the order line.
    Request Date =23-Sep-2010
    Transit Time =3 days
    Request type in Customer ship to= Arrival
    After booking:
    It should be
    Schedule ship date=20-Sep-2010
    Schedule Arrival Date=23-Sep-2010
    But i Get
    Schedule ship date=23-Sep-2010
    Schedule Arrival Date=26-Sep-2010
    Please advise .

  • Append a text line on blob data.

    Hi All,
    I need append a text line on blob data.
    I haven't found prosper example or guide yet.
    Following is example blob data which i should handle with.
    Date: Thu, 29 Oct 2009 18:36:56 +0900 (KST)
    From: IBM
    To: IBM
    Subject: JavaMail Attachment
    Mime-Version: 1.0
    Content-Type: multipart/mixed;
         boundary="----=_Part_10_1177830964.1256809016187"
    ------=_Part_10_1177830964.1256809016187
    Content-Type: text/plain; charset=us-ascii
    Content-Transfer-Encoding: 7bit
    Ideas
    ------=_Part_10_1177830964.1256809016187--
    and I should add a new line on head of above blob data like this,
    Message-ID: <1631215930.1256809016203.JavaMail.SYSTEM@ibm-demo>
    so what i want is every blob data which doesn't have Message-ID line, update with random msg id.
    please give me an tip or sample for this.
    Thanks in advance,
    Beomwoo.

    I have to develop some program which correct abnormal email data of Oracle Collaboration Suite mail 10g.
    OCS store the mail body into a blob column named as body on es_body table.
    Normal mail body have to include Message id header information like following.
    Message-ID: <[email protected]>
    Date: Sat, 31 Oct 2009 19:48:04 +0900 (KST)
    From: bbuser1 kim <[email protected]>
    To: bbuser1 kim <[email protected]>
    Subject: 111111111111111
    Mime-Version: 1.0
    Content-Type: text/plain;charset=US-ASCII
    Content-Transfer-Encoding: 7bit
    Accept-Language: en-US
    X-Mailer: Oracle Collaboration Suite Web Access 10.1.2.4.3
    When a message body doesn't have the message id line on first line.
    I want add random message id on first line.
    So, What i want exactly is how to update blob column data with adding a line like 'Message-ID: <[email protected]>'.
    Any idea?
    Thanks in advance,
    Beomwoo.

  • To Set Goods Receipt Indicator For Particular Line Items In SRM

    Hi All,
      i am working on BBP_DOC_CHANGE_BADI in SRM. i am trying to set the goods receipt indicator for particular line items based upon certain conditions. The values are being set in the badi. But when the Purchase Order is created in the backend R/3 i coudn't able to find the goods receipt indiactor being set..
    i used this field to set the GR indicator
      GR_IND = 'X'.  " Goods Receipt Indicator
    Can anyone help me in this?
    helpfull answers will be rewarded....
    Thanks,
    Murali

    To Murali and Christophe,
    I have set the GR and GR non val indicator in CREATE_PO BADI but I face the following situation :
    problem -
    In case of multiple account assignment in the shopping cart, the R/3 transaction ME21N sets these flags. 
    The flag status determined as per EBP conditions is lost.
    I need to retain the flag status as per EBP conditions even in this multiple account assignment scenario.
    proposed solution -
    - CREATE PO badi is already implemented in EBP and customised logic for GR and GR non valflag is in place.
    - I create user exit in R/3 backend system in ME21N transaction 
    - I make RFC call in this user exit to EBP and check the table BBP_PDPSET for the shopping cart.
    This is how I get the flag status as per EBP conditions and copy the same to R/3 thereby overriding the multiple account assignment check of the R/3 system.
    issue - 
    When I tried to verify that I can check the BBP_PDPSET table from R/3, I found that this table is not having entries for all the records in  CRMD_ORDERADM_I table.
    For which shopping carts will the BBP_PDPSET table not  be populated ?
    thank you in advance,
    Bhakti.

Maybe you are looking for