Add a new column in query
My requirement is to add a new column(local field) to an existing SAP query. I have to add the field in the query and write some logic for fetching the value for that field in the program.
But i dont know how to proceed. Should i add the field (with any name) in SQ02 and generate a user-defined program?(currently existing program is standard). Or should i create 'Z' program separately? If so, how to connect it to my query? I completely dont have any idea. I went through related threads but its not of much help to me. Any suggestions are welcome.
You have to add the field in the infoset through tcode SQ2 and then you have to go to tcode SQ01 and change the query. In that if you want to add the field in between the existing fields,then you have to uncheck the fields and recheck the fields in order. then execute it in background,it will generate a program,the program name you can see in se38,the 1st name after execution in backgroung though SQ01.then copy the program into Z-program and make the changes and incorporate your logic.
Hope it will help.
If any doubt ,let me know