Order by lookup item!!1

Hi,
I have a base table block with a lookup table,
I want my results be ordered by one item of the lookup table!!!
when I set the order by sequence and set order properties, no sort is done
in the result query, the sort is done in the lov of the lookup item!!!
Ho w can I do this please ???
Thanks for help

Do you know that in the "Query Data Source Name" block property you can list tables. Then you can specify you "base table" in the "DML Data Target Name" property. Here how it works. Let's assume you have a block based ot table T1 (id, data, fk_lookup). Then you have a lookup table T2(id, description). fk_lookup is foreign key to T2.id and you want to sort by T2.description. Then
Query Data Source Name = T1, T2
Where Clause = <your where clause based on T1> plus T1.fk_lookup = T2.id
Order By = T2.description
DML Data Target Name = T1
For each column in the block you should specify the "Column Name" in table_name.column_name format. You should make sure that you have specified a column which is a primary key so the forms will now how to address the dmls and how to lock the base table.

Similar Messages

  • Order by lookup item

    Hi,
    I have a base table block with a lookup table,
    I want my results be ordered by one item of the lookup table!!!
    when I set the order by sequence and set order properties, no sort is done
    in the result query, the sort is done in the lov of the lookup item!!!
    Ho w can I do this please ???
    Thanks for help

    Look at:
    http://www.arrowsent.com/oratip/frames.htm
    Tip #14: Ordering by a lookup column linked by a non-intellegent key. (Type: Forms 4.5)

  • Free Goods - Not showing in sales order as subsequent item

    Dear Gurus,
    I have created a Free Goods procedure determination and maintained it at Customer/ Material level in VBN01.
    The procedure is inclusive as follow:
    For every 100 units purchased, the customer gets 10 units free
    However at sales order level there is no indication at all that the Free Goods are being triggered.
    When I check the pricing procedure, the condition record NA00 that I have used doesn't show-up.
    There is no subsequent item in the sales order under the main item showing the Free-Goods discount.
    Could you please help me go through the customizing process to correct the error?
    Many thanks for your help
    Chris

    Hi,
    FYI
    Free goods can be configured in SAP by following two methods.
    (1) Manually
    (2) Automatically
    Manually: By specifying higher level item category for a line item we can determine free goods as a free of charge
    items during sales order processing.
    Automatically: System proposes free of goods automatically in the sales order. In automatic free goods
    configuration system follows two methods.
    (1) Exclusive
    (2) Inclusive
    Exclusive: System configures free goods in exclusive option like free goods quantity is going to be excluded in
    order quantity. Ex: For 10 items 1 item is free. Then system configures free goods as 10 + 1.
    Inclusive: System configures free goods in inclusive option like free goods quantity is going to be included in order
    quantity. Ex: For 10 items 1 item is free. Then system configures free goods as 9 + 1.
    NOTE: In exclusive method other items also can be given as a free of charge items for order item.
    Configuration steps: INCLUSIVE
    SAP follows condition technique to configure free goods automatically.
    Maintain pricing procedure
    Path:
    IMG
    Sales and distribution
    Basic functions
    Free goods
    Condition technique for free goods
    Maintain pricing procedures
    Choose free goods procedure NA0001 and select it
    Click on copy icon on application tool bar and rename it Ex: SRI001
    Condition type is NA00 and Access sequence also NA00
    Save it and Exit
    Activate free goods determination
    Path:
    IMG
    Sales and distribution
    Basic functions
    Free goods
    Condition technique for free goods
    Activate free goods determination
    Go to new entries
    Specify our sales area, document pricing procedure, customer pricing procedure and specify our free goods
    procedure Ex: SRI001
    Save and Exit
    Control free goods pricing
    Path:
    IMG
    Sales and distribution
    Basic functions
    Free goods
    Control free goods pricing
    Control pricing for free goods item category
    Choose item category TAN from position button
    Specify the pricing as X = Pricing standard
    Choose item category TANN from position button
    Specify pricing as B = Pricing for free goods (100% discount)
    Save and Exit
    Maintain condition type for 100% discount
    Path:
    IMG
    Sales and distribution
    Basic functions
    Free goods
    Control free goods pricing
    Maintain condition type for 100% discount
    Check whether condition type R100 is available or not (R100 = is 100% discount)
    Exit
    Maintain pricing procedure for pricing
    Path:
    IMG
    Sales and distribution
    Basic functions
    Free goods
    Control free goods pricing
    Maintain pricing procedure for pricing
    Choose our pricing procedure form position button and select it
    Click on control data icon under dialog structure
    Include condition type R100 between the steps of discounts.
    Specify requirement = 55 and Routine No: 28 (100% discount) in Alt. CBV.
    Save and Exit
    Requirement 55: The Routine No. 55 is assigned to condition type R100. If the user wants to look both revenues
    and sales deductions for the free items since the product that we are going to give as a free of charge item can be
    sold separately in the same sales order. Then the item category of free goods TANN has the pricing value as B.
    Then the system calculates value of the free goods as 100% discount as we discussed above the same material [that
    is going to be given as a free of charge item]. Some times the same item is going to be given as a normal item.
    Then system calculates price for normal item and system should not calculate price for same item [free of charge
    item]. So as to perform this calculation we have to assign Requirement/Routine 55 is to assign condition type
    R100.
    Alt CBV = 28: [100% Discount] Condition type R100 should be taken as a ZERO value. The formula 28
    calculates condition type R100 value as a ZERO.
    Set Transfer of cost to Main item: [Copy control]: Transaction code: VTFL
    Copy control is a concept by which the system copies the data from source document to target document.
    Path:
    IMG
    Sales and Distribution
    Basic functions
    Pricing
    Free goods
    Control free goods pricing
    Set transfer of cost to main item [copy control]
    Choose Billing type F2 Delivery document type LF from position button
    Select it and click on itemicon under dialog structure
    Choose item category Ex: TAN
    Click on details icon
    Click on display or change icon
    Choose item category as TAN again
    Select it and click on details icon
    Check cumulative cost
    Save and Exit
    Cumulative cost controls whether the cost value (VPRS) is to be copied from relevant sub items into main items.
    Sub items cost are not relevant for billing.
    Maintain copying control: Transaction code: VTAA
    Path:
    IMG
    Sales and Distribution
    Basic functions
    Free goods
    Control free goods pricing
    Maintain copying control
    We maintain copy control at item level category for free goods. In this field we can control whether the
    free goods should also be transferred when we copy from one document to another document.
    Choose source document type as QT and target document type as OR from position button
    Select it and click on item control button under dialog structure
    Choose AGN item category from position button
    Click on display or change button
    Again click on AGN
    Click on details icon
    Check Re u2013 explode structure/Free goods
    Save and Exit
    This indicator controls whether the free goods are copied from source document to target document or redetermined
    again.
    Maintain condition records for Free goods [INCLUSIVE]: Transaction code: VBN1
    Path:
    Logistics
    Sales and Distribution
    Master data
    Conditions
    Free goods
    VBN1 u2013 Create
    Specify condition type NA00
    Click on key combination
    Specify all the data
    Choose inclusive by clicking the INCLUSIVE/EXCLUSIVE push button
    Specify the Material No., Minimum order quantity (Ex: 10), Specify [from] the free goods quantity (Ex:
    10), Unit of measure u201CEAu201D (Each), Free goods (are free goods) as u201C1u201D.
    Calculation procedure: We can specify the Routines for calculation procedure as 1 or 2 or 3
    1 = Pro u2013 Rata (Proportionate): Ex: If the customer places order for 100 cases of material u201CXu201D, then customer
    receives 20 cases of same material as free. That means, the business can say that buy 100 and get 20. If the
    customer orders for 162 cases, then system automatically grants 32 cases as a free of cost (162x20/100 = 32 Cases).
    2 = Unit of reference: When customer orders for 100 cases of material u201CXu201D, then the customer receives an
    additional 20 cases as a free of goods. That means business can say that buy 100 get 20 free by granting 200 free
    for every full of 100 cases. The customer places order for 162, then system automatically grants only 20 cases
    (100x20/100=20).
    3 = Whole unit: When a customer places order for 100 cases of material u201CXu201D, then the customer receives additional
    20 cases of material u201CXu201D as a free of goods item. The business can say that buy 100 and get 20 free of charge items.
    If the customer orders for increment of 100 that means 200 (100 + 100) items, then he gets 40. If he placed the
    order for 101 u2013 199 items he gets only ZERO.
    Save and Exit
    Condition record for EXCLUSIVE: Transaction code: VBN1
    Path:
    Logistics
    Sales and Distribution
    Master data
    Conditions free goods
    Specify the discount type u201CNA00u201D
    Click on key combination
    Click on Choose inclusive by clicking the INCLUSIVE/EXCLUSIVE push button
    Specify the sales organization, distribution channel
    Specify customer number and validity periods, material, minimum quantity, order quantity, unit of
    measure, calculation procedure, free goods (3)
    Specify additional material free goods (if other goods is going to be given as a free of charge item.
    Save and Exit
    Go to VA01 and raise the sales order for INCLUSIVE and EXCLUSIVE.
    See the Free Goods effect.
    Condition type NRAB = Free goods: Requirement = 59, Alt CBV = 29: [only for INCLUSIVE purpose]
    Requirement 59: We have to assign requirement 59 to the condition type NRAB. If the customer buys 100 cases
    of product u201CXu201D, then he receives 10 cases of the product free. If the user would not like the additional line item in
    the sales order for free goods rather than the discount of the 10 cases is represent in the same line item as other 90
    cases. If the free goods discount should not apply on credit for returns that do not make reference in the previous
    document.
    Alt CBV 29: The condition type NRAB is to be assigned with 29 formula to support inclusive free goods
    agreement where the user would have to apply the discount to the order item rather than having a sub item
    generated for the free quantity.
    Ex: The customer orders for 100 cases of product u201CXu201D, 10 cases are free instead of having a free sub item generated
    b the system to represent the free 10 cases, the user would like to have a discount applied to the 100 cases line item
    equal to the value of the 10 cases.
    NOTE: Free goods can only be configured on document category type u201CCu201D (OR). That means we cannot configure
    free goods on Inquiry and Quotation.
    Header Conditions
    SAP has delivered two kinds of condition types: (1) Header conditions
    (2) Item conditions
    Header conditions: The value of the header condition applies to the whole items in the sales document.
    Header conditions do not have any access sequence.
    So that, value of the header conditions should be maintained manually.
    Ex: HA00, HB00
    Configuration settings:
    Include condition types HA00, HB00 in V/08 in between the discount condition types.
    Go to VA01 and raise the sales order
    Select line item and go to Go to button
    Header Conditions
    Include condition type HA00 HB00 with values [HA00 is percentage discount and HB00 is absolute
    discount]
    If HA00 = 1%, then system applies 1% on base value on all items in the sales order.
    If HB00 = 100/- Rupees, then system applies 100/- Rupees proportionately to all items in the sales order. If sales
    order has two items, then system applies 50/- Rupees to each item.
    Click on activate button
    Go to item condition screen
    Check how system applied header conditions for line items
    NOTE: Make sure that sales order contains more than one item.
    Condition Scales
    We can maintain scales for each and every condition type. So that we can determine pricing conditions values
    depending upon the range of the order quantity.
    Ex: If you maintain condition record for PR00 for material one as a 100/- Rs. For 1 material, then we can maintain
    scales for this material like below:
    From Quantity Price
    1 u2013 10 1000
    11 u2013 20 999
    21 u2013 30 998
    31 u2013 40 997
    Configuration settings:
    Go to VK11
    Maintain condition record for PR00
    Select line item and click on scales icon on the application tool bar
    Maintain scales and scale rates accordingly
    Save and Exit
    Go to VA01 and raise the sales order
    Enter the order quantity according to the scale and see the scale effect
    Regards,
    Siva

  • Delivery document - sales order - no stock items

    Hello,
    when we create a delivery document out of a sales order, we face the problem that certain material items in the sales order with no stock  will be copied to the delivery document. Other materials that have no stock will not be copied into the delivery document.
    Where in SAP can I do the customizing for that situation?
    Thanks
    Anne

    > when we create a delivery document out of a sales order, we face the problem that certain material items in the sales order with no stock  will be copied to the delivery document. Other materials that have no stock will not be copied into the delivery document.
    > Where in SAP can I do the customizing for that situation?
    Generally when Availability check is active system should not copy the Material which are not available. I can think this may be because of following reason
    1.. Check your configuration of the Item Category using 0VLP. There is stock determination rule fields, i dont have access to SAP so not sure but please check whether there is any setting.
    2. check in copy control VTLA for the item category whether you have maintained the following:-
    Order requirements-->101
    Item data-->101
    Update document flow-->X
    Pos./neg.quantity-->+
    And if these seems ok, Then you have to check the routines in the copy controls.
    Thanks,
    Raja

  • Closing sales order containing cancelled item

    Hello,
    This is the scenario.  You create a sales order containing 3 items and add the order.  One of the items then gets cancelled (in item master data).  You then try and close or cancel the order.  A red line error message is displayed saying 'Item cancelled' with the item code after it.  Is there a way of closing a sales order which contains a cancelled item? I have tried removing the item from the order but am unable to update it afterwards - it shows the same error.
    Many thanks,
    Kate

    Hello Kate,
    A precaution is always needed when you cancel any items.  You need run a simple query such as:
    SELECT * FROM RDR1 T0 WHERE T0.ItemCode = '[%0\]' to check any Sales Orders contain this code.
    Thanks,
    Gordon

  • ConfigureCombined invoice for Delivery and Order related billing items

    Dear Guru's,
    Please tell us what settings one have to do in copy controls (like for TAS "OR to F2" & TAN "LF to F2") as to Combined invoice for Delivery and Order related billing items.
    Regards,
    Sai

    Hi Sai,
    for TAS "OR to F2"
    T-code-VTFA
    Target Billing Type --"F2"        and Source Document as "OR"
    At header level you can select .
    Copying requirements "001" Header/order related
    Tick mark copy item number
    At item Level you give
    Copy requirements "028" Order related 3rd party item
    Data VBRK/VBRP= 000
    Billing quantity="A"
    Pos/Neg quantity="+"
    Price type="G"
    and Save
    2)TAN "LF to F2
    Go to Tcode-VTFL
    Target Billing type "F2"   and source document as "LF"
    In header details you give
    Copy requirements "001" Header-order related
    detr export dta="B"
    Allocatio number="B"
    Reference number="A"
    Tick mark copy item number
    In item details you give
    Copy requirements"004" delivery related item
    Data VBRK/VBRP="003" Single invoive"
    Billing qantity="D"
    Pos/neg quant="+"
    Price type=G"
    Price source"E"
    Regards
    Seegal

  • Purchase order has no items

    Hi All,
    While i am posting the MIGO transaction with reference to PO I encountered error as a "Purchase order has no items.
    Thanks and regards,
    Ravi Vruddhula.

    Following are the reason
    Check the confirmation tab ate item level at the purchase order. It should be blank.
    Is there any goods receipt ag. this PO, if yes, check the PO history tab at item livel in the PO. Check the pending qty.
    It sholud not be deleted PO.
    Check the delivery date in the PUrchase order.
    Check the release stratagy in the PO. It should be release.
    Thanks,
    Samir Bhatt

  • PO account assignment Q + Purchase order has no items + M7033

    Hi All,
    I have create a PO with account assignment Q and now when I am trying to post GR to this PO I am getting the error 'Purchase Order has no items' Message number M7033. Please Guide.
    Thanks and Regards
    Pavan

    Following are the reason
    Check the confirmation tab ate item level at the purchase order. It should be blank.
    Is there any goods receipt ag. this PO, if yes, check the PO history tab at item livel in the PO. Check the pending qty.
    It sholud not be deleted PO.
    Check the delivery date in the PUrchase order.
    Check the release stratagy in the PO. It should be release.
    Thanks,
    Samir Bhatt

  • Creation of sales order from idoc; items referencing to different contracts

    Hi All,
    My requirement is to create sales order from an idoc.
    IF a sale order contains multiple items , then the order should be created with contract referenced
    -at the So item level, the valid contract found for each material is different
    hence am not able to use the following bapis
    BAPI_SALESORDER_CREATEFROMDAT2  is not triggering the copy controls.
    BAPI_SALESDOCUMENT_COPY  i can give only one reference document
    Please help
    Thanks
    Deepa

    Hi Deepa,
    Following link can help you for creating sales order with reference
    http://msdn.microsoft.com/en-us/library/cc185190.aspx
    http://www.sap-img.com/fu036.htm
    Award points if useful
    Thanks,
    Ravee..

  • Is ATP check possible in Service Order for Sales Item?

    Hi All,
    My question, is ATP check possible in Service Order for Sales Item? My requirement is that when i create a service order in the web UI with a sales item and drill down to the item level, i see the schedule lines assignment block but w/o any Confirming date, so i want to know whether the ATP check is happening or not. For example wen i create a sales order in web UI with a sales item and drill down into the item level, the schedule line AB shows me the Confirming date checking the ATP. But this is not happening in case of service order. So kindly suggest the reason and clarify my query. Thanks
    Regards
    Sridevi

    Nobody can help me???
    Please.
    Thanks

  • Transfer of tax indicator to purchase order for service items in shopping cart

    Hi all.
    I have a problem with the tax indicator in the shopping carts and in the backend purchase orders for service items. If I create a shopping cart with service items with different tax indicators, the backend purchase order have a unique item including all the services. So, all the PO items are under one tax indicator while in the shopping cart there is more than one indicator. I mean, the PO is not correctly replicated with the information of the SC.
    Example: shopping cart in SRM with 3 items, tax codes: V1, V2, V1. The standard code transfers the information to the backend, and creates a purchase order with an unique item with the 3 services under tax code V1. So, the second service is not under the correct tax code, and will be wrongly invoiced.
    We have debugged all the code of the process, and we think it is a standard bug. When you replicate a PO in the backend from a SC in SRM, have you experienced this behaviour, or the service items are grouped in different PO items each one with the correct tax indicator?
    Thanks in advance.

    Hi again...
    I forgot to mention that we have found and applied the note 1822107 (Purchase order: wrong tax code for PO with 2 service items), that fits exactly to our problem. But after testing, it doesn't work.
    Regards.

  • Order type and Item category group

    Can anyone tell me which is the relation between order type and Item category group from material master ??
    In fact the problem is that I have created a material and when I want to create new sales order it gives me this errror:
    "No item category available (Table T184 ZORDER ZITGR)"
    Is there a tranzaction where I can assign Item category group ZITGR to sale order type ZORDER or something like that??
    What should i do?

    Hi Dan,
    Goto T-Code VOV4 and maintain the table
    Sales Doc type + Item Category Group + Usage + Higher level Item Category = Item Category
    TA + NORM + Nil + Nil = TAN
    If you have Customized your own Document Type and Item Category Group and Item Category then give your
    Sales Doc type (ZORDER)+ Item Category Group (ZITGR)+ Usage + Higher level Item Category = Item Category (ZTAN)
    Reward if helpful
    Regards PAVAN

  • Unable to cancel - open purchase order where all items are removed

    Hi all,
    When We try to cancel/close open purchase order where all items are removed from item master ?
    It showing error message,
    "No matching records found  'Items' (OITM) "
    Purcahse order was created on may-2007.
    As purchase order showing in open item list.
    Any solution for this problem ?
    Jeyakanthan

    SAP does allow items to be removed from the item master with open documents, but only if the documents have not created journals.
    It does create headaches though, and this situation is one of them.
    If there are not many items, I suggest you recreate the items, close the PO and just cancel the items rather than remove them.
    The other workaround is to change the items on the PO to something different that is in the item master, then close it.

  • How I can get the Billing Type for the sales order and its items

    How I can get the Billing Type for the sales order and its items. I mean from which SAP tables and how?

    Hi,
    You need to use two tables.
    First use VBFA. Enter the sales order number in the field Predecessar and the value M in SubCt field. This will give all the billing document number for the sales order items.
    Then use the billing document numbers in table VBRK, where in you can get the billing document type.
    Regards,

  • Sales order doc and item fields in customer line item report(FBL5N)

    Hi All,
    We have some billing documents and the accounting docs are created as well. However, in the FBL5N report, we are not able to display the sales order doc and item info even though the columns are avaliable in the layout.
    Anyone can help?
    Thanks,
    Teo

    Hiya,
    You said you had the Order/Sales Doc field on the layout already.
    Have you ever been able to view the Order? All I can view is the Billing Doc, and I would think that is logical, since the Order is not the immediately prceeding document for the Accounting Doc. The Accounting Doc is created off the Billing Doc and that is what is updated in BSEG. The Sales Order is not updated in BSEG (I haven't seen that happen).
    In the event of a GR into stock posting, the Product Cost Collector or PO is the immediately preceeding document and hence updated in BSEG.
    Cheers.

Maybe you are looking for

  • Premier Pro CC 2014 crashing, wasting enormous time, not able to load files into previous rev - this is crazy!!!

    SOMEONE AT ADOBE PLEASE HELP!!! I have had no problems editing Red Epic 4K R3D files in the past revisions of Premier CC but ever since creative cloud updated me to the latest Premier CC 2014 (8.0.1) I cant get any serious work done as my system is c

  • Apple logo wont go and phone wont open helppp plz..

    i was restarting my iphone and then the apple logo appeared and now wont go unless power is off wont close or open just wud reset and come back on only the apple and when i insert my sim ppl calling me they get a ringing tone but i dont get anything

  • ZAC update freezes

    Hi, I have one user whose ZAC update just stops at the same point every time. There are no errors being shown on either the client or the server. From what I could figure out ZAC bootstrap updates files in batches. It may be that it is opening (and n

  • Inner Shadow missing feature?

    I'm looking for a better alternative to my current vector graphic applications, mostly to create modern web and application UI's. So I downloaded the trial version of Illustrator CC, to see if I should make the jump to Illustrator for vector work. Af

  • 2.0.1 Issues

    I am on firmware 2.0.1 and am having some problems with it. I have had to restore numerous times because it gets stuck on the Apple Logo, on bootup. For some reason this always happens. No matter what I do. Please help