Sap Query custom field assigned to wrong field group (in extract)

Hello,
I want to add an extra field to InfoSet /SAPQUERY/MEBANF at EBAN level. I added a field in a normal way:
I fill it with a constant value. I adapted Sap Query:
In result, I got the value in new column but only for certain rows:
The value is there only for EBAN rows which have EBKN entries related.
I checked the program, and my new field is added to field group %fg07 with some other fields from table EBKN (not EBAN):
Fields from field group %fg07 are inserted to extract only in event get EBKN, so if there is no entries in EBKN, my field will not be inserted into extract:
I tried a lot of things (assigning my field to new field group in InfoSource, adding a field on EBKN level). I can say that every extra field created by me was assigned to field group &fg07.
Am I doing something wrong?
The target is to add new field in the document overview panel in ME2xN transaction. I know that there is user-exit EXIT_SAPLMEQUERY_002 where I can specify a Z* query. But this solution requires a copy of InfoSet and query to Z*. Adding a new field to standard Sap query is the fastest way.
Message was edited by: Rafal Matuszewski
Now I tried to append EBAN table with my Z* field. I regenerated InfoSet and query but the result is still wrong:
insert EBAN-GSFRG into %fg06.
insert EBAN-ZUGBA into %fg06.
insert EBKN-VBELN into %fg07.
insert EBKN-AUFNR into %fg07.
insert EBKN-KOSTL into %fg07.
insert EBAN-ZZDELIV_DATE_MRP into %fg07.   <-- here again the Z* field is assigned to field group related to EBKN table

Thanks Sandra

Similar Messages

  • SAP Query for difference of 2 currency fields

    Hello Experts,
    I have created a SAP query in which I need to fetch data from only 1 custom table through "direct read of table" method.
    I have also added an additionl field in the query output and the field name is "Difference" (difference between 2 currency fields).
    Please help me out in writing the code for this additional field which gives the difference of 2.
    Ex: there are 5 fields A, B, C, D and E to be displayed in output of SAP query. I have added additional field X. So please help me out to write the code which gives difference of A and B fields.
    Thanks,
    Tousif

    Hi,
    By using t-code SQ02. Use option direct read from table. Then move forward. you have a code option, click on it.
    Here you declare your data as same as your report.
    On coding section, you get a option of events. use event and move you code forward as per your requirement.

  • SAP Query Custom Field with ABAP Code

    Hi All,
    I have a custom field in my SAP query which has some ABAP code under it. The code finally writes some value to a variable. My question is do i need to explicitly link the variable in the ABAP code to the custom field OR it's done automatically. For some reason i don't see any value for this custom field. Thanks.

    Thanks Sandra

  • Material Master possible to have field assigned to 2 field sel. groups?

    Hello
    Division (MARA-SPART) is currently in field selection group 15 along with 5 other fields.  This group is assigned as mandatory for my material types. 
    I have two new material types and I want to make several fields mandatory, including Division from group 15.  However, I don't want the other 5 fields from group 15 to be mandatory for the new material types. 
    Can a field be in two field selection groups?
    How can I set this up if not?

    hello,
    move mara-spart in another field selec. group (i.e. 299 if it's free).
    now in f.s.g 15 you have the other 5 fields mandatory...
    check the field ref. of your material type (OMT3E) and set it as optional in OSMR
    Regards,
    Mauro

  • Query changes getting assigned to wrong bex request

    We have set up several packages for bex objects by functional area (SD, HR, FI, etc.)  Once I release a particular bex request, I expect that I should not be able to make a change to a query within that functional area until I assign a new bex request for that package.  This is not the case.  As long as there is a bex request available from one of the other functional areas, any new changes to this query will be recorded in an existing bex request.  Has anyone had this problem before?
    I have confirmed that all of the query elements of a particular released query are assigned to the correct package yet changes are permitted and being recorded in a request assigned to a different package.
    Any help is greatly appreciated.
    John

    Thanks for all suggestions but if I would have just read the help I would have figured out what I was doing wrong.  1) I did not immediately create a new bex request for my functional area after releasing the last assigned request. 2) I did not create a standard bex request for all bex changes that are not assigned to a special package.
    So in my scenario, because we did not create a standard bex request and I did not immediately create a new bex request for my special package, changes to my query were being written to one of the other special packages by default.

  • Additional fields in SAP Query

    Hi ,
    We have a requirement in HR reporting wherein we are providing the late attendance records of the employees. That is the person is scheduled to come at a respective time but he comes in late and this record is created in attendence infotype . Now we need to see the variance in his planned and actual arrival . Majorly all the fields are availabe in the Infosets but the one with the variance is not there . So do we need to create a custom report for the same or it can be handled in the SAP query adding one field for calculation. If it can be handled , how can that be possible .
    Thanks & Regards

    Please check this link:
    Re: query report
    I guess, it can help for your case too...
    Even this:
    Re: sap query infoset and fieldgroup
    Re: Additional field in SAP Query
    Kind Regards
    Eswar

  • How to control field length in SAP query's report output

    HI everybody,
    I have one scenario in SAP query in which there are two fields in the report output:
    Milestone descrition and milestone description Long Text.
    In CJ02 (WBS element overview), these two fields are populated with some text.
    If description is exactly same as LOng text, long text is NOT getting displayed in output.
    If long text is having more characters than description then only long text gets displayed in the output.
    Do we need to change infoset or query settings? I haven't handled SAP query programming before.
    PLease give some suggestions how to achieve this or I have to write custom report.
    Any inputs on this will be highly appreciated.
    Regards
    Kaushal

    Hi,
    Refer to this link..Additional field in SAP Query
    [Creating Additional Fields |http://help.sap.com/saphelp_nw04/helpdata/en/d9/9958e0c50a11d396f80000e82de14a/frameset.htm]
    [Code|http://help.sap.com/saphelp_nw04/helpdata/en/d9/9958e0c50a11d396f80000e82de14a/frameset.htm]

  • Concatenate 2 fields in SAP Query

    Hello,
    We have a requirement where we have developed a report in SAP query, but we require a local field to basically give the concatenation of two fields detailed in the info set (EKPO-EBELP & EKET-ETENR)
    Can you help me with how to learn to do this?
    Many thanks
    Steve

    Hi Rich,
    Yes, I figured the code would be something like that, however, when I generate the infoset, I get the following:
    Global syntax check
    Additional Fields
    Error in code for additional field ITSCH
    The last statement is not complete (period missing)
    I have placed the following code in the Additional fields/structure section
    Concatenate EKET-EBELP EKET-ETENR into ITSCH
    Can you help with what is probably a simple issue?
    Many thanks
    Steve

  • Text of additional fields on SAP query show blank

    Hi All,
    I'm encountered a problem when text of additional fields on SAP query is not working and it's show blank after HRSP is implemented.
    SAP_ABA : Rel. 701 Lvl. 3
    SAP_BASIS: Rel. 701 Lvl. 3
    SAP_HR: Rel. 604 Lvl. 8
    Below are the config that we have done before HRSP in table: TEXC_FLD_C and it's work perfectly.
    Table Name: P0000_AF
    Field Name: ZZAPPRATING
    Function Module: ZHRGYYFMPA_PDRATING_TEXT
    Exception Priority: 1
    Object Type Name: CL_HR_TEXT_IDENTIFIER
    During debugging, we found that program (Form: %_GET_PERAS) is retrieve text of additional fields based on structure P0000_AF. At this point, text of fields are successfully take place and filled. However, program try to retrieve the text based on structure P0000 again right after that. Due to additional fields are added on P0000_AF not P0000 and no ZZAPPRATING field found in P0000, hence program has cleared the text which filled in previously. This give the result, text is blank.
    Please advise, how should I get this resolved.
    Thank you very much.
    Best Regards,

    Please check this link:
    Re: query report
    I guess, it can help for your case too...
    Even this:
    Re: sap query infoset and fieldgroup
    Re: Additional field in SAP Query
    Kind Regards
    Eswar

  • Problem Querying Oracle Forms Using a Date Field and a Format Mask

    Hello,
    We are experiencing a problem with Oracle Forms that I was wondering if you can help me with.
    We have several Forms that have single database blocks assigned to Oracle tables. The Forms are queryable and one of the fields we’re querying on is assigned to a field on the base table which is Not Null and has a Type of DATE. We are storing date/time information in this field on the database table. The item on the form is set up as a Date field with a Maximum Length of 7, a Format Mask ‘MMDDYY’ and having a Query Length of 10.
    We’ve seen a discrepancy in how these fields are used to query the base table block. On some user’s computers they are able to enter a 6 digit date followed by the % sign (e.g. ‘091808%’) and they get the expected results. Other users get ‘FRM-40301: Query caused no records to be retrieved. Re-enter’. Do you know why we are experiencing this difference?
    - The Oracle Database version we are running is Release 10.1.0.5.0.
    - The Forms Developer version that we’re experiencing the problem with is 4.5.10.15.2
    Thanks,
    Kris

    There is no obvious reason that I can see.
    Version 4.5 is very old so you might have problems calling Oracle Support. If you can reproduce the same problem o0n 10.1.2 you should call have them analyze the problem.

  • SAP Query error for VBAK and KONV tables

    Dear Experts,
    Want to create SAP Query for below requirement but faced some error
    Step1) Extract the data from VBAK table w.r.t.  order type ,  Sale org and date range
    and collected the Sales order numbers and doc. condition record (KNUMV)
    Step 2)In table KONV (Transactional condition record data) in this table provided input as doc. condition record (KNUMV) with respect to condition type ABCD
    Manually i extracted data, there is no problem .
    But customer want to generate SAP Query for above requirement
    I tried to create but in t.code  SQ02 when i tried to join the table VBAK and KONV i faced the below error
    Table KONV cannot be used in a join.
    How  can I create SAP query for above requirement ???
    if its not possible then create Z report is the only solution ??????
    Thanks in advance

    Hello
    You can not create Query report with joining KONV. But there is one solution for your problem. You can create Query report by using Database VAV. In this logical database you will find all SD tables and also KONV. Use only those tables and fields which you want in your query report. I have checked this and its working
    Please try this and update the forum accordingly.
    Edited by: moazzamjii on Jun 30, 2011 12:13 PM

  • Sap query AND sapnwrfc

    Hi all,
    I have a working "sap query" (sq01).
    This query prints the list of our material catalog (module MM).
    My problem is to write an external program that displays the same output.
    To this purpose I installed "sapnrfc".
    All works correctly: I can connect to SAP, read a table (for example MARAV) and output the content.
    In SAPGui (sq01), I selected "InfoSet Query" and then "Display field information".
    I see (for example) that the "Material Number" is stored in the table MARAV (field MATNR).
    The problem is that in my "sap query" there are a couple of fields that I do not know where they come from.
    Selecting "Display field information" for these fileds I only see:
    TXT_ITA (Additional field)
    TXT_TET (Additional filed)
    Where is this information stored ?
    Perhaps there is a view ... or a better method.
    Thanks for any help.
    Miche

    Dear Sathya,
    SAP does not allow you to rename SAP Query & Info set at a same time.
    Note:
    The system has to lock the following objects before you are able to use the Rename SAP Info set function:
    User group catalog
    Info Set catalog
    Query catalogs for user groups to which the Info Set that you are renaming is assigned,
    Queries using this Info Set
    Once all these locks have been set, the system can carry out the function.
    Renaming an Info Set can, however, be very time-consuming. These locks may also prevent other users from working in the system for as long as it takes to rename the Info Set.
    Thanks & Regards
    Dinu

  • Help with Query and report assignment

    Hi,
    I am able to attach 2 transactions (e.g. MM03 and ME23) to my SAP Query through report assignment.  My question is how do I skip the selection screen that asks me if I want to Display Material or Display PO?
    What i want to happen is in my report, if I click on the material - MM03 is called and if I click on the PO, ME23 is called.
    Is this even possible through queries?
    Cheers.

    Thanks for replying.
    I did as suggested and added the following at the start of my code.
    AT LINE-SELECTION.
    GET CURSOR FIELD FILD_NAME VALUE F_VALUE.
    I set a breakpoint in AT LINE-SELECTION and when I executed my query, it wasn't passing through it. 
    When I removed the line AT LINE-SELECTION, it passes through GET CURSOR FIELD, but FILD_NAME is not populated.  It's blank.
    Below is my code at the moment:
    data: fild_name(30), F_VALUE(50).
    *AT LINE-SELECTION.
    GET CURSOR FIELD FILD_NAME VALUE F_VALUE.
    if fild_name = 'MAT'.
    PARAMETERS P_MATNR LIKE MARA-MATNR.  "DD ref. as in MM03
    SET PARAMETER ID 'MAT' FIELD P_MATNR. "ID for MARA-MATNR
    CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
    endif.
    Appreciate any help.

  • Selection screen modification in case of SAP Query

    Hi All,
    I want to modify the selection screen in a standard progam.
    This program is getting generated through SAP QUERY.
    i want to modify some fields and also delete some fields in the
    selection screen. All these fields which i want to modify or delete
    are the logical database fields.So i can't do it through the t-code SQ01
    and SQ02. Also this is a program generated through the SAP QUERY,
    so i can't modify the generated code. Request if any one of you can suggest me to solve this.
    Waiting for a prompt reply!!
    Thanks,
    Rupesh

    Go to SQ02
    Select your Infoset-->Change
    On next Screen.
    Select GoTo->Code->Initialization.
    Write there code
    LOOP AT SCREEN.
      IF screen-name EQ 'SP$00004'.
           screen-required = 1.
           MODIFY SCREEN.
      ENDIF.
    ENDLOOP.

  • Sap Query sq01: how to combine substrings in complex calculations

    I made a query with sap query. I made 1 local field: name1. I have 2 fields firstname and lastname and a field named class.
    In the complex calculations screen I made the following calculation for that field:
    Condition: CLASS='1'
    Formula: firstname' 'lastname
    When I try to run this query I get an Abap error saying "unable to interpret [firstname] as a number". It looks like the + expression can only be used here for numeric calculations.
    Does anyone know how to solve this?
    Edited by: J S on Jan 27, 2009 11:52 AM

    Hi,
    i think its better to concatenate in the infoset code section.... you create a local filed in infoset of type char and then write the concatenate statement of abap and keep first name and last name in the local field .... write this code in the record processing section and take this local filed and display it in the  query i think this clears you ..
    by the way if you still want any information let me know

Maybe you are looking for