Count and Other fields - VBAK

Hi All,
I want to find the count the no of Orders from VBAK for a combination of VBTYP and AUART.
Select Count(*) from vbak into table t_vbak where vbeln in s_vbeln
                                                              and    vkorg eq p_vkorg
                                                              group by vbtyp  auart.
This will only give the count.
I also need other data like erdat ernam and a bunch of other fields for this combination.
Do I need to select again from VBAK??
Any ideas.
Meghna

Hi Meghna,
The statement you written above, Is it correct, Is it working,,,
I will not work as in count(*)  it will not allow to select the data into a table and instead you need to write like this.
DATA : i_vbak type i.
Select Count(*) from vbak into i_vbak where vbeln in s_vbeln
Then you will get the no. of records,,,
It give No difference again to count Erdat or Ernam...! As it will be the same count.
If you need the Maximum then it will give you ethe maximum date but for time it give maximum time in 24 Hours but it may be different from the latest date time....
lets say you ha two record in April & May,, May you created time at 1 PM.. In April you created at 3 PM..
for max time,,,, you will get April,
And for max date you will get May,,,
remember that.
Count is for No. of records,,, & Max is for maximum no. or date or version,,,
Thanks & regards,
Dileep .C

Similar Messages

  • How to get count and other field in one select

    Hi,
    I am try to get total rows and some fields in two separate select:
    1. select count(id) into totalRows from mytable m where m.cat = 'CSV'
    2. select m.id, m.cat, m.updateTime from mytable m where m.cat = 'CSV'
    (all rows in mytable are distinct base on id field)
    How can I combine them into one query to make it faster so that no need to compare the m.cat field twice?
    Thanks.
    David

    Here's one solution :
    SQL> desc test;
    Name Null? Type
    ID NUMBER
    CAT VARCHAR2(10)
    UPDATE_TIME TIMESTAMP(6)
    SQL> select * from test;
    ID CAT UPDATE_TIME
    1 XYZ 09-JAN-04 09.04.17.000000 AM
    2 CSV 09-JAN-04 09.04.31.000000 AM
    4 ABCD 09-JAN-04 09.04.41.000000 AM
    5 CSV 09-JAN-04 09.04.53.000000 AM
    6 ABC 09-JAN-04 09.05.00.000000 AM
    7 CSV 09-JAN-04 09.05.06.000000 AM
    8 GGG 09-JAN-04 09.05.17.000000 AM
    7 rows selected.
    SQL> select id, cat, update_time
    2 ,Count(*) Over (Order By cat) As TotCnt
    3 from test
    4 Where cat = 'CSV'
    5 /
    ID CAT UPDATE_TIME TOTCNT
    2 CSV 09-JAN-04 09.04.31.000000 AM 3
    5 CSV 09-JAN-04 09.04.53.000000 AM 3
    7 CSV 09-JAN-04 09.05.06.000000 AM 3
    SQL>
    -- Shailender Mehta -

  • Notes and other fields don't show up in Contacts on my iPod Classic 160GB

    I don't know if this is just a bug or if I missed a new option somewhere to hide/show Notes and other fields in Contacts, but they don't show up at all. This problem is specific to the new 160GB iPod I bought today. Notes show up fine on my 4GB Nano (2G) and old 3G iPod.
    I would at least like confirmation from some other people that the Notes field is not showing up in your contacts.
    I just ran through a few other contacts and it appears this is a more serious sync problem. There is a field listed in my Address Book as "work" that is showing up as "home" on the 160. The field is identified correctly on my nano. I also noticed that the field for the iChat id is completely missing from all the iPods.
    This is a pretty serious bug for anyone that uses their iPods for Contacts. Since someone is bound to ask, yes I did try resetting the iPod. I even went as far as completely restoring it from both Windows and the Mac, but always saw the same problem, so I went back to my default Mac setup.

    I did another restore and let iTunes move my whole library over before going back to the summary and syncing contacts, but I got the same result. No notes on any contacts and various contact fields that are named incorrectly compared to the Address Book originals.
    I would appreciate confirmation of this bug or people with 80/160 classics identifying that notes due show up in their contacts so that I can post an accurate description to the bug report form.
    Thanks!

  • I added a counter and other html to my non .mac site

    I added a counter and other html to my non .mac site by simply adding the code to the index.html page after I published to folder.
    http://www.the-scrap-yard.net/photorestoration/

    Also, I would suggest requesting a change in your credit card number that was
    used for that transaction just to be safe.
    Also, since they actually got access to your computer, if you have any other
    financial account info on your computer, you will need to monitor those accounts
    quite closely for any fraudulent activity.  There is no knowing what they might have
    accessed.  They quite possibly may have downloaded your whole life.

  • Displaying one field in first page and other field in last page (header)

    Hi
    We are using following way to print headers but we need one field (WO START) to display in first page and another field (WO END) to display in last page
    If output is only 1 page then both needs to be printed on same page
    <?for-each@section:G_WORK_ORDER?>
    WO START This needs to be printed on first page only
    WO END This needs to be printed on last page only
    <?for-each:G_OPERATION?> <?end for-each?>
    <?end for-each?>
    Let us know if any fix for this
    Thanks
    Kamalakar.G
    Edited by: kamalakarg on Sep 21, 2012 4:53 PM

    Hi Kamalakar,
    Send me sample XML data and RTF template i will try on my side. email me [email protected]
    Thanks,
    Omkar Deshpande.

  • How to diable only one field enabled and other fields disabled for one user group?

    Hi,
    I have a form contains many fields. A group of users can add items using that form.
    As per the user requirement I have created a filtered view and that filtered view can be seen by some other sharepoint user group but as per their further requirement the new sharepoint user group is only allowed to update Remarks field. All other fields
    should be disabled for them.
    In my idea, I have to create multiple forms and in one of it except Remarks field all should be disabled but I am unable to assign multiple forms to a single list.
    Or how to make Remarks field enable to this user group and for other admin user group all fields could be enabled.
    Hope I have expressed my question correctly.
    Any solution would be appreciated.

    There is no Out of the Box way to set permissions on each column, primarily due to the performance impact. The following thread provides some options,
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/c0794232-9bab-4cea-91d8-f311a793a863/how-to-set-column-wise-permission-in-sharepint-list-in-sharepoint-2010?forum=sharepointadminprevious
    Dimitri Ayrapetov (MCSE: SharePoint)

  • CRM Mass Update of RelationShip Data and other Fields

    Hello,
    I have to perform a mass Update on some Fields:
    VIP -> BUT051 -> Relationship
    FLG_NOUSE -> ADSMTP -> Address Data
    FLG_NOUSE -> ADTEL -> Address Data
    FLG_NOUSE -> ADFAX -> Address Data
    I've found already TX "MASS" and "MASSD" but those fields are not available.
    (Fortunately I could already use TX "Mass" for updates on Correspondence Language.)
    Thanks for your help
    Andreas

    Hi, You can prepare a list and use Menu -> Mass Update option to do the update. Limitation, per request it can update only 50 records. If there are more you have to do it recursively. Alternate solutions are to import, reset the value and export back or by writing a program using webservices. Hope it helps
    Venky CRMIT

  • Concatenate currency field and other field into a variable

    Hi frinds,
    concatenate wa_mseg-waers wa_mbew-stprs into v_value.
    begin of ty_mseg,
         waers type mseg-waers,
    end of ty_mseg,
    begin of ty_mbew,
         stprs type mbew-stprs,
    end of ty_mseg.
    data :
       v_value type char20.
      i should concatenate those two value which are there in the work areas into one variable V_value.
    it is showing some syntax error.
    how can i do that.

    actually my senario is
    types :
    begin of ty_mseg,
       menge type mseg-menge,
    end of ty_mseg,
    begin of ty_mbew,
       peinh type mbew-peinh,
    end of ty_mbew,
    data :
    w_value(15) type c,
    v_value type char20.
    write wa_mbew-stprs to w_value.
    concatenate wa_mseg-waers w_value into v_value.
       now iam getting the value  USD 10000     in V_VALUE variable.
    Now after getting the value in V_value
    wa_final-stcst = ( V_VALUE / wa_mbew-peinh ) * wa_mseg-menge
    values of respective fields are
    V_VALUE   =     USD 10000
    wa_mbew-peinh  =   1
    wa_mseg-menge =   200
    So in wa_final-stcst =    (  USD 10000 / 1 )* 200
    when the system is executing this line its giving me runtime error.
    how can i correct.
    Regards,
    SATISH.

  • Help Using Count and SQL statements

    Hello
    This problem has been bugging me incesantly and I would be reaaaaaaally grateful if someone could help here
    I want to create query that woud count the number of times a certain unedited word would be matched against different edited words
    This query works well in MS ACCess but not in java
    query =" SELECT Count(*) AS WordCount, Segmentations.EditedWord FROM [select Segmentations.EditedWord FROM Segmentations where Segmentations.UneditedWord = '"+Word+"']. AS c GROUP BY Segmentations.EditedWord";
    I've tried removing the Segmentations. and changing it to
    query =" SELECT Count(*) AS WordCount, EditedWord FROM [select EditedWord FROM Segmentations where UneditedWord = '"+Word+"']. AS c GROUP BY EditedWord";
    But still nothing
    I think that is due to the fact that you can't call Count(*) and another field at the same time
    pleas eif anyone knows a way around this send it ASAP
    thanx

    Why not use,
    query = "SELECT Count(*) AS WordCount, EditedWord FROM Segmentations WHERE  UneditedWord = ? GROUP BY EditedWord"and use PreparedStatement to optimize.
    HTH

  • Link Recipe Group counter and Operation

    Hi,
    I need to develop a report where selection screen will have "recipe group", "group counter" and "plant" and want to extract operation details for that group and counter.
    Please tell me the table / field name where I can see Group/ Group Counter and Operation details together. (In PLPO group counter is not available and other fields like "Group of the referenced task list" and "Refer. group counter" is appearing blank; value in field "node" is not the value of "counter").
    Also let me knwo the table where operation classification (KLAKZ) indicator is maintained.
    I am trying to extract operation classification (class type 019) values for a recipe group and counter.
    Regards,
    Abir.

    hi .
    Please find following tables related with routing
                         MAPL                    Allocation of task lists to materials
         PLAS                    Task list - selection of operations/activities
         PLFH                    Task list - production resources/tools
         PLFL                    Task list - sequences
         PLKO                    Task list - header
         PLKZ                    Task list: main header
         PLPH                    Phases / suboperations
         PLPO                    Task list operation / activity
         PLPR                    Log collector for tasklists
         PLMZ                    Allocation of BOM - items to operations
    Regards
    SANIL

  • [SOLVED] LXDM and Other Catastrophe's

    Compared to the arch-fu practitioners here I'm a total noob so bear with me . And sorry if this has been solved before, I searched but found nothing.
    My second attempt at installing Arch was going kind-of smoothly until I got to configuring LXDM. No matter what I do it keeps logging into the default X session (twm) rather than my wm's (openbox/scrotwm). I tried fiddling with lxdm.conf and /etc/lxdm/Xsession only to break it completely (login loop). I also tried this to no avail. I even tried symlinking~/.Xsession to /etc/lxdm/Xsession, which made no difference. So I'm assuming I have to modify /etc/lxdm/Xsession in some way?
    All this messing about (4 days and counting) and other niggling configs I've borked (shutdown and reboot break with ata2 errors, acpid to blame?) has got me considering ArchBang (Blasphemy!) and modding from there. But then I saw how many gnome bits it has, I don't want to load the entire gnome library for no good reason and I assume removing all of it would be a pain?
    Last edited by seaneking (2012-02-20 22:45:27)

    "$1" is a special variable, known as Positional parameters, they are basically the commandline parameters.
    For example:
    myscript some option another_option
    <--$0--> <$1> <-$2-> <-----$3----->
    <---------------$*---------------->
    <---------------$#----------------> # Number of Arguments, in this case $# = 3 (doesn't include $0)
    More info on bash/shell scripting can be found on Greg's wiki
    In the mean time...
    So I downloaded LXDM and I'm at a loss. I have no idea where it's finding the various window managers (including non-existent ones, and in some cases not at all). The only file which exists on my system sourced within /etc/lxdm/Xsessions is "/etc/X11/xinit/xinitrc", which, even though it's the same as the skeleton file, doesn't merge my X[defaults|resources]. Yet it seems to use some commands from my ~/.xinitrc such as feh background setting.
    Documentation is... sparse (.dmrc?)
    Edit:
    Giving up, hopefully someone with more experience/knowledge can help. Sorry
    Edit2:
    Right. It seems that the list of WMs/DEs is actually built from .desktop entires under /usr/share/xsessions/. (I know you mentioned this already)
    So if you want to add i3, simply drop an i3.desktop file containing something like:
    [Desktop Entry]
    Name=i3
    Exec=i3
    Checking the source indicates that LXDM seems to only look for the "Name", "Exec" and "Desktop Entry".
    Edit3:
    Okay, reinstalled LXDM and tested this theory. Made a bogus.desktop file under /usr/share/xsessions and used the following contents:
    [Desktop Entry]
    Name=Bogus
    Exec=wmii
    Logged out, started LXDM and sure enough, I had a new entry named "Bogus" which launched wmii. I didn't alter any config files at all. (brand new install)
    PS: Bedtime!
    Last edited by Earnestly (2012-02-20 02:27:32)

  • Max and other

    hi,
    may i know how to select aggregate field1 and other fields in the same record where field1 is max?
    this statement is incorrect. may i know what is the correct syntax?
    thanks
    select max( field1 ) field2 into (v_field1 , v_field2) from table where
    fieldx = wa_inputrec-fieldx and
    fieldy = wa_inputrec-fieldy.

    Hi,
    You have to use <b>Group By</b> clause for this.
    So, the query should be like this:
    select max( field1 ) field2 into (v_field1 , v_field2) from table where
    fieldx = wa_inputrec-fieldx and
    fieldy = wa_inputrec-fieldy <b>group by</b> field2.
    And we can select only the fields which are used in group by clause and the grouping field.
    That means we can't select field3 also here. Because that is not used in group by clause.
    Reward if it helps you.
    Regards,
    Sandhya

  • How to use Count with other all fields

    Hello guys. Sorry about my question because it s syntax but i didnt find in google.
    How can i use count combined with other all fields.
    Like SELECT count(*) 'other all fields like * '  FROM VBAK .
    Thank you very much.

    Don't sure to understand your requirement (count would always be 1, aggregates are only defined with grouping)
    So either use two SELECT (or replace count(*) counting Nr of records selected) if no relation between count and field values....
    Or use a dynamic SELECT syntax. Use FM DDIF_FIELDINFO_GET to  get field list, then create fieldlist with every field name and count(*), create grouplist with every field name
    SELECT (fieldlist)
           INTO ...
           FROM table
           GROUP BY (grouplist).
    Regards,
    Ramond

  • Competitor - Strategy and counter strategy text fields in Web UI

    Hi,
    I want to bring  strategy & counter strategy  text fields in the competitor screen of opportunity.
    Component: BT130I_OPPT
    View: BT130I_OPPT/CompetitorProdEF
    .The other standard fields strength and weakness are already visible in WEbUI.
    Also the text fieds strategy & counter strategy  are visible in SAP GUI -opportunity - Competitor tab
    In standard to display strength and weakness the view /CompetitorProdEF has 2 context nodes BTText1  (Relation BTTextIFirstchangable) and BTtext2 (Relation BTTextISecondchangable).
    I tried to add new contect node for strategy & counter strategy (Relation BTTextIAll)  but the save is not working properly.
    Kindly suggest what needs to be done to make these standard text
    types available in this view in WebUI
    Thanks & Regards,
    Sanila

    Hi,
    The issue is related to 'window.open("url")'. I replaced the above function with another script window.navigation("url).
    When 'window.navigation' script is executed, browser is asking a security question whether to download the content or not. If i click yes, whole window is refreshed and existing data is gone. This happens only for first time when we try to download. After this the download is working fine without any session time out, if we are using the same window.
    Kindly help if you have any inputs regarding the issue.
    Thanks a lot.
    Regards,
    Arun N K.

  • How do I use switch and case statements to fill more than one other field?

    Hi all,
    I'm new to the community.
    I'm trying to make an existing form more user friendly for my coworkers. I want to use a switch and case approach in a drop-down list field so that the selection fills two seperate other fields with different info related to the selection.
    I can already do this with one field, but if I add a second target field under an existing case the text doesn't appear there when I make the selection from the dropdown.
    Basically, I'm asking if I can do this:
    switch 
    (sNewSel){
       case "1": // Selection 1    Row2.Field1
    = "text for field 1";
        Row1.Field2 = "text for field 2"; 
        break;
    etc.
    It works if the "row1.field2" option isn't there, but not when it is present.
    Any takers?

    I'm not sure if I will be able to send you the form. There may be too much to redact.
    Would this last bit of code in the cell affect anything?
    if 
    (bEnableTextField)
    {Row2.Field1.access
    = "open"; // enable field
    Row2.Field1.caption.font.fill.color.value= "0,0,0"; // set caption to black
    That is, do I also need to repeat the same thing for the second target cell (Row1.Field2)?
    What would be possible hang ups that would prevent it from working correctly?
    Dave
    By the way, I'm not sure if my other attachment posted. I am trying again.

Maybe you are looking for

  • CS5 TEXT TRAPPING options? Knockout? 0.44? Overprint?

    Is there no option in InDesign CS5 for the text trapping? How can I be sure that the text I want to be knockout is in fact set to knockout? and likewise for text to be overprinted? Am I to assume that everything is automatic and I have to trust InDes

  • How to get a list corresponding to each key in hashmap

    hi all in hash map we can put key value pairs ... but what if i want to get a list of values coresponding to each unique key .. ... can we do it by storing a list Object corresponding each key in a HashMap ... is this the best way out ?? For example

  • Ws reliable message in OSB

    To utilize WS-ReliableMessaging in OSB, I created a OSB proxy by setting Protocol to ws and Get All Headers to Yes. When a message arrives, I want to extract all the header information in the message flow by querying $header. $header is always empty.

  • How can I install and run lookout 6.1 on windows server 2008 64-bit without errors?

    How can I install and run lookout 6.1 on windows server 2008 64-bit without any errors? I was unable to start the lookout applcation after I install the lookout 6.1 on windows server 2008 64-bit. (error code: 0xC0000142). Please help! Thanks

  • Unable  to start weblogic.admin utility

    Hi, I am getting "Can't find class weblogic.Admin" error When I were running the command "java weblogic.Admin t3://<ip>:7005 version". The version of weblogic server I am runnng is 5.1 SP6. Please help. Thanks Yxu