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

Similar Messages

  • 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

  • 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 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

  • How to add new fields in SAP-Query

    Hi,
    Can any body tell how to add new fields to the existing query.
    Thanks a lot,
    Bhaskar.

    hi,
    when we create internal tables like. in final table you can include the extra fields.
    data : begin of itab_mara,
             matnr like mara-matnr,
             erdat like mara-erdat,
             end of itab_mara.
    data : begin of itab_marc,
             matnr like marc-matnr,
             werks like marc-werks,
             end of itab_marc.
    data : begin of itab_final,
             matnr like mara-matnr,
             erdat like mara-erdat,
             werks like marc-werks,
             date like sy-datum,
             status(10) type c,  * new fields
             end of itab_final.
    <select statement>.
    Append all the fields to itab.
    loop at itab_final.
    write :/ itab_final.
    endloop.
    Reward with points if helpful.
    Message was edited by:
            Vinutha YV

  • 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

  • How to add new columns in materialized view

    We are using Oracle 10g Release2.
    We need to add new columns to a prebuilt fast refresh materialized view. We want to add 4 new columns in this table and make them part of select statement in the materialized view. We can drop the view but we cannot do complete refresh after that because the paymentsInfo table has a creation_timestamp column which is populated by before row insert trigger with systimestamp. If we did the complete refresh, all values in this column shall be changed.
    CREATE MATERIALIZED VIEW  paymentsInfo
    ON PREBUILT TABLE
    REFRESH FAST
      ON DEMAND
      START WITH SYSDATE
      NEXT SYSDATE+5/1440
      WITH PRIMARY KEY
    DISABLE QUERY REWRITE AS
    SELECT PAYMENT_ID,BATCH_REFERENCE, TRANSACTION_REFERENCE, NO_OF_TRANSACTIONS, DEBIT_ACC_NUM,... from payment@dblink
    I want to know is there any other way to add new columns without losing any changes from the master table.
    Thanks.

    There is no way to add new Columns to Materialized view. To add new columns, it has to be dropped and re-built again.
    Extract from Oracle Documentaion:
    Use the ALTER MATERIALIZED VIEW statement to modify an existing materialized view in one or more of the following ways:
      To change its storage characteristics
      To change its refresh method, mode, or time
      To alter its structure so that it is a different type of materialized view
      To enable or disable query rewrite
    If you have a problem of Complete refresh, then It may be beneficial to get the backup of the MView; Drop and re-create it with modified definition; Restore the backup data leaving the new columns untouched (assuming they are to be kept as fetched from the Master site).

  • Add New column in the Display Specification: Hit List (CGE2)

    Hi,
    My Scenario is to add new columns (AUTHORIZATION GROUP and CREATED BY) in CGE2 T-code.
    At the hitlist of the workbench in transaction CGE2 there can be selected several columns(Ex:specification,Desc.specific.type,packing name etc), but we need to add new columns for (AUTHORIZATION GROUP and CREATED BY) for the perticular specifications.
    Please let me know how to make the changes for standard things or any exists or badi's are available..
    Replies would be appreciated.
    Regards,
    Raghava

    Try to check whether there is any enhancement spot available and create a spot.
    Example: sample steps for doing it.
    If you are trying to modify standard program. Ex: RV60AFZZ
    1) Go to SE38
    2) Display program RV60AFZZ
    3) Switch to  Front-End Editor (New)
    4) Click Spiral icon(Shift+F4) on the tool bar
    5) From Menu options EDIT-->Enhancement Operations --> Show implicit enhancement options.
    6) Now on the left hand corner you will see and arrow indicator where you can enhance the code. select the line example for this program Line 39, from menu EDIT--> Enhancement Operations --> create. on pop-up include the new column.
    I hope above example will help you to close the thread.
    Regards,
    Sairam

  • Using arrow keys to add new columns to text frames

    Is dragging a text box or the mouse as you push the arrow keys to add new columns or rows, specific to CS5? Does this only work for MAC or is it also good for PC?

    CS5 or CS5.5, either platform.

  • Add New Column in ALV Report of Standard SAP ME28.

    Hi anybody,
    I want add new column in alv report of standard SAP Program ME28 Screen.
    Add Last PO Price column inside ALV Report ME28 Screen.
    Can u please anybody tell me how to add new column in ME28 Screen.
    Thanks
    S.Muthu.

    Try to find any BADI for the same
    Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any transaction.
    OR
    Also one more option is to copy ME28 and, make modifications to the copied program.

  • J1INMIS - To add new columns in the output display - Need of User exits

    Hi,
    Is there Userexits or BADI or Enahncements to add new columns and display in the output for t.code J1INMIS(TDS report - Showing Withholding Tax)?
    If so kindly provide me the details of the same.
    Thanks & Regards,
    Raja Senthil.

    I don't think there is anything for that Tcode. What you can do is append a structure to the WITH_ITEMS structure which is used as item level and then you might have to do some code in the report, maybe through implicit enhancements.

  • Add new column to report S_ALR_87013568

    All,
    I have given a requirement to add a new column in the sap standard report S_ALR_87013568.
    Any info how to enhance this report.
    1. one suggestion given by my collegues saying we need to new report. I don't have any info how this report is created. is this report created using report or some other tool ?
    2. Cloning of the same report into a new name and make changes.  is it right way ?

    This report is developed by using report painter.
    you will be able to add new column by changing th report layout / form. you can do this in CJE4. or else create new form by copying the form 11ERL1E and change the columns. then you create a report in CJE1 assigning the above form.

  • ADD a column in a query

    Hi
    I want to add a column in my query.
    This column is the sum of the net value and the tax ..please how can I do this without refering to ABAP development..
    thanks in advance

    This is not an SD question and you might want to use Search (and include other forums) in the future.
    There is no ABAP needed for such basic calculations in queries. In SQ01, this can be done in the 'Select field' screen (it's the 3rd screen where you select which fields will be included in the query.
    First, assign short names to your Net Value and Tax fields. Go to the menu Edit -> Short Names -> Turn On/off. This should open another column to the right from the field names. Enter the names, say NET and TAX.
    Then create a new local field. Same menu, Edit -> Local field -> Create. Give the field some name (TOTAL), assign a type ('Same field as -> use Net field or whatever is suitable). Enter formula NET + TAX and save.

  • Add new column in RFUMSV00 program

    Hi,
    I am new in abap. I have requirment to add new column in VAT report. I have copy RFUMSV00 program to  'Z'  program and want to add new column in 'Z' program. The column is BSEG-ZNUOR(Assignment).How can i add a column in report and how to retrive data from BSEG table, If any one have code like this requirment , please give me some idea about this.
    Thanks in advance.
    Regards,
    Sourav

    you need to read program carefully first possible than do debug.than find the exact location where system ALV generates here you need to add your field.
    May be i it helps you.
    search with term in mention prg ASSIGN gt_alv TO <gt_alv>.    you will get idea where you need to add your own field
    Edited by: Amit Gujargoud on Aug 27, 2008 9:44 AM

  • How to add new column in Report ME2L

    Dear Sir,
    We are using ME2L for various purposes . In the ME2L report we need to add 2 new columns i.e Item Delivery Date and WBS Element .
    Although in the standard ME2L report , after the basic list generation , there have been provided 2 icons for getting the report displayed  with either WBS Element or with Delivery Date .  It means we can not get both the column Delivery Date and WBS Element  available simultaneously in the standard ME2L report .
    We request you to kindly guide us as how can we add these column in the ME2L report pl .  We are on ECC-6.0 and not having enhancement package 4.0 .
    Kindly help us pl .
    Regards
    Sonia Agarwal

    HI  Pradeep,
    Goto the transaction code (Change Report) GR32.
    Give you library name and report name
    And click on the column (application tool bar or F7) button then place the curser on the screen where you want column (please note you have to keep curser on the header section u2013Red column text) right click and insert element. Then you select formula as selection element  and enter. You will get the enter formula box. Then you can type your formula and continue. This will add new column to the report.
    How to enter formula: you can see the formula components in that id and description.
    Id is columns that are present and description indicates explanation of that column.
    Enter formula according your requirement.
    Examples:
    Enter formula screen:
    ID :    des
    X001  amount
    X002  pt000
    X003  test
    1. Enter formula as: ( X001 u2013 X002)
    The above formula is for fist column u2013 second column.
    2. ( ( X001 u2013 X002) / X003) * 100
    First column u2013 second column and devide by third column after that multiple with 100.
    Hope this will help you
    Regards
    Manohar

Maybe you are looking for