Report counterpart sample for   field = select(max)

Post Author: JuneCruz
CA Forum: Crystal Reports
Hi Guys,
This the contenct of my table.
NFstCol NSndCol NTrdCol -
1       One     12       One     13       One     14       Two     15       Two     16       Two     17       One     28       One     29       One     210      One     311      One     312      One     316      Two     217      Two     218      Two     219      Four    NULL20      Four    NULL21      Four    NULL
Now I want to display the records all records that have the maximum ntrdcol group by nsndcolso the output should be.  Can this be done without using view, command as source for the database, or a subreport ?thanks.
  NfstCol NtrdColOne
      10     3      11     3      12     3
Two       16     2      17     2      18     2
Four       19     null      20     null      21     null
Again.  Thanks guys.

Post Author: ROMZILBER
CA Forum: WebIntelligence Reporting
To create a view is not a problem, supporting it is a different story
But we have find a solution, you were correct about the filter.  I just did not know you can put the whole subselect in a  filter
but here is a logic for the filter if someone would come up with the same problem
tablename.NNNN_PROOF_DT = (SELECT MAX(X.NNNN_PROOF_DT) FROM tablename X  WHERE tablename.NNNN_CLAIM_NUMBER = X.NNNN_CLAIM_NUMBER AND   tablename.NNNN_LINE_CD = X.NNNN_LINE_CD)
please let me know if you have any questions.
sorry I am new to this so please do not take any offense

Similar Messages

  • Add a custom table for field selection while creating field catalog for LIS

    Hi,
    I have a requirement to add a Custom table to be available for field selection while creating a field catalog for LIS. Its required as there are many custom fields to be used for field catalog creation and adding them in one of the existing tables listed is not a feasible option for us. Please let me knw if its possible..?? If yes how to get it done..??
    Regards,
    Akash Sinha

    hi,
    You need to add your field in the Data Dictionary first. For example, if
    you want the new field in the Order Item field catalog do the following.
    Look at structure MCVBAPUSR (SE11). If you already have a user structure
    appended to this structure then you can add your new field to your existing
    structure. If there is no structure already appended to MCVBAPUSR then you
    must create a new structure with your field in it and then append the new
    structure to this one.
    If you look at structure MCVBAP you will see the data appended to the end
    of it.
    Now you should see it in the field catalog.
    regards,
    balajia

  • Profile for field selection on object detail list

    Hi All ,
            What is the customizing path or tcode to define  Field selection profile and also object profile
    to choose in COIO transaction , please advice the assignment process also .
    Thanks
    Anil

    Hi All , thanks for your quick response
    I can create only overall profiles in COISN tcode .Please advice me where can we create Object profile and field profile and assignment of the same to overall profile .
    My purpose of defining above profiles is I wish to incorporate a field name resource in the seperate column with including the list of fields which is showing currently in COIO order header (here we can not find resource untill drill down) .For acheiving the same I think I can define new field profile and assigning that one to object profile , and thus I can able to select the desired object profile after executing the COIO order header --> settings --> select profile . Please suggest me if I am wrong and also the other transaction codes
    Thanks
    Anil

  • User Exit/Field Exit for Field Selection in MM01 & MM02

    Dear All,
    Please Tell if I want to make Field Purchasing group Mandatory in MM01 & MM02 in Purchasing view only.I dont want the data to be updated in MRP1 view. Please tell me is there any exit for the same.
    Regards,
    Sandeep

    You can customize
    via
    SPRO>Logistics - General>Material Master>Field Selection>
    first from
    Assign Fields to Field Selection Groups
    you must assign MARC-EKGRP (Purchasing Group)
    to a selection Group which will be mandatory.
    Then from Maintain Field Selection for Data Screens
    you must choose the Material Types which you want to make
    Purchasing Group mandatory.
    You must check Reqd Entry for the material types you want
    Best Regards
    Hope will help

  • Calling the selection screen of report with data for the selection field

    I have the selection screen with 2 fileds.
    sales order and  payment terms.
    My requirement is to update the payment terms into the ztable for the given order.
    Sometimes the payment terms will be there ie already maintained ,in that case i need to show to the user the existing payment term ,so that he can modify and save that one.If the payment term is not existing then simply i can go inside the program and update the payment term.
    What I thought of doing is , writing a report program and then after the user inputs the selection screen ie order number , I Will check in the ztable and if the payment terms is found then i will use the key word leave list processing. But i dont know how to populate the payement term in the selection screen oncegaing from the program

    Hi shiva,
    when the user enters sales order number on screen, in parameter 1,
    you want to show payment term, on selection screen itself, in parameter 2.
    We can use the event
    AT SELECTION-SCREEN.
    Eg. PO Number <----
    > User
    Below is sample code for same.
    If you enter PO Number, the system will show the corresponding user in parameter2.
    Just copy paste.
    REPORT  YAM_TEMPA09.
    PARAMETERS : EBELN LIKE EKKO-EBELN.
    PARAMETERS : ERNAM LIKE EKKO-ERNAM.
    AT SELECTION-SCREEN.
    ERNAM = ''.
    SELECT SINGLE ERNAM
    FROM EKKO
    INTO ERNAM
    WHERE EBELN = EBELN.
    regards,
    amit m.

  • Popup check box screen for fields selection using user structure

    Hi all,
    could you please help how can i get the popup screen in the program when the user wants to choose the wanted fields.
    for ex: in the table after clicking the contents display the selection fields will be displayed. there in setting -> list format->choose, we can check the fields wanted to be displayed. The same functionality i needed with my own structure. can any one help me in this, it is urgent.
    Thankyou.

    Hai Ashok
    Check the following Code
    S_FIELDS-TABNAME = 'VBAP'.
    S_FIELDS-FIELDNAME = 'ARKTX'.
    S_FIELDS-VALUE = WC_VALUE.
    APPEND S_FIELDS.
    CALL FUNCTION 'POPUP_GET_VALUES'
      EXPORTING
      NO_VALUE_CHECK        = ' '
        POPUP_TITLE           = 'Locate Material'
      START_COLUMN          = '5'
      START_ROW             = '5'
    IMPORTING
      RETURNCODE            =
      TABLES
        FIELDS                = S_FIELDS
    EXCEPTIONS
       ERROR_IN_FIELDS       = 1
       OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ELSE.
    READ TABLE S_FIELDS  INDEX 1.
    WC_VALUE = S_FIELDS-VALUE.
    ENDIF.
    Thanks & regards
    Srenivasulu P

  • ORA-1445 and maximum width for field selection.

    Hello,
    We had the ORA-01445 error in the database recently.
    A friend of mine directed me to the following address:
    http://www.errorhelp.com/search/details/65019/ora-01445
    And explained me that Oracle takes every field of every table in the inner and outer joins to build a HUGE table before selecting what fields are really required for the query.
    I can't believe that Oracle makes such stupid thing so I ran here to ask the experts.
    An example:
    Two tables:
    TABLE1
    Field1
    Field2
    Field100
    TABLE2
    Field1
    Field2
    Field500
    Select table1.field1, table2.field1
    FROM table1
    INNER JOIN table2 on table1.Field2 = table2.Field2
    WHERE table1.field3 = '1'
    ->
    Question is:
    How the join is built on detail?
    Does it build an intermediate table with 100+500 = 600 fields to get only the 5 that are used in the query (table1.field1, table2.field1, table1.Field2, table2.Field2,table1.field3)?
    Thank you.
    Kindest regards,

    864737 wrote:
    Hi John,
    Maybe it's a complete nonsense but even if has no sense proceeding that way solved the issue here.
    I have a query that suddenly failed to execute with the error described, version 10.2.0.3 but it does not happens in 10.2.0.4. As a workaround we did it using subselects and joining as described in the post and the query worked again.
    So ORA-01445 is triggered even if it's not the cause of the error. You have there a circumstance where it fits...
    So, it is clearly a bug introduced (possibly in 10.2.0.3), and fixed in 10.2.0.4.
    I cannot post the query because license restrictions but believe it or not this happens with Oracle. It's great to know that the number fields of the tables does not matter. I was suprised to hear it. But your clarification was good. :D Tnx.
    It seems that our DBA found that this behaviour can be corrected with an official patch.
    Which clearly indicates a bug, just be sure that the patch is truly the right one.
    Thank you again for your response.There are a number of bugs in MOS around ansi joins getting this error, bug
    4369235.8 ORA-1445 can occur for ANSI join queries with large views/subqueries
    seems possiblefor your case. However the workaround for that was to not use ansi style joins, so again, the number of columns is not directly the cause of the error.
    John

  • Search help for Field Selection

    Hello Exeperts,
    I've added the field ABWGR (Attendance/Absence Reason) in Iview Clock-in / Clock-out corrections, but when I execute the test this field in i-view does not show the codes created in the backend.
    Is there a way to activate the search help for this field in clock-in/ou corrections iview?
    Thanks in advance!

    Implement the note 1080414. it contains both front end and backend changes

  • Field selection for Material Type

    Hi,
    When we create the material type we are assigning a field ref. in Define Material attributes screen, and when we are creating the industry sector there also we are assigning a field  screen reference.
    No when we creat a materail with MM01, and if Field ref. is different in Industry sector and material type then which system will follow when we create the material it will be ref. to field selection in Material type or industry sector.
    regards,,
    zafar

    Zafar,
    When you talkout Material type is basically controls the properties of a Material like important control fucntions and attributes.
    That is inturn, like Field selection, Special material type, Type of Procurement, Stock (Qty &Value) updation, User departments and Price control. But,
    where as Field selection is control key which consits of some setoff fields which are subjected to a perticular Industry sector like, Plant &Construction, Mechanical Industry, Pharmacuetical Industry, Chemical Industry, etc. In this case field selection is different from Industry to Industry, but in some cases field selection is common for the similar kind of Industries or Industry sectors.
    And the Field selection is subjected to the Material type as well, that means each material type can have their own Field selection (it is named with a field selection key 3 char sap code for field selection).
    Comming to the Creation of Material master record : using MM01  ( create material -general)
    here, you need to select the material type and industry sector --> then you need to choose the relevent user departments and subsequently plant, sloc.etc.
    Note: when you are creating the material in the above fasion, you need to enter the relevent data which is w.r.to the user departments which you have choosen, and those inturn reflect from this control data ( attributes and important control functions as I said is the definition of Material type).
    And this is how a material is created, wether it can be a Raw material, Semi finished Product or Finished Product, etc.
    Note: There is an option to create your own Material Types, but SAP suggests to use standard Material type when you create material master record, unless otherwise a special requirement comes from your client is from Specific Industry sector or if running a special kind of business which is not yet dragged into the SAP R/3 system.
    Hope this will clarifies your query.
    With Regards,
    Srin

  • Error Field selection in material master for Tax

    While creating material master MM01 in Sales orgn tab when I am trying to save HST tax for Canada, it is disappearing. Although I have classified customer tax & material tax in IMG-Sales & distribution as 1 & 0 both.
    In MM I can see HST either 0 or 1 when pressing F4
    I tried Log General/Material Master/Field Selection/Maintain Filed selection for data screen
    I tried 0001 group but when opened it gives various numbers for optional/required/supressed/display entry
    Which number is used for TAX? I could not identified.
    Can any one tell me what is transaction code for field selection group for material master for making Tax Required Field?
    Thanks for help.

    Hello,
    Tax problem is resolved by me only.
    In Tax classification IMG/Sales & Dist/Taxes/Define Tax determination Rule
    HST number was 4 I made as number 1 followed by CTX1 as 2 CTX2 as 3.....so on
    So it picked up HST now as this was number one. Now in MM Tax is mandatory as I put 1 & in pricing it picked up.

  • MIGO field selection

    Dear friends ,
    I'd like to know how the " Influencing"  field works @ MIGO field selection !
    could someone provide an explanation about the field selection with "Influencing"  configuration ?
    when I hit the button [Influencing]  other field appear called " Content"  and this content means ?
    SPRO > Materials Management > Inventory Management and Physical Inventory > Settings for Enjoy Transactions > Settings for Goods Movements (MIGO) > Field Selection for MIGO
    Best regards,
    Ale

    hi,
    Just go to migo screen, where u can see above to item colum and next to delete dust bin icon as "contents" its  copy cell contents purpose. 
    F1 notes given as per blw for content;
    User group for field selection
    Indicates the user group for field selection in the MIGO transaction (goods receipt from external procurement).
    Use
    In Customizing for Inventory Management, you can adjust the field selection for header and detail fields as well as table columns.

  • OMS9 required entry for field STAWN

    Hi everybody,
    I'm trying to change filed MARC-STAWN required entry in transaction code OMS9(for transaction mm01, for specific material types)
    I've only found this field in field group 089, but I have a problem with all the other fields that are included in this field group. I do not want to make them requiered.
    Is there any way to use this field group and not make the selection of required field references apply to all the fields in the  field group, or do I have to create a new field group?
    Thank you
    BR,
    Jana

    Hi Jana
    What u need to do is just changing the field selection group for the particular field
    MARC-STAWN. Go to OMSR and select the filed just change the number (give new) for the particular filed and save. For this new field r group of fields u want give the same number for field selection group and make as mandatory for required material type.
    Hope this will answer to ur question.
    Ravi

  • Restrict the field selection

    Hi,
    i would like to restrict the field selection upto 20 from left to right pane in the field choice popup.
    when the user cliks on the push button in selction screen, pop up will come for field selection for sorting order. now user will have a facility to move the fields from left box to right box, where we have to restrict only 20. if it exceeds, need to pass a message.
    Could some one help on this.
    Regards
    KER

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822#q-3

  • Select Max record for the report

    Post Author: ROMZILBER
    CA Forum: WebIntelligence Reporting
    Hello,
    Here is our problem we have history data on a table like
    Example
    Data:
    11111   bbb       12/31/2004
    11111   nnn       12/31/2005
    11111   ddd       12/31/2007
    On a report we only need to display the most current record (based on a date).
    11111   ddd       12/31/2007
    How can we do that, we have try to create subquery but it does not allowed to enter logic for the max date for the same id.  So we are kind of stuck, I am more then sure this would be a very common conditions specially for data warehousing.
    we are on Oracle 10g
    Thank you for all your help.

    Post Author: ROMZILBER
    CA Forum: WebIntelligence Reporting
    To create a view is not a problem, supporting it is a different story
    But we have find a solution, you were correct about the filter.  I just did not know you can put the whole subselect in a  filter
    but here is a logic for the filter if someone would come up with the same problem
    tablename.NNNN_PROOF_DT = (SELECT MAX(X.NNNN_PROOF_DT) FROM tablename X  WHERE tablename.NNNN_CLAIM_NUMBER = X.NNNN_CLAIM_NUMBER AND   tablename.NNNN_LINE_CD = X.NNNN_LINE_CD)
    please let me know if you have any questions.
    sorry I am new to this so please do not take any offense

  • How to select max (field) and one more field from table?

    Hi experts!
    I need to select maximum value of ENDDA from PA0023 and BRANC of max ENDDA.
    How can I do that ?
    When I trying this code:
    This is the  code:
    SELECT MAX( endda ) branc
      FROM pa0023
      INTO (pa0023-endda, pa0023-branc).
    I get error message:
    The field "PA0023~BRANC" from the SELECT list is missing
    in the GROUP BY clause. Addition INTO wa or INTO (g1,...,gn)  is required.
    So what is the problem?
    Thanks forehead.

    Hi
    Though am not totally sure of your requirement, check below code samples without any syntax errors:
    1. As per you current coding:
    TABLES: pa0023.
    SELECT MAX( endda ) branc
           FROM pa0023
           INTO (pa0023-endda, pa0023-branc)
           GROUP BY branc.
    ENDSELECT.
    2. Above code results only on one record where as the criteria can be more than one. Eg: for a specific data more than one record can exist. Below code helps you handle the same:
    TABLES: pa0023.
    TYPES: BEGIN OF t_pa0023,
             endda TYPE endda,
             branc TYPE brsch,
           END OF t_pa0023.
    DATA: i_pa0023 TYPE TABLE OF t_pa0023,
          wa_pa0023 TYPE t_pa0023.
    SELECT MAX( endda ) branc
           FROM pa0023
           INTO TABLE i_pa0023
           GROUP BY branc.
    LOOP AT i_pa0023 INTO wa_pa0023.
    ENDLOOP.
    3. If the requirement is to get the Industry Key for the record with highest End Date. We can acheive it by using subquery something like:
    TABLES: pa0023.
    SELECT SINGLE endda branc
           FROM pa0023
           INTO (pa0023-endda, pa0023-branc)
           WHERE endda = ( SELECT MAX( endda ) FROM pa0023 ).
    Kind Regards
    Eswar

Maybe you are looking for

  • Filtering on 0activity - how to achieve this in a query?

    Hi all, I have a requirement in my report which is: Give me, of all network numbers, only they keyfigures concering activity 0001. In the BEx querydesigner I have 0WBS_ELEMT, 0NETWORK and 0ACTIVITY as characteristics. The next step is that I want to

  • Module MM - ME55 transaction, Variant Initial Screen

    Hi Experts, I would like to set a Variant initial screen, when i call TRX ME55, nothing happen. I would like setting theses boxes -Blocking indicator 1 and -Scope of list=F How coulg I do it?, I tried with trx Se38, but It was impossible. Thanks, Ign

  • Search for text within files

    How do you search for files that contain a specific string of text?  I tried going to the folder in the finder and typing the string in the search box, but it does not seem to return correct results.   True, I do see a couple of files that contain my

  • Error loading DBAAS monitor console

    Hi I get following error when I try to open the DBAAS monitor console: Could not load languages. Please try reloading the page. Reloading the page doesn't solve the issue. I'm currently using a Oracle Public Cloud Services trail. Any help would be ap

  • Masking effect problem

    i am having problem when i use this masking effect. I make two layers 1 for image and second for effect and do the fill color in effect layer .erase the lines by erasor and do the masking effect also. the problem is when i run my file it only shows u