Removing the carriage return / Tab during data extraction

Hi ,
  I have an issue with removing the carriage return / Tab from the extracted (Flat File) data from SAP EKPO table.
  1) While uploading(Long Back) the Legacy data to SAP tables the carriage returns and Tabs in Product description were uploaded to SAP tables.
  2) Now I am extracting data from bkpf,..EKPO.. tables  to a flat file . 
3) When I extract the data i. PO number, Product description,......
The Product description is going to 3 to 5 lines depending on the carriage returns and Tabs in the Product description.  Ekpo-txz01
Ex : Mfg # DS104NA / NET######GEAR DS104 Hub######model
    I want  this product description in one continuous line. It is possible only  by removing the Carriage returns and tabs from product description before concatenating and TRANSFERING the file to Server.
4) What is  getting:  The line is breaking @gear @ Hub due to Carriage return/Tab
Mfg  D  NET
GEAR DS104 Hub
model   .
5) What is required is: in one line
Mfg  D  NETGEAR DS104 model
In the process I am extracting product description from Ekpo-txz01 . So it is internal table. Now I want to remove the carriage return / Tab .
How these can be removed.
Thanks,
Vasu

Dear Vasu,
Sometimes there is a problem that cannot be solved normally. This is one of them.
The reason why the mentioned methods do not work is because you need to remove actually two characters CR and LF in one stroke. You can identify one but then not the other. So approach it from the other side.
Simply define what your correct characters might be AND only use them to export.
Below you will find a FORM routine that does just that (only passes defined valid characters and NOT others).
FORM validate_field USING    VALUE(field_in)
                    CHANGING field_out.
CONSTANTS:
All low caps characters
  validlow(26)  TYPE c VALUE 'abcdefghijklmnopqrstuvwxyz',
All upper caps characters and all figures
  validhigh(36) TYPE c VALUE '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ',
All other characters (starting with space)
  validrest(32) TYPE c VALUE ' <,>.?/:;"{[}]|\~`!@#$%^&*()_-+=',
Single quote
  validquote           VALUE ''''.
  DATA:
    pos(1) TYPE c,         " Container to hold 1 character
    l      TYPE i,         " Length
    i      TYPE i.         " Indexer
Determine length
  l = STRLEN( field_in ).
Stripping loop
  WHILE i LT l.
  Get one character 
    pos = field_in+i(1).
  Check its validity
    IF pos CO validlow
    OR pos CO validhigh
    OR pos CO validrest
    OR pos EQ validquote.
    When valid, use it
      concatenate field_out
                  pos
             into field_out.
    ENDIF.
  ENDWHILE.
ENDFORM.
Hopes this helps solving your problem.
Regards,
Rob.

Similar Messages

  • Get rid of the carriage return

    Hello,
    I have a Note column, the column type is CLOB. My assignment is to get rid of the carriage returns in the record set. I tried to use Trim function, however, the carriage returns exist in the middle of the record set, they do not only exist in the end of the record set. Can anyone help?
    Thanks!

    ... Or [REGEXP_REPLACE|http://www.oracle.com/pls/xe102/lookup?id=SQLRF06302] if you are on latest version (for complex replaces).
    -Arun

  • Can any one pls tell me the procedure of crm datasourse data extraction r/3

    hi
    pls can any one pls tell me the procedure of crm datasourse data extraction from r/3
    regards
    subbu

    Subbu,
    First off please don't post the same question twice.  I have locked your other question due to it being a duplicate.
    Second off:  don't expect an answer to your question immediately.
    Third off:  You need to read the rules of engagement before posting any more questions here:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/home/rulesofEngagement
    Fourth:  You question is way too vague and honestly if you would have done a search or read some introductory material on CRM, you would have learnt that the CRM middleware handles the data transfer.
    Last:  I'm locking this thread because your question is way too vague, please take a look at the CRM wiki and help.sap.com and read all the associated documentation about CRM on those sites.
    CRM wiki
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/crm/home
    Then you can come back here if you have a detailed question after reading those materials.
    Take care,
    Stephen
    CRM Forum Moderator

  • Run quickSearch with the carriage-return key

    Hi to all,
    I am using JDeveloper 10.1.2 and developing an application using ADF Business Components and JheadStart 10.1.2.
    JHS built the application and i need to do some post-generation.
    I need to run quickSearch with the carriage-return key.
    To do that, i replace
    <messageTextInput id="searchText" name="searchText" text="${searchBean.searchText}" rows="1" maximumLength="255" columns="60"/>
    by
    <messageTextInput id="searchText" name="searchText" text="${searchBean.searchText}" rows="1" maximumLength="255" columns="60">
    <enterClientAction>
    <fireAction event="quickSearch"/>
    </enterClientAction>
    </messageTextInput>
    The problem is the carriage-return action go systematically to the BackButtonErrorPage.
    How can i solve this problem ?
    Is it a good solution ?
    Sorry, if my english is not very well.
    Thanks
    Laurent

    Thank you Martijn for your help
    I tried your solution :
    In UIX :
    <messageTextInput id="searchText" onKeyDown="if(window.event.keyCode==13) doSearch(event,'goSearchButton');" name="searchText" text="${searchBean.searchText}" promptAndAccessKey="&amp; de recherche" rows="1" maximumLength="255" columns="60"/>
    <button id="goSearchButton" name="goSearchButton" onClick="doDataEvent('quickSearch','quickSearch', 'true' );" text="${nls.GO}"/>
    In javascript :
    function doSearch(e, buttonName) {
    buttonToClick = document.getElementById(buttonName);
    buttonToClick.click();
    The behaviour is the same, i often go to the BackButtonErrorPage but not systematically.
    But if i use the search button, i never go to the BackButtonErrorPage.
    I don’t undersand,
    Anybody has an idea ?
    Regards
    Laurent

  • I have just donwloaded Firefox 5 to my Sony Vaio laptop and it keeps opening three tabs, I uninstalled it and reinstalled it and it happened agona, how do I remove the two surplus tabs?

    I have just donwloaded Firefox 5 to my Sony Vaio laptop and it keeps opening three tabs, I uninstalled it and reinstalled it and it happened again, how do I remove the two surplus tabs?

    I finally managed to fix this problem! You have to go into your program files and you will see another bearshare folder, this has two add on components for firefox. Go into the folders, and find the uninstall program tools.
    One of them will uninstall here. There is a program called media mrg or something along those lines in your add ons for firefox. You need to delete this, and it should stop bearshare popping up in the tabs. Then just to make sure, I went back and deleted the bearshare folder. You know you have disabled all the right components when it will finally let you delete the folder.

  • Possible to add the Carriage Return Character

    Hi all,
    I need to add the Carriage Return characters at the end of the each paragraphs.  I found the insertTextAsContent (using: {String | SpecialCharacters} , position: XMLElementPosition), but don't know how to use this function. I think in this method accept only the position as XML Element Object.
    How to use this function to achieve my task?.
    Using: InDesign CS4/Javascript/Windows.
    Regards,
    Karpanai

    you could do: string += "\r";
    \r is a carriage return, and \n is a newline

  • How can labview update the string control (text-edit box) after we have pressed the carriage return key on the keyboard during text-editing within that box?

    Dear readers,
    I have been trying to work out how to get labview to detect the event when a 'string' control has been modified, where the user has finished editing the string either by 1) pressing the enter key on the keyboard, or by 2) taking the focus away from the string control again. For example.. if I use the mouse to click on the string control and then I type 1234 into the box, I would like to have a routine that does something once the user hits the Enter key of the keyboard, or when the user takes the focus away from the string control again by clicking on something else. I would like the routine to respond even when the user didn't change anything in the text box (such as when we mouse-click on the edit box to go into edit mode, and then mouse-click on something else to remove the focus with no changes to the contents in edit-box).
    The purpose of my routine is to have a edit-box for a user to change for example the centre-frequency of a vector network analyser, so that the centre-frequency of the network analyser can change once the user finishes entering a new value in the text-edit box by hitting Enter key after the number is keyed in. Even if the user has clicked on the edit box, but changes their mind by mouse-clicking on something else to remove focus from the edit box, I would still like labview to detect the event when the control loses focus, so that the centre frequency can be updated anyway (to the same value that was already in the edit box).
    So far, I've tried set the string control option to 'limit to single line', so that I can try to scan for a carriage return .. '\n' ... pattern in the string. Unfortunately this doesn't work because labview doesn't seem to attach the '\n' to the end of that single line.
    Could someone please suggest ways to set a flag when a user hits Enter during text-edit mode of a string control, or when focus has been removed from the string control?
    While I've only described my problem for controlling a single control parameter on the gpib device, I'd like to make this feature work so that I can do the same kind of thing with other control parameters as well.
    Thanks so much in advance.
    Kenny

    Hi Kenny,
    instead of using the event structure, you can directly achieve to what you want by the KeyFocus property of the string control.
    - Enable Limit to single line option
    - Create the property KeyFocus in read mode and connect an indicator
    Each time you click on the string to modify it KeyFocus is True; when you click away or hit Enter KeyFocus is False.
    You can toggle your settings when KeyFocus changes from True to False.
    Alberto

  • My test instrument is outputting a 5 line string but labview only read until the carriage return. how can I get it to read the whole string?

    I have a labview sub-VI reading the string being outputted by a pH meter.  The meter outputs a 5 line string and labview is only reading up to each lines carriage return, there-by giving me 5 separate strings is there anyway to rectify this and have the 5 line read as one string?
    NAS1
    St Petersburg FL
    Labview 2010

    Yes, LabVIEW will automatically update. What happens is that the old serial functions still exist in 7.1 and above but the code (the block diagram) has been modified to use VISA functions. Older versions of LabVIEW are fully supported in this manner. The only way you can avoid the automatic update is to have the old serial functions in an llb and your top level VI refer to these. Having any VI that was part of vi.lib in an llb is a very bad idea and the way to fix things is to remove any VIs in the llb that are part of the LabVIEW distribution.
    I don't remember how the old serial config worked and what the new version does with the VISA Configure Serial Port. Your program should only have a single serial config and you might just be able to directly replace that with the VISA configure Serial Port.

  • Using a Macro to add a Carriage Return after each data entry within all cells of an imported range of cells

    I have a macro that copies data from a Target workbook then pastes the data into a destination workbook.  I then wish to use lookups in the destination workbook to view specific data from the pasted range of data on a separate sheet. 
    The problem is, the cells that contain numbers from the pasted data have the green dogeared error flags associated with the cell. The only way I can make a lookup function work, is to go to each cell and manually enter a carriage return after each entry. 
    The code for the macro is given below.  What can be done so that the pasted data contains no errors associated with the number cells?  Or can a second macro be written to clean the data.  If so can you help me out?  Thanks in advance.
    Kindest Regards
    Sub ImportData()
     ' ImportData Macro allows user to select an Excel workbook (i.e. Orchestrate Excel Output),
     ' then copy & paste it into the MediaSpreadsheet.
        Dim wbk As Workbook
        Set wbk = Application.Run("MediaSpreadsheet_1.0.xlsm!OpenFile")
        If wbk Is Nothing Then
            Beep
            Exit Sub
        End If
        Set wbk = ActiveWorkbook
        Range("A9:S116").Copy
        Workbooks("MediaSpreadsheet_1.0.xlsm").Activate
        Sheets("OrchestrateData").Select
        Range("A1").Select
        ActiveSheet.Paste
        With Selection.Font
            .ColorIndex = xlAutomatic
            .TintAndShade = 0
        End With
        With Selection.Interior
            .Pattern = xlNone
            .TintAndShade = 0
            .PatternTintAndShade = 0
        End With
        Selection.Borders(xlDiagonalDown).LineStyle = xlNone
        Selection.Borders(xlDiagonalUp).LineStyle = xlNone
        Selection.Borders(xlEdgeLeft).LineStyle = xlNone
        Selection.Borders(xlEdgeTop).LineStyle = xlNone
        Selection.Borders(xlEdgeBottom).LineStyle = xlNone
        Selection.Borders(xlEdgeRight).LineStyle = xlNone
        Selection.Borders(xlInsideVertical).LineStyle = xlNone
        Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
        wbk.Close
        Sheets("MediaSchedule").Select
    End Sub
    DAPulliam64

    Hi DAPAugust64,
    The green "dogeared error flags" of the cells means that you paste numbers in these cells, but they're formated as Text.
    So you need to change the cells back to the correct format so that the lookup function works fine. You can simply call this method after pasting:
    ActiveSheet.Cells(1, 1).NumberFormat = "General"
    ActiveSheet.Cells(1, 1) = ActiveSheet.Cells(1, 1).Text
    Or use PasteSpecial method to paste the numbers as well as it's format:
    https://msdn.microsoft.com/en-us/library/office/ff837425.aspx
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can the carriage return within a variant be read as the terminatio​n condition for VISA READ?

    Hi guys, I am trying to read a variant data using VISA READ. The VISA READ is set to terminate reading when it sees a carriage return.
    Is there a chance that for the CR "encapsulated" within the variant be read by the VISA READ, and cause it to terminate?
    Cheers!
    Solved!
    Go to Solution.

    Since with the Flatten to String you are basically sending a binary representation of the data, you are going to have problems if you have the termination character enabled since byte 13 would be part of perfectly valid data and not just represent the end of a transmission.
    What you might want to do is disable the termination character.  Of course now you don't know how many bytes to read.  So prepend your message to write with the number of bytes that are a part of the message (string length).  You may want to use two bytes, (one byte would only give you messages up to 255 characters in length.)
    Now on your reading end, read 2 bytes, convert them to a number and feed that number in the next VISA read which will then read that many bytes.
    For examples, look at the TCP/IP read write examples in the example finder and you'll see how they send a message with 4 bytes to tell how much data makes up the rest of the message.

  • The carriage return &#13; does not appear to work in FF8, it did in 3.6

    I get quotes in html format from a supplier. In FF 3.6 (and IE) they would display properly. Since upgrading to FF 8, the rows in the table don't break at the end of each line, they just run on off to the right. Looking at the source they use an &#13; (carriage return code) as the line break between rows. I can't change what I get from the supplier.

    One of the changes in Firefox 4: '''''by default''''' Firefox 4 does not display the warning message when closing multiple tabs, but it can be turned back on by changing some preferences. ''<u>Note: This was a decision by the developers. On this forum, we are all '''uncompensated volunteers''' here to help other users. The developes/employees of Mozilla/Firefox rarely, if ever visit here.</u>''
    #Type '''''about:config''''' in the URL/Location/Address bar and press the Enter key
    #Accept the warning message (promise to be careful)
    #The preferences page/list will open
    #Filter = '''''browser.tabs.warnOnClose'''''
    #If its value is set to false, double-click on it (in the lower panel) to toggle its value to true
    #Repeat steps 4 and 5 for these following 3 preferences also:
    #*'''''browser.warnOnQuit'''''
    #*'''''browser.warnOnRestart'''''
    #*'''''browser.showQuitWarning'''''
    #**Note: last pref is new in Firefox 4b12, may need to add (boolean)
    #**Info/Instruction for using '''''about:config''''': http://kb.mozillazine.org/About:config
    #See:
    #*https://support.mozilla.com/en-US/questions/785169
    #*http://forums.mozillazine.org/viewtopic.php?f=23&t=2105039&p=10434467&sid=fd2a35945bb2c633687f7b50d8c53989
    #*http://blog.zpao.com/post/3174360617/about-that-quit-dialog

  • Pasting loses all the carriage returns

    Hi,
    Whenever I paste text from the command line, or computer source code into mail, all the formatting is gone. I have to go back and put a carriage return at the end of every line! I've tried intermediary pastes to text editors and such, but it doesn't work. My default has now become a paste as quotation and then remove the extra level. I wish Command-V could do those two steps together instead of the useless regular paste. Is there some switch that I can use to get back the old behavior? Maybe I should consider Thunderbird.

    Hi, and welcome to the forums Jovan!
    Yep, seems to be a problem with Mail itself, seen lots of complaints, but Text Edit Pasting & recopying & Pasting seemed to work for most... gawd!
    I think Thunderbird or Eudora is the way to go, they're the ones I use. I don't trust Mail one little bit.

  • How can I REMOVE the Yahoo! tab from the menu bar? Each time I open Firefox, I get the gialogue box asking if I want to make yahoo the default and each time I respond no and check the do not ask this question again.

    I am tempted to remove Ff4 and revert to 3.X if I cannot fix this problem. The question (statement) has all pertinent details already included

    '''Hello peacefultrev,'''
    I believe from your question you wish to remove the window title-bar, while keeping the menu bar available.
    I have two solutions for you to try. One requires no plugin and the other requires the installation of a plugin.
    '''No plugin option:'''
    This option hides the the window title while also removing the menu bar. The menu bar can then be reactivated and viewed simply by pressing "Alt" which shows the menu bar until you click away from it. To do this:
    # Right click on the tab bar and disable "Menu Bar".
    # Whenever you which to use the menu bar, tap "Alt" on your keyboard.
    # When you click away from the menu bar the windows title will disappear until you tap "Alt" again.
    '''Plugin Option:'''
    You can download this plugin called [https://addons.mozilla.org/en-US/firefox/addon/hide-caption-titlebar-plus-sma/ Hide Caption Titlebar Plus] which can be customized to suit your needs. I cannot provide support on this plugin as I have not used it myself.
    I hope one of these solutions will suit your needs.
    Mattlem

  • IDoc output is not showing blank fields before the carriage return

    When we produce the Material Master IDoc (MATMAS), we send it to a ascii file, to a file port.  That works fine when we execute BD10 to produce the IDoc and the file.  But, the 3rd party mapping software wants to see every field, even if blank, in each segment it is fed.  So, let's say the E1MARCM segment is 750 chars, when you add up all the field lengths in the structure, but the last 5 fields are blank.  SAP does not include those trailing blanks at the end of the segment in the file.  It just puts a carriage return.  How can we configure it to output the trailing blanks?

    Hi Mark Mathison 
    In IDoc ....if no value is passed in to that field then, the field wonu2019t be populated in Doc....
    There is no chance of getting blank field in IDocs...
    Ramesh

  • Problem during data extraction program (tran - RSA3) in SC system

    Hi Experts,
    We are extracting data from one of the data source (9ALS_SBC) through trans RSA3. We are using active version 000 for the same.
    but, the transaction is showing error below:
    Error when generating program
    Message no. /SAPAPO/TSM141
    Diagnosis
    Generated programs are programs that are generated based on individual data objects, such as planning object structures, planniung areas and InfoCubes. These programs are then executed in the transaction. An error occurred during the generation of such a program.
    There are two possible causes:
    The template has been corrupted.
    The object that the template uses to generate the program contains inconsistencies, for instnace an InfopCube has not been activated.
    could someone tell me how to solve this error?
    i hv corrected all the inconsistencies but still it is showing same error!
    thanks in advance for this help!
    with best rgds/
    Jay

    Dear Jay,
    the error can have several reasons, it depends on your business scenario and system settings.
    I send you some possible reasons and solutions:
    1.
    The problem can be that the technical datasource name has changed inside the planning area. The planning area has other extract structure assigned as the datasource.
    This could have happened due to a planning area or datasource transport.
    The best way to repair this is to create a dummy-datasource for the planning area with transaction /N/SAPAPO/SDP_EXTR. This will update the relevant tables with the new datasource structure.
    Please check if the other datasources will work correctly as well. If not you may create similar dummy-datasources for the other aggregates as well.
    Please do not forget to delete the dummy-datasources as well in  /N/SAPAPO/SDP_EXTR.
    2.
    You can try to re-generate the data source at transaction /SAPAPO/SDP_EXTR and recheck the issue.                   
    3.
    Run /sapapo/ts_pstru_gen via transaction se38.         
    In the selection, enter the Planning Object Structure used and select  'Planning area extractor' and set the flags on the 2 bottom checkboxes 'Reset generation time stamp' and 'Generate'. 
    4.
    Maybe the extract structure which is assigned to planning area doesn't exist in your system. This could  happend at the time of transport.             
    Please refer to following content from note 549184:                                                                               
    =======================================================================
    Q4: Why could I have extraction problem after transport of DataSource? 
    A4: DataSources for DP/SNP planning areas depend directly on the                                                                               
    structure of the planning areas. That's why the planning area MUST                                                                               
    ALWAYS be transported with or before the DataSource.                   
    ========================================================================
    To solve this inconsistency please try the below:                      
    -Please reactivate the datasoure on Planning Area.                     
    And activate all active transfer structures for a source system with  RS_TRANSTRU_ACTIVATE_ALL programme on se38 transaction.                
    I hope these proposals could solve the error.
    Regards,
    Tibor

Maybe you are looking for

  • Unable to Access SQL Server 2005 Remotedly

    Not sure if this is the right forum to post this... After going through lot of old posts in various forums and changing lot of settings, i'm still not able to access my Server remotely. This is Windows 2003 Server machine with Sonicwall Firewall, i h

  • Safari doesn't show Youtube and Yahoo websites.

    I just bought a Macbook Pro a few days ago, and I have a problem since day one. Safari doesn't work with Yahoo Mail or Youtube. I always get a blank page. When I open other sites like www.real.com the pages show text but no images. Can anyone help me

  • How do i restore my macbook pro to its out of the box settings?

    Hi folks, I recently got a new macbook pro and used Time Machine to import all of my data and settings from my old macbook into my new one. I am now realizing that there is a bunch of stuff on my old hard drive that I don't want on my new one. What I

  • PXI External Graphic Card

    Hi Guys, I have a PXIe system, currently running in RT. Now, there is a requirement for the PXIe system to have up to graphic output to control some instruments. I came across these cPCI cards: 1. http://ekf.de/s/sv1/sv1.html 2. http://ekf.de/c/cgxa/

  • Problem switching devices

    Hello guys, trying to switch config from a 8310 to a 8900 using desktop manager 5.0.0.11. It gave an error and finished. The problem is that it cleaned information from source device. Do you know where is saved the temporary backup? Thanks in advance