Public bidding scenario?

Dear Experts,
There is a business scenario where the client requires fresh bidders for his bid invitation? He does not want to engage existing bidders present in SRM system? He does not have any ROS (registration of Supplier) system for registration of fresh suppliers/bidders?
He does not want to use OPI to access third party supplier directory to invite fresh bidders.
Could you please comment on how to achieve further with the given constraints?
Your feedback is highly appreciated.
Thanks and regards,
Ranjan

Dear Experts,
How we can invite fresh bidder for a public bid invitation? Say, the client does not have any ROS system or has not configured OPI.
Can we in such cases use the supplier self registration in SRM system like user registration? Since Bidders have anyway to be created in SRM system, could we visualize a scenario as below?
1. The bid is published.
2. The interested parties visit the buyer's website and see the public bid.
3. Request for registration.
4. Workflow (standard if available, or custom developed) is activated.
5. A task does appear for the approval of the bidder in the purchaser inbox.
6. The purchaser approves the bidders.
7. The bidder is created and notified via e-mail informing the access data.
8. The bidders now submits the bid against the public bid.
Can we design such a process?
Thanks and regards,
Ranjan

Similar Messages

  • Classic Scenario: follow on document from BID

    Dear All,
    We are trying to create a PO from an accepted BID . We can create the PO, and if we check it in the backend system, everything is OK.
    Our problem is that we are trying to find in SRM, somewhere that shows us the follow on document of the Bid but we can´t find it.
    It´s important to say that as soon as the PO is created, we get a message that contains the PO number. But after that, we can´t find in SRM the PO number anymore.
    Is this a lack of SRM or may be another problem? Has anyone face up with this issue? If so, How it was resolved?
    Thanks,
    Pablo.-

    I noticed that you have a very similiar Bidding scenario that we have.  We can create a bid invitation in SRM and we have used the BADI - BBP_DETERMINE_LOGSYS to indicate to the system to create a purchase order in the backend system after the bid is accepted.  We keep getting the following error in SM21:  Purchase orders cannot be created without IPC pricing
    Did you have to turn on the IPC in order to create the purchase order in R/3?  We are on SRM 4.0.  Also, if you have used the BBP_DETEMINE_LOGSYS Badi and have example code that might be helpful as well...thanks!

  • SRM Public Sector Tendering Process

    Hi Experts
    Have a question.
    In SRM 7 Public Sector Procurement (PPS) scenario, I publish the bid against which the bidders provide with their Technical Response. I publish the bid as 'Public Bid'.
    Question 1: How will the bidders log in to the portal to submit their bids? Would it be with a common ID that would be used by all the bidders to log in to the portal to submit their bids?
    Question 2: If the bidders log in to the portal via common ID, how would CFolders create a separate folder for each bidder to attach their document.
    Question 3: Currently I am also not able to open the bid from the bidder side. When I click on the Bid Invitation document link, no action happens. Am I missing some roles?
    Any advise on the above queries would be highly appreciated.
    Regards
    Manoj

    Hi,
    Question 1: How will the bidders log in to the portal to submit their bids? Would it be with a common ID that would be used by all the bidders to log in to the portal to submit their bids?
    Ans: Each Bidder should have seperate user id & pwd
    Question 2: If the bidders log in to the portal via common ID, how would CFolders create a separate folder for each bidder to attach their document.
    Ans: CFolders directly link with individual user ids.
    Question 3: Currently I am also not able to open the bid from the bidder side. When I click on the Bid Invitation document link, no action happens. Am I missing some roles?
    Ans: Following role is must in EBP : SAP_EC_BBP_BIDDER in Portal : com.sap.pct.srm.core.ro_supplier & com.sap.pct.srm.gp.ro_bidder
    Regards,
    Mohan

  • Publish Bid Invitations.

    Hi Guys, need help in the following:
    1) What does public bid Inviation mean? My understanding is that we will not have to assign any bidders to the bid invitation and it get published on a portal.
    2) How do I publish the bid on a portal - I want to publish the bid invitation on Internet where the suppliers can see the opportunity for businees?
    3) How does it work - Do we have to generate a PDF using smart form and then put it on the net some how?
    4) How will the vendors respond to the Open Bid Invitation as they are not created in the system and do not have login details?
    Kind Regards,
    Abdul Kadir Rajbhoy

    Hi,
    Yes you are right.Public Bid Invitation means that any body can bid to the event.If Bidders are involved then it becomes Restricted Bid Invitation.
    In Public Bid Invitation,you need to give  link to which the intending bidder need to get registered by answering a questionnaire published by your enterprise.Once his registration is approved by the enterprise, he will be issued a userid & Pwd and he will be in a position to submit Bid response.
    This requires the setting up of the Supplier Registration scenario.
    Thanks & Regards,
    Nagarajan

  • Procurement to public sector

    Hi,
    I'm going to implement SRM in a public company and I would like to know if I had to implement an addon onto SRM to get an specify public business scenario.
    Need I something 'out' for SRM?
    thanks

    Hi David,
    you may want to consider implementing industry solution Procurement for Public Sector, also known as "Government Procurement". This solution is mostly an enhancement of SAP SRM, providing for integration with funds management of ERP, and for automatic capturing and filing of the procurement document, procurement file closing procedures,  workload management, mass change operations on contracts, purchase orders, and RFx, mass novations on contracts, post-award processes, the creation of RFx, contract and purchase order documents that contain complex terms and conditions according to regulation, featuring SAP Document Builder and integrating with SAP Records- and Case Management.
    Please have a look at the [public sector solution map |http://www.sap.com/industries/publicsector/businessmaps.epx] and get in contact with a field service contact.
    Best regards,
    Andreas

  • Converting Bid

    Hi All,
    Can a accepted bid converted directly into a PO in backend instead of creating first in EBP. If the leading PO is in EBP backend PO cannot be changed. So I want the PO to be created directly in backend through the bid. Is there any process for doing this.
    Thanks and regards
    Venu
    Will reward full points for the solution

    Hi Venu,
    this is possible and the name of the main functionality process is 'sourcing hub' (since release EBP 4.0 i think). Sourcing Hub allows to use the functionalities of the sourcing cockpit without creation of document (Po or Contract) in EBP. Technically the use of sourcing hub means use sourcing cockpit or bid scenario with the classic scenario mode. The creation of the next document in EBP or back-end depends on the configuration of scenario (classic or extended) and on user parameters in organizatational structure.
    Is there also a Badi available to the creation of the Contract in backend system instead of local contract because you can not control this in scenario configuration as you can do for the PO.
    Hope this can help you.
    M

  • Restricted Bid Invitation

    I am not able to see restricted bid invitations under vendor users.
    I have created a restricted bid invitation and assigned couple of vendors to it. I have a user associated with each vendor with SAP_BBP_STAL_BIDDER role. When I release the bid, the vendor users are not able to see the restricted bids. However, I can see the public bid invitations.
    Am I missing some configuration? Please let me know
    -Suren

    Dear Suren,
    It sound like the bidder is not authorized to display the bid inv document, you can try to login from GUI.
    Then open the "submit bid" transaction (Tcode BBP_QUOT), after that enter the bid inv number and start, then go to /NSU53, check if there's any authorization failed.After that add the needed authorization ,then try again.
    regards,
    w1n

  • Send vendor to SUS (EBP-SUS)

    Hi expets
    I would like to have contact with someone that uses EBP-SUS and replicate vendor from EBP to SUS in a scenario two clients.
    My problem is when I try to replicate vendor to SUS the BP is not created in SUS.
    I would like to know if I need to use BBPGETVD in SUS client too and after go SRM browser in manage busness partner and flag prortal vendor to send it to SUS.
    Thanks in advance
    Nilson

    Hi,
    Please go through these links ->
    Mandatory to enter at least one bidder for Public Bid Invitation
    Control functions available in Manage Business Partner
    Re: Impossible to submit shopping cart : vendor number not found
    Some related SAP OSS Notes ->
    Note 918588 SRM-SUS: Item processing for not existing items
    Note 890260 Contact person not replicated from SUS to EBP
    Note 754356 SUS-XI: Current SUS message mapping
    Note 887348 SRMSUS: FAQ for error analysis and logging OSS tickets
    Note 847538 SUS2.0: 'Object requested is currently locked by user'
    Note 738780 XML PO inbound: Error in several limit items
    Note 537922 SRM 2.0 SUS 1.0: Applying SP02 to Supplier Self-Services
    Note 554927 SRM 2.0 SUS 1.0: Applying SP03 to Supplier Self-Services
    Note 641960 - New processing of terms of payment in EBP 3.5
    BR,
    Vijay Mittal.
    (Plz award points for help)

  • CFolder with Documentum content server

    Hello,
    We have installed cFolder on WAS which has a RFC connection with ECC6.0 and this ECC6.0 instance uses  Documentum content server. I want to understand , is there any impact in terms of document export/import in between content server and cFolder ? Like in normal scenario where cFolder using SAP content server, we use CFE01 and CFI01 transactions in ECC for document import/export in between back-end system and cFolder, in my case can we use the same transactions for document import/export?
    Please clear my understanding.
    Thanks,
    Avinash

    Hi,
    Cfolders is basically a functionality in the PLM.
    However this can be used in the SRM for the Bidding Scenario.
    The functionality deals with the Creation and maintaining a collaboration room in the Public area by the Buyer so that all his bidders can access and allows the Bidders also to create a collaboration room so that the buyer alone can access.
    On conversion of a successful bid into the PO the PO will have a link to the Cfolders.
    The customizing would be quite simple.
    I am sure you will find a document in the SAP Market Place.
    Thanks
    Arbind

  • Help about the last SRM version and interaction with suppliers

    Hello, I need the confirm that the last SAP SRM versione is the 7.0. Which are the differences between 5.0 and 7.0? Do you have materials about the interaction with suppliers for bids? Thank you!
    Dany

    Hi,
    There are a lot of differences between the SRM 5.0 and SRM 7.0.regarding the Bidding Scenario.
    Infact SRM 7.0 is released with Public Procurement service(PPS)
    The main differences
    SRM 5.0 -tender fees payment and EMD (Earnest Money deposit) is thro' Development
    SRM 7.0 -Tender fess -Payment can be made in SRM thro'Payment Gateway
                 - EMD Fees can also be paid in the SRM 7.0 which is Standard Functionality..
    There are  lot of differnce
    Just Wait for a day or two I will send the difference to your Business Id
    Regards
    G.Ganesh Kumar

  • SRM Category Management - cRoom Integration with cFolders

    Can anyone please send me the configuration guide to integrate cRooms (SAP Collaboration Rooms) with cFolders (c Project Suite SAP PLM).
    I've got both (SRM-Category Management and PLM-cProjects) the business packages installed on EP and I need to integrate them both.
    Suitable points will be rewarded.
    Regards
    Sreenivas

    From ERP using transaction CFE02 you can export the DMS document to cFolders.
    These documents can undergo changes in the cFolders.
    then via CFI02 you can get back the latest version of the documents from the cFolders into DMS.
    In SRM in a bidding scenario, where in you upload all you tendering documents into cFolders which will create a cFolders collaboration in a competitive scenario.
    All you docs are put in the public area, then you could create individual areas for you vendors in the same collaboration with atmost security (you can even hide the names of the vendors in the create/changed by columns in the overview tables) .
    None of the vendors can see each others information but the public area is visible to all the vendors. Vendors then place their bids in the respective private areas.
    You can alternatively use the Portal to create collaboration rooms, which is to upload some docs and download then you would loose the advantage of managing/structuring the bidding process from multiple vendors. Then also the integration aspect with SRM.

  • Collaboration not created for bidder

    Hi
    Currently we are building competitive bidding scenario with cfolders and SRM.
    The cfolders CPRXRPM 450_700 (package SAPK-45008INCPRXRPM) has been installed on the SRM server 7 package level (SAPKIBKV05).
    Problem statement:
    The Bidder is unable to create collaboration folder and following error is displayed on the screen.
    u201CError creating collaboration; check user authorizationu201D.
    Bidder has following SRM roles in SRM system:
    Bidder Role: /SAPSRM/BIDDER
    Cfolder User Role: SAP_CFX_USER and
    Create Collaborations in the Competitive scenario Role: SAP_CFX_COMP_CREATOR
    Am I missing some authorisation here?
    I did manage to find OSS note 1375761, however we are at the OSS Note service pack level.
    The buyer has created the bid invitation with Cfolder, he has given NONE authorisation to Bidder 1 and Bidder 2 to the Public folder.
    The expectation is when the private work area is created by the bidder 1 (which is not happening at the moment due to the above error) while creating bid invitation, the content of the public area will be copied to the bidder 1 work area with restrcted authorisation to other bidders, so that bidder 2 will not be able to see bidder 1 work area. Similarly bidder 1 will not be able to see bidder 2 work area.
    Is this the right process to configure the competitive business scenario? Please advice!!
    I also tried creating 2 manual private work areas for each bidder and then assign the bidder user ID with admin roles respectively. Still we are getting the above error and bidder is unable to create the bid response.
    Is it a bug in the system? or am I missing authorisation step?
    Please advice!!
    Regards,
    Sandeep Parab

    Ashwin,
    Unfortunately the program BCFOLDER20_COL_CREATE is not stopping at the breakpoint.
    I did investigate further with cfolder authorization.
    If I give the bidder the administrator rights to the public area then the system automatically creates the private area while creating bid invitation. By doing this the system automatically give access to other bidders private area, which we do not want.
    I really would like to understand how to control the folder administration role such that the system creates the private area while creating bid invitation also at the same time the bidders are not able to access each others private area?
    Is it possible with standard competitive functionality or we need to do enhancement to control the authorization?
    This is a very common scenario, I am sure someone might have archived this before. Kindly advice!!
    Regards,
    Sandeep

  • How do i impliment this array

    Hey everyone, just came across this forum looks quite good so I'll give it a go smile.gif
    Just working through a book called 'Objects First with Java' and I'm stuck on exercise 4.31.
    This is about a small auction program that has 4 classes - auction, bid, lot and person.
    Here's the code:
    Auction:
    import java.util.ArrayList;
    import java.util.Iterator;
    * A simple model of an auction.
    * The auction maintains a list of lots of arbitrary length.
    * @author David J. Barnes and Michael Kolling.
    * @version 2008.03.30
    public class Auction
        // The list of Lots in this auction.
        private ArrayList<Lot> lots;
        // The number that will be given to the next lot entered
        // into this auction.
        private int nextLotNumber;
        private Lot selectedLot;
         * Create a new auction.
        public Auction()
            lots = new ArrayList<Lot>();
            nextLotNumber = 1;
         * Enter a new lot into the auction.
         * @param description A description of the lot.
        public void enterLot(String description)
            lots.add(new Lot(nextLotNumber, description));
            nextLotNumber++;
         * Show the full list of lots in this auction.
        public void showLots()
            for(Lot lot : lots) {
                System.out.println(lot.toString());
         * Bid for a lot.
         * A message indicating whether the bid is successful or not
         * is printed.
         * @param number The lot number being bid for.
         * @param bidder The person bidding for the lot.
         * @param value  The value of the bid.
        public void bidFor(int lotNumber, Person bidder, long value)
            selectedLot = getLot(lotNumber);
            if(selectedLot != null) {
                boolean successful = selectedLot.bidFor(new Bid(bidder, value));
                if(successful) {
                    System.out.println("The bid for lot number " +
                                       lotNumber + " was successful.");
                else {
                    // Report which bid is higher.
                    Bid highestBid = selectedLot.getHighestBid();
                    System.out.println("Lot number: " + lotNumber +
                                       " already has a bid of: " +
                                       highestBid.getValue());
         * Return the lot with the given number. Return null
         * if a lot with this number does not exist.
         * @param lotNumber The number of the lot to return.
        public Lot getLot(int lotNumber){
            if((lotNumber >= 1) && (lotNumber < nextLotNumber)) {
                // The number seems to be reasonable.
                Lot selectedLot = lots.get(lotNumber - 1);
                // Include a confidence check to be sure we have the
                // right lot.
                if(selectedLot.getNumber() != lotNumber) {
                    System.out.println("Internal error: Lot number " +
                                       selectedLot.getNumber() +
                                       " was returned instead of " +
                                       lotNumber);
                    // Don't return an invalid lot.
                    selectedLot = null;
                return selectedLot;
            else {
                System.out.println("Lot number: " + lotNumber +
                                   " does not exist.");
                return null;
        public void close() {
            for(Lot lot : lots){
                Bid highestBid=lot.getHighestBid();
                Person person=highestBid.getBidder();
                String personName=person.getName();
                String number = "" + lot.getNumber();
                if(lot.getHighestBid() == null) {
                    System.out.println(number + ": " + lot.getDescription()+" has *not* been sold");
                else {
                    System.out.println(lot.getDescription()+" has been sold to " );
        // Creates a new array list and stores all unsold items into notSold.
        // Returns all items in the new list.
       /* public ArrayList<Lot> getUnsold;
            ArrayList<String> notSold;
            Integer numberList = 1;
            notSold = new ArrayList<String>(); // Creates new array
            for(Lot lot : lots){ // Although it compiles, when I create an auction object
                                 // it returns 'null pointer exception' here, any suggestions?
                if(lot.getHighestBid() == null)
                    notSold.add(lot.getDescription());
                    for(String unsold : notSold){
                        System.out.println(numberList + ": " + unsold);
                        System.out.println();
                        numberList++;
    }        There are a few random things in there, just from me mucking around in other exercises.
    Lot:
    * A class to model an item (or set of items) in an
    * auction: a lot.
    * @author David J. Barnes and Michael Kolling.
    * @version 2008.03.30
    public class Lot
        // A unique identifying number.
        private final int number;
        // A description of the lot.
        private String description;
        // The current highest bid for this lot.
        private Bid highestBid;
         * Construct a Lot, setting its number and description.
         * @param number The lot number.
         * @param description A description of this lot.
        public Lot(int number, String description)
            this.number = number;
            this.description = description;
         * Attempt to bid for this lot. A successful bid
         * must have a value higher than any existing bid.
         * @param bid A new bid.
         * @return true if successful, false otherwise
        public boolean bidFor(Bid bid)
            if((highestBid == null) ||
                   (bid.getValue() > highestBid.getValue())) {
                // This bid is the best so far.
                highestBid = bid;
                return true;
            else {
                return false;
         * @return A string representation of this lot's details.
        public String toString()
            String details = number + ": " + description;
            if(highestBid != null) {
                details += "    Bid: " +
                           highestBid.getValue();
            else {
                details += "    (No bid)";
            return details;
         * @return The lot's number.
        public int getNumber()
            return number;
         * @return The lot's description.
        public String getDescription()
            return description;
         * @return The highest bid for this lot.
         *         This could be null if there is
         *         no current bid.
        public Bid getHighestBid()
            return highestBid;
    }Bid:
    * A class that models an auction bid.
    * It contains a reference to the Person bidding and the amount bid.
    * @author David J. Barnes and Michael Kolling.
    * @version 2008.03.30
    public class Bid
        // The person making the bid.
        private final Person bidder;
        // The value of the bid. This could be a large number so
        // the long type has been used.
        private final long value;
         * Create a bid.
         * @param bidder Who is bidding for the lot.
         * @param value The value of the bid.
        public Bid(Person bidder, long value)
            this.bidder = bidder;
            this.value = value;
         * @return The bidder.
        public Person getBidder()
            return bidder;
         * @return The value of the bid.
        public long getValue()
            return value;
    }Person:
    public class Person
        // The name of this person.
        private final String name;
         * Create a new person with the given name.
         * @param name The person's name.
        public Person(String name)
            this.name = name;
         * @return The person's name.
        public String getName()
            return name;
    }Question: Rewrite getLot so that it does not rely on a lot with a particular number being stored at index (number-1) in the collection. For instance, if lot number 2 has been removed, then lot number 3 will have been moved from index 2 to index 1, and all higher lot numbers will also have been moved by one index position. You may assume that lots are always stored in increasing order of their lot number.
    So I know it's talking about an arraylist but I can't think how to implement it, I have tried a number of ways but can't seem to get my head round it. After I couldn't work out how to rewrite just the getLot I started spreading out and trying to add new arraylists in different classes and calling them but it ultimately just failed so now I was just wanting to get some ideas from people.

    @ The OP....
    Word of advice. Posting pages of code that are provided for YOU are not gonna be welcome on these forums. You can however take snippets of code and post them here and in turn ask a more precise question. For example....
    I modified this method..
    *post code
    and get the following error in compiler
    *post error                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Trying to access an object's field but it has private access ! !

    Dear People,
    I am trying to access the highestBid, a data member of the Bid class
    in an Auction program.
    If I try to set the highestBid:
    bicycle.setHighestBid(steveBicycleBid);
    The error message says:
    "TryAuction.java": Error #: 306 : method setHighestBid(stan_bluej_ch4p90.Bid) has private access in class stan_bluej_ch4p90.Lot at line 58, column 15
    IF I try to get the highest bid by saying:
    System.out.println("The highest bid for this item is " + bicycle.getHighestBid() );
    I get an object hex address as seen below instead of an integer value:
    The highest bid for this item is stan_bluej_ch4p90.Bid@f4a24a
    ^^^
    Below are the classes
    Thank you in advance
    stan
    package stan_bluej_ch4p90;
    //Purpose of project: To demonstrate collections of objects
    //Version: 2001.05.31
    //How to start this project:
    // Create an Auction object.
    // Enter a few lots via its enterLot method. Only String
    // descriptions of the lots are required.
    // Create one or more Person objects to represent bidders.
    // Show the lots and select one to bid for.
    // Get the required Lot onto the object bench.
    // Enter a bid for the lot, passing the Person who is
    // bidding to the bidFor method.
    public class TryAuction
    public static void main(String[] args)
    //create the auction
    Auction cityAuction = new Auction();
    //create the lots for sale
    Lot bicycle = new Lot(1,"bicycle");
    Lot lamp = new Lot(2, "lamp");
    Lot trailer = new Lot(3, "trailer");
    //enter the lots into the city Auction
    cityAuction.enterLot("A bicycle in so so condition");
    cityAuction.enterLot("A brand new lamp");
    cityAuction.enterLot("A trailer built in 2001");
    //show the lots
    System.out.println();
    System.out.println("The first lot for sale: " + bicycle.getDescription());
    System.out.println("The second lot for sale: " + lamp.getDescription());
    System.out.println("The third lot for sale: " + trailer.getDescription());
    //create the people who will bid for the lots
    Person Steve = new Person("Steve");
    Person Maria = new Person("Maria");
    //create the people's bids
    Bid mariaLampBid = new Bid(Maria, 460);
    Bid steveLampBid = new Bid(Steve, 510);
    //create the people's bids
    Bid mariaBicycleBid = new Bid(Maria, 1460);
    Bid steveBicycleBid = new Bid(Steve, 1510);
    //create the people's bids
    Bid steveTrailerBid = new Bid(Steve, 700510);
    Bid mariaTrailerBid = new Bid(Maria, 900460);
    //give the bids
    bicycle.bidFor(Maria,1460);
    bicycle.bidFor(Steve, 1510);
    //bicycle.setHighestBid(steveBicycleBid);
    System.out.println("The highest bid for this item is " + bicycle.getHighestBid() );
    lamp.bidFor(Maria,460);
    lamp.bidFor(Steve,510);
    trailer.bidFor(Steve, 700510);
    trailer.bidFor(Maria,900460);
    System.out.println(" \nMaria's bicycle bid is : " + mariaBicycleBid.getValue() );
    System.out.println("Steve's lamp bid is : " + steveBicycleBid.getValue() );
    System.out.println(" \nMaria's lamp bid is : " + mariaLampBid.getValue() );
    System.out.println("Steve's lamp bid is : " + steveLampBid.getValue() );
    System.out.println("\nSteve's trailer bid is : " + steveTrailerBid.getValue() );
    System.out.println(" Maria's trailer bid is : " + mariaTrailerBid.getValue() );
    System.out.println();
    cityAuction.showLots();
    //cityAuction.close();
    //The output I get is:
    //The first lot for sale: bicycle
    //The second lot for sale: lamp
    //The third lot for sale: trailer
    //The highest bid for this item is stan_bluej_ch4p90.Bid@f4a24a
    //Maria's bicycle bid is : 1460
    //Steve's lamp bid is : 1510
    //Maria's lamp bid is : 460
    //Steve's lamp bid is : 510
    //Steve's trailer bid is : 700510
    // Maria's trailer bid is : 900460
    //1: A bicycle in so so condition
    // (No bid)
    //2: A brand new lamp
    // (No bid)
    //3: A trailer built in 2001
    // (No bid)
    package stan_bluej_ch4p90;
    import java.util.*;
    //Ex4.14
    * A simple model of an auction.
    * The auction maintains a list of lots of arbitrary length.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.06.08
    public class Auction
    // The list of Lots in this auction.
    private ArrayList lots;
    // The number that will be given to the next lot entered
    // into this auction.
    private int nextLotNumber;
    * Create a new auction.
    public Auction()
         lots = new ArrayList();
         nextLotNumber = 1;
    * Enter a new lot into the auction.
    * Lots can only by entered into the auction by an
    * Auction object.
    * @param description A description of the lot.
    public void enterLot(String description)
         lots.add(new Lot(nextLotNumber, description));
         nextLotNumber++;
    * Show the full list of lot numbers and lot descriptions in
    * this auction. Include any details of the highest bids.
    public void showLots()
         Iterator it = lots.iterator();
         while(it.hasNext()) {
         Lot lot = (Lot) it.next();
         System.out.println(lot.getNumber() + ": " +
                   lot.getDescription());
         // Include any details of a highest bid.
         Bid highestBid = lot.getHighestBid();
         if(highestBid != null) {
              System.out.println(" Bid: " +
                        highestBid.getValue());
         else {
              System.out.println(" (No bid)");
    * Return the lot with the given number. Return null
    * if a lot with this number does not exist.
    * @param number The number of the lot to return.
    public Lot getLot(int number)
         if((number >= 1) && (number < nextLotNumber)) {
         // The number seems to be reasonable.
         Lot selectedLot = (Lot) lots.get(number-1);
         // Include a confidence check to be sure we have the
         // right lot.
         if(selectedLot.getNumber() != number) {
              System.out.println("Internal error: " +
                        "Wrong lot returned. " +
                        "Number: " + number);
         return selectedLot;
         else {
         System.out.println("Lot number: " + number + " does not exist.");
         return null;
    // public void close()
    // Iterator i = lots.iterator();
    // while(i.hasNext())
    //     System.out.println("The winning amount for the " + bicycle.getDescription()
    //     + " is " + bicycle.getHighestBid());
    //     System.out.println("The winning amount for the " + lamp.getDescription()
    //     + " is " + lamp.getHighestBid());
    //     System.out.println("The winning amount for the " + trailer.getDescription()
    //     + " is " + trailer.getHighestBid());
    package stan_bluej_ch4p90;
    * A class to model an item (or set of items) in an
    * auction: a lot.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.06.08
    public class Lot
    // A unique identifying number.
    private final int number;
    // A description of the lot.
    private String description;
    // The current highest bid for this lot.
    private Bid highestBid;
    * Construct a Lot, setting its number and description.
    * @param number The lot number.
    * @param description A description of this lot.
    public Lot(int number, String description)
         this.number = number;
         this.description = description;
    * Attempt to bid for this lot. A successful bid
    * must have a value higher than any existing bid.
    * @param bidder Who is bidding.
    * @param value The value of the bid.
    public void bidFor(Person bidder, long value)
         // We trust that lot is genuine. There is nothing to
         // prevent a spurious lot from being bid for, but it
         // would not appear in the auction list.
         if((highestBid == null) ||
         (highestBid.getValue() < value)) {
         // This bid is the best so far.
         setHighestBid(new Bid(bidder, value));
         else {
         System.out.println("\nLot number: " + getNumber() +
                   " (" + getDescription() + ")" +
                   " has a bid of: " +
                   highestBid.getValue());
    * @return The lot's number.
    public int getNumber()
         return number;
    * @return The lot's description.
    public String getDescription()
         return description;
    * @return The highest bid for this lot. This could be null if
    * there are no current bids.
    public Bid getHighestBid()
         return highestBid;
    * @param highestBid The new highest bid.
    private void setHighestBid(Bid highestBid)
         this.highestBid = highestBid;
    package stan_bluej_ch4p90;
    * A class that models an auction bid. The bid contains a reference
    * to the Lot bid for and the user making the bid.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.05.31
    public class Bid
    // The user making the bid.
    private final Person bidder;
    // The value of the bid. This could be a large number so
    // the long type has been used.
    private final long value;
    * Create a bid.
    * @param bidder Who is bidding for the lot.
    * @param value The value of the bid.
    public Bid(Person bidder, long value)
         this.bidder = bidder;
         this.value = value;
    * @return The bidder.
    public Person getBidder()
         return bidder;
    * @return The value of the bid.
    public long getValue()
         return value;
    package stan_bluej_ch4p90;
    * Maintain details of someone who participates in an auction.
    * @author David J. Barnes and Michael Kolling.
    * @version 2001.05.31
    public class Person
    // The name of this user.
    private final String name;
    * Create a new user with the given name.
    * @param name The user's name.
    public Person(String name)
         this.name = name;
    * @return The user's name.
    public String getName()
         return name;
    if I try to say
    LotObjectName.getHighestBid, I get a

    Dear EsoralTrebor,
    Thank you very much for an enlightening explanation.
    I had never tried to chain methods together before but it works !
    anObject.methodOfTheObjectClassThatReturnsAnObjectOfAnotherClass.
    methodOfTheObjectClassThatWasReturned();
    my output correctly states:
    The highest bid for the bicycle is 1510
    The highest bid for the lamp is 510
    The highest bid for the trailer is 900460
    Thank you !
    Stan
    ps tomorrow I need to study the showLots() method in the Auction class
    to figure out why that method is saying "No Bid" to everything
    Have a Good Thanksgiving !

  • Jpa trouble

    hello
    can anyone help me with this problem
    atm i'm making a project which uses EJBs (with JPA) and some fields in the EJBs get auto generated when persisting an EJB entity to the database
    Writing to the database and reading out of it works perfectly, but when i persist a brand new entity to the table, i don't receive the brand new generated ID
    (ID is a primary key in the table)
    is there any way to update the persisted entity right after persisting it to the database ? so that my entity, which got persisted, gets his ID injected?
    this is my code for inserting a new entity into the database:
    @Transactional
    public class JPAScenarioDAO implements ScenarioDAO{
        private EntityManager entityManager;
         * Spring injects entityManager
         * @param entityManager manager that handles persistence operations
        @PersistenceContext
        public void setEntityManager(EntityManager entityManager)
          this.entityManager = entityManager;
        public JPAScenarioDAO() {}
        public void createScenario(Scenario scenario){
            entityManager.persist(scenario); // <-- help?
        public void updateScenario(Scenario scenario){
            entityManager.merge(scenario);
        public void removeScenario(Scenario scenario){
            entityManager.remove(scenario);
    }The scenario is an EJB that i generated from a table
    import java.io.Serializable;
    import java.sql.Timestamp;
    import java.util.List;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.JoinColumn;
    import javax.persistence.ManyToOne;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.OneToMany;
    import javax.persistence.Table;
    @Entity
    @NamedQueries({
        @NamedQuery(name = "Scenario.getScenarios",
                    query = "select o from Scenario o"),
        @NamedQuery(name = "Scenario.getScenariosBetweenDates",
                    query = "select o from Scenario o where o.date >= :datum1 and o.date <= :datum2"),
        @NamedQuery(name = "Scenario.getScenariosByEdition",
                    query = "select o from Scenario o where o.edition = :edition"),
        @NamedQuery(name = "Scenario.getScenariosByIssue",
                    query = "select o from Scenario o where o.issue = :issue"),
        @NamedQuery(name = "Scenario.getLast2ScenariosFromEdition",
                    query = "select o from Scenario o where o.edition = :edition order by o.date desc")
    @Table(name = "WEBE_MAKR_DRAAIBOEK")
    public class Scenario implements Serializable {
        @Id
        @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="s_webe_makr_draaiboek")
        @Column(name="DRAAIBOEK_ID", nullable = false)
        private Long scenarioID;
        @Column(name="JAAR")
        private Long year;
        @Column(name="WEEK")
        private Long week;
        @Column(name="DATUM")
        private Timestamp date;
        @ManyToOne
        @JoinColumn(name = "EDITIE_ID", referencedColumnName = "EDITIE_ID")
        private Edition edition;
        @OneToMany(mappedBy = "scenario")
        private List<ScenarioItemStatus> scenarioItemStatusList;
        @ManyToOne
        @JoinColumn(name = "VERSCHIJNING_ID", referencedColumnName = "VERSCHIJNING_ID")
        private Issue issue;
        @OneToMany(mappedBy = "scenario")
        private List<ScenarioHistory> scenarioHistoryList;
        // CONSTRUCTOR
        public Scenario() {}
        // GETTERS
        public Long getScenarioID() {
            return scenarioID;
        public Long getYear() {
            return year;
        public Long getWeek() {
            return week;
        public Timestamp getDate() {
            return date;
        public Edition getEdition() {
            return edition;
        public Issue getIssue() {
            return issue;
        public List<ScenarioItemStatus> getScenarioItemStatusList() {
            return scenarioItemStatusList;
        public List<ScenarioHistory> getScenarioHistoryList() {
            return scenarioHistoryList;
        // SETTERS
        public void setScenarioID(Long scenarioID) {
            this.scenarioID = scenarioID;
        public void setDate(Timestamp date) {
            this.date = date;
        public void setYear(Long year) {
            this.year = year;
        public void setWeek(Long week) {
            this.week = week;
        public void setEdition(Edition edition) {
            this.edition = edition;
        public void setIssue(Issue issue) {
            this.issue = issue;
        public void setScenarioItemStatusList(List<ScenarioItemStatus> scenarioItemStatusList) {
            this.scenarioItemStatusList = scenarioItemStatusList;
        public void setScenarioHistoryList(List<ScenarioHistory> scenarioHistoryList) {
            this.scenarioHistoryList = scenarioHistoryList;
        // EXTRA METHODS
        public ScenarioItemStatus addScenarioItemStatus(ScenarioItemStatus scenarioItemStatus) {
            getScenarioItemStatusList().add(scenarioItemStatus);
            scenarioItemStatus.setScenario(this);
            return scenarioItemStatus;
        public ScenarioItemStatus removeScenarioItemStatus(ScenarioItemStatus scenarioItemStatus) {
            getScenarioItemStatusList().remove(scenarioItemStatus);
            scenarioItemStatus.setScenario(null);
            return scenarioItemStatus;
        public ScenarioHistory addScenarioHistory(ScenarioHistory scenarioHistory) {
            getScenarioHistoryList().add(scenarioHistory);
            scenarioHistory.setScenario(this);
            return scenarioHistory;
        public ScenarioHistory removeScenarioHistory(ScenarioHistory scenarioHistory) {
            getScenarioHistoryList().remove(scenarioHistory);
            scenarioHistory.setScenario(null);
            return scenarioHistory;
    }Edited by: NeoSniperkiller on 17-apr-2008 14:44

    public void createScenario(Scenario scenario){
            entityManager.persist(scenario); // <-- help?
        }I've seen this happen.
    Changing it to
    public Scenario createScenario(Scenario scenario){
            entityManager.persist(scenario); // <-- help?
            return scenario;
        }(and using the returned value) for some reason worked.
    Not quite sure yet why, I'll have to do some research to figure out exactly what happens.

Maybe you are looking for

  • WebServer 6.1 SP3 SSL reverse proxy to Sun One Application Server 7

    I have an application in the appserver7 that requires SSL authentication. I have already installed a self cert in the appserver7, and the authentication works fine when I browse directly to the appserver. The appserver7 has both listener for port 80

  • Photosmart 7510 Scan to eMail does not send the eMail

    I can scan a document to a file, go to my email, attach the scanned document and send it with no problem. However, when I use the Document to Email feature, an email window opens up on my desktop with my send from email address properly included and

  • Digital PDF's Not Appearing in iTunes Lib

    The title pretty much says it all. Had restored my iTunes music files to a new computer along with all the music and any digital PDF booklets that I had. Trust me the PDF booklets are successfully imported on my new pc but for some reason I am having

  • Something changed firefox into a word document in cryllic how do I fix it?

    some how firefox is now a word document. Desktop icon is also a word icon. When you click on it a word document pops up asking for file conversion with Windows cryillic the defrault. I am sure a virus did this. I have swept my machine, but cannot ins

  • Use of report's customization form

    Can I add a report's customization form to a content area as an application component? I mean, I would like to use a customization form in a content area style (with the same nav bar, with the same banners and layout). It's a little inconvinience tha