We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE: [sap-dev] Code at Infoset SQ02 - Use the Current Line When Processing

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from horacio zapettini on Dec 11 at 10:45 AM
Soufiane,

IMO, you should go for a custom report. You want to do two different selects on mseg (one with the join and another one to retrieve the sum of 911 and 912). I don't say it's impossible, but it's going to be a real challenge and a waste of time...

Of course you could do what you want: an outline of the idea is more or less like this:
add the new field and set it to zero while you evaluate it.
In an embed coding after the data has been selected but before the code outputs it (at end-of-selection for example) you loop at the extract, and for each new matnr you select sum... from mseg to get 911 and 912. You calculate the difference and update the extract. (I can't remember if this is even possible ...)

A different possibility would be adding a calculated field that evaluates if mseg-bwart = 911 or mseg-bwart = 912 then the value is possitive or negative and you retrieve every possible value from mseg. In the infoset query I think there was a possibility to sum up that field... (without showing movement by movement.). (It's been a long time since my last infoset query...).

And a better option would be to remove the join from resb to mseg. That would offer you the possibility of calculate the sum while you're retrieving each resb-matnr value...

HTH
Horacio.

---------------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.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2012 Ziff Davis, Inc. and message author.
Ziff Davis, Inc. 28 E 28th Street New York, NY 10016
horacio zapettini  

12 achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Earn Recognition for Your Contributions at Toolbox for IT. Gain Points for Community Achievements

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language