FM SAP_CONVERT_TO_CSV_FORMAT - separator is wrong.

I am using FM SAP_CONVERT_TO_CSV_FORMAT and I have the field separator as a comma but when the file is exported it has the separator as a semicolon.  Does anybody have any ideas why this is happening?  Below is my code and a portion of the exported document:
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
    EXPORTING
      i_field_seperator    = ','
    TABLES
      i_tab_sap_data       = it_table
    CHANGING
      i_tab_converted_data = it_table_csv
    EXCEPTIONS
      conversion_failed    = 1
      OTHERS               = 2.
  CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      filename = w_filename
    TABLES
      data_tab = it_table_csv
    EXCEPTIONS
      OTHERS   = 1.
0080629699;04/05/2007;LF;04/05/2007;0520;H1;01;PP;Destination;0000200471;DI;0000200471
Regards,
Davis

You can use GUI_DOWNLOAD FM ,for field separator :
""Lokale Schnittstelle:
*"  IMPORTING
*"     REFERENCE(BIN_FILESIZE) TYPE  I OPTIONAL
*"     REFERENCE(FILENAME) TYPE  STRING
*"     REFERENCE(FILETYPE) TYPE  CHAR10 DEFAULT 'ASC'
*"     REFERENCE(APPEND) TYPE  CHAR01 DEFAULT SPACE
*"     <b>REFERENCE(WRITE_FIELD_SEPARATOR) TYPE  CHAR01</b> DEFAULT SPACE
*"     REFERENCE(HEADER) TYPE  XSTRING DEFAULT '00'
*"     REFERENCE(TRUNC_TRAILING_BLANKS) TYPE  CHAR01 DEFAULT SPACE
*"     REFERENCE(WRITE_LF) TYPE  CHAR01 DEFAULT 'X'
*"     REFERENCE(COL_SELECT) TYPE  CHAR01 DEFAULT SPACE
*"     REFERENCE(COL_SELECT_MASK) TYPE  CHAR255 DEFAULT SPACE
*"     REFERENCE(DAT_MODE) TYPE  CHAR01 DEFAULT SPACE
*"  EXPORTING
*"     VALUE(FILELENGTH) TYPE  I
*"  TABLES
*"      DATA_TAB
*"  EXCEPTIONS
*"      FILE_WRITE_ERROR
*"      NO_BATCH
*"      GUI_REFUSE_FILETRANSFER
*"      INVALID_TYPE
*"      NO_AUTHORITY
*"      UNKNOWN_ERROR
*"      HEADER_NOT_ALLOWED
*"      SEPARATOR_NOT_ALLOWED
*"      FILESIZE_NOT_ALLOWED
*"      HEADER_TOO_LONG
*"      DP_ERROR_CREATE
*"      DP_ERROR_SEND
*"      DP_ERROR_WRITE
*"      UNKNOWN_DP_ERROR
*"      ACCESS_DENIED
*"      DP_OUT_OF_MEMORY
*"      DISK_FULL
*"      DP_TIMEOUT
*"      FILE_NOT_FOUND
*"      DATAPROVIDER_EXCEPTION
*"      CONTROL_FLUSH_ERROR
Thanks
Seshu

Similar Messages

  • Acrobat 5 - Placing PDF into inDesign and Output to Colour Separations are Wrong

    Acrobat 5 - Placing PDF into inDesign and Output to Colour Separations are Wrong
    I have a 2 Page PDF file from my client which I have to have setup 2UP on 450x320 for Metal Plates for the Press.
    I setup my page size in inDesign and Placed each page from the PDF file into the inDesign Document.
    Because I need 4 Metal plates (CMYK) I had to check the Colour Seperations for the file by outputting it to a Postscript file with CMYK SEPS and then using Adobe Distiller to turn it into a PDF file for me to view the Seperations.
    As I've shown in the screen shot below. The CYAN plate has boxes all around the images in the PDF file which will come out on a Metal Plate.
    Compared to the Colour version of the Client's PDF they supplied me, there is no boxes around the images.
    I know this is a error with dropping a PDF file into inDesign, outputting to a PS file and then Distilling it to the SEPS. I've had the same problem when I've opened a PDF file that has been distilled in Illustrator and the Artwork is sliced into pieces and uneditable.
    Has anyone else found this problem and if so is there a workaround?
    I'm using Adobe inDesign CS and Adobe Acrobat Professional Version 5.

    Im facing a similar kind of problem. I want to store and retrieve Office files, PDF and Jpegs into/from the database to view them on web in disconnected mode. Please reply as I cant find any help/documentation regarding saving BLOB data into files. I was able to store file data into BLOB, using DBMS_LOB package.
    Shahzad

  • Error while conversion

    hi,
    my scenario is conversion of file to xml where the input is a fixed length file.while conversion im getting the following error.Can anyone help me identify what is it.
    the i/p structure is
    datetype
         datainp
                header0
                           key0
                           value1
                header1
                           key1
                          value1
    My file content conversion parameters are
    HEADER0.fieldFixedLengths     2,6,13,13,7
    HEADER0.keyFieldValue     00
    HEADER0.fieldNames     KEY0,VALUE1,VALUE2,VALUE3,VALUE4
    HEADER0.endSeperator     ' '
    HEADER1.fieldFixedLengths     2,7,8,4
    HEADER1.keyFieldValue     01
    HEADER1.fieldNames     KEY1,VALUE1,VALUE2,VALUE3
    HEADER1.endSeperator     ' '
    ignoreRecordsetName     true
    But im getting the following error:
    Conversion of complete file content to XML format failed around position 0: Exception: ERROR consistency check in recordset structure validation (line no. 1: missing structure(s) in last recordset
    Can anyone help me with this.Its very urgent
    thanks,
    srinadh

    Hi Bhargav,
    this might be the error...as in ur parameters
    HEADER0.fieldFixedLengths 2,6,13,13,7
    HEADER0.keyFieldValue 00
    HEADER0.fieldNames KEY0,VALUE1,VALUE2,VALUE3,VALUE4
    HEADER0.endSeperator ' '
    HEADER1.fieldFixedLengths 2,7,8,4
    HEADER1.keyFieldValue 01
    HEADER1.fieldNames KEY1,VALUE1,VALUE2,VALUE3
    HEADER1.endSeperator ' '
    The Spelling of Separator is wrong...
    Try using
    HEADER0.<b>endSeparator</b>
    Sachin

  • What is wrong with Separation Preview SLOW SLOW SLOW V2

    In Acrobat 7 I could toggle colors on off on off on off to see what my seps would do, check K.O., traps, builds  etc.
    I cannot even toggle on off on off in 9. I have a horrid delay between the spot color clicks and the entire production comes to a halt and has even unexpectedly quit.
    Has the jump to 9 from 7 made a function that worked flawlessly into such a memory hog that I need to add freaking ram to view what my Seps look like!
    Rendering settings?
    Can this be changed.
    What I have found is  I MUST click the checkmark to turn the color sep off, move my mouse, click again someplace like the color name, move my mouse back to the unchecked checkmark box, click again and turn the now off separation back on. I cannot just leave my mouse in he same location I MUST move my mouse and add a click on nothing. So to view and toggle color separations off/on, the action has changed from CLICK OFF CLICK ON CLICK OFF to CLICK OFF MOVE MOUSE CLICK NOTHING MOVE MOUSE CLICK ON.

    It's not in Acrobat 9. Before I upgraded to Acrobat X, I used Separation Preview on a Mac in Acrobat 9 for two or three years, with no slowdown whatsoever.
    It's something gone wrong with your copy.
    I would consider uninstalling Acrobat 9 and reinstalling it again if it's bugging you as much as you indicate.

  • Separator page prints out with wrong name when printing from Outlook 2010

    Working with Windows 7 Enterprise, Outlook 2010.  We've set up our desk printers to print a separator page with the user's name, as several people use the same printers in our building.  Printing from IE, Word, etc. all work fine, and it'll print
    out the correct username on the separator page.
    When anyone attempts to print an Outlook email, it instead prints out my username.  We've found that it doesn't happen if they click on the "quick print" button, but it happens every time if they do "file > Print" or Ctrl+P.

    Hi
    As per the information and details provided by you that separator page prints out with wrong name when printing from Outlook 2010, please follow these steps: -
    To create a custom separator page file, use a text editor such as
    Notepad. On the very first line, type one single character, and then press
    Enter. The character on this line defines the character used as an escape character. For example, the following list assumes that this character is the at sign (@).
    Enter the escape codes for the functions you want, and then save the file with an .sep extension in the Windows System32 subfolder.
    In the Print Manager, select the printer that you want to use the separator page file with, and then click
    Choose Properties on the Printer menu.
    Click
    Details, specify the name of the desired separator page file in the
    Separator File box, and then click OK.
    Note:
    Put the custom separator page file in one of the following locations:
    In the %Windir%System32 folder.
    In a folder whose path contains a SepFiles folder. For example:
    Drive:\Folder\SepFiles\Subfolder
    I hope this information will be helpful for you.
    Thanks and regards
    Shweta@G 

  • When creating a multi page document, some of my thumbnails become linked and can't be separated for editing. What am I doing wrong and how do I correct this?

    When creating a multi page document, some of my thumbnails become linked and therefore impossible to rearrange. What am I doing wrong and how do I correct this?

    The pages in sections stick together because the text flows between the pages.
    Insert a section break to isolate pages between sections.
    Now this all works in Pages '09, unfortunately Pages 5 doesn't let you.
    Peter

  • Wrong deduction of ESIC while separation

    Dear Experts,
    I am facing one issue wrong amount is getting deducted of ESIC while seperation,
    Actual ESI to be deducted in payslip Gross Earning = Rs.11354.57 ESIC to be deducted Rs.199/- from Payslip but payslip shows
    Rs.287/-. On which   basis ESIC deducted
    KIndly help me out.
    Regards,
    Palak Vora

    Delimit the ESI subtype on the date of leaving.
    Raghu

  • Wrong charakter for separation of numbers (dot instead of comma)

    Hi there,
    I face the following Problem with BI-Publisher 10.1.3.3.1. I want to have large numbers seperated by commas. There are different ways to do that in different countries. For example, in the usa the money amount 44.00 USD is seperated the following way: 44.00 USD. In Germany, the same money amount is seperated the following way: 44,00 USD (comma instead of dof).
    Can someone tell me how to set this in BI-Publisher? I have one instance, where it does the seperation with comma, and another instance where a dot is used - but I can't find the difference in configuration.
    Regards
    hfr

    Thanks shimona. Now I at least understand how it should work. Unfortunately, it does not in reality.
    I use the following function:
    to_char(sum(nvl(otd.pruefungsgebuehr,0)),'999G999G999G999G990D99') PRUEFUNGSGEBUEHR
    I have two BI-Publisher-Instances on two identically configured OC4Js. On both instances that report is deployed and the used datasource points to exactly the same database with the same user.
    But on one instance, the result diplayed is "40.00" and on the other instance, the result displayed is "40,00".
    The NLS_NUMERIC_CHARACTERS Definition in Database is ".,", so it should not work like I want on both instances (I need the result "40,00").
    Best Regards
    Hans

  • Data in the cube is showing wrong when compared with ODS

    Hello BW Gurus,
    We have a waste report in production planning on Cube and ODS separately. The same info package loads both targets (which means same infosource) but when we run a report on Cube, the records are showing multiple entries (i.e. Key Figures are not matching when compared to ODS) where as the ODS records are showing correctly as it was in R/3. There are totally 6 key figures out of which 4 pulled from R/3 and 2 are populated in BW. 
    An Example:
    Waste report in PP run for plant 1000 for 12/2005 and process order 123456.  The operational scrap should be 2.46% and the component scrap should be 3.00% for material 10000000.  The report is showing 7.87% for planned operational waste % and 9.6% for planned component waste %.  These values are not correct.  The ODS values for order 123456 matched the data in R/3 for component and operational scrap.
    There is a Start routine to the ODS and also to the cube. I am not good at ABAP so requesting your Help.
    <b>Here is the ODS Code:</b>
    tables:  /BI0/PPRODORDER.
      loop at data_package.
        select single COORD_TYPE
                      PRODVERS
          into (/BI0/PPRODORDER-COORD_TYPE,
                /BI0/PPRODORDER-PRODVERS)
          from /BI0/PPRODORDER
         where PRODORDER = data_package-PRODORDER
           and OBJVERS   = 'A'.
        if sy-subrc = 0.
          if /BI0/PPRODORDER-COORD_TYPE = 'XXXX'
          or /BI0/PPRODORDER-COORD_TYPE = 'YYYY'.
            data_package-PRODVERS = space.
          else.
            data_package-PRODVERS = /BI0/PPRODORDER-PRODVERS.
          endif.
        endif.
        if data_package-calday = space
        or data_package-calday = '00000000'.
          if data_package-TGTCONSQTY NE 0.
            data_package-calday = data_package-ACTRELDATE.
          endif.
        endif.
        modify data_package.
      endloop.
    <b>Here is Cube Code:</b>
    tables:  /BI0/PPRODORDER,
               /BIC/ODS.
      TYPES:
      BEGIN OF ys_mat_unit,
        material                 TYPE /bi0/oimaterial,
        mat_unit                 TYPE /bi0/oimat_unit,
        numerator                TYPE /bi0/oinumerator,
        denomintr                TYPE /bi0/oidenomintr,
      END OF ys_mat_unit.
      DATA:
        l_s_mat_unit             TYPE ys_mat_unit,
        e_factor                 type p decimals 5.
      loop at data_package.
        select single COORD_TYPE
                      PRODVERS
          into (/BI0/PPRODORDER-COORD_TYPE,
                /BI0/PPRODORDER-PRODVERS)
          from /BI0/PPRODORDER
         where PRODORDER = data_package-PRODORDER
           and OBJVERS   = 'A'.
        if sy-subrc = 0.
          if /BI0/PPRODORDER-COORD_TYPE = 'XXX'
          or /BI0/PPRODORDER-COORD_TYPE = 'YYY'.
            data_package-PRODVERS = space.
          else.
            data_package-PRODVERS = /BI0/PPRODORDER-PRODVERS.
          endif.
        endif.
        if data_package-calday = space
        or data_package-calday = '00000000'.
          if data_package-TGTCONSQTY NE 0.
            data_package-calday = data_package-ACTRELDATE.
          endif.
        endif.
        data_package-agsu     = 'GSU'.
        data_package-agsu_qty = 0.
        select single gr_qty
                      base_uom
          into (/BIC/ODS-gr_qty,
                /BIC/ODS-base_uom)
          from /BIC/ODS
         where prodorder = data_package-prodorder
           and material  = data_package-material.
        if sy-subrc = 0.
          if /BIC/ODS-base_uom = 'GSU'.
            data_package-agsu_qty = /BIC/ODS-gr_qty.
          else.
            SELECT SINGLE * FROM /bi0/pmat_unit
              INTO CORRESPONDING FIELDS OF l_s_mat_unit
              WHERE material   = data_package-material
                AND mat_unit   = 'GSU'
                AND objvers    = 'A'.
            IF sy-subrc = 0.
              IF l_s_mat_unit-denomintr <> 0.
                e_factor = l_s_mat_unit-denomintr /  
                              l_s_mat_unit-numerator.
                multiply /BIC/ODS-gr_qty by e_factor.
                data_package-agsu_qty = /BIC/ODS-gr_qty.
              ENDIF.
            else.
              CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
                EXPORTING
                  INPUT                = /BIC/ODS-gr_qty
                  NO_TYPE_CHECK        = 'X'
                  ROUND_SIGN           = ' '
                  UNIT_IN              = /BIC/ODS-base_uom
                  UNIT_OUT             = 'GSU'
                IMPORTING
                  OUTPUT               = DATA_PACKAGE-gsu_qty
                EXCEPTIONS
                  CONVERSION_NOT_FOUND = 1
                  DIVISION_BY_ZERO     = 2
                  INPUT_INVALID        = 3
                  OUTPUT_INVALID       = 4
                  OVERFLOW             = 5
                  TYPE_INVALID         = 6
                  UNITS_MISSING        = 7
                  UNIT_IN_NOT_FOUND    = 8
                  UNIT_OUT_NOT_FOUND   = 9
                  OTHERS               = 10.
            endif.
          endif.
        endif.
        modify data_package.
      endloop.
    some how the AGSU qyt is not populating in the cube and when I dbug the code, I could see a clean record in the internal table but not in the cube.
    your suggestion and solutions would be highly appreciated.
    thanks,
    Swathi.

    Hi Swathi,
    May be you might want to look into the way the % is being calculated in the cube. If the formula involves counting the no. of records, then you will also be counting the -ve records that are posted in the cube unless you have had a compression on the cube. that might give you wrong numbers.
    Doniv

  • Wrong album covers can't be deleted

    Hi
    I have stubborn wrong album covers that can't be changed or deleted in my itunes library / covers view. The Info-> Artwork view is ok! They only show up in the covers flow..
    Fixes tried:
    delete artwork. replace artwork, add artwork, move song to desktop - delete in itunes - reimport (nope)
    The same album cover shows for several different songs/artists, I think it's just one - that was grabbed by itunes "get album covers" (and can you imagine how annoying it is to see "robbie williams escapology" for a bunch of alternative music songs..)
    Ideas?

    Thanks Rob,
    I had similar problem, where the Cover Flow artwork was not even close to the artwork. I went into iTunes info, as suggested,and unclicked the box "Part of a Compilation". So, far I've had to go in to each incorrect song separately. It was frustrating me, until that great suggestion. I would track down the CD artwork I wanted; it would show up correctly in the Now Playing window (lower left) in iTunes, but the Cover Flow was way off...the crazy thing was I couldn't find the incorrect artwork in the iTunes artwork window...it would be blank; even when I dragged the correct artwork into that window, it would NOT override it, UNTIL I discovered The Secret! Again, UNCHECK the box labeled Part of a Compilation. I tried grouping 2 or more incorrectly labeled songs, but that didn't seem to work. So far, it looks like you can do it, but it's ONE at a Time. Thanks for the suggestion. If anyone found a quicker way, do tell...I've got thousands of tunes to pour through.

  • Collisions (Separating Axis Theorem)

    Hi,
    I'm working on a 2D game, it's top-down like GTA2, but I'm havinfgproblems with the collision detector. I know there are a lot of posts about collision already but they didn't help me much. I'm using the separating axis theorem (explained here: http://www.harveycartel.org/metanet/tutorials/tutorialA.html#section1) and most of the code is inspired by http://www.codeproject.com/cs/media/PolygonCollision.asp .
    Separating axis theorem:
    find all axis perpendicular to all the edges of both objects,
    project both objects on the axis,
    if there is an axis where the projections do not overlap, then the objects do not overlap.
    The problem is that I think my code should work. And guess what, it doesn't. I checked the code 30 times this weekend but maybe there is some tiny mistake I overlook each time..
    When I run the program with 6 objects I get this:
    1 2 3 4 5 6
    1: - 0 0 0 0 0
    2: 0 - 1 0 0 0
    3: 0 1 - 0 0 0
    4: 0 0 0 - 0 0
    5: 0 0 0 0 - 0
    6: 0 0 0 0 0 - (1=intersect, 0=doesn't intersect)
    but this is completely wrong. You can run the program yourself to see the exact locations of the objects.
    1 is the triangle at the top,
    2 and 3 are the triangles who share an edge
    4 is the one on the left intersecting with 3
    5 is the triangle on the right
    6 is the parallelogram
    But it really gets weird when I add a 7th object (the one in the comments):
    1 2 3 4 5 6 7
    1: - 0 0 0 0 0 0
    2: 0 - 0 0 0 0 0
    3: 0 0 - 0 0 0 0
    4: 0 0 0 - 0 0 0
    5: 0 0 0 0 - 0 0
    6: 0 0 0 0 0 - 0
    7: 0 0 0 0 0 0 -
    Now 2 and 3 don't intersect anymore! They didn't change I just added another object.
    I'm adding a short explanationof all the classes and the code itself. I know it's a lot of code but I added all the test classes so you can just run Test.Test
    I hope someone can help me with this.
    Thanks,
    El Bandano
    _<h5>package CollisionDetector:</h5>_
    <h6>CollisionDetector</h6>
    The class that is supposed to check for collisions. It will take 2 Props and return a CollisionResult
    <h6>CollisionResult</h6>
    A small class with 2 public fields. For now only the boolean Intersect matters.
    <h6>Interval</h6>
    Another small class that represents an interval of floats. It's pretty simple. Distance should return something negative if 2 intervals overlap.
    _<h5>package World</h5>_
    <h6>MovableProp</h6>
    An interface of an object. All objects should be convex.
    <h6>Vector2D</h6>
    A 2D-vector. It has an x and a y value (floats) and some simple methods. a 2D vector can represent a point or an edge/axis. For a point the x and y are the coordinates. For an axis you need a normalized vector (x^2+y^2=1) and the x and y are coordinates on a parrallell line through (0,0).
    _<h5>package Test</h5>_
    <h6>Test</h6>
    The main class. It makes some objects, prints a matrix showin which intersect eachother and shows a window with all objects.
    <h6>TestMovProp</h6>
    A basic implementation of MovableProp.
    <h6>TestPanel</h6>
    A panel that draws MovableProp.
    _<h5>package CollisionDetector:</h5>_
    <h6>CollisionDetector</h6>
    package CollsisionDetector;
    import World.MovableProp;
    import World.Vector2D;
    import java.util.ArrayList;
    public class CollisionDetector {
        public CollisionDetector(){
        public CollisionResult DetectCollision(MovableProp propA, MovableProp propB) {
            CollisionResult result = new CollisionResult();
            result.Intersect = true;
            result.WillIntersect = true;
            Vector2D[] edges = UniqueEdges(propA, propB);
            // loop through the edges
            // find an axis perpendicular to the edge
            // project the props on the axis
            // check wether they intersect on that axis
            for (Vector2D edge: edges){
                Vector2D axis = edge.getPerpendicular();
                Interval intA = projectPointsOnAxis(propA.getCoordinates(), axis);
                Interval intB = projectPointsOnAxis(propB.getCoordinates(), axis);
                if (intA.distance(intB) > 0)
                    result.Intersect = false;
            return result;
        public Interval projectPointsOnAxis(Vector2D[] points, Vector2D axis){
            Interval i = new Interval();
            for (Vector2D p: points)
                i.add(projectPointOnAxis(p, axis));
            return i;
        public float projectPointOnAxis(Vector2D point, Vector2D axis){
            // axis <-> y=a*x
            float a  = axis.y / axis.x;
            // line <-> y=(-a/1)*x+b
            float a2 = -axis.x / axis.y;
            // b = y-a2*x
            float b = point.y - a2*point.x;
            // y = a *x
            // y = a2*x + b
            // => a*x = a2*x + b
            float x = b/(a-a2);
            float y = a*x;
            // is there a better way to do this?
            return new Float(Math.sqrt(x*x + y*y)).floatValue();
         * Put all edges in 1 array, eliminate doubles (parallels).
        public Vector2D[] UniqueEdges(MovableProp propA,MovableProp propB){
            Vector2D[] aEdges = propA.getEdges();
            Vector2D[] bEdges = propB.getEdges();
            ArrayList<Vector2D> tmp = new ArrayList<Vector2D>();
            for (Vector2D v: aEdges){
                tmp.add(v);
            for (Vector2D v: bEdges){
               if (! tmp.contains(v))
                    tmp.add(v);
            return tmp.toArray(new Vector2D[tmp.size()]);
    }<h6>CollisionResult</h6>
    package CollsisionDetector;
    import World.Vector2D;
    public class CollisionResult {
        public boolean WillIntersect;
        public boolean Intersect;
        public Vector2D MinimumTranslationVector;
        public CollisionResult() {
    }<h6>Interval</h6>
    package CollsisionDetector;
    public class Interval {
        public float min;
        public float max;
        public Interval() {
            min = Float.MAX_VALUE;
            max = Float.MIN_VALUE;
        public void add(float f){
            // no 'else'! In an empty interval both will be true
            if (f>max)
                max = f;
            if (f<min)
                min = f;
        public float distance(Interval interval){
            if (this.min < interval.min) {
                return interval.min - this.min;
            } else {
                return this.min - interval.min;
    }_<h5>package World</h5>_
    <h6>MovableProp</h6>
    package World;
    public interface MovableProp {
        public int getNPoints();
        public Vector2D[] getEdges();
        public Vector2D[] getCoordinates();
    }<h6>Vector2D</h6>
    package World;
    public class Vector2D {
        public float x;
        public float y;
        public Vector2D(float x, float y) {
            this.x = x;
            this.y = y;
        public boolean equals(Object obj){
            if (!(obj instanceof Vector2D)){
                return false;
            }else
                return (this.x == ((Vector2D)obj).x && this.y == ((Vector2D)obj).y);
        public String toString() {
            return ("Vector2D  x=" + x + " ,  y=" + y);
        public void normalize(){
            if (x*x + y*y != 1){
                float x2 = x;
                x /= Math.sqrt(x2*x2+y*y);
                y /= Math.sqrt(x2*x2+y*y);
        public Vector2D getPerpendicular(){
            Vector2D per = new Vector2D(-y,x);
            per.normalize();
            return per;
    }_<h5>package Test</h5>_
    <h6>Test</h6>
    package Test;
    import CollsisionDetector.CollisionDetector;
    import World.MovableProp;
    import java.awt.Polygon;
    import java.util.ArrayList;
    import java.util.Vector;
    import javax.swing.JFrame;
    public class Test {
        public static void main(String args[]) {
            CollisionDetector detect = new CollisionDetector();
            float[] x = new float[3];
            float[] y = new float[3];
            ArrayList<MovableProp> list = new ArrayList<MovableProp>();
            x[0] = 200; x[1] = 300; x[2] = 500;
            y[0] = 400; y[1] = 200; y[2] = 300;
            list.add(new TestMovProp(x,y));
            x[0] = 300; x[1] = 500; x[2] = 600;
            y[0] = 400; y[1] = 400; y[2] = 500;
            list.add(new TestMovProp(x,y));
            x[0] = 200; x[1] = 300; x[2] = 600;
            y[0] = 600; y[1] = 400; y[2] = 500;
            list.add(new TestMovProp(x,y));
            x[0] = 100; x[1] = 200; x[2] = 300;
            y[0] = 800; y[1] = 500; y[2] = 700;
            list.add(new TestMovProp(x,y));
            x[0] = 600; x[1] = 600; x[2] = 700;
            y[0] = 400; y[1] = 700; y[2] = 500;
            list.add(new TestMovProp(x,y));
    //        x[0] = 100; x[1] = 001; x[2] = 900;
    //        y[0] = 001; y[1] = 900; y[2] = 500;
    //        list.add(new TestMovProp(x,y));
            x = new float[4];
            y = new float[4];
            x[0] = 450; x[1] = 550; x[2] = 500; x[3] = 400;
            y[0] = 200; y[1] = 250; y[2] = 650; y[3] = 600;
            list.add(new TestMovProp(x,y));
            int n = list.size();
            boolean[][] matrix = new boolean[n][n];
            for (int i=0; i<n; i++){
                for (int j=0; j<n; j++){
                    if (i!=j)
                    matrix[i][j] = detect.DetectCollision(list.get(i),list.get(j)).Intersect;
            System.out.print("  ");
            for (int i=0; i<n; i++){
                System.out.print("  " + (i+1));
            for (int i=0; i<n; i++){
                System.out.print("\n" + (i+1) + ":  ");
                for (int j=0; j<n; j++){
                    if (i==j)
                        System.out.print("-  ");
                    else if (matrix[i][j])
                        System.out.print("1  ");
                    else
                        System.out.print("0  ");
            System.out.println();
            JFrame window = new JFrame();
            window.setDefaultCloseOperation(window.EXIT_ON_CLOSE);
            window.pack();
            window.setVisible(true);
            window.setContentPane( new TestPanel(list));
            window.pack();
    }<h6>TestMovProp</h6>
    package Test;
    import World.MovableProp;
    import World.Vector2D;
    public class TestMovProp implements MovableProp{
        float[] X;
        float[] Y;
        Vector2D[] coor;
        public TestMovProp(float[] x, float[] y) {
            X=x; Y=y;
            coor = new Vector2D[getNPoints()];
            for(int i=0; i< getNPoints(); i++){
                coor[i] = new Vector2D(X, Y[i]);
    public Vector2D[] getCoordinates(){
    return coor;
    public int getNPoints() {
    return X.length;
    public Vector2D[] getEdges() {
    int n = getNPoints();
    Vector2D[] v = new Vector2D[n];
    for (int i=0; i<n-1; i++){
    v[i] = new Vector2D(X[i]-X[i+1], Y[i]-Y[i+1]);
    v[i].normalize();
    v[n-1] = new Vector2D(X[0]-X[n-1], Y[0]-Y[n-1]);
    v[n-1].normalize();
    return v;
    public String toString() {
    String s = "\n";
    for (Vector2D v: getCoordinates())
    s += ("\n" + v);
    return s;
    <h6>TestPanel</h6>package Test;
    import World.MovableProp;
    import World.Vector2D;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Polygon;
    import java.util.ArrayList;
    import javax.swing.JPanel;
    public class TestPanel extends JPanel {
    public ArrayList<MovableProp> list;
    public TestPanel(ArrayList<MovableProp> list) {
    super();
    this.list = list;
    setPreferredSize(new Dimension(1000,850));
    public void paint(Graphics g) {
    super.paint(g);
    for (MovableProp prop:list){
    Vector2D[] coor = prop.getCoordinates();
    int n = prop.getNPoints();
    g.drawLine((int)coor[0].x, (int)coor[0].y, (int)coor[n-1].x, (int)coor[n-1].y);
    for (int i=0; i<n-1; i++){
    g.drawLine((int)coor[i].x, (int)coor[i].y, (int)coor[i+1].x, (int)coor[i+1].y);

    .java wrote:
    I have been search for what seems like hours, Nice try, but in less than 15 seconds I found a complete discussion on the subject.
    and I still have not managed to find anybody or anything that can clearly answer these three questions:
    1. What is SAT?
    2. How does it apply to 2D collision detection? (How would it be different with 3D collision detection?)
    3. How can this be implemented in Java using Shape objects?
    Note: I am easily confused by geometric terminology.This really looks like a question you should have an answer for in your notes from class, or in your book. If not perhaps you need to go ask your teacher what it is and explain why you don't have it in your notes or book.

  • Store rep signed me up under the wrong plan and no one in customer service has fixed it in over a month

    I was bait and switched. I signed up under the pretense that I was getting the promotional rate of 40gb/$150 that was scheduled to end on November 5 2014.
    I walked  into a Verizon wireless store on November 4th with the intent to trade in my iPhone 5s which I was offered $350 trade in value and port over 2 of my lines with T-Mobile under the Verizon promotion. Once I was approved and offered my trade in I was told that the phones I was seeking to purchase from Verizon was not in stock and needed to be ordered, and delivered separately with the iPhone 6 being shipped out November 14 and the iPhone 6+ shipped November 21. Thomas, the Verizon wireless sales representative, also informed me that for me to get the promotional rate I would have to open the account with an active line before the 5th or I wouldn't be able to get the promotional rate since the phones would be delivered past the promotional date period. The sales representative insisted I should add an iPad that  was in stock at the store and I could leave the store with an active account and once my phones were delivered I would be all set to go with my promotional plan and devices. I had no need for an iPad but decided it was worth getting for the sake of the promotion.
    ON November 14 I recieved via FedEx a package containing not a iPhone 6 as promised, but a iPhone 6+. I called Verizon to activate the phone that was ported to my personal phone number, and didn't have my iPhone 6 that was set to port my out of state business line and cancel service with T-Mobile on the 14th of November. To say the least I was extremely upset for which I had no means of recieving business calls from North Carolina while I live in Florida. At that point I asked the Verizon customer care representative I had on the phone to see if they could see if there was a store that had the iphone 6 I ordered in stock so that I an could have a business phone the same day. He found a store that had it in stock and it happened to be the store I originally signed up at. I was told that it was in the color and storage capacity I had originally ordered and that I could pick it up at the store to complete my purchase with Verizon. Again, for the sake of having a business line I ran to the store and spoke with Thomas and explained the mix up. upon moving forward I was informed that they had an iPhone 6 in stock with the capacity I had requested but not the same color I had ordered. At that point I didn't care I just needed a phone and proceeded to activate the phone he had in stock And ported over my business line.
    After recieving a text from Verizon that I had consumed all of my data just days after I recieved my phones I called Verizon 611 from my phone and spoke to a customer care representative named Fallon, which informed me I was set up on the wrong plan and that she see's the notes that Thomas notated that I was subscribing for a 40gb plan and that she was going to send a  request I D # [removed] form to make the corrections and that there was no need for me to cancel service as I was within my cancelation period, again she insisted that there was no need to cancel and that the request would be granted and she would be calling me once my billing cycle reset and the corrections were made and she would credit my account based on the promotional rate. I NEVER RECIEVED A CALL FROM FALLON! Not even to be notified that the request was denied! I came to realize later in December when I recieved a $1200 bill that this wasn't resolved. I called customer service again and spoke with a gentleman that explained the request was denied and that this will be resolved after I explained what transpired. He assured me that he was going to expedite another request and he would be in contact with me within a few hours....... I'm still waiting for his call as well!
    I called again several times in the past few days and have spoken to several supervisors that promised to resolve this matter and call me back promptly........ Again, no one has called me back!
    December the 8th I spoke with a supervisor named Victoria which assured me she would get this resolved within the next 24 hours and gave me her direct number to reach her if I didn't hear from her [removed], again I haven't heard from her yet and I've made several attempts to reach her at her direct line to no avail.
    December the 9th I spoke with supervisor named Mike employee #[removed] in the Seattle call center, he appoligized for the mix up and that no one has called me back and that he would handle this matter and get back to me today December 10th....... Again no call..... I have spoken to 3 people today all which have made promises to call me back today within a few hours and none that have. I just got off the phone with a supervisor named Vanessa Jentfield at the Chicago call center and saw all the notations and assured me that there is no reason why this shouldn't be corrected and that she would be calling me back tonight or tomorrow. I will be sitting by the phone unless Verizon wireless decides to disconnect my service for non payment of $1200+.........
    I have filed a complaint giving a detailed explanation of what has transpired with the FCC as well as the FTC, my next step is to file a small claims lawsuit tomorrow morning with the state of Florida and see if Verizon finds a way to contact me then,I guess I will just have to wait and see.
    Personal information removed as required by the Verizon Wireless Terms of Service
    Message was edited by: Admin Moderator

    It was a good idea to file a complaint with the FCC, someone from Verizon will contact you by phone in an effort to  resolve your issue. I wouldn't suggest small claims court as they have not done anything illegal, (just bad customer service) and their contract with you is usually upheld, which in this case is not for the plan you want. The person contacting you likely has a little more pull, as the call centers can only uphold the written customer agreement made.

  • HT204400 Light is flashing continueously on the front of the apple tv. No picture and no sound. Does anyone know what is wrong? Everything is plug in correctly. When I disconnect everything and re plug it in the apple icon comes up, but then blank screen

    Light is flashing continueously on the front of the apple tv. No picture and no sound. Does anyone know what is wrong? Everything is plug in correctly. When I disconnect everything and re plug it in the apple icon comes up, but then blank screen with no sound and no picture. Does anyone know what is wrong?
    l have an apple tv  2 generation please help me

    Welcome to the Apple Community.
    If your problem persists get yourself a micro USB cable (sold separately), you can restore your Apple TV from iTunes:
    Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
    Connect the micro USB cable to the Apple TV and to your computer.
    Reconnect the power cable (only for Apple TV 3)
    Open iTunes.
    Select your Apple TV in the Devices list, and then click Restore.
    (You may already have a micro USB cable if you have a camera or other digital device)

  • Wrong format on text file using SO_NEW_DOCUMENT_ATT_SEND_API1 FM

    Hi All!!
    I've been looking in the forum but couldn't find the solution...
    I'm using this FM to send a text file by email.
    I got the email and the file attached but the file is not right
    I shoud get:
    texttexttexttext blablabla  texttexttexttext
    texttexttexttext blablabla  texttexttexttext
    texttexttexttext blablabla  texttexttexttext
    texttexttexttext blablabla  texttexttexttext
    but I'm getting
    texttexttexttext blablabla  texttexttexttext
    . ...................................... texttexttexttext blablabla  texttexttexttext
    . ....................................... ......................................  texttexttexttext blablabla  texttexttexttext
    . ....................................... ....................................... ...................................... texttexttexttext blablabla  texttexttexttext
    (dots are not being displayed)
    I've tried concatenating '0A' or '09' at the end of each line but I'm still getting the wrong alinegment. 
    Any idea?
    Thanks.
    Edited by: Ina on Sep 15, 2009 1:01 PM
    Edited by: Ina on Sep 15, 2009 1:02 PM

    ***********Declarations *******************************
    constants :  c_cret(2)        TYPE c VALUE cl_abap_char_utilities=>cr_lf,
                        c_tab(2)         TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
    DATA : i_objtxt            TYPE STANDARD TABLE OF solisti1,        " Internal table to hold Mail details
                 i_objpack        TYPE STANDARD TABLE OF sopcklsti1,   " Internal table to hold Mail details
                 i_objhead        TYPE STANDARD TABLE OF solisti1,        " Internal table for the Mail data
                 i_objbin           TYPE STANDARD TABLE OF solisti1,        " Internal table to hold the Object text
                 i_rcvrs            TYPE STANDARD TABLE OF somlreci1.
    DATA : wa_objtxt        LIKE LINE OF i_objtxt,
                wa_objpack       LIKE LINE OF i_objpack,
                wa_objhead       LIKE LINE OF i_objhead,
                wa_objbin        LIKE LINE OF i_objbin,
                 wa_rcvrs         LIKE LINE OF i_rcvrs.
    ********Send Mail***************************************
      DATA : l_lines TYPE i.
      DATA : l_attlines TYPE i.
    Mail Body text
      wa_objtxt-line = title
      APPEND wa_objtxt TO i_objtxt.
      DESCRIBE TABLE i_objtxt LINES l_lines.
    *Document Attributes
      i_doc_chng-obj_name  = 'TEST'. " input contains the attributes of the document to be sent
      i_doc_chng-obj_descr = 'bla bla bla'
    Mail details
      CLEAR wa_objpack.
      wa_objpack-head_start = c_1.
      wa_objpack-head_num   = c_0.
      wa_objpack-body_start = c_1.
      wa_objpack-body_num   = l_lines.
      wa_objpack-doc_type   = 'RAW'.
      APPEND wa_objpack TO i_objpack.
      IF NOT i_output IS INITIAL.   
        LOOP AT i_output INTO wa_output.
          CONCATENATE wa_output-matnr1  wa_output-text INTO wa_objbin SEPARATED BY c_tab.   "first line
          CONCATENATE c_cret wa_objbin  INTO wa_objbin.
          APPEND  wa_objbin TO i_objbin.
        ENDLOOP.
      DESCRIBE TABLE i_objbin LINES l_attlines.
      READ     TABLE i_objbin INTO wa_objbin INDEX l_attlines.
      CLEAR wa_objpack.
      wa_objpack-transf_bin = 'X'.
      wa_objpack-head_start = c_1.
      wa_objpack-head_num   = c_0.
      wa_objpack-body_start = c_1.
      wa_objpack-body_num   = l_attlines.
      wa_objpack-doc_type   = 'TXT' .
      wa_objpack-obj_name   = text-201.
      wa_objpack-obj_descr  = text-201.
      wa_objpack-doc_size   = ( l_attlines - 1 ) * 255
                                                + STRLEN( wa_objbin ).
      APPEND wa_objpack TO i_objpack.
      MOVE p_list TO wa_rcvrs-receiver.
      wa_rcvrs-rec_type = 'U'            " Internet ID
      wa_rcvrs-rec_date = ''.
      PERFORM touppercase CHANGING wa_rcvrs.
      APPEND wa_rcvrs TO i_rcvrs.
      CLEAR wa_rcvrs.
      wa_objhead-line = text-201.
      APPEND wa_objhead TO i_objhead.
    Call function to send the mail
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = i_doc_chng
          put_in_outbox                = c_x
          commit_work                 = c_x
        TABLES
          packing_list                   = i_objpack
          object_header              = i_objhead
          contents_bin                = i_objbin
          contents_txt                 = i_objtxt
          receivers                      = i_rcvrs
        EXCEPTIONS
          too_many_receivers                  = 1
          document_not_sent                   = 2
          document_type_not_exist         = 3
          operation_no_authorization      = 4
          parameter_error                       = 5
          x_error                                     = 6
          enqueue_error                         = 7
          OTHERS                                   = 8.
      CASE sy-subrc.
        WHEN '0'.
          WAIT UP TO 2 SECONDS.
          SUBMIT rsconn01 WITH mode = 'INT'
                          AND RETURN.
          MESSAGE s010(ad)  WITH 'Mail Sent Successfully'(i50).
    ENSCASE.
    Try this code with your data, this should work.
    Edited By Tejaswini Khante

  • HT4796 I used migration to transfer iTunes from pc to mac book. It had me set up another user account. Now i have 2 user accounts and i have the iTunes on the wrong one. How do i get the iTunes on the original account.

    I used migration to transfer iTunes from pc to mac book. It had me set up another user account. Now i have 2 user accounts and i have the iTunes on the wrong one. How do i get the iTunes on the original account.

    In Mail Preferences/Accounts/each GMail account, set up the SMTP Outgoing Server for each account separately, going into SMTP name/edit/Advanced and specify the Username of each account.  The Outgoing servers must be two different servers, authenticated by the Username and Password of each.
    Otherwise, the GMail SMTP server will change the from address to that of the account where the SMTP server was setup.
    Ernie

Maybe you are looking for

  • PCUI 4.0 Cookbook/Documentation very very urgent

    Dearest experts I have been having problems trying to access the pcui and have tried going through the forum but its still not helping. I need it case management implementation. I know there's a documentation link that was created but there is not pc

  • Overriding Ctrl+Tab

    I try to override the Ctrl-Tab key combination using the following:         final KeyStroke focusUnderneathTableKeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, Event.CTRL_MASK);         wrapper.overrideShortcutKey(new FocusOnTableAction(false), f

  • Inbound ALE Setup for Work Orders in SRM

    Hi Gurus, I need help on Inbound ALE Setup in SRM.If i have Inbound Idoc available at SRM side, what needs to be done for ALE configuration so i can post this data to corresponding application documents. Which message type, Process code i need to use

  • Cant open a file need help.

    I cant open spacer_5px.gif file

  • Remote speakers/computer doesen't show up in itunes

    I tried everything from calling tech support to re-installing the airport software. And I found out how to fix it! I unplugged the airport from my stereo and plugged it into the wall and connected it as a wireless modem, ( I have a Linksys wireless r