‎2009 Sep 11 7:54 AM
Hi Experts,
I am new SAP Query, so i have come up with this issue. Please help.
I have an infoset query with me, also a SAP query and a transaction with some Z transaction code, the program name as taken from System->Status is AQZZZSD=========Z_SD_ORD_WO_ST.
1. Now I can see code in the program, but I cant see that much of code in the SQ02 under extras tab.
2. Moreover, I have to change the code to address new requirements. How can I change the code in a SAP query???
What are the ways to change an existing SAP query's code ???
Thanks,
Chandan
‎2009 Sep 11 8:14 AM
Hi,
SAP Query is a tool used to generate programs based on the conditions set in the infoset.
You can join tables, get data from database tables in the infoset creation. Hence what ever changes you need to make can be done only in the infoset and Query definition(where you set the selection screen and conditions for data retrieval).
Below are the transaction codes:
u2022 SQ01 ABAP/4 Query
u2022 SQ02 Infosets
u2022 SQ03 User group
Below is how you can get the query and the infoset from the program name(generated).
AQZZZSD=========Z_SD_ORD_WO_ST
First 3 char - System specific(Dev/Prod/Quality systems)
Next 12 Char - Infoset name
Last 12 Char - Query name
Hope this helps
Regards
Shiva
‎2009 Sep 11 8:22 AM
Sorry, that was not what I am looking for.
I need to know, how we can change code in Infoset Query SQ02 ???
Please suggest.....
‎2009 Sep 30 6:18 AM
Hi Chandan,
Go to Infoset (SQ02) in change mode, click on Code icon (Sfift + F8) displayed on Application bar.
You will find, 'Code section' where different events are listed. You can write your code in any of listed events depending on your need.
For ex. if you want declare any variable in u2018DATAu2019 Section, to initialize any variable can use INITIALIZATION event.
If you want to perform operation on selection screen you can use 'AT SELECTION-SCREEN OUTPUT'
And most important event for this tool is Record Processing event like if you want to have any condition and calculation or modification of field value, you can write code in this event.
END OF SELECTION BEFORE LIST--> You can write header information in this event. After this information, your output is displayed. (User WRITE statement to write your information)
END OF SELECTION AFTER LIST--> You can write footer information in this event. After query output, information mentioned in this event is displayed.
Note: END OF SELECTION BEFORE LIST and END OF SELECTION AFTER LIST work only when output format of your query (SQ01) is u2018ABAP LIST'
GET and GET LATE: When you select a logical database as a data source of an infoset, you get this additional event to maintain the code as per your need for LDB.
Please let me know if you need any further details.
Regards,
Dinesh
Edited by: Dinesh Tiwari on Sep 30, 2009 7:21 AM
‎2009 Oct 01 4:07 AM
Hi,
Standard aging analysis report (RFDOPR10) displays only the customer line items. But the client also wants to display the offsetting line item details. I am a functional person and I am trying to write a query to generate offsetting line items from Table BSEG. (in SQ01). I am using Logical Database - DDF, which has BSID and BSEG table. I am trying to apply the logic,
For Example - If the accounting document has 4 line items(1,2,3,4) and the line item in BSID table is 2, then select items 1,3,4 from BSEG table for the documnet number and output as separate line items.
I dont have ABAP knowledge to write code. Kindly help with your valuable inputs to create a query to get offsetting line item details.
Thanks & Regards
Sri.
‎2009 Oct 01 4:35 AM
Hi Chandan,
Could you please read my post to your question and tell me if this suffice your requirement of maintaining code/ writing additional codes in Infoset.
Awaiting a valuable feedback from you.
Regards,
Dinesh
‎2009 Oct 01 4:39 AM
Hi Sri,
Could you please post/raise a new forum for it. Also if possible, kindly brief your requirement so that I can respond as soon as possible.
Regards,
Dinesh
‎2009 Sep 30 6:28 AM
You should not modify the report generated from SAP query.
SAP has provided place to insert custom code in infoset. Go to change mode o finfoset and Click on CODE icon there.
You will see code snippet area where you can write your own code under the different events.
Hope this helps.
‎2009 Dec 01 1:31 PM