Ordering related collections
Hi,
I have a one-many relation between two classes whereby the child class's
primary key consists of two fields: the parent class's oid and an entry
date.
Is there a mechanism that can be used to get an "ORDER BY" clause included
in the SQL that is issued when my program follows my relationship?
I always want my collection of children to be ordered by the entry date,
but instead, there appears to be no ordering as two subsequent references
to the same collection often results in a different ordering of the
collection elements.
Thanks,
Bill
William-
It seems like you want to use the jdbc-ordered extension. See:
http://docs.solarmetric.com/manual.html#jdbc-ordered
Note that Kodo will require that you have an additional column that
holds the order for the collection.
In article <[email protected]>, William Korb wrote:
In re-reading my original post, I decided it wasn't very clear. Perhaps an
example of what I'm asking for might make this a bit more clear.
Customer {
int customerId;
// other stuff
Order {
int customerId; // fkey to Customer table
Date orderDate;
// other stuff
OK, so when I want to get all of the orders for a customer, I use the
mapping keyed by the customerId field in the Order.
Customer c = getCustomerFromSomewhere();
Iterator ordersIterator = c.orders.iterator();
Let's say that I have a customer with two orders, one dated June 1 and one
dated June 2. When I step through the ordersIterator, sometimes the June 1
order will be first, and sometimes the June 2 order will be first. I would
very much like this ordering to be consistent. If I manually select my
orders with a JDOQL query where customerId == something, I can then
specify an order by clause, but this defeats the purpose of the ability to
traverse the relationships between JDO objects.
I realize that I can simply sort the returned orders, but there are
performance reasons for preferring that the database do this for me (e.g.,
result set is large, relationship is being referenced from within a JSTL
forEach tag, etc.). Also, this is a pre-existing schema, so I cannot add
an integer order column to define the natural ordering of the results.
Is there an easy answer?
Thanks,
Bill
William Korb wrote:
Hi,
I have a one-many relation between two classes whereby the child class's
primary key consists of two fields: the parent class's oid and an entry
date.
Is there a mechanism that can be used to get an "ORDER BY" clause included
in the SQL that is issued when my program follows my relationship?
I always want my collection of children to be ordered by the entry date,
but instead, there appears to be no ordering as two subsequent references
to the same collection often results in a different ordering of the
collection elements.
Thanks,
Bill
Marc Prud'hommeaux
SolarMetric Inc.
Similar Messages
-
Third party process:Billing relevance 'B' order related and 122
I am facing the following problem: in Order related Billing according to order qty, the sales order bills what has been received on the third party PO in MM.
The following situation occurs: When I order 100, receive 100 and Bill 100: The sales order is fully billed. When I later return a quantity to the vendor in MM with a 122 referring to the PO, the sales order remains fully billed. There is no way I can find out which Sales order needs to be take action on (credit). Can someone help me finding out how I can select these sales orers after a 122?Ok, no problem.
At the client we have a very specific flow where receipts on a third party PO need to be billed daily when they happen and every receipt (better: any goods movement) needs a seperate billing document.
This is not covered in SAP standard. I wrote a program (functional) how SAP should find the billing relevant movements:
1) Go to the billing due list daily at 0:00
2) Check all related third party PO's and the movements
3) Check the sales flow of the relevant SO. Check which material doc has been billed (via reference field in the billing doc)
4) For all items not yet billed call function module GN_INVOICE_CREATE. (bill in case of 101 and 123 and credit in case of 102 and 122)
This works all fine until I found above issue: Fully billed items are removed from the billing due list even if there is a 122 or 102 afterwards on the PO. So I redesigned the program.
1) at 0:00 Select all movements on the system date for the specific flow (PO type and plant) via Material documet header and segment.
2) Via the account assignment in the material doc you have the Sales order. Then the same applies:
3) Check the sales flow of the relevant SO. Check which material doc has been billed (via reference field in the billing doc)
4) For all items not yet billed call function module GN_INVOICE_CREATE. (bill in case of 101 and 123 and credit in case of 102 and 122)
Here I am not using the due list and it solved my problem. -
What is the table to get the all planned orders related to a sale order
Hi,
May i know what is the table to get the all planned orders related to a sale order. My scenario is make to order scenario. we can get my out put final product by completing the nearly 916 planned orders.(Like major assemble,sub assemble). From this scenario i want the total orders related to a sale order. ( The planned orders from sale order to sale order will change. i.e 1 sale order will have 916 planned orders and one sale orders will generate 920 like that will chage when running mrp.). Now i want to pick the total planned orders for a sale order in a report. please guide me.
Regards,
Mastan.Hi,
Use the table PLAF... in this table pass the sale order no in the filed KDAUF and then execute...issue here is once the planned orders are converted production orders, these planned orders are deleted from the system....so you will not able to see them.....
Thanks
Kumar -
Standar report to see the sale order stock collectively
Dear Gurus,
Is there any standard report available to see the sales order stock collectively.
I can see the sale order stock in MMBE. But disadvantage is, at a time i can see a single material only.
I would like to see the sale order stock for more than 1 materials.
For example MB52- Collective inventory stock can be seenDear,
You could check sales order stock using MB52. Tick Also Select Special Stock and fill special stock indicator ='E'
You can check in MMBE t.code by enter material and execute....& see ur slaes order stock in On-order stock segment also try in CO09
Regards,
R.Brahmankar -
Invoice is not getting created in Order related billing
Dear all,
I am trying to do a Order related billing. After creating the order i am going to VF01 and selecting the billing type i have created and trying to create the invoice. I am getting the error "No billing documents were generated. See log" when i am checking the Log its showing now errors.
In case if my account determination procedure is wrong, system should allow me to create a Sales invoice and accounting document will not be generated. But in this case even the sales invoice is also not getting created.
Please suggest me if there are any configuration changes i need to do to overcome this problem.Apart from the suggestion already given, also ensure that
the order is not showing in incomplete log
the order is not blocked for credit limit
You can also cross check in VF04 whether system is fetching that sale order. For information, once you execute VF04, by default, system will check only "Delivery related" check box. You have to manually select "Order related" check box.
G. Lakshmipathi -
Order Related Proforma Invoice for Free delivery Sales Order Type
Dear All ,
The requirement is as given below :
We need to create an Proforma Invoice for Free Delivery order type (FD) . The item cat is TANN with
Pricing B
Billing Relevance A
The Pricing procedure is Free of charge - Zvar6. with R100 % dicount condition type .
Created Proforma ZF9 with doc pric "C". Maintained copy control .Between ZF9 and FD ( order related biling).with the following :
Copying requirements 008 Item/ord.pro forma
Data VBRK/VBRP 000
Billing quantity C
Pricing type G
The condition record is R100 is captured in the order and the net value becomes zero . But when i create Proforma Invoice ZF9, the Dicount condition R100 is not copied into the Billing document ( ZF9). I am not able to understand where the mistake is .
Can any one give their inputs .
Thanks in advance
VeeraHello Veera
kindly check whether free good determination is activated for the combination sales org, dist channel, division, document pricing procedure(C), cust pricing procedure, free goods pricing procedure.
thank you
Anirudh -
How to Create Excise Invoice (J1IIN) with order related billing document
Dear Experts,
Is it possible to Create Excise Invoice (J1IIN) with order related billing document? How? please guide
Regards
BK GAIKWADSir,
We have make the supplementary Invoice (Debit Note) as per below process
1) Create sales order_VA01
2) Create billing document_VF01_with reference to sales order
3) Create Excise Invoice With J1IS (Other Movement) It is manually job & due to heavy work load (create 200 invoice per day) it is not possible to do manually.
Hence we want to create excise Invoice with J1IIN instead of J1IS, any alternative solution for that?
Regards
BK GAIKWAD -
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,
SaiHi 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 -
Order related inter company credit memo - Order status 'Not Invoiced'
Hi,
We have recently created 'Order related inter company credit memo' process for return Stock Transport Orders(STO). For this, we used order related billing (billing relevance = C i.e. Relevant for ord.-related billing - status acc.to target qty) with standard item category 'G2N'. The issue is even after invoicing, sales order item status is 'Not Invoiced' and header status is 'Open', hence these orders are picked up multiple times during background invoice run and multiple invoices are being created.
How do we control the 'Completion' status in order related inter company billing? VBUP-FKSAA is not changed even after billing document creation and remains as A i.e. Not yet processed. Do i need to check VBUP-FKIVP since this is inter company billing.
I have also tried with TVAP-FKREL as 'B' i.e. Relevant for order-related billing - status according to order quantity but of no use.
Please advise.
Thanks in advance.
Regards,
Ganesh
Edited by: Venkata Ganesh Perumalla on Nov 10, 2010 6:08 PMHI,
Check too the Note 308989 - Consultant note for cross-company transactions
It says:
I.1.5 Returns request (IR) - returns delivery - customers credit memo -
intercompany credit memo (IG) (RETURNS)
The customer credit memo is created for the returns request and the
intercompany credit memo is created for the returns delivery.
Regards,
Eduardo -
Foreign Trade / Intrastat - data order-related billing (downpayments)
Hi,
Shortly we have implemented the down payment functionality in our flows. Because downpayments require order-related billing the intrastat/foreign trade data is not copied into the closing invoice.
Apparently it is only possible to copy the data from a delivery.
We are in a make-to-order environment and we still create deliveries but because of the down payments, the invoice is created from the sales order and hence no intrastat data is copied which ofcourse is required ...
Can't find a suitable user exit for filling this data into the billing document. Also tried using copy data transfer (vofm) filling up tables eikp and eipo but that didn't work.
The only option open for me at the moment is creating a proforma invoice automatically from the delivery. This document can then be included in the intrastat reporting.
Is there another solution ?
with regardsHi,
in the copy control between order and invoice you need to set the 'determine export data' to 'B' so that it will be redetermined in the invoice. After that the relevant foreign trade userexits will work as well.
Balazs -
In case of returns,will there be order related billing?
Hi,
In case of returns,will there be order related billing or the delivery related billing?Hi,
The credit memo is issued even if the return delivery and the goods receipt are not created as it is order related billing except if you put a billing block on the return order but as soon as you will remove the billing block on the return order, the credit memo will be issued event if delivery is not created and goods have not been received.
This is strange but certainly german people are confident enough to reimburse their customers even if the goods have not yet been received.
Myriam. -
Printing of Production Order related smartforms while creation of P.O
Hi All,
SCENARIO: Production order related smartforms have to print as soon as we create the P.O. It is happening when I create the P.O in CO01 in front end.
PROBLEM: I am calling CO01 transaction in BDC method and creating the P.O, I have used MODE 'E' UPDATE 'A' in call transaction method. Here it is not triggering the smartforms. First of all, it is not triggering my print program itself. But it is happening while in creation of P.O in front end.
Can anyone tell and suggest me, how can we solve this problem.
Thanks and Regards
Ramesh mavilla.Hi Ramesh,
Few screen would popup only in foreground but not in background. That could be the reason bcz of which you BDC is not working in background.
Please pass the BDCMSGCOLL data into a spool using WRITE statement to check what is the error in executing BDC.
Else debug the background job using JDBC in command prompt of SM37.
Best regards,
Prashant -
Delivery / Order related invoice.
20.10.2008
HI friends,
For a Sales Order i create invoices against deliveries or directly against the order itself. I have created copy control for delivery to invoice and order to invoice.
My problem is when i create a delivery related invoice for an order, it allows me to invoice the same sales order again against the order too resulting in mutliple invoice. How do i restrict this. Please suggest.
Regards,
UdaynathHi Uday
As per my knowledge goes, Billing can be either Delivery related or Order related and it can not be both.
It is controlled from the "Billing relevance " field in the Item category in sales(VOV7).
So, how are you able to do Billing both from the Sales order as well as from the Delivery. Kindly explain.
Have you got more then one item in the Sales order and Billing relevance for them in their item category are different ?
Edited by: pradyumna on Oct 21, 2008 11:27 AM -
Tax issue in third party order related intercompany billing
Hi,
I have one isseu related to tax determination in third party order related billing document.
Ordering sales organization : Germany
Delivering sales organization: France
In billing document the Delivering country: FR (France)
Receiving Country: DE (Germany)
The tax condtion type: MWAS, Application of that condition type: TX.
Sytem is picking the A1 tax code from country FR and through tax procedure TAXEUR.
But the actually client requirement is system should pick upt he tax code from country DE (Germany). I.e., system need to pick up from receiving country.
I tried through SD tax condition records, it is not working.
I maintained the tax rate through VK11, like
Departure country (FR) - Destination country (DE) - Cust.taxclassi - material tax classi - Tax code (XT), the XT is belongs to France, When i maintained this system is not picking the tax amount from FTXP.
Please let me to come out from this issue.
Regards
LakshmikanthThanks to all
-
Need Suggestion to Stage Process Order related data
Hi All,
Could anybody help me by providing the solution or suggestion for the problem which I am describing here. The problem is like to stage the process order related data (which are downloaded from SAP ECC for sending to machine data base or confirmed by machine data base which will be sent to SAP ECC) can we use NetWeaver Data Base by creating separate tables or by creating separate schema in NetWeaver DB or we will go for separate DB to stage all transactional data of Process Order.
Thanks in Advance.
ChandanHello Chandan,
1) Yes you can use underlying Netweaver DB either by creating new tables or by creating new schema but as per MII best practices it is Not Recommended because by mistake you might end up affecting the NW and MII configurations
2) There is no hard and fast rule saying you must stage Data but it is very good if you do it because,
a) Your data will be buffered when SAP is down
b) Faster processing
c) Ability to perform more analysis on data through many drill downs to sub-levels
3) I would recommend going for a separate DB to stage all your SAP Data (both for sending or receiving data from ECC)
Hope this helps!!
Regards,
Adarsh
Maybe you are looking for
-
Windows 8.1 and IOMEGA External Hard Drive Issues
Since I upgraded from Windows 7 to 8.1 my computer will not now recognize my IOMEGA external hard drive. How could just updating Windows not allow my hard drive to be accessed? Please help? I do taxes on the side and all my clients's tax returns a
-
Acrobat 9 Pro Extended or Acrobat 3D?
I have CATIA v5 r19 and NX 7.0 3d models and I want to put them into Adobe so they can be shared by other downstream users for viewing, however my issue is that I am not sure what software to do this with? I have 9 Pro Extended which does not suppor
-
My EZ Vinyl Converter software won't export songs to ITunes
Can't export songs from EZ Vinyl Converter to ITunes. Would prefer to Windows Media Player...either would do. Have tried all the tricks I know...but I'm still not very good on the pc. This software worked for me years ago. Please help.
-
Hi, On the vendor invoice we would like to change the cash discount tolerance amount. It only accepts 2% discount but we would like to remove the limit. Also we would like to be able to enter the discount as a dollar amount if paid within a certain t
-
Hello, What if we want to improve the quality of a photograph should always open camera raw? Is it more advisable? thanks