Percent of a line

I hope this is not considered a cross post. My original message was at http://forum.java.sun.com/thread.jspa?threadID=617032 but I've finally narrowed down my problem.
I have a linked list of lines (Line2D.Double) that are connected together. These lines represent a path for a character that exists between a dot and a mark in a text pane.
Is there a way to somehow get a quantitive number that represents the total size of the line list. I need this in order to determine what position the character should be at on the path based on the current caret position.
Earlier, I accomplished this by getting the path's pixels, but this caused a memory leak. Can anyone suggest another way?

Before, I had a pixelsList that contained the individual pixels of every line that is in the lineList. As I add or remove a line, this pixelsList wiould be updated. This allowed me to use the following numbers in order to determine which pixel needed to be drawn as well as where the character needed to be drawn on the line:
        double numberOfChars = currentCharacter.getCurrentMovement().getMark() -
            currentCharacter.getCurrentMovement().getDot();
        double currentPosition = mainFrame.getScriptFrame().getTextPane().
            getCaretPosition() - currentCharacter.getCurrentMovement().getDot();
        double totalPixelSize = currentCharacter.getCurrentMovement().
            getPixelsList().size();
        double incrementAmount = numberOfChars / totalPixelSize;As you see, since I can no longer use the increment amount to move the character along the line because of the memory problems with the pixelsList so I need some other quantitative way in which to not only draw the lines (based on their endpoints) but also to draw the character both 1.) on the appropriate line, and 2.) at a specific position on the line. For example let's say I know that the caret is 60% between the character's dot and mark. I need to somehow determine where 60% is on the character's path which is of course made up of multiple lines.
Have a look at http://49web.uncc.edu/~crblack/screenshot.jpg
Although it may not look like it Bob is actually in the middle of his movement.
Thanks again for taking the time out to help.

Similar Messages

  • Cfchart - how do I stop percent value from rounding

    I am trying to present a simple chart with
    labelformat="percent" (see below).
    The problem is that the values being presented are decimal
    values between 1 and 2. Although it appears to put the data markers
    in the correct placed, it is rounding the label to the nearest
    integer. so 1.86% becomes 2%, 1.44% becomes 1% etc.
    Does anyone have any suggestions on how I can stop this
    rounding?
    Thanks in advance.
    ==============================
    <cfchart style="blue" show3D="no" chartwidth="800"
    chartheight="500" showlegend="yes" format="png"
    labelformat="percent" >
    <cfchartseries type="line" seriesColor="green"
    seriesLabel="Victoria">
    <cfchartdata item="July 2007" value=".0186">
    <cfchartdata item="August 2007" value=".0170">
    <cfchartdata item="September 2007" value=".0160">
    <cfchartdata item="October 2007" value=".0144">
    </cfchartseries>
    </cfchart>

    select the cells with the dollar amounts, then open the cell formatter and select "Currency"
    Now set the number of decimal places.  Note... Numbers will round to the number of digits you select so you should know that what you see in the cell may be different that what you typed into the cell.
    If you set the number of digits in the cell formatter to 3, then type in a value "1.2368", Numbers will display "1.237"

  • Hatching and line shading

    Hi team,
    I've come across several images across the internet and I am really interested in how to produce an effect like this for my designs.
    I have searched through many forums and blogs to find that the best option to create this effect is through an art brush or pattern.
    What I would like to know is how to create and then how to fill a pen tool made object with the pattern.
    Thanks,
    Brandon

    mec_os wrote:
    no. it is mirrored on the computer. it would be imposible as it is 100 percent symmetrical including line quality. i don't care how autistic you are. no one can do that symmetically by hand. i'll believe you is graphic pen. but it is at the very least mirrored by computer.
    A lot of this artists work is not, even when symmetrical, however this might be one that is (after a little research). But come on to use the term "no one" is absurd. I agree very few people now days would take the time since computers have taken away most peoples true creative nature and replaced it with digital processes, but luckily people still exist whom give effort the old fashion way to create stunning results.
    mec_os wrote:
    but i would need to see an actual photograph of the paper to be convinced in this day and age of computer graphics.
    Right because before computers talent and art did not exist and since computers natural skills have vanished?

  • Updating lines.discountpercent in draft do not recalc doctotal

    hi,
    i update an invoice draft document. I set the disocunt percent in document lines.
    oDrafts.Lines.DiscountPercent
    This works well unless the document currency is system currency.
    But if document currency is PLN the doctotal was not recalculated and the document discount is set.
    This seems to be a bug. Is there a workaround?
    SAP Version: 8.8 pl12
    best regards
    Markus

    Hello Markus,
    did you set a currencyrate? If you update this manually in the gui this works correct?
    If the answers are both yes. You must log a message at SAP Support (or your partner). They can investigat this issue, give you a workarround or provide a solution in a next patch.
    Good luck.
    HTH Regards Teun

  • SP2-0359: memory exhausted

    OS: Solaris
    We have two solaris unix box. Query was successfuly running in one unix box
    and the same query is failing in another unix box
    Any input would be highly appreciated
    ANALYZE TABLE sa_master_name_all ESTIMATE STATISTICS SAMPLE 50 PERCENT
    ERROR at line 1:
    ORA-00603: ORACLE server session terminated by fatal error
    ERROR:
    ORA-03114: not connected to ORACLE
    SP2-0359: memory exhausted

    Hi,
    this is an internal error. Normally You can find more details in Alert log and dump files that can be in cdump, bdump or udump directory.
    Normally You have to contact Oracle support to solve an ORA-006xx error.
    Hope this helps
    Max

  • I want the tooltip of dvt graph(bar line combo) to be shown as percent.

    I want the tooltip of dvt graph(bar line combo) to be shown as percent.
    <dvt:y1Axis >
    <dvt:numberFormat numberType="*NUMTYPE_PERCENT*" decimalDigit="0" scaleFactor="SCALEFACTOR_NONE"/>
    </dvt:y1Axis>
    <dvt:markerText rendered="false">
    <dvt:y1Format>
    <dvt:numberFormat numberType="*NUMTYPE_PERCENT*" decimalDigit="0" scaleFactor="SCALEFACTOR_NONE"/>
    </dvt:y1Format>
    </dvt:markerText>
    Is anything wrong with my config.
    Thanks !

    I want the tooltip of dvt graph(bar line combo) to be shown as percent.
    <dvt:y1Axis >
    <dvt:numberFormat numberType="*NUMTYPE_PERCENT*" decimalDigit="0" scaleFactor="SCALEFACTOR_NONE"/>
    </dvt:y1Axis>
    <dvt:markerText rendered="false">
    <dvt:y1Format>
    <dvt:numberFormat numberType="*NUMTYPE_PERCENT*" decimalDigit="0" scaleFactor="SCALEFACTOR_NONE"/>
    </dvt:y1Format>
    </dvt:markerText>
    Is anything wrong with my config.
    Thanks !

  • My iphone3gs shuts off when i jump between apps or run certain apps...  even with 90 percent it will shut down and shows vertical lines through the black screen...  any ideas what this could be?

    My iphone 3gs shuts off when flipping to different apps or running certain apps.  If it crashes badly I need to plug power to the device to bring it up.  This happens whether i have even 90 percent battery life.  Any idea as to what this may be? 

    Sounds like a major hardware problem.
    If no change after restoring your iPhone as a new iPhone or not from your iPhone's backup, there is a hardware problem.

  • Simple Java 3D program’s CPU Usage spikes to up to 90 percent!

    Hi, everyone. I’m completely new to Java 3D and I’m toying around with basic program structure right now. My code is based off of that in the first chapter on 3D in Killer Game Programming in Java. I removed most of the scene elements, replacing them with a simple grid, Maya style. (Yes, I’m starting off small, but my ambitions are grand – I intend on creating a polygonal modeling and animation toolset. After all, the Maya PLE is dead – damn you, Autodesk! – and I just plain dislike Blender.) I implement a simple OrbitBehavior as a means for the user to navigate the scene. That part was basically copy and paste from Andrew Davison’s code. The mystery, then, is why the program’s framerate drops below 1 FPS and its CPU Usage spikes to up to 90 percent, according to the Task Manager, when I tumble the scene. I’d appreciate anyone taking the time to look at the code and trying to identify the problem area. (I’ve undoubtedly missed something totally newbish. -.-) Thank you!
    (Also, I had the worst possible time wrestling with the posting process. Is anyone else having trouble editing their posts before submitting them?)
    import java.awt.*;
    import javax.swing.*;
    public class MAFrame
        public static final Dimension SCREEN_SIZE = Toolkit.getDefaultToolkit().getScreenSize();
        public MAFrame ()
            System.out.println("Initializing...");
            try {
                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            catch (Exception e) {
                e.printStackTrace();
            JFrame frame = new JFrame ("Modeling and Animation");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            MAViewPanel panel = new MAViewPanel ();
            frame.getContentPane().add(panel);
            frame.pack();       
            frame.setLocation(((int)SCREEN_SIZE.getWidth() / 2) - (frame.getWidth() / 2),
                              ((int)SCREEN_SIZE.getHeight() / 2) - (frame.getHeight() / 2));     
            frame.setVisible(true);
    import com.sun.j3d.utils.behaviors.vp.*;
    import com.sun.j3d.utils.geometry.*;
    import com.sun.j3d.utils.universe.*;
    import java.awt.*;
    import javax.media.j3d.*;
    import javax.swing.*;
    import javax.vecmath.*;
    public class MAViewPanel extends JPanel
        public static final int GRID_SIZE = 12;
        public static final int GRID_SPACING = 4;
        public BoundingSphere bounds;
        public BranchGroup sceneBG;
        public SimpleUniverse su;
        public MAViewPanel ()
            GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
            Canvas3D canvas3D = new Canvas3D (config);               
            canvas3D.setSize(600, 600);
            add(canvas3D);
            canvas3D.setFocusable(true);
            canvas3D.requestFocus();
            su = new SimpleUniverse (canvas3D);
            createSceneGraph();
            initUserPosition();
            orbitControls(canvas3D);
            su.addBranchGraph(sceneBG);
        public void createSceneGraph ()
            sceneBG = new BranchGroup ();
            bounds = new BoundingSphere (new Point3d(0, 0, 0), 1000);
            // ambient light
            Color3f white = new Color3f (1.0f, 1.0f, 1.0f);
            AmbientLight ambientLight = new AmbientLight (white);
            ambientLight.setInfluencingBounds(bounds);
            sceneBG.addChild(ambientLight);
            // background
            Background background = new Background ();
            background.setColor(0.17f, 0.65f, 0.92f);
            background.setApplicationBounds(bounds);       
            sceneBG.addChild(background);
            // grid
            createGrid();
            sceneBG.compile();
        public void createGrid ()
            Shape3D grid = new Shape3D();
            LineArray lineArr = new LineArray (GRID_SIZE * 8 + 4, GeometryArray.COORDINATES);
            int offset = GRID_SIZE * GRID_SPACING;
            // both sides of the grid plus the middle, done for both directions at once (each line defined by two points)
            for (int count = 0, index = 0; count < GRID_SIZE * 2 + 1; count++) {
                // vertical, left to right
                lineArr.setCoordinate(index++, new Point3d (-offset + (count * GRID_SPACING), 0, offset));  // starts near
                lineArr.setCoordinate(index++, new Point3d (-offset + (count * GRID_SPACING), 0, -offset)); // ends far
                // horizontal, near to far
                lineArr.setCoordinate(index++, new Point3d (-offset, 0, offset - (count * GRID_SPACING))); // starts left
                lineArr.setCoordinate(index++, new Point3d (offset, 0, offset - (count * GRID_SPACING)));  // ends right
            grid.setGeometry(lineArr);
            sceneBG.addChild(grid);
        public void initUserPosition ()
            ViewingPlatform vp = su.getViewingPlatform();
            TransformGroup tg = vp.getViewPlatformTransform();
            Transform3D t3d = new Transform3D ();
            tg.getTransform(t3d);
            t3d.lookAt(new Point3d (0, 60, 80), new Point3d (0, 0, 0), new Vector3d(0, 1, 0));
            t3d.invert();
            tg.setTransform(t3d);
            su.getViewer().getView().setBackClipDistance(100);
        private void orbitControls (Canvas3D c)
            OrbitBehavior orbit = new OrbitBehavior (c, OrbitBehavior.REVERSE_ALL);
            orbit.setSchedulingBounds(bounds);
            ViewingPlatform vp = su.getViewingPlatform();
            vp.setViewPlatformBehavior(orbit);     
    }

    Huh. A simple call to View.setMinimumFrameCycleTime() fixed the problem. How odd that there effectively is no default maximum framerate. Of course simple programs like these, rendered as many times as possible every second, are going to consume all possible CPU usage...

  • In A/P Service Invoice, a discount percent amount is automatically entered

    Hi all,
    I am stumped.  On a random basis (about 25% of time) a discount percent is appearing (not entered) in the field of a multi-line A/P Service invoice.  The percent amount appears to be random as well. The discount percent field is not visible and inactive in form settings.  What could be causing this?
    Thanks, Bill

    Hi,
    Please check the following scenario :
    One scenario is caused when the Total amount changed after system calculate it according to Unit Price.
    Check the following steps to reproduce this scenario,
    - open ap invoice and choose Services
    - choose an account and type Unit price, Total amount will be
      calculated automatillcay
    - change the total amount.
    - System will calculate the difference and leave it in Discount field.
      Not change the Price field.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • My firefox has decided to load in a line by line format, why?

    My broser started loading in a line by line formay. I need to know what to do about this. This happens on most websites, but not all. Will not allow me on to the facebook site. sample below.
    Access Email using the XFINITY Mobile app »
    Xfinity
    Home
    TVNew
    Connect
    Help
    Account
    Security
    Shop
    Register
    Sign In
    Profile Set-up
    Progress: 100%
    View More Options
    Hi chvbob
    Sign Out
    Welcome
    Complete the XFINITY set up process so you can browse, watch and record your TV shows & movies anytime, anywhere.
    Set Up Xfinity
    Welcome
    Just 0 more steps and you're done:
    You're Done!
    Complete Set-up
    View Profile
    Thank You
    Coming back to complete the set-up is simple. Just click on the arrow to the right of the progress bar to see where you left off, then finish your set-up tasks.
    Comcast.net
    Search:
    enhanced by Google
    Today's Highlights
    October 06, 2011
    10 Unsolved Mysteries of Amanda Knox Case
    10 Unsolved Mysteries of Amanda Knox Case
    Amanda Knox is freed and back in the U.S., but questions about the Italian murder case remain.
    Judge: 'This Case Will Never Be Solved'
    Knox's Tearful Arrival Back in United States
    Family, Friends Celebrate Knox's Return to U.S.
    Woman on Knox's Flight Home Speaks Out
    Reactions to the Amanda Knox Verdict
    New End-of-the-World Prediction
    New End-of-the-World Prediction
    The world didn't end last May, but that doesn't mean we're out of the woods just yet...
    Harold Camping Thinks the World Will End Soon
    Evangeline Lilly Is Sick of Talking About 'Lost'
    Watch the Full Episode of 'Jimmy Kimmel Live'
    Full Episodes of 'Jimmy Kimmel Live'
    Find TV Listings for Your Area
    Real Estate: What Will $200K Buy?
    Real Estate: What Will $200K Buy?
    Will you get a luxury 4-bedroom home or a cramped studio? See what your dollar's worth in these cities:
    Chicago
    Houston
    Denver
    What Does $200K Buy in Other Cities?
    10 Tips to Get the Best Mortgage
    6 Must-Do's Before You Buy
    Listing Red Flags
    Should You Clean the Foreclosure Next Door?
    Jobs Remembered as 'Visionary'
    Apple founder Steve Jobs lost his long battle with pancreatic cancer yesterday. He was 56.
    Tributes Pour In from Across the Globe
    Video
    Apple Fans Mourn Jobs
    Jobs' Life in Pictures
    Jobs Told Us What We Needed Before We Knew
    Digital Titans, Gadget Junkies Mourn Steve Jobs
    Evolution of Apple
    Little-Known Steve Jobs Facts
    Watch the Greatest TV Moments
    TV Guide counts down the top 100 memorable moments in television history.
    View '100 Great TV Moments' Online for Free
    Watch More of '100 Great TV Moments' Online
    Watch 'Fat Albert and the Cosby Kids' Online
    Watch 'Hill Street Blues' Online
    Watch Thousands of TV Shows for Free
    5 Lightning-Fast Porsches
    Do you have a need for speed? Buckle up and check out the fastest Porsches permitted to cruise the streets.
    Fastest Street-Legal Porsches
    5 Super Cars That Shatter 200 MPH
    Beautiful Exotic Cars
    Famous TV Cars
    5 Cars That Stand Out from the Crowd
    Most Stolen Cars
    Future Collectible Cars
    Ways to Save on Groceries
    In just one year, the cost of groceries has increased by 4.2 percent. Learn how to stop your grocery bills from growing.
    5 Tips to Fight Rising Prices
    Secrets of Supermarket Prices
    Make Your Groceries Last Longer
    Clean Up the Cost of Laundry
    The Best Savings Accounts
    Did They Go Under the Knife?
    From Steve Martin to Simon Cowell, these leading men are rumored to have had lifts, Botox and other procedures.
    Did They or Didn't They?
    Celebrity Surgery: Before & After
    Stars Who Insured Their Body Parts
    Watch Full Episodes of 'Nip/Tuck'
    Super-Skinny Celebrities
    Slow PC? Speed It Up
    Improve your computer's speed and performance with a PC tune-up. This special offer is available exclusively to XFINITY customers.
    Learn More
    Tune Up Your PC's Speed and Performance
    Keep Your Computer Safe and Secure
    Get a Free Month of XFINITY Signature Support
    Mexico Vacation Sale
    Check out spectacular specials on flights and all-inclusive hotel stays across Mexico. Two great deals, one unforgettable vacation.
    Flights $119+
    All-Inclusive Hotels $69+
    Disney Resort Vacations: 3 Nights with Air $480+
    Jamaica from $469
    Hawaii from $589
    Tour the UK: 6 Nights, 3 Countries with Air $910+
    Flight Deals: Atlanta $59+
    San Diego $119+
    Highest-Earning Women in Hollywood
    Forbes has released its annual list of the best-paid women in entertainment. Did Oprah Winfrey retain her crown?
    Find Out Now
    Lady Gaga Wears False Teeth
    Richest Star Moms
    Most Powerful Celebrities
    Watch Oprah Winfrey Network Clips & Episodes
    Best-Paid Actresses
    Wealthiest Stars Under 30
    Get Paid to Eat Out
    A new website offers 'insider pricing' of 30% off your bill when you use it to make a reservation.
    How Does It Work?
    Food News, Cooking Shows, More
    America's Best Chain Restaurants
    Guide to Restaurant Tipping
    12 Dinner Date Deal Breakers
    Amanda Knox
    'Jimmy Kimmel'
    $200K Homes
    Steve Jobs
    TV Moments
    Fastest Porsches
    Grocery Savings
    Celeb Surgery
    Tech Help
    Mexico Sale
    Richest Women
    Get Paid to Eat
    Amanda Knox
    Previous
    1 - 1.0336417157275022 of 12
    Next PLAYPAUSE
    Top Videos
    Finance News
    Previous
    1 - 1.0336417157275022 of 16
    Next
    Previous
    Loading...
    'DWTS' Star's Revealing Pics'DWTS' Star's Revealing Pics
    'Bachelor' Beauty's New Man'Bachelor' Beauty's New Man
    Depp's Comment Sparks OutrageDepp's Comment Sparks Outrage
    Camille Grammer Rocks BikiniCamille Grammer Rocks Bikini
    'DWTS' Star's Revealing Pics'DWTS' Star's Revealing Pics
    Next
    Watch XFINITY TV Online
    History Hits
    Classic Comedy
    Fox Toons
    Reality Rewind
    'Pawn Stars'

    You are addressing an audience that is not affiliated with Apple.  We can't help you.

  • Line item pricing based on total value of the order

    Hi,
    We need to charge as a separate line item (material) 'Insurance' as a % based on the total value of the order less one line item. Our orders are created on the web and posted via a BAPI.
    (a) depending on where the customer is located, we charge a certain added shipping cost.
    (b)  the customer has the choice to ask for insurance or not.
    The actual order may be 10 lines totaling $1,000 and due to location, the BAPI slaps on an added line item of $100. If the customer chose the insurance option, the BAPI needs to slap on another line item whose value would be, say 2% of the total order, i.e. 2% of 1000 (instead of on 1000+100). Of course, if the customer doesn't choose this option he is not charges this extra line and further if the customer is not in the particular region, the 100 charge may also not be there.
    The 2% can vary time to time so needs to be driven by a condition record based on %.
    How can we achieve this in the pricing procedure? The logic of how the BAPI will function is clear to us, we are stuck on the pricing procedure configuration.
    Glad to answer any further questions you may need for clarifications.
    Many thanks!

    Ideally insurance would be levied on end customer based on Inco Terms like CIF, DDU etc.,
    So you can have an access sequence for which you can make use of tables like 033 & 034 in V/07.  In VK11, for this combination, maintain the required insurance percent.
    In condition type V/06, for this condition type, maintain "C" for Manual entries, since you have indicated that customer has the choice.  Otherwise, this can be populated automatically in sale order.
    Similarly, for shipment cost also, you can have the Inco2 as one of the combination so that based on region, this condition type will be populated in sale order.  If you have shipment cost configured, then this can be achieved.
    In your pricing procedure, you have to assign the shipment cost condition type next to insurance and assign the From-To step accordingly.
    thanks
    G. Lakshmipathi

  • Price from Order Line and Price from QP_PREQ_PUB.PRICE_REQUEST is different

    Hi,
    I have trouble in using QP_PREQ_PUB.PRICE_REQUEST to derive the price of an item.
    RDBMS : 11.1.0.7.0
    Oracle Applications : 12.1.3
    From the Pricing Request Viewer or from Order Entry Line, The price lis coming as expected, but not from QP_PREQ_PUB.PRICE_REQUEST API.
    Here are the details -
    Primary Price List - 'Primary'
    Secondary Price List - 'Secondary1' - Item Price 40 (Precedence 150)
    Secondary Price List - 'Secondary2' - Item Price 25 (Precedence 130) , Custom Qualifier Qualifier_Attribute31 = > Attribute1('Yes/No') from Item Master.
    From the application, it is giving 25. Where as using the below code it is giving 40, Can you please advise what could be the issue/fix for it?
    DECLARE
    p_line_tbl QP_PREQ_GRP.LINE_TBL_TYPE;
    p_qual_tbl QP_PREQ_GRP.QUAL_TBL_TYPE;
    p_line_attr_tbl QP_PREQ_GRP.LINE_ATTR_TBL_TYPE;
    p_LINE_DETAIL_tbl QP_PREQ_GRP.LINE_DETAIL_TBL_TYPE;
    p_LINE_DETAIL_qual_tbl QP_PREQ_GRP.LINE_DETAIL_QUAL_TBL_TYPE;
    p_LINE_DETAIL_attr_tbl QP_PREQ_GRP.LINE_DETAIL_ATTR_TBL_TYPE;
    p_related_lines_tbl QP_PREQ_GRP.RELATED_LINES_TBL_TYPE;
    p_control_rec QP_PREQ_GRP.CONTROL_RECORD_TYPE;
    x_line_tbl QP_PREQ_GRP.LINE_TBL_TYPE;
    x_line_qual QP_PREQ_GRP.QUAL_TBL_TYPE;
    x_line_attr_tbl QP_PREQ_GRP.LINE_ATTR_TBL_TYPE;
    x_line_detail_tbl QP_PREQ_GRP.LINE_DETAIL_TBL_TYPE;
    x_line_detail_qual_tbl QP_PREQ_GRP.LINE_DETAIL_QUAL_TBL_TYPE;
    x_line_detail_attr_tbl QP_PREQ_GRP.LINE_DETAIL_ATTR_TBL_TYPE;
    x_related_lines_tbl QP_PREQ_GRP.RELATED_LINES_TBL_TYPE;
    x_return_status VARCHAR2(240);
    x_return_status_text VARCHAR2(240);
    qual_rec QP_PREQ_GRP.QUAL_REC_TYPE;
    line_attr_rec QP_PREQ_GRP.LINE_ATTR_REC_TYPE;
    line_rec QP_PREQ_GRP.LINE_REC_TYPE;
    detail_rec QP_PREQ_GRP.LINE_DETAIL_REC_TYPE;
    ldet_rec QP_PREQ_GRP.LINE_DETAIL_REC_TYPE;
    rltd_rec QP_PREQ_GRP.RELATED_LINES_REC_TYPE;
    x_price_contexts_result_tbl QP_Attr_Mapping_PUB.Contexts_Result_Tbl_Type;
    x_qual_contexts_result_tbl QP_Attr_Mapping_PUB.Contexts_Result_Tbl_Type;
    v_line_tbl_cnt integer;
    I BINARY_INTEGER;
    l_version VARCHAR2(240);
    l_file_val VARCHAR2(60);
    L_MODIFIER VARCHAR2(4000);
    L_ADJUSTMENT_AMOUNT VARCHAR2(300);
    L_MOD_NAME VARCHAR2(240);
    l_unit_price number;
    l_selling_price number;
    BEGIN
    MO_GLOBAL.INIT('ONT');
    MO_GLOBAL.SET_POLICY_CONTEXT('S',89);
    --FND_GLOBAL.APPS_INITIALIZE(1130,21623,660);
    DBMS_OUTPUT.PUT_LINE('1');
    v_line_tbl_cnt := 1;
    ---- Control Record
    p_control_rec.pricing_event := 'BATCH';
    p_control_rec.calculate_flag := QP_PREQ_GRP.G_SEARCH_N_CALCULATE;
    p_control_rec.simulation_flag := 'Y';
    p_control_rec.source_order_amount_flag := 'Y';
    p_control_rec.PUBLIC_API_CALL_FLAG := 'N';
    p_control_rec.rounding_flag := 'Q';
    p_control_Rec.manual_discount_flag := 'N';
    --p_control_rec.MANUAL_ADJUSTMENTS_CALL_FLAG := 'Y';
    p_control_rec.request_type_code := 'ONT';
    p_control_rec.TEMP_TABLE_INSERT_FLAG := 'Y';
    DBMS_OUTPUT.PUT_LINE('2');
    line_rec.request_type_code :='ONT';
    --line_rec.PRICE_LIST_HEADER_ID := 8007;
    line_rec.line_id :=2125125; -- Order Line Id. This can be any thing for this script
    line_rec.line_Index :=1; -- Request Line Index
    line_rec.line_type_code := 'LINE'; -- LINE or ORDER(Summary Line)
    line_rec.pricing_effective_date := TRUNC(sysdate); -- Pricing as of what date ?
    line_rec.active_date_first := TRUNC(sysdate); -- Can be Ordered Date or Ship Date
    line_rec.active_date_second := TRUNC(sysdate); -- Can be Ordered Date or Ship Date
    line_rec.active_date_first_type := 'ORD'; -- ORD/SHIP
    line_rec.active_date_second_type :='SHIP'; -- ORD/SHIP
    line_rec.line_quantity := 1; -- Ordered Quantity
    line_rec.line_uom_code := 'EA'; -- Ordered UOM Code
    line_rec.currency_code := 'USD'; -- Currency Code
    line_rec.price_flag := 'Y'; -- Price Flag can have 'Y' , 'N'(No pricing) , 'P'(Phase)
    p_line_tbl(1) := line_rec;
    DBMS_OUTPUT.PUT_LINE('3');
    ---- Line Attribute Record
    line_attr_rec.LINE_INDEX := 1;
    line_attr_rec.PRICING_CONTEXT :='ITEM'; --
    line_attr_rec.PRICING_ATTRIBUTE :='PRICING_ATTRIBUTE3';
    line_attr_rec.PRICING_ATTR_VALUE_FROM :='ALL';
    line_attr_rec.VALIDATED_FLAG :='Y';
    p_line_attr_tbl(1) := line_attr_rec;
    line_attr_rec.LINE_INDEX := 1;
    line_attr_rec.PRICING_CONTEXT :='ITEM'; --
    line_attr_rec.PRICING_ATTRIBUTE :='PRICING_ATTRIBUTE1';
    --line_attr_rec.COMPARISON_OPERATOR_CODE         := 'BETWEEN';
    line_attr_rec.PRICING_ATTR_VALUE_FROM := '4466'; -- INVENTORY ITEM ID
    line_attr_rec.VALIDATED_FLAG :='Y';
    p_line_attr_tbl(2) := line_attr_rec;
    line_attr_rec.LINE_INDEX := 1;
    line_attr_rec.PRICING_CONTEXT :='ITEM'; --
    line_attr_rec.PRICING_ATTRIBUTE :='PRICING_ATTRIBUTE1';
    --line_attr_rec.COMPARISON_OPERATOR_CODE         := 'BETWEEN';
    line_attr_rec.PRICING_ATTR_VALUE_FROM := '2395'; -- INVENTORY ITEM ID
    line_attr_rec.VALIDATED_FLAG :='Y';
    p_line_attr_tbl(3) := line_attr_rec;
    line_attr_rec.LINE_INDEX := 1;
    line_attr_rec.PRICING_CONTEXT :='ITEM'; --
    line_attr_rec.PRICING_ATTRIBUTE :='PRICING_ATTRIBUTE30';
    --line_attr_rec.COMPARISON_OPERATOR_CODE         := 'BETWEEN';
    line_attr_rec.PRICING_ATTR_VALUE_FROM := 'Yes'; -- INVENTORY ITEM ID
    line_attr_rec.VALIDATED_FLAG :='Y';
    p_line_attr_tbl(3) := line_attr_rec;
    DBMS_OUTPUT.PUT_LINE('4');
    ---- Qualifier Attribute Record
    qual_rec.LINE_INDEX := 1; -- Attributes for the above line. Attributes are attached with the line index
    qual_rec.QUALIFIER_CONTEXT :='MODLIST';
    qual_rec.QUALIFIER_ATTRIBUTE :='QUALIFIER_ATTRIBUTE4';
    qual_rec.QUALIFIER_ATTR_VALUE_FROM :='8007'; -- PRICE LIST ID
    qual_rec.COMPARISON_OPERATOR_CODE := '=';
    qual_rec.VALIDATED_FLAG :='Y';
    p_qual_tbl(1) := qual_rec;
    DBMS_OUTPUT.PUT_LINE('5');
    qual_rec.line_index := 1;
    qual_rec.qualifier_context := 'ITEM';
    qual_rec.qualifier_attribute := 'QUALIFIER_ATTRIBUTE31';
    qual_rec.qualifier_attr_value_from := 'Yes';
    qual_rec.comparison_operator_code := '=';
    qual_rec.validated_flag := 'Y';
    p_qual_tbl (2) := qual_rec;
    DBMS_OUTPUT.PUT_LINE('6');
    OE_ORDER_PUB.G_LINE.inventory_item_id := 4466;
    DBMS_OUTPUT.PUT_LINE(Fnd_Profile.VALUE('QP_CUSTOM_SOURCED') );
    --QP_Attr_Mapping_PUB.Build_Contexts
    --( p_request_type_code => 'ONT',
    -- p_line_index => 1,
    -- p_pricing_type_code => 'L'
    QP_Attr_Mapping_PUB.Build_Contexts(
    p_request_type_code => 'ONT',
    p_pricing_type => 'L',
    --p_org_id => 89,
    x_price_contexts_result_tbl => x_price_contexts_result_tbl,
    x_qual_contexts_result_tbl => x_qual_contexts_result_tbl );
    I := x_qual_contexts_result_tbl.FIRST;
    IF I IS NOT NULL THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE('Context: '||x_qual_contexts_result_tbl(I).context_name);
    DBMS_OUTPUT.PUT_LINE('attribute_name: '||x_qual_contexts_result_tbl(I).attribute_name);
    DBMS_OUTPUT.PUT_LINE('attribute_value: '||x_qual_contexts_result_tbl(I).attribute_value);
    EXIT WHEN I = x_qual_contexts_result_tbl.LAST;
    I := x_qual_contexts_result_tbl.NEXT(I);
    END LOOP;
    END IF;
    I := x_price_contexts_result_tbl.FIRST;
    IF I IS NOT NULL THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE('Context: '||x_price_contexts_result_tbl(I).context_name);
    DBMS_OUTPUT.PUT_LINE('attribute_name: '||x_price_contexts_result_tbl(I).attribute_name);
    DBMS_OUTPUT.PUT_LINE('attribute_value: '||x_price_contexts_result_tbl(I).attribute_value);
    EXIT WHEN I = x_price_contexts_result_tbl.LAST;
    I := x_price_contexts_result_tbl.NEXT(I);
    END LOOP;
    END IF;
    DBMS_OUTPUT.PUT_LINE(Fnd_Profile.VALUE('QP_CUSTOM_SOURCED') );
    DBMS_OUTPUT.PUT_LINE('7');
    l_version := QP_PREQ_GRP.GET_VERSION;
    dbms_output.put_line(OE_ORDER_PUB.G_LINE.price_list_id);
    dbms_output.put_line(OE_ORDER_PUB.G_LINE.inventory_item_id);
    QP_PREQ_PUB.PRICE_REQUEST
    (p_line_tbl,
    p_qual_tbl,
    p_line_attr_tbl,
    p_line_detail_tbl,
    p_line_detail_qual_tbl,
    p_line_detail_attr_tbl,
    p_related_lines_tbl,
    p_control_rec,
    x_line_tbl,
    x_line_qual,
    x_line_attr_tbl,
    x_line_detail_tbl,
    x_line_detail_qual_tbl,
    x_line_detail_attr_tbl,
    x_related_lines_tbl,
    x_return_status,
    x_return_status_text);
    -- Return Status Information ..
    DBMS_OUTPUT.PUT_LINE('8');
    DBMS_OUTPUT.PUT_LINE('Return Status text '|| x_return_status_text);
    DBMS_OUTPUT.PUT_LINE('Return Status '|| x_return_status);
    DBMS_OUTPUT.PUT_LINE('+---------Information Returned to Caller---------------------+ ');
    DBMS_OUTPUT.PUT_LINE('-------------Request Line Information-------------------');
    I := x_line_tbl.FIRST;
    IF I IS NOT NULL THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE('Line Index: '||x_line_tbl(I).line_index);
    DBMS_OUTPUT.PUT_LINE('Unit_price: '||x_line_tbl(I).unit_price);
    DBMS_OUTPUT.PUT_LINE('Percent price: '||x_line_tbl(I).percent_price);
    DBMS_OUTPUT.PUT_LINE('Adjusted Unit Price: '||x_line_tbl(I).adjusted_unit_price);
    DBMS_OUTPUT.PUT_LINE('Pricing status code: '||x_line_tbl(I).status_code);
    DBMS_OUTPUT.PUT_LINE('Pricing status text: '||x_line_tbl(I).status_text);
    EXIT WHEN I = x_line_tbl.LAST;
    I := x_line_tbl.NEXT(I);
    END LOOP;
    END IF;
    DBMS_OUTPUT.PUT_LINE('-----------Pricing Attributes Information-------------');
    I := x_line_detail_attr_tbl.FIRST;
    IF I IS NOT NULL THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE('Line detail Index '||x_line_detail_attr_tbl(I).line_detail_index);
    DBMS_OUTPUT.PUT_LINE('Context '||x_line_detail_attr_tbl(I).pricing_context);
    DBMS_OUTPUT.PUT_LINE('Attribute '||x_line_detail_attr_tbl(I).pricing_attribute);
    DBMS_OUTPUT.PUT_LINE('Value '||x_line_detail_attr_tbl(I).pricing_attr_value_from);
    DBMS_OUTPUT.PUT_LINE('Status Code '||x_line_detail_attr_tbl(I).status_code);
    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------');
    EXIT WHEN I = x_line_detail_attr_tbl.last;
    I:=x_line_detail_attr_tbl.NEXT(I);
    END LOOP;
    END IF;
    DBMS_OUTPUT.PUT_LINE('-----------Qualifier Attributes Information-------------');
    I := x_line_detail_qual_tbl.FIRST;
    IF I IS NOT NULL THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE('Line Detail Index '||x_line_detail_qual_tbl(I).line_detail_index);
    DBMS_OUTPUT.PUT_LINE('Context '||x_line_detail_qual_tbl(I).qualifier_context);
    DBMS_OUTPUT.PUT_LINE('Attribute '||x_line_detail_qual_tbl(I).qualifier_attribute);
    DBMS_OUTPUT.PUT_LINE('Value '||x_line_detail_qual_tbl(I).qualifier_attr_value_from);
    DBMS_OUTPUT.PUT_LINE('Status Code '||x_line_detail_qual_tbl(I).status_code);
    DBMS_OUTPUT.PUT_LINE('---------------------------------------------------');
    EXIT WHEN I = x_line_detail_qual_tbl.last;
    I:=x_line_detail_qual_tbl.NEXT(I);
    END LOOP;
    END IF;
    I := x_line_detail_tbl.FIRST;
    DBMS_OUTPUT.PUT_LINE('------------Price List/Discount Information------------');
    IF I IS NOT NULL THEN
    LOOP
    L_MOD_NAME := '';
    DBMS_OUTPUT.PUT_LINE('Line Index: '||x_line_detail_tbl(I).line_index);
    DBMS_OUTPUT.PUT_LINE('Line Detail Index: '||x_line_detail_tbl(I).line_detail_index);
    DBMS_OUTPUT.PUT_LINE('Line Detail Type:'||x_line_detail_tbl(I).line_detail_type_code);
    DBMS_OUTPUT.PUT_LINE('List Header Id: '||x_line_detail_tbl(I).list_header_id);
    DBMS_OUTPUT.PUT_LINE('List Line Id: '||x_line_detail_tbl(I).list_line_id);
    DBMS_OUTPUT.PUT_LINE('List Line Type Code: '||x_line_detail_tbl(I).list_line_type_code);
    DBMS_OUTPUT.PUT_LINE('Adjustment Amount : '||x_line_detail_tbl(I).adjustment_amount);
    DBMS_OUTPUT.PUT_LINE('Line Quantity : '||x_line_detail_tbl(I).line_quantity);
    DBMS_OUTPUT.PUT_LINE('Operand Calculation Code: '||x_line_detail_tbl(I).Operand_calculation_code);
    DBMS_OUTPUT.PUT_LINE('Operand value: '||x_line_detail_tbl(I).operand_value);
    DBMS_OUTPUT.PUT_LINE('Automatic Flag: '||x_line_detail_tbl(I).automatic_flag);
    DBMS_OUTPUT.PUT_LINE('Override Flag: '||x_line_detail_tbl(I).override_flag);
    DBMS_OUTPUT.PUT_LINE('status_code: '||x_line_detail_tbl(I).status_code);
    DBMS_OUTPUT.PUT_LINE('status text: '||x_line_detail_tbl(I).status_text);
    DBMS_OUTPUT.PUT_LINE('-------------------------------------------');
    EXIT WHEN I = x_line_detail_tbl.LAST;
    BEGIN
    SELECT NAME INTO L_MOD_NAME
    FROM QP_LIST_HEADERS_ALL
    WHERE LIST_HEADER_ID=x_line_detail_tbl(I).list_header_id
    AND x_line_detail_tbl(I).list_line_type_code <>'PLL'
    AND x_line_detail_tbl(I).adjustment_amount IS NOT NULL;
    L_MODIFIER := L_MODIFIER||'~'||L_MOD_NAME;
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    IF x_line_detail_tbl(I).list_line_type_code <>'PLL' AND x_line_detail_tbl(I).adjustment_amount IS NOT NULL THEN
    L_ADJUSTMENT_AMOUNT := L_ADJUSTMENT_AMOUNT||'~'||x_line_detail_tbl(I).adjustment_amount;
    END IF;
    I := x_line_detail_tbl.NEXT(I);
    END LOOP;
    END IF;
    SELECT line_unit_price , order_uom_selling_price
    INTO l_unit_price , l_selling_price
    FROM qp_preq_lines_tmp
    WHERE pricing_status_code = Qp_Preq_Pub.g_status_updated
    ORDER BY line_id;
    DBMS_OUTPUT.PUT_LINE('Unit Price := '||l_unit_price);--x_line_tbl(1).UNIT_PRICE );
    DBMS_OUTPUT.PUT_LINE('Selling Price := '||l_selling_price);---x_line_tbl(1).LINE_UNIT_PRICE );
    DBMS_OUTPUT.PUT_LINE('L_MODIFIER: '||L_MODIFIER);
    DBMS_OUTPUT.PUT_LINE('L_ADJUSTMENT_AMOUNT: '||L_ADJUSTMENT_AMOUNT);
    DBMS_OUTPUT.PUT_LINE('--------------Related Lines Information for Price Breaks/Service Items---------------');
    I := x_related_lines_tbl.FIRST;
    IF I IS NOT NULL THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE('Line Index :'||x_related_lines_tbl(I).line_index);
    DBMS_OUTPUT.PUT_LINE('Line Detail Index: '||x_related_lines_tbl(I).LINE_DETAIL_INDEX);
    DBMS_OUTPUT.PUT_LINE('Relationship Type Code: '||x_related_lines_tbl(I).relationship_type_code);
    DBMS_OUTPUT.PUT_LINE('Related Line Index: '||x_related_lines_tbl(I).RELATED_LINE_INDEX);
    DBMS_OUTPUT.PUT_LINE('Related Line Detail Index: '||x_related_lines_tbl(I).related_line_detail_index);
    DBMS_OUTPUT.PUT_LINE('Status Code: '|| x_related_lines_tbl(I).STATUS_CODE);
    EXIT WHEN I = x_related_lines_tbl.LAST;
    I := x_related_lines_tbl.NEXT(I);
    END LOOP;
    END IF;
    END; -- procedure --;
    Edited by: user7751421 on Apr 20, 2013 8:54 AM

    I tried with bellow code but it shows both Unit Price (price after apply all adjustment) and List price same_
    What I need is get unit selling price before order book, when customer called for inquiry only._
    DECLARE
    p_line_tbl QP_PREQ_GRP.LINE_TBL_TYPE;
    p_qual_tbl QP_PREQ_GRP.QUAL_TBL_TYPE;
    p_line_attr_tbl QP_PREQ_GRP.LINE_ATTR_TBL_TYPE;
    p_LINE_DETAIL_tbl QP_PREQ_GRP.LINE_DETAIL_TBL_TYPE;
    p_LINE_DETAIL_qual_tbl QP_PREQ_GRP.LINE_DETAIL_QUAL_TBL_TYPE;
    p_LINE_DETAIL_attr_tbl QP_PREQ_GRP.LINE_DETAIL_ATTR_TBL_TYPE;
    p_related_lines_tbl QP_PREQ_GRP.RELATED_LINES_TBL_TYPE;
    p_control_rec QP_PREQ_GRP.CONTROL_RECORD_TYPE;
    x_line_tbl QP_PREQ_GRP.LINE_TBL_TYPE;
    x_line_qual QP_PREQ_GRP.QUAL_TBL_TYPE;
    x_line_attr_tbl QP_PREQ_GRP.LINE_ATTR_TBL_TYPE;
    x_line_detail_tbl QP_PREQ_GRP.LINE_DETAIL_TBL_TYPE;
    x_line_detail_qual_tbl QP_PREQ_GRP.LINE_DETAIL_QUAL_TBL_TYPE;
    x_line_detail_attr_tbl QP_PREQ_GRP.LINE_DETAIL_ATTR_TBL_TYPE;
    x_related_lines_tbl QP_PREQ_GRP.RELATED_LINES_TBL_TYPE;
    x_return_status VARCHAR2 (240);
    x_return_status_text VARCHAR2 (240);
    qual_rec QP_PREQ_GRP.QUAL_REC_TYPE;
    line_attr_rec QP_PREQ_GRP.LINE_ATTR_REC_TYPE;
    line_rec QP_PREQ_GRP.LINE_REC_TYPE;
    detail_rec QP_PREQ_GRP.LINE_DETAIL_REC_TYPE;
    ldet_rec QP_PREQ_GRP.LINE_DETAIL_REC_TYPE;
    rltd_rec QP_PREQ_GRP.RELATED_LINES_REC_TYPE;
    x_price_contexts_result_tbl QP_Attr_Mapping_PUB.Contexts_Result_Tbl_Type;
    x_qual_contexts_result_tbl QP_Attr_Mapping_PUB.Contexts_Result_Tbl_Type;
    v_line_tbl_cnt INTEGER;
    I BINARY_INTEGER;
    l_version VARCHAR2 (240);
    l_file_val VARCHAR2 (60);
    L_MODIFIER VARCHAR2 (4000);
    L_ADJUSTMENT_AMOUNT VARCHAR2 (300);
    L_MOD_NAME VARCHAR2 (240);
    l_unit_price NUMBER;
    l_selling_price NUMBER;
    l_item_id number:=17155;
    BEGIN
    MO_GLOBAL.INIT ('ONT');
    MO_GLOBAL.SET_POLICY_CONTEXT ('S', 91);
    --FND_GLOBAL.APPS_INITIALIZE(1130,21623,660);
    DBMS_OUTPUT.PUT_LINE ('1');
    v_line_tbl_cnt := 1;
    ---- Control Record
    p_control_rec.pricing_event := 'LINE';
    p_control_rec.calculate_flag := 'Y';
    p_control_rec.simulation_flag := 'Y';
    p_control_rec.source_order_amount_flag := 'Y';
    p_control_rec.PUBLIC_API_CALL_FLAG := 'N';
    p_control_rec.rounding_flag := 'Q';
    p_control_Rec.manual_discount_flag := 'N';
    --p_control_rec.MANUAL_ADJUSTMENTS_CALL_FLAG := 'Y';
    p_control_rec.request_type_code := 'ONT';
    p_control_rec.TEMP_TABLE_INSERT_FLAG := 'Y';
    DBMS_OUTPUT.PUT_LINE ('2');
    line_rec.request_type_code := 'ONT';
    -- line_rec.PRICE_LIST_HEADER_ID := 386481;
    line_rec.line_id := 72202; -- Order Line Id. This can be any thing for this script
    line_rec.line_Index := 1; -- Request Line Index
    line_rec.line_type_code := 'LINE'; -- LINE or ORDER(Summary Line)
    line_rec.pricing_effective_date := TRUNC (SYSDATE); -- Pricing as of what date ?
    line_rec.active_date_first := TRUNC (SYSDATE); -- Can be Ordered Date or Ship Date
    line_rec.active_date_second := TRUNC (SYSDATE); -- Can be Ordered Date or Ship Date
    line_rec.active_date_first_type := 'ORD'; -- ORD/SHIP
    line_rec.active_date_second_type := 'SHIP'; -- ORD/SHIP
    line_rec.line_quantity := 10; -- Ordered Quantity
    line_rec.line_uom_code := 'Ea'; -- Ordered UOM Code
    line_rec.currency_code := 'USD'; -- Currency Code
    line_rec.price_flag := 'Y'; -- Price Flag can have 'Y' , 'N'(No pricing) , 'P'(Phase)
    p_line_tbl (1) := line_rec;
    DBMS_OUTPUT.PUT_LINE ('3');
    ---- Line Attribute Record
    line_attr_rec.LINE_INDEX := 1;
    line_attr_rec.PRICING_CONTEXT := 'ITEM'; --
    line_attr_rec.PRICING_ATTRIBUTE := 'PRICING_ATTRIBUTE3';
    line_attr_rec.PRICING_ATTR_VALUE_FROM := 'ALL';
    line_attr_rec.VALIDATED_FLAG := 'N';
    p_line_attr_tbl (1) := line_attr_rec;
    line_attr_rec.LINE_INDEX := 1;
    line_attr_rec.PRICING_CONTEXT := 'ITEM'; --
    line_attr_rec.PRICING_ATTRIBUTE := 'PRICING_ATTRIBUTE1';
    --line_attr_rec.COMPARISON_OPERATOR_CODE := 'BETWEEN';
    line_attr_rec.PRICING_ATTR_VALUE_FROM := '17155'; -- INVENTORY ITEM ID
    line_attr_rec.VALIDATED_FLAG := 'Y';
    p_line_attr_tbl (2) := line_attr_rec;
    -- line_attr_rec.LINE_INDEX := 1;
    -- line_attr_rec.PRICING_CONTEXT := 'ITEM'; --
    -- line_attr_rec.PRICING_ATTRIBUTE := 'PRICING_ATTRIBUTE1';
    -- --line_attr_rec.COMPARISON_OPERATOR_CODE := 'BETWEEN';
    -- line_attr_rec.PRICING_ATTR_VALUE_FROM := '72201'; -- INVENTORY ITEM ID
    -- line_attr_rec.VALIDATED_FLAG := 'Y';
    -- p_line_attr_tbl (3) := line_attr_rec;
    -- line_attr_rec.LINE_INDEX := 1;
    -- line_attr_rec.PRICING_CONTEXT := 'ITEM'; --
    -- line_attr_rec.PRICING_ATTRIBUTE := 'PRICING_ATTRIBUTE30';
    -- --line_attr_rec.COMPARISON_OPERATOR_CODE := 'BETWEEN';
    -- line_attr_rec.PRICING_ATTR_VALUE_FROM := 'Yes'; -- INVENTORY ITEM ID
    -- line_attr_rec.VALIDATED_FLAG := 'Y';
    -- p_line_attr_tbl (3) := line_attr_rec;
    DBMS_OUTPUT.PUT_LINE ('4');
    ---- Qualifier Attribute Record
    qual_rec.LINE_INDEX := 1; -- Attributes for the above line. Attributes are attached with the line index
    qual_rec.QUALIFIER_CONTEXT := 'MODLIST';
    qual_rec.QUALIFIER_ATTRIBUTE := 'QUALIFIER_ATTRIBUTE4';
    qual_rec.QUALIFIER_ATTR_VALUE_FROM := '386481'; -- PRICE LIST ID
    qual_rec.COMPARISON_OPERATOR_CODE := '=';
    qual_rec.VALIDATED_FLAG := 'Y';
    p_qual_tbl (1) := qual_rec;
    DBMS_OUTPUT.PUT_LINE ('5');
    -- qual_rec.line_index := 1;
    -- qual_rec.qualifier_context := 'ITEM';
    -- qual_rec.qualifier_attribute := 'QUALIFIER_ATTRIBUTE31';
    -- qual_rec.qualifier_attr_value_from := 'Yes';
    -- qual_rec.comparison_operator_code := '=';
    -- qual_rec.validated_flag := 'Y';
    -- p_qual_tbl (2) := qual_rec;
    qual_rec.LINE_INDEX := 1; -- Attributes for the above line. Attributes are attached with the line index
    qual_rec.QUALIFIER_CONTEXT := 'CUSTOMER';
    qual_rec.QUALIFIER_ATTRIBUTE := 'QUALIFIER_ATTRIBUTE5';
    qual_rec.QUALIFIER_ATTR_VALUE_FROM := 5728; -- Customer Account ID
    qual_rec.COMPARISON_OPERATOR_CODE := '=';
    qual_rec.VALIDATED_FLAG := 'Y';
    p_qual_tbl (3) := qual_rec;
    qual_rec.LINE_INDEX := 1;
    qual_rec.QUALIFIER_CONTEXT := 'ITEM_CATEGORY';
    qual_rec.QUALIFIER_ATTRIBUTE := 'QUALIFIER_ATTRIBUTE35';
    qual_rec.QUALIFIER_ATTR_VALUE_FROM := 'TOOLS.HARDWARE TOOLS (DISCOUNTABLE).'; -- item category
    qual_rec.COMPARISON_OPERATOR_CODE := '=';
    qual_rec.VALIDATED_FLAG := 'N';
    p_qual_tbl (4) := qual_rec;
    DBMS_OUTPUT.PUT_LINE ('6');
    OE_ORDER_PUB.G_LINE.inventory_item_id := l_item_id;
    DBMS_OUTPUT.PUT_LINE (Fnd_Profile.VALUE ('QP_CUSTOM_SOURCED'));
    --QP_Attr_Mapping_PUB.Build_Contexts
    --( p_request_type_code => 'ONT',
    -- p_line_index => 1,
    -- p_pricing_type_code => 'L'
    QP_Attr_Mapping_PUB.
    Build_Contexts (
    p_request_type_code => 'ONT',
    p_pricing_type => 'L',
    --p_org_id => 89,
    x_price_contexts_result_tbl => x_price_contexts_result_tbl,
    x_qual_contexts_result_tbl => x_qual_contexts_result_tbl);
    I := x_qual_contexts_result_tbl.FIRST;
    IF I IS NOT NULL
    THEN
    LOOP
    DBMS_OUTPUT.
    PUT_LINE (
    'Context: ' || x_qual_contexts_result_tbl (I).context_name);
    DBMS_OUTPUT.
    PUT_LINE (
    'attribute_name: '
    || x_qual_contexts_result_tbl (I).attribute_name);
    DBMS_OUTPUT.
    PUT_LINE (
    'attribute_value: '
    || x_qual_contexts_result_tbl (I).attribute_value);
    EXIT WHEN I = x_qual_contexts_result_tbl.LAST;
    I := x_qual_contexts_result_tbl.NEXT (I);
    END LOOP;
    END IF;
    I := x_price_contexts_result_tbl.FIRST;
    IF I IS NOT NULL
    THEN
    LOOP
    DBMS_OUTPUT.
    PUT_LINE (
    'Context: ' || x_price_contexts_result_tbl (I).context_name);
    DBMS_OUTPUT.
    PUT_LINE (
    'attribute_name: '
    || x_price_contexts_result_tbl (I).attribute_name);
    DBMS_OUTPUT.
    PUT_LINE (
    'attribute_value: '
    || x_price_contexts_result_tbl (I).attribute_value);
    EXIT WHEN I = x_price_contexts_result_tbl.LAST;
    I := x_price_contexts_result_tbl.NEXT (I);
    END LOOP;
    END IF;
    DBMS_OUTPUT.PUT_LINE (' Fnd_Profile.VALUE (QP_CUSTOM_SOURCED): ' || Fnd_Profile.VALUE ('QP_CUSTOM_SOURCED'));
    DBMS_OUTPUT.PUT_LINE ('7');
    l_version := QP_PREQ_GRP.GET_VERSION;
    DBMS_OUTPUT.put_line (OE_ORDER_PUB.G_LINE.price_list_id);
    DBMS_OUTPUT.put_line (OE_ORDER_PUB.G_LINE.inventory_item_id);
    QP_PREQ_PUB.PRICE_REQUEST (p_line_tbl,
    p_qual_tbl,
    p_line_attr_tbl,
    p_line_detail_tbl,
    p_line_detail_qual_tbl,
    p_line_detail_attr_tbl,
    p_related_lines_tbl,
    p_control_rec,
    x_line_tbl,
    x_line_qual,
    x_line_attr_tbl,
    x_line_detail_tbl,
    x_line_detail_qual_tbl,
    x_line_detail_attr_tbl,
    x_related_lines_tbl,
    x_return_status,
    x_return_status_text);
    -- Return Status Information ..
    DBMS_OUTPUT.PUT_LINE ('8');
    DBMS_OUTPUT.PUT_LINE ('Return Status text ' || x_return_status_text);
    DBMS_OUTPUT.PUT_LINE ('Return Status ' || x_return_status);
    DBMS_OUTPUT.
    PUT_LINE (
    '+---------Information Returned to Caller---------------------+ ');
    DBMS_OUTPUT.
    PUT_LINE ('-------------Request Line Information-------------------');
    I := x_line_tbl.FIRST;
    IF I IS NOT NULL
    THEN
    LOOP
    DBMS_OUTPUT.PUT_LINE ('Line Index: ' || x_line_tbl (I).line_index);
    DBMS_OUTPUT.PUT_LINE ('Unit_price: ' || x_line_tbl (I).unit_price);
    DBMS_OUTPUT.
    PUT_LINE ('Percent price: ' || x_line_tbl (I).percent_price);
    DBMS_OUTPUT.
    PUT_LINE (
    'Adjusted Unit Price: ' || x_line_tbl (I).adjusted_unit_price);
    DBMS_OUTPUT.
    PUT_LINE ('Pricing status code: ' || x_line_tbl (I).status_code);
    DBMS_OUTPUT.
    PUT_LINE ('Pricing status text: ' || x_line_tbl (I).status_text);
    EXIT WHEN I = x_line_tbl.LAST;
    I := x_line_tbl.NEXT (I);
    END LOOP;
    END IF;
    DBMS_OUTPUT.
    PUT_LINE ('-----------Pricing Attributes Information-------------');
    I := x_line_detail_attr_tbl.FIRST;
    IF I IS NOT NULL
    THEN
    LOOP
    DBMS_OUTPUT.
    PUT_LINE (
    'Line detail Index '
    || x_line_detail_attr_tbl (I).line_detail_index);
    DBMS_OUTPUT.
    PUT_LINE ('Context ' || x_line_detail_attr_tbl (I).pricing_context);
    DBMS_OUTPUT.
    PUT_LINE (
    'Attribute ' || x_line_detail_attr_tbl (I).pricing_attribute);
    DBMS_OUTPUT.
    PUT_LINE (
    'Value ' || x_line_detail_attr_tbl (I).pricing_attr_value_from);
    DBMS_OUTPUT.
    PUT_LINE ('Status Code ' || x_line_detail_attr_tbl (I).status_code);
    DBMS_OUTPUT.
    PUT_LINE ('---------------------------------------------------');
    EXIT WHEN I = x_line_detail_attr_tbl.LAST;
    I := x_line_detail_attr_tbl.NEXT (I);
    END LOOP;
    END IF;
    DBMS_OUTPUT.
    PUT_LINE ('-----------Qualifier Attributes Information-------------');
    I := x_line_detail_qual_tbl.FIRST;
    IF I IS NOT NULL
    THEN
    LOOP
    DBMS_OUTPUT.
    PUT_LINE (
    'Line Detail Index '
    || x_line_detail_qual_tbl (I).line_detail_index);
    DBMS_OUTPUT.
    PUT_LINE (
    'Context ' || x_line_detail_qual_tbl (I).qualifier_context);
    DBMS_OUTPUT.
    PUT_LINE (
    'Attribute ' || x_line_detail_qual_tbl (I).qualifier_attribute);
    DBMS_OUTPUT.
    PUT_LINE (
    'Value ' || x_line_detail_qual_tbl (I).qualifier_attr_value_from);
    DBMS_OUTPUT.
    PUT_LINE ('Status Code ' || x_line_detail_qual_tbl (I).status_code);
    DBMS_OUTPUT.
    PUT_LINE ('---------------------------------------------------');
    EXIT WHEN I = x_line_detail_qual_tbl.LAST;
    I := x_line_detail_qual_tbl.NEXT (I);
    END LOOP;
    END IF;
    I := x_line_detail_tbl.FIRST;
    DBMS_OUTPUT.
    PUT_LINE ('------------Price List/Discount Information------------');
    IF I IS NOT NULL
    THEN
    LOOP
    L_MOD_NAME := '';
    DBMS_OUTPUT.
    PUT_LINE ('Line Index: ' || x_line_detail_tbl (I).line_index);
    DBMS_OUTPUT.
    PUT_LINE (
    'Line Detail Index: ' || x_line_detail_tbl (I).line_detail_index);
    DBMS_OUTPUT.
    PUT_LINE (
    'Line Detail Type:'
    || x_line_detail_tbl (I).line_detail_type_code);
    DBMS_OUTPUT.
    PUT_LINE (
    'List Header Id: ' || x_line_detail_tbl (I).list_header_id);
    DBMS_OUTPUT.
    PUT_LINE ('List Line Id: ' || x_line_detail_tbl (I).list_line_id);
    DBMS_OUTPUT.
    PUT_LINE (
    'List Line Type Code: '
    || x_line_detail_tbl (I).list_line_type_code);
    DBMS_OUTPUT.
    PUT_LINE (
    'Adjustment Amount : ' || x_line_detail_tbl (I).adjustment_amount);
    DBMS_OUTPUT.
    PUT_LINE ('Line Quantity : ' || x_line_detail_tbl (I).line_quantity);
    DBMS_OUTPUT.
    PUT_LINE (
    'Operand Calculation Code: '
    || x_line_detail_tbl (I).Operand_calculation_code);
    DBMS_OUTPUT.
    PUT_LINE ('Operand value: ' || x_line_detail_tbl (I).operand_value);
    DBMS_OUTPUT.
    PUT_LINE (
    'Automatic Flag: ' || x_line_detail_tbl (I).automatic_flag);
    DBMS_OUTPUT.
    PUT_LINE ('Override Flag: ' || x_line_detail_tbl (I).override_flag);
    DBMS_OUTPUT.
    PUT_LINE ('status_code: ' || x_line_detail_tbl (I).status_code);
    DBMS_OUTPUT.
    PUT_LINE ('status text: ' || x_line_detail_tbl (I).status_text);
    DBMS_OUTPUT.PUT_LINE ('-------------------------------------------');
    EXIT WHEN I = x_line_detail_tbl.LAST;
    BEGIN
    SELECT NAME
    INTO L_MOD_NAME
    FROM QP_LIST_HEADERS_ALL
    WHERE LIST_HEADER_ID = x_line_detail_tbl (I).list_header_id
    AND x_line_detail_tbl (I).list_line_type_code = 'PLL'
    AND x_line_detail_tbl (I).adjustment_amount IS NOT NULL;
    L_MODIFIER := L_MODIFIER || '~' || L_MOD_NAME;
    EXCEPTION
    WHEN OTHERS
    THEN
    NULL;
    END;
    IF x_line_detail_tbl (I).list_line_type_code = 'PLL'
    AND x_line_detail_tbl (I).adjustment_amount IS NOT NULL
    THEN
    L_ADJUSTMENT_AMOUNT :=
    L_ADJUSTMENT_AMOUNT
    || '~'
    || x_line_detail_tbl (I).adjustment_amount;
    END IF;
    I := x_line_detail_tbl.NEXT (I);
    END LOOP;
    END IF;
    SELECT line_unit_price, order_uom_selling_price
    INTO l_unit_price, l_selling_price
    FROM qp_preq_lines_tmp
    WHERE pricing_status_code = Qp_Preq_Pub.g_status_updated
    ORDER BY line_id;
    DBMS_OUTPUT.PUT_LINE ('Unit Price := ' || l_unit_price); --x_line_tbl(1).UNIT_PRICE );
    DBMS_OUTPUT.PUT_LINE ('Selling Price := ' || l_selling_price); ---x_line_tbl(1).LINE_UNIT_PRICE );
    DBMS_OUTPUT.PUT_LINE ('L_MODIFIER: ' || L_MODIFIER);
    DBMS_OUTPUT.PUT_LINE ('L_ADJUSTMENT_AMOUNT: ' || L_ADJUSTMENT_AMOUNT);
    DBMS_OUTPUT.
    PUT_LINE (
    '--------------Related Lines Information for Price Breaks/Service Items---------------');
    I := x_related_lines_tbl.FIRST;
    IF I IS NOT NULL
    THEN
    LOOP
    DBMS_OUTPUT.
    PUT_LINE ('Line Index :' || x_related_lines_tbl (I).line_index);
    DBMS_OUTPUT.
    PUT_LINE (
    'Line Detail Index: '
    || x_related_lines_tbl (I).LINE_DETAIL_INDEX);
    DBMS_OUTPUT.
    PUT_LINE (
    'Relationship Type Code: '
    || x_related_lines_tbl (I).relationship_type_code);
    DBMS_OUTPUT.
    PUT_LINE (
    'Related Line Index: '
    || x_related_lines_tbl (I).RELATED_LINE_INDEX);
    DBMS_OUTPUT.
    PUT_LINE (
    'Related Line Detail Index: '
    || x_related_lines_tbl (I).related_line_detail_index);
    DBMS_OUTPUT.
    PUT_LINE ('Status Code: ' || x_related_lines_tbl (I).STATUS_CODE);
    EXIT WHEN I = x_related_lines_tbl.LAST;
    I := x_related_lines_tbl.NEXT (I);
    END LOOP;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.
    PUT_LINE ('SQLERRM' || SQLERRM);
    END;
    Kindly provide sugession if I miss any thing.
    Regards,
    Akil
    Edited by: 1004537 on May 9, 2013 7:20 AM
    Edited by: 1004537 on May 9, 2013 7:20 AM

  • Discount in Invoice Lines

    Hi. I'm trying to make an invoice with DI that has different discounts in its lines (not in the header's discount). I use oDoc.Lines.DiscountPercent in the apropiate line to give a % discount value but it is ignored and appears in the header's discount...
    It's a bug or I am doing something wrong?
    Thanks in advance...

    The line level at the document works like this:
    1. the pricebefdi (price before discount is inherited from the previous document, or set based on the price field.)
    2. the discount field affects the price field
    3. the price field reflects the discount.
    If all three values are already set then adjusting the price will affect the discount. ie multiply the price by .9 to get a 10 percent discount in the discount field.
    If you have no values in any of these fields try this: set the pricebefdi (price before discount first). Then set the price field to the discounted amount, this should populate the discount amount.
    Regardless- you cannot directly set the discount. You must adjust the price from its original non zero value.

  • Is there a way to print over the same line of text?

    Hey everyone, does anyone know if it's possible to write over the same line in a console window? I am formatting a diskette an currently it is going:
    1 percent complete
    2 percent complete
    3 percent complete
    4 percent complete
    5 percent complete
    I am currently doing:
    System.out.println(bufferedReader.readLine());
    to display this .. is there anyway to write over and over on the same line?
    Thanks again.

    I just thought of something!!! Try this:
    System.out.println("When the zeros have printed twenty times the disk has been formatted\n");
    System.out.println("|-----------------------------------|"\n)
    Then add the zeros to the line underneath it as it formats.  This will give a progress bar effect.  The zeros, when completely done, should fill up the whole |---| segment.
    Hope this helps.
    Virum                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Strange flickering lines across screen, opening Photobooth makes them go away?

    Hi everyone,
    I've been having a very strange problem with my 2011 Macbook Pro 15" for quite a long time now. It's basically flickering lines across the screen, and the screen 'folds' in on itself, squashing the display vertically and stacking them on top of each other. Sometimes it's terrible, sometimes it's bearable. Sometimes the screen goes completely black. It's super weird. Here's a photo I took my phone, as I screenshotting shows nothing out of the ordinary:
    The really really weird thing is that when I open Photobooth, as in the apple webcam program, the problem completely goes away (until I quit it). I had hoped this was a software issue, so I backed up and formatted my hard drive and then installed a fresh copy of OS X - and the exact same thing happens! I barely made it through the system setup!
    I beg, someone help me!

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac. 
    These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing. 
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. 
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands. 
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply. 
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click the line of text below to select it:
    kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -f -a TextEdit 
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). A TextEdit window will open. Post the contents of that window, if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Repeat with this line:
    { sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; sudo defaults read com.apple.loginwindow LoginHook; } | open -f -a TextEdit 
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. 
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step. 
    Step 3
    launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}' | open -f -a TextEdit 
    Step 4
    ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts 2> /dev/null | open -f -a TextEdit  
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting. 
    Step 5
    osascript -e 'tell application "System Events" to get name of every login item' | open -f -a TextEdit 
    Remember, steps 1-5 are all copy-and-paste — no typing, except your password. Also remember to post the output. 
    You can then quit Terminal.

Maybe you are looking for

  • Change The title of table control

    I have Table Control on Screen 102 called TABCTRL_102. General attributes of TABCTRL_102 has <b>With title</b> checked and <b>Title element name</b>  TXT003 Now I want to Change The title of my table control through program. Is there a way out.

  • Create new function...inconsistent, process &SAP_GRAC_FUNC_APPR&

    Folks, I checked the scn forums for this error but didn't find anything that points to this...hence posting this question. On GRC/AC 10.1 / 740 release / SP 0005 / GRCFND_A V1100...I'm trying to add a new function...by adding ACTION 'FB50'...adding P

  • How do I disable Computrace on Yoga 13

    I have found that having Computrace enabled seems to be preventing me from updating my Yoga 13 BIOS. Whenever I try the BIOS update I get an error: ''the system is currently under Intel Ant-Theft Technology 4.0 protection. Please un-enroll the client

  • Syncing Google email account on Lumia 800

    Encountered this problem when trying to create a google account. Whenever I try to login, I always get this message: "update your info for m.google.com and tap save". I was very frustrated and disappointed that it was not working altought my other em

  • Setting up new user - user does not get the welcome email

    I have seen other people having this issue, but have not seen that there is/was a resolution. Has anybody found the answer? I set my new tech up in SW, it is supposed to send him an email so he can set his pw up and be able to start working.....that