JComboBox with items grouped in categories

Hello to all,
I have been requested to make a "fancy" combo box where all items are grouped in categories. There is only one level of grouping.
This is how the combo will look like.
categ1
+--- o.1.1
+--- o.1.2
categ2
+----o.2.1
+----o.2.2
While rendereing such a thing is not a problem, I can not fin a way to prevent the selection of "categ1" and "categ2" items. So I do not want the user to be able to select the category names but only the elements in each category.
Any ideas on how this may be done?
Thank you!
- Ilie

Hi Ilie
The section headers will of course have to be added to the combo box as items, just as the values themselves, but you could create and implement your own ListRenderer to alter their appearance so their purpose is clear.
As you say, you'll have to account for your users (inevitably) clicking on the section header.
You could deal with this either with a popup in response to an inappropriate click (wouldn't be too friendly for anybody using the keyboard to navigate the combo) or by simply ignoring the selection until the user clicks some 'submit' or 'ok' button.
This isn't normally the behaviour one would expect from a combo, so would you consider using [b[menus[/b] instead, where each section heading can have a flyout menu with the selectable values?
You don't need a menu bar to achieve this, but could instead use JPopupMenu.
Hope this is helpful.
Chris.

Similar Messages

  • PO DETAILS ( WITH ITEM GROUP)

    Folks
    I have a requirement from my client on PO which includes Item Group wise segregation.
    Project - PO # - PO Date - Vendor Name - Due Date - Item Group(1) (in Rs) -  Item Group(2) (in Rs) -  Item Group(3) (in Rs) -
    Freight - Discount - Excise - Vat - Cst - Total of PO
    All the details should be Document Level & not line items.
    Request you to kindly help me on this.
    regards
    KARTHIK

    Rahul
    Yes absolutely .   The query should throw group wise value in a particular PO.
    Project - PO # - PO Date - Vendor Name - Due Date - Item Group(1) (in Rs) - Item Group(2) (in Rs) - Item Group(3) (in Rs) -
    PROJ1     1        11/7/11          XXX             12/7/11          5000                             2000                                 1000
    Freight - Discount - Excise - Vat - Cst - Total of PO
    100                           100        50             8250.00
    In this all the values should be doc level & not line items value.
    regards
    KARTHIK

  • Approval procedure on item groups

    Hi All
    I would like your assistance on this query, I need a query that will execute an approval procedure when an item with item group name contains or part of the word software is used on the sales quote . 
    I need to know how can i pull the item group from a selected item and display that on a udf and use info on that udf to trigger an approval .
    Thanks
    Bongani
    Edited by: Bongani Dlamini on Jul 13, 2009 1:25 PM

    hai Bongani Dlamini
       Row level approval is not possible in SAP B1,as a work around try this query in approval template,this will help u to check
    only first item,other wise u have to write stored procedure
    SELECT DISTINCT 'True' FROM QUT1 T0 WHERE $[$38.1.1]  =
    (select distinct  itemcode from oitm o1,oitb o2  where
    o1.itmsgrpcod = o2.itmsgrpcod and o1.itemcode = (select $[$38.1.1] ) and o2.ItmsGrpNam like '%Software%'  )

  • Listing item groups on print layout

    Is it possible with the standard print layout designer to list the list of item groups used on that document at the bottom of the document?
    For example, let's say there are 5 items on an invoice (Item name with item group in brackets)
    Golf Balls (Golf)
    Golf Set (Golf)
    T-Shirt (Clothing)
    Water Bottle (Accessories)
    Socks (Clothing)
    So the invoice would look like this:
    1 x Golf Balls
    1 x Golf Set
    1 x T-Shirt
    1 x Water Bottle
    1 x Socks
    Is it possible to print something at the bottom of (or actually anywhere on) this invoice all of the item groups used and if it was used more than once, just list it once, i.e.:
    Golf
    Clothing
    Accessories
    Thanks in advance,
    Adele

    Hi Adele,
    I think the easiest way to do it is to create a UDF and populate it with a Formated Search. The UDF can then be used in the Print Layout easily.
    Regards
    Carin

  • Third Party with item cat group NORM

    Hi!
    I've created a material X with item cat gr NORM. Now I'm creating a standard order with type OR. I don't have the material X in my plant and want to go through third party process.
    I've done the following-
    Maintained Purchasing and MRP views
    OR + NORM + TAN + TAS
    Could someone please guide me further as to how to create a third party order.
    I'm getting the error "Material X not maintained by purchasing" Mesg no.  ME046
    Thanx
    Sunny

    Hi suryaz ,
    --I think you have not selected the purchasing view option  for your material.
    --Go to MM01 & select the purchasing view for the material which you want to do the Third Party process.
    --In purchasing view  give the purchasing group.
    --Change the item category group as BANS in Sales Org2 tab & save it in MM01
    --Do the item category determination in VOV4
    Sales docItem category groupDefault Item category
    ORBANSTAS
    --Now raise the sales order VA01 & enter the material default the item category will be TAS.
    Let me know if your problem is solved.
    Regards
    Pradeep

  • Mass Maintenance of BOMs with Alternate Item Groups

    We plan to create BOMs containing Alternate Item Groups (+ usage probability + priority) to cover alternative parts usage.
    What is the SAP solution for Mass maintenance of BOMs with Alternate item groups?
    Is it possible to use (or customize) CS20 (or another transaction) to do following tasks in Mass :
    - identify the BOMs containing a specific material number (where used)
    - add a new item line with a new material nbr in the BOM (with same quantity, subitems, Alternate Item Group, ...)
    - when required, change the usage probability of the members of the group to set the new material usage on 100% and all other alternates usage on 0%. When not required, add the new one with 0% and don't change the existing members of the group.

    Dear.
    Ask your ABAP Team to write BDC or LSMW program.
    This will help you.
    Regards
    Utsav

  • How are GL Accounts assigned with item categories in Sales Order

    Please advise;
    - how and where GL accounts are assigned with item categories appearing in the sales order?
    Points confirmed.
    regardss

    We have number of sales document types and item categories. The sales order numbers are also different for hardware and software categories, so is the sales organization, plant and company code.
    Usually, the hardware orders contain line items for software but the item category used is for hardware and therefore, it gets posted to the incorrect (hardware) GL account. Is this happening due to MATERIAL TYPE/CODES.
    We are using separate GL accounts for both.
    Where and what controls could be developed to prevent this?
    Please let me know if you need further information.

  • Transaction of item with cost-group 2008 results in cost-group comingle

    Hi Folks,
    I have the following error on Miscellaneous Transaction when I use a different cost group than the default one assign on subinventory:
    Transaction of item with cost-group 2008 results in cost-group comingle
    In our specific case, we define a CONVERSION subinventory with default Cost Group is X
    We would like to create Miscellaneous Transactions (interface table) which use CONVERSION subinventory with different Cost Group.
    The problem is when we use a Cost Group other than X, the "comingle" error occured.
    Is there a manner to create a Miscellaneous Transactions base on a Cost Group different than the default define in the subinventory?
    Regards

    HI,
    is not that type of error.
    Actually there is no error. the system is working as it should.
    I have used different cost groups in subinventories.
    I need a way to change the cost group for some of the items.
    I found some workaround in article 837816.1 but i'm not able to follow it.
    Pls,
    help with procedure to follow.
    Thank you in advance,
    Denis

  • Transaction of item with cost-group 2614 results incost-group comingle

    Hi,
    I'm working on EBS 11i.
    I have setup inv organization and wms is enabled.
    When i'm trying to make transactions betwwen suborganizations there is an
    error message for some type pf items:
    Transaction of item with cost-group 2614 results in cost group comingle.
    I see that for some item, in On hand quanitity form are grouped in different cost groups.
    There is a way to change the cost group of those items, or to make this cost group disabled.
    In this organization I do not care about cost and account. (It is just needed to have physical count of items)
    Pls advice how to solve?
    Thank you in advance,
    Denis

    HI,
    is not that type of error.
    Actually there is no error. the system is working as it should.
    I have used different cost groups in subinventories.
    I need a way to change the cost group for some of the items.
    I found some workaround in article 837816.1 but i'm not able to follow it.
    Pls,
    help with procedure to follow.
    Thank you in advance,
    Denis

  • ITEM GROUP NEEDS TO BE SET UP WITH BALANCE SHEET ACCOUNT

    I am trying to set up an Item so that I can charge it to a Balance Sheet account but the Item Group will not let me do this as it only allows me to charge it to either an Expense or Revenue account.  Is there a way to correct this or change the current Revenue account it is being charged to a Balance Sheet account on the row level?

    Hi Frank,
    The reason why in some fields you can only have a certain account type is to avoid descrepancies and wrong accounting. They have been set up that way to allow the document flow in business one to create the correct entries. 
    Please consider that a revenue account will only be posted to once in this flow, there will be no debit balancing the credit in any target document. The same is true for the expenses.
    Other accounts (Balance sheet accounts) like the allocation cost account will be balanced by the target document, the same is true for the BP Control account, it will be balanced by the payment.
    The balances posted to the P&L accounts will remain there unless they are manually balanced or reversed by a credit note. 
    I hope it makes some sense.
    Jesper

  • SBO - How to use two different Stock Account within the same Item Group

    Hi,
    I'm currently stuck within one of my implementation.
    I'm deploying the same solution worldwide which worked pretty well until now. All the items are connected to an item group, with a unique GL account, supposed to book at the same time the good receipt and the good issue (Balance-Sheet Account = 14xxxxx).
    My new unit is willing to use two different GL accounts when performing its stock entry (let say 14xxx10) and another GL account for the good issue, let say 14xxx20.
    Do you have any clue so i can please them and keep using at the same time the item group ?
    Thanking you in advance
    Stephane

    Hi,
    In fact, we use the GL account as the HQ Account (Reporting Account) while the "Export Code" will be used to store the local GL Account (greek account).
    As such, we can, somehow handle two different chart of accounts.
    In my reporting, i'm only using a single GL account for stock movements, while my greek counterparts want to handle two different accounts.
    Threfore, i have only two solution since there is normally a one to one relationship between a HQ account and a local account that are :
    1 - Duplicate the HQ accounts
    In that case, i do respect anytime the one to one relationship. I've got one HQ account for one local account. But how can i put this since i can only handle one single stock account.
    2 - I keep my single stock account like this but i won't be managing the possibility to get two different Export Codes.
    Regards
    Stephane

  • Item group field in A/p Invoice  jounal Report

    Hi,
    in Financial Reports -> Accounting-> Transaction Journal->
    A/P invoice.
    in this report along with Vendor Details & Tax %, Respective Item Group also should display.
    for this what to do. if i drag any group name from the list, it is repeating.
    how to bring "Item Group" of the perticular item which is a/p invoiced.
    plz help me asap.
    Regards.
    Nagababu

    Add Item group as group in the report.This will avoid repetition on the group name.
    Regards,

  • Assign Source of supply is not working for contract with material group

    Dear Experts,
    I have searched all the threads and gone through before posting my query. So i would ask moderators to go through the thread properly before rejecting this.
    We have value contracts with respect to a particular material group without material and with item category W in the contract item, Please note that for the materials with this material group, the source determination is not set and source list is also not maintained.
    When we create PR for the material with this contract, and when we click on assign source of supply contracts used to get popped up, but recently from few days, when we click on assign source of supply we are getting an error " no source found for this item ".
    Can anybody help on this.
    Regards

    @ Biju,
    As mentioned earlier, we are not creating PR with reference to contract.
    first we are creating contract with item category W (material group), without material and plant details.
    we create PR with or without material with account assignment K and with the material group in the transaction ME51N, and after inputting all the fields, we click on assign source of supply, it was proposing the existing contracts with respect to material group earlier, but it is not happening for particular material group(it is working for all other material groups)
    Hope it is clear.
    @ Dev Patra,
    we are using DIEN-Service material types and we assign that particular material group to only service material type.
    we have not ticked, source list in the material master, we donot have any source list for the materials under that material group.( please check the note 457110- question number 14.)
    Regards

  • Material replication from R/3 to SRM - Issue with Material group

    Hello All,
                      I am working on BADI PRODUCT_CUSTOMER2 and method MAP_R3_TO_CRM_MATERIALMaterial replication part from R/3 to SRM.
    I am using a Ztable to map r/3 material group to SRM material group(Product category).
    For example Material M1 with material group 100 is transferred to SRM. Material group(Product category) 100 exist in SRM, but I am changing the material group to 200 in the product_customer2 badi.  its working fine.
    In another scenario, Material with material M1 with material group 300. Material group(product category) 300 does not exist in SRM,
    I am changing the material group to 200 in the bdoc, in the product_customer2 badi. It is not working. The LUW is failing in SMQ2 transaction with the error "Error in Mapping (Details: transaction SMW01)". The BDOC is failing with error "Category for material group 300 does not exist"
    I tried to deactivate the badi PRODUCT_CUSTOMER2, even then the FM MAP_BAPIMTCS_AND_PROCESS is validating the material group from R/3.
    I tried to change the material group 300 to the existing material group 200 at initial stage in debugging in function module MAP_BAPIMTCS_AND_PROCESS but still the bdoc is failing with error "No storage form defined for product type 01 / logical system".
    I am doing my testing using the following steps.
    1. change the material descriptioni in MM02 in R/3.
    2. An item is displayed in the queue in SMQ2 in SRM.
    3. I have debugged the LUW and analyzed my badi by setting breakpoint at method MAP_R3_TO_CRM_MATERIAL, its changing the material group in the bdoc properly.
       that didnt work.
       also i tried to change the material group in the function module MAP_BAPIMTCS_AND_PROCESS before the badi is called.
    4. I am checking the BDOc status using tcode SMW01 and checking the material using tcode COMMPR01.
    can someone tell me how I can change the R/3 material group to SRM material group at the time of mapping in SRM?
    Thanks
    Sathish PM

    Hi find below for the product cat
    Steps to create the product category in SRM:
    1) Create MM material groups in ECC client. This will create a transport. Go to SRM Tcode R3AS and select the object u201CDNL_CUST_PROD1u201D from the list and run it. You can monitor the job using R3AM1 in SRM. This will bring the material group into SRM. This can be seen in TCode u201CCOMM_HIERARCHYu201D in SRM.
    2) Once it is done. Go to IMG in SRM and go to path SRM> SRM server> Cross app biz settings> Account aassigmnet> Define GL code for Acc *** Cat and Prod Cat. Maintain the GL code against this prod cat for all the account assignment codes. This is client specific setting and need to be done in every client by opening it. This GL code is given in the form in ticket.
    3) Do a test and check if the product category is available for procurement in SC.
    Regards,
    Satish

  • Stacked and standard item groups

    Hi,
    Can anyone give a clue if the following problem can be solved?
    I have a table with many columns which I want to display on a single form with multiple tab-canvases. And on each tab-canvas I want to use item groups (two side-by side!).
    I managed to generate this only partly by using stacked item groups for each tab-canvas and item groups within these stacked item groups. But the item groups are all placed beneath each other! I can not find a way to control the layout-generation. It looks like the forms-generator does not use the tabulation preferences.
    I am using Designer 6 (6.0.3.10) and Forms 6i (6.0.8.10).
    Thanks.
    null

    It is not possible to get Service Item w/o delivery in to Invoice along with the the delivery item..unless the Service item is configured as item relevant to delivery.

Maybe you are looking for