Announcement:
wanna exchange links? contact me at sapchatroom@gmail.com.
Posted by
Admin at
Reply from LCC352 on Dec 12 at 9:44 AM Soufiane - I've been reading the threads and I would like to offer another alternative. First, I agree with Horacio (as always) that unless you limit this query in some way other than just the movement type, this query will only get worse with time and will not produce results at some point - it will just dump out due to the volume of data. That said, I would suggest creating your own hashed table of values to sum the amounts by material in the code before the selection area starts. Declare the hashed table in the DATA area, and then do the selection once, up front, before the query starts its selection. This would be an independent grab of data that would be put into the hashed table. As each record then processes, you would use a READ statement based on material (there should be only one with a net value of 911's and 912's) and read that summed value into the field you're using in the query on a record-by-record basis. You would not necessarily do this in an ABAP program this way, but in a query, it's a better method to get the data you want once, and not keep going through the same tables over and over again. Good luck! - Lou
| | | ---------------Original Message--------------- From: soufiane669 Sent: Tuesday, December 11, 2012 10:06 AM Subject: Code at Infoset SQ02 - Use the Current Line When Processing Hello every one, I want to add some abap code in infoset SQ02 to calculate an additional field: In the infoset i'm joining the 2 tables RESB and MSEG and i want to calculate for each reservation of material => sum(reserved quantity) where movement type = 911 MINUS sum(reserved quantity) where movement type = 912 where the material = current line. That's why i want to use the value of the current line material otherwise the select will populate the additional field with the same result for all the records. Please to help me Regards, Soufiane | | Reply to this email to post your response. __.____._ | _.____.__ |