Addition of new column into SAP query program

Hi freinds,
There is a query program(joins EKKO,EKPO) which contains columns like vendor,purchase doc,item,material and material description etc..
I need to insert a new column 'Supplying plant' in 2nd position after vendor column...When I try to add a field into internal table,am getting short dump error...
Kindly suggest on this problem...
Thanks in advance...
Bharat.

Hi,
the program you got is it a copy from a SAP QUERY created on TCode SQ01 ?
If yes got to Tcode SQ01 draw a new one and see the report generated
Best Regards
Jaime

Similar Messages

  • How to add new codes into SAP Query/Infoset

    Hi Experts,
    First time working with SAP Query.
    I need to enhance an existing Query to add a new field into a report.  I have added new tables into this Infoset and joined my new  tables with existing tables and able to extract the new fields out on the report.  But here are my problems:
    Example of original output:
    X88888 500000
    X99999 400000
    Example of new output after adding my 2 new tables to get 1 new field to output:
    X88888 50000  01/08/2009
    X88888 50000  01/25/2009      <--- for X88888 customer, I want only this record w/ latest date to be output
    X88888 50000  01/22/2009   
    X99999 40000  03/09/2009
    X99999 40000  04/18/2009
    X99999 40000  04/19/2009      < -- for X99999, I want only this record w/ latest date to be output
    Where/How i can add the code to control this logic so that only 1 record per customer with the highest date can be output.  I looked at the query program and it looks very confusing and hard to understand.
    Please advise,
    Thanks,
    Sam

    Hi Sam,
    Instead on adding new table/tables , better way to use Direct Read from your single table.
    Please read the below steps to suffice your requirement.
    Assumption: Let your original table be A and second table is B.
                            Tables A and B are having field X1 and X respectively, using these fields, they can be joined.
                             You want field date1 of table B.
    Infoset Changes:
    1. Go to SQ02 (Enter Infoset name, click on Change button)
    2. Create an extra field E_date of type date (Sy-datum), by clicking on 'Extras' (F5) button.
    3. Select that field in one of the field group of your Infoset.
    4. Click on Code Icon (Shift+F8) displayed on application bar, you will be getting lists events in 'Code section'.
    5. In Data Section , declare an internal table like below code (here pseudo code)
    data: begin of itab_date occurs 0,
                       date1  like B-date1,
                       end of itab_date.
    6. In Recod processing Event write the following code.
    CLEAR itab_date.
    CLEAR E_date.
    SELECT date1 FROM B into table itab_date                           " Retrieving date field from table B
    WHERE X = A-X1.
    Sort itab_date by itab_date-date1  DESCENDING.                 "Sort internal table B in decendind order on date1
    READ TABLE itab_date index 1.                                            "Read first record of interanal table
    E_date  = itab_date-date1                                                      "Assigning top most date of internal table into field E_date.
    7. Generate the Infoset
    Query changes
    1.Go To SQ01 (in a new session),
    2.Give your Query name, click on change button, and select that field group in which you have added extra field.
    3.Select extra field.
    4.Go to basic list to select that field in your O/p list.
    5.Click on Test button, and see if you are getting desired result.
    Please let me know if you need further details.
    Regards,
    Dinesh

  • Need to add new column in SAP Query - Please guide me in this regard

    Dear All,
    In SAP Query, I need to put a new coulmn of each record for the difference of Billing date and PGI date as a work days.
    eg: Billing Date = 02.05.2008
         PGI Date = 08.05.2008
    Take a Variable i.e. Days = Billing Date - PGI Date that will display as 5 days by excluding Saturday and Sunday.
    After doing calculation of these work days for each record, we need a to add a new coulmn in that record as field lable as "Work Days" and display.
    Please Guide me in this regard
    Regards,
    Sateesh.

    Hi Rama,
    In SQ01 when you are in the fields (first would be attributes, when you click next it takes you to field groups, and again when you click next if takes you to fields tab) check the following menu path
    EDIT -> LOCAL FIELD -> CREATE
    You can define the formula as per your requirement and populate the field.
    Hope this is helpful.
    Thanks,
    Pavan

  • Creating a new column in SAP reports

    Hi All,
    I need to add a new column in, Financials -->  Financial Reports --> Accounting --> General Ledger.  When I try to create a column, it says Column already exists.
    Kindly advise me if it is possible to add new columns in SAP reports.
    TIA,
    Satish. B.

    Hi Satish,
    you can't add a column to a system matrix using UIAPI - the only way is to add a userdefined field
    And check this thread..
    New column in Standard Report
    Hope it helps,
    Vasu Natari.
    Edited by: vasu natari on Jul 22, 2009 7:38 AM

  • Add a new Components into SAP

    Needs to Add a new Components into SAP. Is any SAP tool is available to do the same.....

    Hi,
    For add-on's you can use transaction SAINT.
    I am sure this has been answered many times before.
    Regards,
    Vishnu.

  • Add a new column into repository

    hi
    In BI11g, how to add a new column into repository?
    Thanks
    kavi

    Hi kavitha,
    If your adding a new column to the physical layer or BMM layer the process is same as 10g.
    Steps:-
    1) Right click table where you want to add the column.
    2)Select new object >>physical column/BMM column
    3) Enter your choice labelling and data type,if needed formula.
    4) Click ok and you can see the column being added on to the table.
    CHeers,
    KK

  • Bringing in Additional Fields into SAP Query

    Hi,
    I'm new to SAP Query. I had to modify an existing report to bring in an additional field from one of the tables of the query. When i look at the tables in query, i don't even see the field i would like to add under the table. I guess it needs to be first bring into query and later i can add. Can someone help me how to do this?
    Thanks in Advance.

    HI,
    IN SQ02, IF table is already in JOIN, just click on the PLUS sign to expand the strcture.
    All the field showing Plus sign in the strcture are selected in your query and with MINUS sing are no selected.
    So you have to just click on the MINUS sign for the field you want to use through table field.
    Generate the query and execute thriugh SQ01.
    If you want to add some other field which is not a part of JOIN,
    then click on EXTRAS Button shown in the MENU option.
    Click on Create button and system will ask abt the additional field.
    Regds,
    Anil

  • Addition of a new column to the standard program

    Hi Friends,
    I have a requirement to add a new column Group Key to the existing report a standard program RFD0PR10 and display the fields based on the group key .
    The standard program uses methods write _header etc...
    can any one guide me in this issue.

    hai naveen,
                        For standard tables, it is possible to add new columns by using either .include or
    Append structures. but,it is not possible to change key of the existing of table .
    if useful, reward points
    bye
    G.V.K.Prasad

  • SAP SRM UWL Addition of new columns

    Hello All,
            i am having a requirement where in i need to add new columns in the SAP UWL tasks list.Please let me know the procedure for this.
    Thanks,
    Kiran.

    Hi,
    Check this document to add or remove columns in UWL;
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a3461636-0301-0010-3787-978f5ac8bd45?QuickLink=index&overridelayout=true
    Hope this helps.
    Cheers,
    Vinoth.M

  • Addition of New Column name "Qty" in user defined layout for CJR2

    Hi Friends,
    I am going thorugh variurs posts but could not a fetch correct answer. If that was available and missed, sorry about that.
    My requirement is, wanted to have new user defined layout which would be copied from 1-701 (CJR2). The layout should have new column which would be named as "Qty".
    Note that I tried to change name after pulling new fileds from left side to right hand side but these fields are grayed out in change layout.
    What is the work around solution to have new column and tthis wouold be named as "Qty". Let me ask one question is it possible to add new fields name to standard layout like 1-702 other than what it has been delivered by SAP????.
    Looking forward to hear from and thanks for your efforts.
    Regards,
    Sudhakar

    Have you tried MENU > Edit > Columns > Append additional fields?
    I think you can not choose any other characteristics other than SAP has provided which is mentioned in SAP Help.
    Regards,
    Mahendra

  • Addition of new column in Transaction VL10G

    Hello Experts.
    My requirement is that USER want to add new column in Transaction  VL10G
    There two plant in which Ware house management is activated. while creating delivery from Transaction VL10G from these two plants, Storage type column should be added in layout in delivery creation screen.
    Storage type column should be appear after executing VL10G for Ware house managed plant only.
    please help me in that ,is there any configuration or USER Exist which can fulfilled my requirement. ?
    waiting for reply.....its quite Urgent
    Regards
    Pash@SD

    Hi
    Go to report V50R_USEREXITS and see these includes
    * 1. Add field to list-display
    * Userexits for additional fields on list display
    * use append-structure in DDIC at structure SHP_VL10_ITEM
    * and ad field value in one of these routines
    *INCLUDE LV50R_VIEWG02.       "POS_ITEM_FILL_USER:       SD/MM-orders
    *INCLUDE LV50R_VIEWG03.       "POSTAB_VEPVG_FILL_USER    SD-Index
    *INCLUDE LV50R_VIEWG06.       "POSTAB_VETVG_FILL_USER    MM-Index
    *INCLUDE LV50R_VIEWG07.       "POSTAB_DELIVERY_FILL_USER Delivery item
    See also SAP Note 421791 - VL10: Including new fields in the shipping due date list
    Regards
    Eduardo

  • HOW TO ADD NEW COLUMN IN EXISTING QUERY

    hi,
    i m working on oracle reorts 10g. i have a multiple query based report. now i want to add a new column in query 1 and order by on that new column .
    i added column in query but when i see that group i dont find that column in that group.wt do i need to do to visible that column in query1 group thats y the order by on that column is not working i think.
    tell how to solve it ?
    thanks

    Hi,
    The new column you have added might be in the least level group of that query.
    Drag it to the desired group level, first postion and set the break order for that item in the property pallette..
    (If still the item not coming, check whether you have put 'comma' in the select query after writing the column name)
    Simply giving the column in the order-by clause will not work in report.
    In Report, record display order is completely based on the break-order of the items given in query-groups
    If you change accordingly it will work
    Regards
    Dora

  • How to Hide Empty Column In SAP Query (SQ01)

    I was crated a report in sq01 based on business requirements , but there are some fields without any content , in sq01 if you select one of output fields in the right side of the screen in the left side you can see  "List Fields" T in the list fields there is a check box , the name is "Only display field if <> 0 " , but when i check it, it doesn't work  , guys is there any one to help me to eliminate column without content , in the result of sap query (sq01) ??

    Please give reference (or hyperlink) to 10 Useful Tips on Infoset Queries (original document)
    Regards,
    Raymond

  • SAP Query - Adding new fields to SAP query

    Hi experts,
    I got an issue to work on SAP query.
    I have Transaction code and need to know the infoset to add additional two fields to the existing output.
    Please let me know how to find infoset/ Query for the specfic transaction and how to add fields.
    Regards,
    Venkata

    first check the transaction code given to you.. if it is report transaction (check using SE93), then get the report name for example AQFKTES_SGS_IV==MMIV0003======, then after aQFK,TES_SGS_IV woulbe be your user group and MMIV0003 would be your query. Now go to SQ03 with the user group (you need to check the query areas also which would be Environment---> query areas) because some can be client depended some can be just cross client. and then go to sq01 from user group. It will direct you to the queries of the user group you mentioned in SQ03. Now you should be able to find the query you are looking for. The infoset will also be displayed linked to the query. The infoset can be displayed via SQ02 transaction.
    If it is parameter transaction code, you need to check the parameter values to find the query details. Rest of the approach is same as mentioned above.

  • Integrating new acquistions into SAP : Approach

    Hi
    Our Client has decided to integrate one of their newly acquired companies into SAP.  As a key technical resource i have been asked to identify critical areas within RICEF developments. What would be a good starting point for me ? I am new to this kind of work and was hoping if anyone can help me with the broad picture or approach to get me started. I do not expect anyone to spoon feed me or provide exact solutions.

    No replies.
    Closing this old question.

Maybe you are looking for