Help with Creating Views

Hi Gurus,
There are 3 R/3 Tables for Plant Maintenance namely:
1. ZPM_T_CONTRWO - Work Order Details for Contractor Payroll - ZIPY
2. ZPM_T_WODETAILS - Work Order Details for ZIPY
3. ZPM_T_ZIPYMASTER - Document Numbers for ZIPY
The keys for the tables are:
1. ZPM_T_CONTRWO: Document #, Order #, Operation/Activity #, Notification #
2. ZPM_T_WODETAILS: Document #, Order #, Operation/Activity #, Notification #
3. ZPM_T_ZIPYMASTER: Document #
I'm thinking of creating 2 views, one b/w CONTRWO & ZIPYMASTER and the other b/w CONTRWO & WODETAILS.
Please provide me guidelines & suggestions of doing this.
Points will be rewarded.
Thanks in advance,
Manjesh
NOTE: Below are the field names for each table ***
ZPM_T_CONTRWO:
Client, Document Number - ZIPY, Order Number, Operation/Activity Number
Notification Number, Work Order Reference Number, Base quantity
Base unit of measure, Total hours in selection period, Segment From
Segment To, Offset From, Offset To, Checkbox, Last changed on, Time of entry
User name
ZPM_T_WODETAILS:
Client, Document Number - ZIPY, Order Number, Operation/Activity Number
Work Order Reference Number, Base quantity, Base unit of measure
Total hours in selection period, Segment From, Segment To, Offset From
Offset To, Checkbox, Page Number, Single-character flag, Confirmation number of operation, Confirmation counter, Single-character flag, Last changed on,
Time of entry, User name
ZPM_T_ZIPYMASTER:
Client, Document Number - ZIPY, Date, Work center, Plant, Personnel number,
Single-character flag, Time, Last changed on, Time of entry, User name

Hi Manjesh,
To create a view, you have to have atleast one common field in both tables to have the right join condition.
You are meeting that condition with Document# for all tables.
Refer this
http://help.sap.com/saphelp_erp2005/helpdata/en/cf/21ec5d446011d189700000e8322d00/content.htm
<b>for how to create the views?</b>
R/3 side:
1. Go to SE11 tcode.
2. Enter the name of the view and create.
3. Take common key fields of the tables to meet the Join Conditions ZPM_T_CONTRWO or ZPM_T_WODETAILS or ZPM_T_ZIPYMASTER
---> Document# will give correct join condition.
4. add the fields from ZPM_T_CONTRWO or ZPM_T_WODETAILS or ZPM_T_ZIPYMASTER.
Regards,
BVC

Similar Messages

  • I need help with Creating Key Pairs

    Hello,
    I need help with Creating Key Pairs, I generate key pais with aba provider, but the keys generated are not base 64.
    the class is :
    import java.io.*;
    import java.math.BigInteger;
    import java.security.*;
    import java.security.spec.*;
    import java.security.interfaces.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;
    import au.net.aba.crypto.provider.ABAProvider;
    class CreateKeyPairs {
    private static KeyPair keyPair;
    private static KeyPairGenerator pairGenerator;
    private static PrivateKey privateKey;
    private static PublicKey publicKey;
    public static void main(String[] args) throws Exception {
    if (args.length != 2) {
    System.out.println("Usage: java CreateKeyParis public_key_file_name privete_key_file_name");
    return;
    createKeys();
    saveKey(args[0],publicKey);
    saveKey(args[1],privateKey);
    private static void createKeys() throws Exception {
    Security.addProvider(new ABAProvider());
    pairGenerator = KeyPairGenerator.getInstance("RSA","ABA");
    pairGenerator.initialize(1024, new SecureRandom());
    keyPair = pairGenerator.generateKeyPair();
    privateKey = keyPair.getPrivate();
    publicKey = keyPair.getPublic();
    private synchronized static void saveKey(String filename,PrivateKey key) throws Exception {
    ObjectOutputStream out= new ObjectOutputStream(new FileOutputStream(filename));
    out.writeObject(key);
    out.close();
    private synchronized static void saveKey(String filename,PublicKey key) throws Exception {
    ObjectOutputStream out= new ObjectOutputStream( new FileOutputStream(filename));
    out.writeObject(key);
    out.close();
    the public key is:
    �� sr com.sun.rsajca.JSA_RSAPublicKeyrC��� xr com.sun.rsajca.JS_PublicKey~5< ~��% L thePublicKeyt Lcom/sun/rsasign/p;xpsr com.sun.rsasign.anm����9�[ [ at [B[ bq ~ xr com.sun.rsasign.p��(!g�� L at Ljava/lang/String;[ bt [Ljava/lang/String;xr com.sun.rsasign.c�"dyU�|  xpt Javaur [Ljava.lang.String;��V��{G  xp   q ~ ur [B���T�  xp   ��ccR}o���[!#I����lo������
    ����^"`8�|���Z>������&
    d ����"B��
    ^5���a����jw9�����D���D�)�*3/h��7�|��I�d�$�4f�8_�|���yuq ~
    How i can generated the key pairs in base 64 or binary????
    Thanxs for help me
    Luis Navarro Nu�ez
    Santiago.
    Chile.
    South America.

    I don't use ABA but BouncyCastle
    this could help you :
    try
    java.security.Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
    java.security.KeyPairGenerator kg = java.security.KeyPairGenerator.getInstance("RSA","BC");
    java.security.KeyPair kp = kg.generateKeyPair();
    java.security.Key pub = kp.getPublic();
    java.security.Key pri = kp.getPrivate();
    System.out.println("pub: " + pub);
    System.out.println("pri: " + pri);
    byte[] pub_e = pub.getEncoded();
    byte[] pri_e = pri.getEncoded();
    java.io.PrintWriter o;
    java.io.DataInputStream i;
    java.io.File f;
    o = new java.io.PrintWriter(new java.io.FileOutputStream("d:/pub64"));
    o.println(new sun.misc.BASE64Encoder().encode(pub_e));
    o.close();
    o = new java.io.PrintWriter(new java.io.FileOutputStream("d:/pri64"));
    o.println(new sun.misc.BASE64Encoder().encode(pri_e));
    o.close();
    java.io.BufferedReader br = new java.io.BufferedReader(new java.io.FileReader("d:/pub64"));
    StringBuffer keyBase64 = new StringBuffer();
    String line = br.readLine ();
    while(line != null)
    keyBase64.append (line);
    line = br.readLine ();
    byte [] pubBytes = new sun.misc.BASE64Decoder().decodeBuffer(keyBase64.toString ());
    br = new java.io.BufferedReader(new java.io.FileReader("d:/pri64"));
    keyBase64 = new StringBuffer();
    line = br.readLine ();
    while(line != null)
    keyBase64.append (line);
    line = br.readLine ();
    byte [] priBytes = new sun.misc.BASE64Decoder().decodeBuffer(keyBase64.toString ());
    java.security.KeyFactory kf = java.security.KeyFactory.getInstance("RSA","BC");
    java.security.Key pubKey = kf.generatePublic(new java.security.spec.X509EncodedKeySpec(pubBytes));
    System.out.println("pub: " + pubKey);
    java.security.Key priKey = kf.generatePrivate(new java.security.spec.PKCS8EncodedKeySpec(priBytes));
    System.out.println("pri: " + priKey);
    catch(Exception e)
    e.printStackTrace ();
    }

  • Help with creating a form, I want to add a check box to enable me to unlock certain fields and deselect the block again

    Help with creating a form, I want to add a check box to enable me to unlock certain fields and deselect the block again

    Look to the right under "More Like This". Your issue has been discussed many many times. The error you are seeing is because you do not have enough free "contiguous" space on your hard drive. Read the other threads that address this issue to find how to solve the issue.
    Or, put "The disk cannot be partitioned because some files cannot be moved" into the search box at the upper right of this page.

  • Help with creating a Quiz

    Hey i need help with creating a quiz with scoring and all.
    I need a helping hand so if you can get me started that
    would help a lot.
    Use the Question class to define a Quiz class. A
    quiz can be composed of up to 25 questions. Define the add method
    of the Quiz class to add a question to a quiz. Define the giveQuiz
    method of the Quiz class to present each question in turn to the user,
    accept an answer for each one, and keep track of the results. Define
    a class called QuizTime with a main method that populates a quiz,
    presents it, and prints the final results.
    // Question.java Author: Lewis/Loftus/Cocking
    // Represents a question (and its answer).
    public class Question implements Complexity
    private String question, answer;
    private int complexityLevel;
    // Sets up the question with a default complexity.
    public Question (String query, String result)
    question = query;
    answer = result;
    complexityLevel = 1;
    // Sets the complexity level for this question.
    public void setComplexity (int level)
    complexityLevel = level;
    // Returns the complexity level for this question.
    public int getComplexity()
    return complexityLevel;
    // Returns the question.
    public String getQuestion()
    return question;
    // Returns the answer to this question.
    public String getAnswer()
    return answer;
    // Returns true if the candidate answer matches the answer.
    public boolean answerCorrect (String candidateAnswer)
    return answer.equals(candidateAnswer);
    // Returns this question (and its answer) as a string.
    public String toString()
    return question + "\n" + answer;
    }

    Do you know why this lazy f&#97;rt-&#97;ss is back? Because when he posted his homework last week, some sorry-assed idiot went and did it for him.
    http://forum.java.sun.com/thread.jspa?threadID=5244564&messageID=10008358#10008358
    He didn't even thank the poster.
    It's the same problem over and over again. You feed the bears and it only teaches them to come back for handouts.
    My polite suggestion to the original poster: please do your own f&#117;cking homework.

  • Need help with creating a brush

    Hi guys,
    I wanted to ask for help with creating a brush (even a link to a tutorial will be goon enough ).
    I got this sample:
    I've created a brush from it, and i'm trying to get this kind of result:
    but it's only duplicates it and gives me this result:
    Can someone help me please understand what i need to define in order to make the brush behave like a continues brush instead of duplicate it?
    Thank you very much
    shlomit

    what you need to do is make a brush that looks like the tip of a brush. photoshop has several already but you can make your own that will be better.
    get a paintbrush and paint a spot kind of like what you did but dont paint a stroke. make it look kindof grungy. then make your brush from that, making sure to desaturate it and everything.
    EDIT:
    oh, and if you bring the fill down to like 10-20% your stroke will look better

  • I need help with creating PDF with Preview...

    Hello
    I need help with creating PDF documetns with Preview. Just a few days ago, I was able to create PDF files composed of scanned images (notes) and everything worked perfectly fine. However, today I was having trouble with it. I scanned my notebook and saved 8 images/pages in jpeg format. I did the usual routine with Preview (select all files>print>PDF>save as PDF>then save). Well this worked a few days ago, but when I tried it today, I was able to save it, but the after opening the PDF file that I have saved, only the first page was there. The other pages weren't included. I really don't see anything wrong with what I'm doing. I really need help. Any help would be greatly appreciated.

    I can't find it.  I went into advanced and then document processing but no batch sequence is there and everything is grayed out.
    EDIT: I realized that you cant do batch sequences in standard.  Any other ideas?

  • I need help with creating some formulas

    I'm not sure if anyone around here can help me, but I'm trying to create a Numbers document and need some help with creating a formula/function.
    I have a column of amounts and I would like to create a formula which deducts a percentage (11.9%) and puts the result in another column.
    If anyone can help me, it would be greatly appreciated.

    Here is an example that shows one way to do this:
    The original data is in column A.  In column B we will store formulas to adjust the amounts:
    1) select the cell where you want to formula (in this case cell B2)
    2) Type the "=" (equal sign):
    3) click cell A2:
    4) now type the rest of the formula which is: "*(100-11.9)/100"  that is asterisk, then open parenthesis, 100 minus eleven point nine close parenthesis forward slash  one hundred
    The Asterisk is the multiply operator  (times) and the forward slash is the division operator (divide)
    now hit return.  select cell B2 and hover the cursor over the bottom edge of the cell:
    drag the little yellow dot down to "fill" the formula down as needed.

  • Plz help me create a Procedure with create view cmd

    i want to create a view from the procedure like the following one,
    It creates the proc but while running it show invalid column name please help me;
    create or replace procedure asho2005.mock_pro( fin_fr_dt in date, fin_to_dt in date) is
         ffdt date;
         ftdt date;
    begin
         select to_date(fin_fr_dt,'dd-mm-yyyy') into ffdt from dual;
         select to_date(fin_to_dt,'dd-mm-yyyy') into ftdt from dual;
    execute immediate 'create or replace view mock_vu as select a.amt from cbtran a where chq_dt > ffdt and chq_dt <ftdt';
    end;

    i want to create a view from the procedure like the
    following one,
    It creates the proc but while running it show invalid
    column name please help me;
    create or replace procedure asho2005.mock_pro(
    fin_fr_dt in date, fin_to_dt in date) is
         ffdt date;
         ftdt date;
    begin
    select to_date(fin_fr_dt,'dd-mm-yyyy') into ffdt
    t from dual;
    select to_date(fin_to_dt,'dd-mm-yyyy') into ftdt
    t from dual;
    execute immediate 'create or replace view mock_vu
    vu as select a.amt from cbtran a where chq_dt > ffdt
    and chq_dt <ftdt';
    end;Hallo,
    your problem is , that execute immediate does't recognize ffdt
    You have to concatenate literals
    create or replace procedure asho2005.mock_pro( fin_fr_dt in date, fin_to_dt in date) is
    ffdt date;
    ftdt date;
    begin
    select to_date(fin_fr_dt,'dd-mm-yyyy') into ffdt from dual;
    select to_date(fin_to_dt,'dd-mm-yyyy') into ftdt from dual;
    execute immediate 'create or replace view mock_vu as select a.amt from cbtran a where chq_dt > '''||ffdt||''' and chq_dt <'''||ftd||'''';
    end; BTW, your view doesn't return any rows
    ffdt and < ffdt :-)
    Besides that , it's a very very bad method!
    You must not create views in runtime. Use of literals results in hard parsing .
    The performance will be poor.
    You have to create view in design time, and then simply use select:
    select * from mock_vu where chq_dt > (your_date) and something else
    HTH
    Regards
    Dmytro
    corrected wrong number of quotes (no wonder ) :-)
    Message was edited by:
    Dmytro Dekhtyaryuk

  • Need help with creating template. Changes are not going through to index.html page

    Hi all,
    I have an issue with my template that I am creating and also a question about creating template Regions (Repeating and Editable).
    Somehow my changes to my index.dwt are not changing my index.html page.
    Also my other question is: For my top navigation bar and left navigation bar links, do I need to select and define each individual button or link as Repeating/Editable Region? or can I just select the whole navigation bar (the one on the top) etc...
    Below are my steps for creating my template...I am kinda fairly new to using DW and this is my first attempt to making a template following the DW tutorial CD that came with DW CS3.
    I appreciate any help with this...regards, Dano
    -Open my index.html file
    -File/save as template
    -Save
    -update links - yes
    -Select Repeating and Editable Regions (I selected the whole top navigation bar and selected Repeating Region and Editable Region, same with the left side navigation links)
    -File close all
    -Open the index.dwt
    -Save as and selected the index.html and chose to overide it..
    When I make changes to my index.dwt it is not changing the index.html
    I feel that I am missing some important steps here.....
    Website address
    www.defenseproshop.com

    Figured out

  • Help with creating a layout.

    I need help creating a layout for my program, but am having tons of problems. I just an't that good at creating this, and it's been driving me insane.
    Here's the link to how I want it to look like. http://s94182144.onlinehome.us/randomstuff/layout.JPG
    In panel 1... that will be a cartesian plain, so it will pretty much be empty until lines and stuff are drawn in there.
    In panel 2, there will be two drop down menus and a couple of buttons
    In panel 3, there will be a bunch of things, with two buttons on the bottom.... and this section has to be scrollable.
    Any help with the basic layout will be helpful... I can put in the buttons myself. For reference, the whole programs size is 400x800.
    Thanks,
    sachit

    Read this section from the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html]How to Use Layout Managers. You can combine multiple Layout Managers to get the effect your want. By default the content pane uses the BorderLayout, so one approach might be:
    JPanel center = new JPanel(new BorderLayout());
    center.add(panel1, BorderLayout.CENTER);
    center.add(panel2, BorderLayout.SOUTH);
    getContentPane().add(center, BorderLayout.CENTER);
    getContentPane().add(panel3, BorderLayout.EAST);
    It turn you would layout panel1, panel2 and panel3 with the appropriate layout manager. Panel2 could be something like:
    JPanel panel2 = new JPanel( new BorderLayout() );
    panel2.add(comboBox1, BorderLayout.WEST);
    panel2.add(comboBox2, BorderLayout.EAST);
    JPanel bottom = new JPanel();
    bottom.add(button1);
    buttom.add(button2);
    panel.add(bottom, BorderLayout.SOUTH);

  • Help with creating a flash banner

    Hi,
    I need some help with a creating/replicating a flash banner I
    saw online. I cant find it anymore but I will do my best to
    describe it.
    The banner had multiple images layered on top of each other
    horizontally. Each image covered the image to the left of it. When
    you moused over an image the image expanded to full size while the
    other remained contracted.
    How can I create something with the above description? Are
    there any good tutorials for something like this or maybe someone
    can provide me with a few tips/tricks for doing this?
    I am proficient in PShop and a beginner with Flash so the
    design portion is not the hard part, just the programming/setup in
    flash is what has me stumped.
    Thanks in advance for any assitance.
    Regards,
    Mike
    Hookah Life

    Update:
    The banner on this template has an exact example of what I am
    shooting for.
    http://www.algozone.com/zencart-templates-zc03c00287-p-1191.html

  • Need Help with Crystal viewer and ActiveX

    Hi !!
    I have a problem that i cant seem to be able to solve. I had alot of help from the forum but i think i got everything mixtup now...
    From my addon i can print with CrystalReport Viewer or i cant print a Crystal report directly to my default printer, so thats good and working well. The problem is with Crystal Viewer that drags on the SBO screen and stays on the task bar.
    It is strongly recommended to use an Activex to display my Crystal Viewer report. I tried so many differrent ways allways ending up with class id errors, or private class errors.
    My report is called c:\report.rpt
    My Working CrystalViewer form is called 'frmCRV'
    Can some one help me thru this last step...  I tried with the Activex sample in SDK but i think i dont have to use the Tree function ??? am i right ??
    I'm running on SBO 2005 SP1 PL3
    Crystal Report .net V10 and .net for code.
    Thanks you all for your patience.

    Hi Again !
    I can now open a form with an Activex part but i cant pass my CrystalViewer in it. Always says specified cast not valid.
    Thanks

  • Help in creating View

    Hi Guys,
    I am trying to create a view from table A and table B.  Data in table A and table B are as follows.
    Table A                              TableB
    Field_1       Field_2                    Field_1           Desc_1
    A1          B1                    A1          New York     
    A1          B1                    A2          Albany
    A1          B2                    A3          Rochester     
    A1          B2                    A4          Buffalo
    A1          B2                    A5          Syracuse
    A2          B1                              
    A2          B2
    I want to get the following result:
    Field_1        Desc_1          Field_2     
    A1          New York     B1                    
    A1          New York     B1                    
    A1          New York     B2                         
    A1          New York     B2                    
    A1          New York     B2                    
    A2          Albany          B1                              
    A2          Albany          B2
    Please advise me which type of view should I create. I create Maintenance view and I am getting following error"
    "No database view exists for view Z_TEST_VIEW".
    Please help in creating a view without the error.
    Thanks,

    Since your requirement is to view logically connected data from different tables, try creating the "database view".
    http://help.sap.com/saphelp_nw70/helpdata/en/cf/21ecab446011d189700000e8322d00/content.htm

  • Help with create a trigger

    hello all
    i have a 4 tables and i would like to create a trigger in a tables
    CREATE TABLE CLIENT_INFO
    ( CLIENT_NO     VARCHAR2(10) CONSTRAINT CLIENT_INFO_CNO_PK PRIMARY KEY,
      CLIENT_NAME   VARCHAR2(50) NOT NULL,
      ORDERS_AMOUNT NUMBER(7)
    CREATE TABLE STOCK_INFO
    ( ITEM_NO              VARCHAR2(10) ,
      ITEM_DESCRIPTION     VARCHAR2(100),
      SELLING_PRICE        NUMBER(6),
      QTY_IN_HAND          NUMBER(6)    NOT NULL,
      CONSTRAINT ITEM_NUM_SPRICE_PK PRIMARY KEY (ITEM_NO , SELLING_PRICE)
    CREATE TABLE ORDER_INFO
    ( ORDER_NO     VARCHAR2(10) CONSTRAINT ORDER_INFO_ONO_PK PRIMARY KEY,
      CLIENT_NO    VARCHAR2(10),
      ORDER_DATE   DATE,
      ORDER_AMOUNT NUMBER(6),
      CONSTRAINT ORDER_INFO_CNO_FK  FOREIGN KEY (CLIENT_NO) REFERENCES CLIENT_INFO (CLIENT_NO)
    CREATE TABLE ORDER_LINES
    ( ORDER_NO       VARCHAR2(10),
      ITEM_NO        VARCHAR2(10),
      LINE_QTY       NUMBER(6),
      SELLING_PRICE  NUMBER(6),
      TOTAL_PRICE    NUMBER(6)
    ALTER TABLE ORDER_LINES
    ADD  CONSTRAINT ORDER_LINES_ONO_FK FOREIGN KEY (ORDER_NO) REFERENCES ORDER_INFO (ORDER_NO);
    ALTER TABLE ORDER_LINES
    ADD  CONSTRAINT ORDER_LINES_INO_FK FOREIGN KEY (ITEM_NO) REFERENCES STOCK_INFO (ITEM_NO);i would like to create this trigger
    1-order_amount in table 3 due to any (insert,update or delete ) in total_price in table 4
    2-orders_amount in table 1 due to any (insert,update or delete ) in order_amount in table 3
    i would like to ask another quotations r this relations in good for tables
    thank's all

    >
    plz i need a help to create a trigger
    >
    Using a trigger won't solve your problem. You are trying to use child table triggers to maintain parent table information.
    There is no transaction control to ensure that the parent table will be updated with the correct information.
    One process could update child record 1 while another process is updating child record two. Each process will see a different total if they try to compute the sum of all child records since the first process will see the 'old' value for the child record that the second process is updating and the second process will the 'old' value for the child record that the first process is updating.
    So the last process to commit could store the wrong total in the parent record withoug an exception ever being raised.
    See Conflicting Writes in Read Committed Transactions in the Database Concepts doc
    http://docs.oracle.com/cd/E14072_01/server.112/e10713/consist.htm
    >
    some one ask me this quotation in interview
    and im told him i can't understand this structure for database he said just do it
    >
    And I would tell them that using a trigger is not the right way to accomplish that since it could invalidate the data concurrency and data consistency of the tables.
    Sometimes you just have to tell people NO.

  • Help with creating Box2D bodies dynamically, according to shape.

    Hello everyone,
    I am having some issues on how to dynamically create Box2D bodies dynamically, according to the shape.
    So far this is how I've layed out my project in attempt to do this...
    Main class:
    package
    //imports
              public class Architecture extends Sprite
                        public var world:b2World;
                        public var stepTimer:Timer;
                        public var mToPx:Number = 20;
                        public var pxToM:Number = 1 / mToPx;
                        protected var shapeObjectDirector:ShapeObjectDirector = new ShapeObjectDirector();
                        public function Architecture()
      //gravity
                                  var gravity:b2Vec2 = new b2Vec2(0, 10);
                                  world = new b2World(gravity, true);
      //debug draw
                                  var debugDraw:b2DebugDraw = new b2DebugDraw();
                                  var debugSprite:Sprite = new Sprite();
                                  addChild(debugSprite);
                                  debugDraw.SetSprite(debugSprite);
                                  debugDraw.SetDrawScale(mToPx);
                                  debugDraw.SetFlags(b2DebugDraw.e_shapeBit);
                                  debugDraw.SetAlpha(0.5);
                                  world.SetDebugDraw(debugDraw);
      //declarations
                                  var wheelBuilder:WheelBuilder = new WheelBuilder(world, pxToM);
                                  createShape(wheelBuilder, 0, 0, 0, 0);
      //timer
                                  stepTimer = new Timer(0.025 * 1000);
                                  stepTimer.addEventListener(TimerEvent.TIMER, onTick);
                                  stepTimer.start();
                        private function createShape(shapeObjectBuilder:ShapeObjectBuilder, pxStartX:Number, pxStartY:Number, mVelocityX:Number, mVelocityY:Number):void
                                  shapeObjectDirector.setShapeObjectBuilder(shapeObjectBuilder);
                                  var body:b2Body = shapeObjectDirector.createShapeObject(pxStartX * pxToM, pxStartY * pxToM, mVelocityX, mVelocityY);
                                  var sprite:B2Sprite = body.GetUserData() as B2Sprite;
                                  sprite.x = pxStartX;
                                  sprite.y = pxStartY;
                                  this.addChild(sprite);
                        public function onTick(event:TimerEvent):void
                                  world.Step(0.025, 10, 10);
                                  world.DrawDebugData();
    ShapeObjectBuilder class:
    package
    //imports
              public class ShapeObjectBuilder
                        public var body:b2Body;
                        protected var circle:b2CircleShape;
                        protected var polygon:b2PolygonShape;
                        protected var world:b2World, pxToM:Number;
                        protected var fixtureDef:b2FixtureDef;
                        protected var bodyDef:b2BodyDef;
                        protected var fixture:b2Fixture;
                        protected var startingVelocity:b2Vec2;
                        protected var sprite:B2Sprite;
                        protected var restitution:Number, friction:Number, density:Number;
                        protected var mStartX:Number, mStartY:Number;
                        protected var mVelocityX:Number, mVelocityY:Number;
                        protected var Image:Class;
                        public function ShapeObjectBuilder(world:b2World, pxToM:Number)
                                  this.world = world;
                                  this.pxToM = pxToM;
                        public function createCircleShape():void
                                  circle = new b2CircleShape();
                                  createFixtureDef(circle);
                        public function createPolygonShape():void
                                  polygon = new b2PolygonShape();
                                  createFixtureDef(polygon);
                        public function createFixtureDef(shape:b2Shape):void
                                  fixtureDef = new b2FixtureDef();
                                  fixtureDef.shape = shape;
                                  fixtureDef.restitution = restitution;
                                  fixtureDef.friction = friction;
                                  fixtureDef.density = density;
                        public function createBodyDef(mStartX:Number, mStartY:Number):void
                                  bodyDef = new b2BodyDef();
                                  bodyDef.type = b2Body.b2_dynamicBody;
                                  bodyDef.position.Set(mStartX, mStartY);
                        public function createBody():void
                                  body = world.CreateBody(bodyDef);
                        public function createFixture():void
                                  fixture = body.CreateFixture(fixtureDef);
                        public function setStartingVelocity(mVelocityX:Number, mVelocityY:Number):void
                                  startingVelocity = new b2Vec2(mVelocityX, mVelocityY);
                                  body.SetLinearVelocity(startingVelocity);
                        public function setImage():void
                                  sprite = new B2Sprite();
                                  var bitmap:Bitmap = new Image();
                                  sprite.addChild(bitmap);
                                  bitmap.x -= bitmap.width / 2;
                                  bitmap.y -= bitmap.height / 2;
                        public function linkImageAndBody():void
                                  body.SetUserData(sprite);
                                  sprite.body = body;
    ShapeObjectDirector class:
    package builders
    //imports
              public class ShapeObjectDirector
                        protected var shapeObjectBuilder:ShapeObjectBuilder;
                        public function ShapeObjectDirector()
      //constructor code
                        public function setShapeObjectBuilder(builder:ShapeObjectBuilder):void
                                  this.shapeObjectBuilder = builder;
                        public function createCircleObject():void
                                  shapeObjectBuilder.createCircleShape();
                        public function createPolygonObject():void
                                  shapeObjectBuilder.createPolygonShape();
                        public function createShapeObject(mStartX:Number, mStartY:Number, mVelocityX:Number, mVelocityY:Number):b2Body
                                  shapeObjectBuilder.createBodyDef(mStartX, mStartY);
                                  shapeObjectBuilder.createBody();
                                  shapeObjectBuilder.createFixture();
                                  shapeObjectBuilder.setStartingVelocity(mVelocityX, mVelocityY);
                                  shapeObjectBuilder.setImage();
                                  shapeObjectBuilder.linkImageAndBody();
                                  return shapeObjectBuilder.body;
    WheelBuilder class:
    package builders
      //imports
              public class WheelBuilder extends ShapeObjectBuilder
                        [Embed(source='../../lib/Basketball.png')]
                        public var Basketball:Class;
                        public function WheelBuilder(world:b2World, pxToM:Number)
                                  super(world, pxToM);
                                  restitution = 1.0;
                                  friction = 0.0;
                                  density = 5.0;
                                  Image = Basketball;
                                  circle.SetRadius(15 * 0.5 * pxToM);
    The above code did have some errors, but even if it worked I wouldn't have been happy. It was just my attempt at what I'm trying to achieve.
    What I want to is be able to call a function in my "Main" class to create a shape (Circle body or Polygon body), like so... createShape(wheelBuilder, 0, 0, 0, 0);
    I would like to make the class ShapeObjectDirector and ShapeObjectBuilder to be able to handle b2CircleShape() and b2PolygonShape(), but my problem is creating constants to handle both datatypes all in the one class.
    Basically, I need help with building a class to create shapes on the fly, with minimal code in the Main class. What do you guys suggest? I would be grateful for one of you's who have enough experience with this kind of thing to write me a post on how I can tackle this problem, all responses appreciated.
    Thankyou,
    Brendon.

    UIImageView initWithImage takes a UIImage* as a parameter, not NSString*. So load your image into a UIImage first
    UIImage *ballImage = [UIImage imageNamed:@"Ball.png"];
    UIImageView *tempStart = [[UIImageView alloc] initWithImage:ballImage];

Maybe you are looking for

  • How do I disable your annoying screen urging an update to a newer version of firefox?

    You are annoying me and it may cause me to delete Firefox and use another browser if you do not frankly and forthrightly answer my question and not skirt the issue and pretend you are addressing a question about auto-updates because that is not my qu

  • Music-synced Text Scroller Design - How to scroll the text?

    Hallo, Flash-loving people, I'm a writer of stories and I want to make a Flash app that will scroll text whilst music plays. The music part is easy, but scrolling the text... I've tried simply importing ALL of the text, resizing, and scrolling that o

  • Printing a jpanel

    is it possible to print a jpanel i can print individual components but i want to do a printout that contains many components. any advice

  • Question about functions methods and variables

    Sorry but i couldn't figure out a better title. When does a method alter the variables it gets directly and when does a method just alter a clone of the variables it gets? How about a funcion? for example: public void (int i) i = 4; sometimes this me

  • Windows 7 and the HP 7410

    windows 7 laptop cant see memory sticks on my HP 7410 Printer