Populating custom field in an existing sap query

HI,
I am making changes to existing query . Query already had a qty field, now I need to display the % of qty delivered for every
vendor  as a subtotal text for every vendor.
I added the custom field to query and can display it as subtotal text. But I am not able to populate the value into it.
Because, When I sort by Qty and sum by Qty, I am getting value. Now I need to divide the sum of qty / number of items, which i dont get until I display the output, So my subtotal text field is always zero.
I
I debugged the program generated by query, it is using select--endselect and putting in %dbtab(which is not defined in query) .
To get the final value, i cannot change standard code generated from Query/Infoset and add teh LOOP ..ENDLOOP and make At new logic for vendor.
Any suggestion on calculating the % of delivered qty,..
Thanks

if your query is based on an infoset, you just have to put the formula in code of infoset

Similar Messages

  • Adding new custom field in already existing custom tab for MM01

    Hello Guru,
    I have a requirement that add a custom field in already existing custom view of MM01. I did the following steps :
    1. I have cerated a new field in MARA using APPEND structure.
    2. I have found the function group(Y_FE_MARA) that already there other subscreens, so that I have added another subscreen in that function group and created a field from MARA in the screen.
    3. in SPRO went for the path Logistics General->Material Master->Configuring the Material->Define Structure of Data screens for Each Screen sequence
    In the 3rd step, I have choosen already existing screen sequence(Y1) and went for Data Screens and choosen for Custom tab and double click on subscreens and then I have added the program as SAPLY_FE_MARA and subscreen number(011) and saved it.
    After all the above steps, I have run MM02/MM03 then the field is not getting displayed in the screen of custom view.
    Did I miss any steps here? Please suggest me if I did something wrong.
    Thanks and Regards,
    Muralikrishna Peravali

    Hi Raymond,
    Thank you for the reply. As per the note some one already implemented the Screen Enhancement with 2 custom views. I need to add the field in any one of existing custom view. So for this I have created a Subscreen in copied function group of MGD1(Y_FE_MARA). But in the function group already 10 Subscreens were created. Is this is the problem? or else copy the FG MGD1 into another FG and create the subscreen will be feasible to my scenario?
    Please suggest me.
    Thanks and Regards,
    Muralikrishna Peravali

  • Add 2 new fields to an existing ABAP query in a particular position

    Hello,
    I have added 2 new fields to an existing ABAP query. These have been successfully added and the query is also executing.
    But these 2 new fields are displaying at last. I need to add these fields in a particular column position.
    Also I need to change the heading of these 2 new fields.
    I tried to do so from the basic list, layout design from SQ01.
    But I could not.... whatever I do.. the 2 new fields are displayed at the end of the list...
    Please help me

    Hi Andreas,
    Do you mean that I should create a complete new abap query?
    Is there no way to add some new fields at a particular position to an existing abap query?

  • Adding some new fields for display in SAP Query

    I need to add some fields for display in SAP query  01 of  infoset /SAPQUERY/AM01. So I have changed the infoset by checking the additional fields which is already in LDB. Then I created the query by copying the 01 of  infoset /SAPQUERY/AM01 to Zusergroup with reference to the same infoset. In the newly created query, I am just checking the newly added field in Basic list. If I generate the program for this query, I get a error.
    Pls let me know how should I rectify this.
    Regards,
    Jeyananth

    Hi,
    Before generating the query, adjust the query from the menu of SQ01
    Thanks
    Shiva

  • Modify existing SAP Query / Quickview

    Hello,
    Greetings!
    We have a requirement to modify an existing SAP Query. This query was created much earlier by a user who is no longer present.
    We have the query name, user group, and the program for the query. This query, we assume was created using tcode SQVI.
    However, in tcode SQVI, we cannot see the query as we have not created it.
    I understand that this is because the quick view has not been converted to query.
    I have referred:
    SQVI - Quick view modification
    http://wiki.sdn.sap.com/wiki/display/ABAP/QuickViewer
    In tcode SQ01, we are unable to see the query, as we get an error that the user group does not exist.
    In table AQLTQ, we get an entry for the query and the user group. But the user group does not exist in tcode SQ03 as well.
    In this case, how to we convert the quickview to query? Or is there any other way to edit the exisitng quickview/query?
    Kindly help.
    Best Regards,
    Smruthi

    Hello Suhas,
    Thank you for your reply.
    I checked in both the tables.
    There exists an entry only in AQLQCAT(Local or Client-dependent queries). We now have the infoset as well, along with the user group and the query.
    When I check for the infoset in SQ02, I get an error, "Infoset <infoset name> not created"
    The user group is the same as that found in table AQLTQ.
    Best Regards,
    Smruthi

  • ABAP query using logical database KDF is not populating custom fields

    Hi Experts ,
    I created two following queries
    1.       VENDORCATKDF – uses KDF logical database
    2.       VENDORCATLFA1 – uses table = LFA1
    I’m pulling the same information in both queries:
    ·         Vendor Number
    ·         Country
    ·         Vendor Name
    ·         Vendor Category  (custom fields added to LFA1)
    The results for the query that uses the logical database KDF is incorrect.  It doesn’t pull in the flag on the custom field LFA1-ZMRO.   Even though the logical database KDF is made up of the table LFA1 and has these fields. 
    Is there something that can be done – so that all of these “custom” category fields under LFA1 (such as LFA1-ZZMRO) – get pulled into queries – when we use the logical database KDF ?

    Hi,
    I have got the error removed by ensuring that fields from one table are a part of one line ( taking help of ruler) only. But the underlying problem remains, the output is not ALV but List output.
    I do not think having additional fields in the query is reason for this.
    Is it bcoz iI am adjusting the output length of columns to ensure no hierarchical error ?
    Can we not have a query using LDB which is shown as SAP List?
    Regards,
    Garima.

  • Output Technical Field Names in the SAP query Output

    Hi Experts,
    I am new to SAP Query/ABAP Query or Quick Viewer. Just would like to know if there is a way whereby I can print the technical field names as opposed to the English field headers. For example I want to print BUKRS in the place of CoCode.
    I have a vague feeling this could be possible through custom coding in SQ02 but have no idea which code section to choose.Any inputs greatly appreciated.
    thanks in advance,

    Hi Sreegopalan,
    Open your infoset in SQ02, by default in the left hand side you'll be having the tables that you have selected, double click the field name which you want change the long text, it will open a attributes window below your field group. Change the header data text as you wish.
    Please find the query documentation in the below link.
    [http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVQUE/BCSRVQUE.pdf]
    Regards,
    Nandha

  • How to add a Custom field in the Standard SAP Sales Order main screen

    Dear Experts,
    We have a requirement of adding a Custom field in the Sales Order screen. I know how to add the Customer field in the Additional data B tab of the Sales Order Header Screen as that is the screen user exit provided by SAP. Can someone tell me how to add the Custom field in the Sales Order main screen. Program Name - SAPMV45A and Screen Number - 4001. What is all I need to take care.
    Thanks,
    SNK.

    I have not added the Custom filed in the main screen and added in the Additional data B screen. So closing the message.

  • Replicating GR custom fields from EBP to SAP R/3

    Dear SRM Gurus,
    We are using SRM 5.0, extended classic scenario..
    We have created 3 custom fields for GR in SRM and we want to pass these custom field values to SAP R/3(4.6C). Is there any BAdI or function module to replicate these custom field values from SRM 5.0 to SAP R/3.
    Please do the needful..
    Thanks in Advance,
    Chandra Sekhar.

    Hi
    <b>Please go through the following links -></b>
    Re: Confirmation screen field to be mapped to backend field
    Re: Creating Confirmations in SRM - What is the preferred method
    Re: GRN IDOC Transfer to ERP  - MBGMCR01 ( 2 IDOCS created)
    Re: Problem to send idoc for a Good Receipt created
    GR IDOC Number
    Re: Idoc error in Goods confirmation - urgent
    Re: Delete goods confirmation in SRM3.0
    Re: SRM / MM integratuion: goods receipt
    IDOC MBGMCR01: CO Ctd-pedido exceeded by 1 UN:
    <b>Some useful SAP OSS Notes to refer -></b>
    Note 521488 - FAQ: MB_CREATE_GOODS_MOVEMENT
    Note 521427 - FAQ: IDocs for goods movements
    Note 521488 - FAQ: MB_CREATE_GOODS_MOVEMENT
    Hope this will definitely help.
    Regards
    - Atul

  • Blank Fields not coming in SAP Query

    Hi All,
    I have created an SAP Query through SQ01 to show Vendor Details. I have 5 master tables corresponding to Vendor Details: LFA1, LFB1, LFBK, BNKA, LFM1. All connected through LIFNR.
    Now, my problem is when i give a company code to fetch details of all vendors corresponding to that company code, It gives me details only when the all the lifnr selected in LFB1 (Vendor Master : Company Code) is present in all other table i.e LFA1, LFBK, LFM1.
    Now for one Company Code, Table LFM1 is not maintained, so if I select that Company Code, I dont get any line item in SAP Query. Ideally it shoudl be like, fields from LFM1 whould be blank but other fields from other tables should appear.
    Please suggest that is there any setting in SAP Query where we can give a sort of OR condition that if data is not maintained in a table, fields from those tables are left blank instead of those line items not appearing totally.
    Regards,
    Ravi

    How did you do? I try to do a query but I don´t get Information in Query when there is no Information in a SAP table, but I want get empty fields
    Please help me
    Thank you

  • BAPI_BUS2054_CREATE_MULTI - Populating custom fields

    Hi,
    I am using BAPI BAPI_BUS2054_CREATE_MULTI for creating WBS Elements.
    We have 18 custom fields at WBS element level.
    I am trying to populate the data for those 18 custom fields through EXTENSIONIN table parameter. 
    I am passing BAPI_TE_WBS_ELEMENT to the structure name & values to VALUEPART1. But after the BAPI call,
    its not creating any error or saving the data for WBS Element. 
    Note: i am passing WBS Element at starting position i.e., 0(24)  .  My custom fields starts from 25(3) position onwards.
    Below is the code how i am populating the data to the EXTENSIONIN tables.
    data: lwa_extin       TYPE bapiparex.
    MOVE 'BAPI_TE_WBS_ELEMENT' TO lwa_extin-structure.
      lwa_extin-valuepart1+0(24) = wa_data-posid.
      lwa_extin-valuepart1+25(3) = '1'.
      lwa_extin-valuepart1+28(4) = 'BSUB'.
      lwa_extin-valuepart1+32(4) = 'CONT'.
      lwa_extin-valuepart1+36(3) = '132'.
      lwa_extin-valuepart1+39(6) = 'AUTH'.
      lwa_extin-valuepart1+45(6) = '301'.
      lwa_extin-valuepart1+51(26) = '1'.
      lwa_extin-valuepart1+77(5) = '1'.
      lwa_extin-valuepart1+82(21) = '1'.
      lwa_extin-valuepart1+103(11) = '1'.
      lwa_extin-valuepart1+114(15) = 'IL'.
      lwa_extin-valuepart1+129(50) = '1'.
      lwa_extin-valuepart1+179(50) = '1'.
      lwa_extin-valuepart1+229(11) = '1'.
      lwa_extin-valuepart2+0(10) = 'C'.
      lwa_extin-valuepart2+10(8) = sy-datum.
      lwa_extin-valuepart2+18(8) = sy-datum.
      lwa_extin-valuepart2+26(4) = '1'.
    APPEND lwa_extin TO li_extin.
        CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
          EXPORTING
            i_project_definition = lwa_pspid
          TABLES
            it_wbs_element       = li_wbsele_data
            et_return            = li_return
            extensionin          = li_extin
            extensionout         = li_extout.
    Can any one help me about this issue.
    Regards,
    Kris.

    Hi,
    Are you using 'BAPI_TRANSACTION_COMMIT' after BAPI call?
    If not then try to use as below,
    data: lwa_extin TYPE bapiparex.
    MOVE 'BAPI_TE_WBS_ELEMENT' TO lwa_extin-structure.
    lwa_extin-valuepart1+0(24) = wa_data-posid.
    lwa_extin-valuepart1+25(3) = '1'.
    lwa_extin-valuepart1+28(4) = 'BSUB'.
    lwa_extin-valuepart1+32(4) = 'CONT'.
    lwa_extin-valuepart1+36(3) = '132'.
    lwa_extin-valuepart1+39(6) = 'AUTH'.
    lwa_extin-valuepart1+45(6) = '301'.
    lwa_extin-valuepart1+51(26) = '1'.
    lwa_extin-valuepart1+77(5) = '1'.
    lwa_extin-valuepart1+82(21) = '1'.
    lwa_extin-valuepart1+103(11) = '1'.
    lwa_extin-valuepart1+114(15) = 'IL'.
    lwa_extin-valuepart1+129(50) = '1'.
    lwa_extin-valuepart1+179(50) = '1'.
    lwa_extin-valuepart1+229(11) = '1'.
    lwa_extin-valuepart2+0(10) = 'C'.
    lwa_extin-valuepart2+10(8) = sy-datum.
    lwa_extin-valuepart2+18(8) = sy-datum.
    lwa_extin-valuepart2+26(4) = '1'.
    APPEND lwa_extin TO li_extin.
    CALL FUNCTION 'BAPI_BUS2054_CREATE_MULTI'
    EXPORTING
    i_project_definition = lwa_pspid
    TABLES
    it_wbs_element = li_wbsele_data
    et_return = li_return
    extensionin = li_extin
    extensionout = li_extout.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        WAIT = 'X'.

  • To add custom field in MIRO in SAP ECC 6.0

    Hi All,
    I am using ECC 6.0 version of SAP.
    I want to add a custom field inside the DISPLAY tab on the MIRO screen.
    Please give me any pointers for any USER EXIT or OSS note for MIRO screen so that we can add a custom field under the display tab on the screen.
    Regards,
    Gaurav Joshi.

    hi ,
         but in miro tcode i hav'nt seen display tab ...
    but for miro screen customer exit is LMR1M001
    REGARDS
    Aniruddh Singh

  • Populating custom fields

    I'd like to be able to populate a custom field with keyboard commands. This would be analagous to using option-1, etc., to add keywords to the Keyword field.
    My custom field is called 'Type', and the population consists of Tree, Palm, Patio Tree, Shrubs, Vines, Aquatics, Annuals. I want to assign keyboard shortcuts for each of these terms and have the term populate 'Type'.
    Is this even possible? I spend a fair amount of time with the Command Editor, but didn't see anything. Of course my fallback is to simply use keywords, but as I am already about a third through 5000 images, I'd like to continue.
    Thanks.

    The organizational uses are important.  Grouping like Keywords as children makes them much easier to find and use when using the Keywords HUD.  And being able to collapse your Keyword HUD into a manageable number of top-level categories (just like an outline) is helpful in many situations.  But the big advantage is this:
    Using a parent Keyword as a category puts an entry in the Filter HUD whenever any on of its children Keywords are assigned to an Image in the currently active container.  Thus you can filter any container easily using the Rule {"Keyword" "includes any of the following" "yourParentKeyword"}, and the filter will select all images that have a Keyword that is a child of "yourParentKeyword".  (This saves you having to troubleshoot the results when you forget to click "Vines" while hunting down and clicking "Tree, Palm, Patio Tree, Shrubs, Aquatics, Annuals".)  With a well-structured Keyword hierarchy, this can be extremely useful.  At its simplest, you could filter Photos view as {"Keyword" "does not include" "Type"} and immediately identify all Images to which you have not added a "type" Keyword.
    As a general practice, I promote specificity over concision.  In this case, you should, imho, avoid the un-specific label "Type" in favor of something that will always specify its meaning to any user, such as "Type of Plant".

  • Adding Custom Fields - Application Enhancement Tool - SAP Library

    To add a comment, please log in or register on the top of this page and choose Reply. Please write your comment in English.
    You can also go back to the SAP help page.

    Hi,
    AET(Application Enhancement Tool) is able to create custom field for almost all CRM application.
    Please go to transaction AXTREG to see which "Business Object" is enhanceable.
    AET is also able to create custom field for ERP on CRM system. It will enhance the BOL structure which is shown in ERP_H component. However, you need to create the field on the ERP system as well. This is not supported by AET.
    Regards,
    Steve

  • Populating Customized fields in Sales Order Creation using BAPI

    Hi All,
    I have a requirement that, I need to populate 2 customized fields which are appedned in the VBAK tables through Append structure. I am using BAPI_SALESORDER_CREATEFROMDAT2 FM for creating it.
    Could anybody tell me how to send these 2 coustomized field values in this BAPI using EXTERNIN parameter.
    Regards
    Rajesh
    [email protected]

    Hi,
    To add data to custom fields there are two appraoches.
    <b>1)</b>Using the <b>EXTENSIONIN</b> in the Tables option in the FM <b>BAPI_SALESORDER_CREATEFROMDAT2</b>
    Check the Documentation for the same,
    <b>Customer Enhancement for VBAK, VBAP, VBEP</b>
    <i>Description</i>
    You can use this parameter to transfer user-specific enhancments to a BAPI. The customer has to complete the EXTENSION structure and the system automatically continues processing it. If you have not defined any user-specific fields, then you can transfer a blank EXTENSIONIN structure.
    <b>Technical information about Customer Enhancements</b>
    The following description uses an example to explain how to proceed with customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.
    The customer has added their own fields to table VBAP using the INCLUDE structure CUTEST. This structure contains 2 fields:
    CFIELD1, CHAR 10
    CFIELD2, CHAR 3.
    The customer also requires that these two fields can be maintained with the BAPI.
    1. Maintain structure CUTEST in table VBAP
    2. Because the BAPIs work with checkboxes, you must also define a CUTESTX checkbox for the customer structure. It should be structured like this:
    Field name       Data element
    CFIELD1            CHAR1
    CFIELD2          CHAR1
    3. Define these customer structures in the structures VBAPKOZ und VBAPKOZX using INCLUDE or APPEND.
    4. Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI structures using the APPEND technique.
    5. Adjust the following structures for customer enhancements to table VBAK:
    a) VBAKKOZ
    b) VBAKKOZX
    c) BAPE_VBAK
    d) BAPE_VBAKX
    6. Adjust the following structures for customer enhancements to table VBEK:
    a) VBEPKOZ
    b) VBEPKOZX
    c) BAPE_VBEP
    d) BAPE_VBEPX
    7. Generally, the data should be added to the BAPI interface in the internal communication structures (VBAKKOM, and so on). There, you can process the data in the SD tables (VBAK, and so on).
    8. If the EXTENSIONIN parameter contains customer data, you must complete at least the key fields in the relevant standard parameters.
    <i>For example:</i>
    You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.
    The following entries are expected:
    Import:     BAPIVBELN-VBELN       = '0000004711'  Document number
                BAPISDHD1X-UPDATEFLAG = 'U'           UPDKZ for doc header
    Tables:     BAPISDITM-ITM_NUMBER  = '000020'      Item number
                BAPISDITMX-ITM_NUMBER = '000020'      Item number
              + BAPISDITMX-UPDATEFLAG = 'U'           UPDKZ for item
    You must complete the EXTENSION table as follows:
    STRUCTURE                          VALUEPART1       1234561234567890123
    BAPE_VBAP                       0000004711000020                 XYZ
    BAPE_VBAPX                      0000004711000020       X
    <b>Further Information</b>
    You can find more information in the BAPI programming guide in the chapter for enhancements to BAPIs.
    Notes
    You must complete the STRUCTURE field with the name of the relevant enhancement structure (BAPE_VBAK, BAPE_VBAP, BAPE_VBEP). You can complete the remaining fields with the append structures from the enhancement structures.
    At the moment, you can use the BAPI to store enhancements in the following structures:
    VBAK : An enhancement to header data requires an append structure to BAPE_VBAK and an enhancement to structure VBAKKOZ.
    VBAP : An enhancement to item data requires an append structure to BAPE_VBAP and an enhancment to structure VBAPKOZ.
    VBEP : An enhancement to schedule line data requires an append structure to BAPE_VBEP and an enhancement to structure VBEPKOZ.
    VBKD : If you are using an enhancement for header data, you must add an append structure to BAPE_VBAK. You also need to enhance structure VBAKKOZ. If it is for item data, you need to add an append structure to BAPE_VBAP. You must also enhance structure VBAPKOZ.
    If you also want to work with checkboxes, each X-structure must also contain an append structure.
    For example:
    A customer has created an order and wants to include the material long text (50 digits long).
    The EXTENSIONIN structure must be completed with BAPE_VBAP. Two fields have fixed definitions in this structure. These are in the VBAP host key (VBELN, POSNR). The customer sets up an append structure that contains field ZMAT50.
    Because the VBELN is normally blank when you create an order, the data can look like this:
    STRUCTURE   |BAPE_VBAP
    <b>2)</b> Create the Sales Document using the FM and when successfully craeted you will get the Sales Document No in the Export parameter <b>SALESDOCUMENT</b>.
    After its created and Committed using <b>BAPI_TRANSACTION_COMMIT</b> , do a <b>BDC</b> recording for the same to (<b>VA02</b> Change Sales Order) update the fields only and save the document.
    Regards,
    AS

Maybe you are looking for