Please explain on what does these select statements get from these tables..

Hello Experts,
What does these select statements get?and what are these tables CDHDR and CDPOS used for?
The program that I am currently modifying lets users post documents and the ones that are not posted
are saved in a custom table. Now, we had a scenario in PROD server wherein certain items are not being
fetched as bypassed but we saved it in the bypassed table. Anyway, below is the select statements:
get all change document header within the selected dates
  SELECT * INTO CORRESPONDING FIELDS OF TABLE it_cdhdr
    FROM cdhdr
   WHERE udate IN s_udate
     AND objectclas EQ 'CHARGE'
     AND tcode IN (lc_tcode_msc1,
                   lc_tcode_msc2,
                   lc_tcode_msc1n,
                   lc_tcode_msc2n,
                   lv_tcode_vl33n,
                   'SE38',
                   'ZGENE').
IF NOT it_cdhdr[] IS INITIAL.
SELECT objectid changenr value_new
      FROM cdpos
      INTO TABLE it_cdpos
      FOR ALL ENTRIES IN it_cdhdr
     WHERE objectclas EQ it_cdhdr-objectclas
       AND objectid   = it_cdhdr-objectid
       AND changenr   = it_cdhdr-changenr
       AND tabname    = lc_tabname_mcha
       AND fname     IN (lc_fname_zustd,'LWEDT').
DELETE it_cdpos WHERE value_new+00(01) = 'X'.
  LOOP AT it_cdpos ASSIGNING <fs_cdpos>.
    l_matnr = <fs_cdpos>-objectid+00(18).
    l_charg = <fs_cdpos>-objectid+22(10).
    l_zustd = <fs_cdpos>-value_new+00(01).
    READ TABLE it_batch INTO wa_batch
         WITH KEY matnr = l_matnr
                  charg = l_charg.
    IF sy-subrc EQ 0.
      l_tabix = sy-tabix.
      wa_batch-zustd = l_zustd.
      MODIFY it_batch FROM wa_batch INDEX l_tabix
             TRANSPORTING zustd.
    ELSE.
      wa_batch-matnr = l_matnr.
      wa_batch-charg = l_charg.
      wa_batch-zustd = l_zustd.
      wa_batch-code  = 'A'.              "selected within period
      APPEND wa_batch TO it_batch.
    ENDIF.
  ENDLOOP.
  ENDIF.

Hi,
                        The first select statement is for Change document header.CDHDR table contains this object class in your case if you change any batch number for any material number  from the transaction for example (MB01) you can trace this .
From CDPOS you can trace which tables affected (EX : MCHA) and the new value(l_zustd ).
Regds,
Vinsa.R

Similar Messages

  • What does these messages mean

    I cannot get into my itunes because this message comes up. "A required iTunes component is not installed. Please repair or reinstall iTunes. (42404) "
    Then when I exit this message another one comes up. We could not complete your iTunes store request. "an unknown error occured (50)"
    Please help me to fix this.
    Grandmakat70

    zodmaner wrote:
    Hi, well today when starting up my box I noticed these two startup messages:
    :: Initiate Random Seed
    :: Removing LeftOver files
    What does these mean? And what program/service runs it? (And what 'left over files' is it removing?) I think I never see them before. Is these message appears because I just install sudo?
    Also when shutting down there is also a message concerning a Random Seed. (Saving Random Seed).  What is it doing?
    Well...  if your head over to your /etc/rc.sysinit, you'll see exactly what it does.  If I remember correctly, saving random seed is just saving your startup time because it is random, and removing leftover files is clearing out the /tmp/ directory.

  • How to find what  are the select  statements fired on a particular schema

    Hi Guys,
    I have a development box schema whose username and the password is shared across many users who are doing the developement.
    I wnat to know what are the select statement fired on it during a particular time interval.
    Thanks,
    Prafulla

    with dba user
    BEGIN
    DBMS_FGA.ADD_POLICY(object_schema => 'schemaname',
    object_name => 'CALLS',
    policy_name => 'CALLS_AUDIT',
    statement_types => 'SELECT'
    …enable => TRUE);
    END;
    then all select are viewed on table dba_fga_audit_trail
    Edited by: Adigozalov Gurban on Dec 3, 2010 11:05 AM

  • I got an iphone from Hong Kong which is locked one. Can anyone explain me what does a locked iphone means. How do I use it in India now, with my own sim card. How do I unlock it???

    I got an iphone from Hong Kong which is locked one. Can anyone explain me what does a locked iphone means. How do I use it in India now, with my own sim card. How do I unlock it???

    If your iPhone is locked to a wireless provider, only that wireless provider
    can unlock it. Contact the wireless provider in Hong Kong to see if they
    offer unlocking and if you qualify.
    If your iPhone is locked to an AppleID that you do not know, return it for
    a refund as it is useless. Only the person whose AppleID was used for
    activation can remove the lock. There is no workaround for Activation Lock.
    If neither of the above is what you are facing, provide more detail so someone
    may offer a solution.

  • What does these startup messages mean?

    Hi, well today when starting up my box I noticed these two startup messages:
    :: Initiate Random Seed
    :: Removing LeftOver files
    What does these mean? And what program/service runs it? (And what 'left over files' is it removing?) I think I never see them before. Is these message appears because I just install sudo?
    Also when shutting down there is also a message concerning a Random Seed. (Saving Random Seed).  What is it doing?
    Last edited by zodmaner (2007-07-27 00:23:42)

    zodmaner wrote:
    Hi, well today when starting up my box I noticed these two startup messages:
    :: Initiate Random Seed
    :: Removing LeftOver files
    What does these mean? And what program/service runs it? (And what 'left over files' is it removing?) I think I never see them before. Is these message appears because I just install sudo?
    Also when shutting down there is also a message concerning a Random Seed. (Saving Random Seed).  What is it doing?
    Well...  if your head over to your /etc/rc.sysinit, you'll see exactly what it does.  If I remember correctly, saving random seed is just saving your startup time because it is random, and removing leftover files is clearing out the /tmp/ directory.

  • A consent for a new eula, please explain the ramification of these new terms

    4. Your Compliance With This Agreement.
    You acknowledge that your compliance with the terms of this Agreement may require you to provide certain notices to, obtain certain rights from, and impose certain obligations on your Clients and/or users of the websites hosted by the Services. To that end, you agree that each website for which Adobe provides Services on your behalf (including, if you are a Partner, your Clients’ websites) will contain a clear and conspicuous link to a terms of use and a privacy policy that comply with all applicable laws, rules, and regulations.
    5. Partner Obligations.
    (c) You are responsible for your Clients’ compliance with applicable laws in connection with their use of the Services.
    (g) You have or will obtain all rights necessary for you to grant Adobe the licenses granted in Section 16 (“Content”), below.
    16. Content.
    You (if you are a Site Owner) or your End Users (if you are a Partner), and/or each such party’s respective licensors, retain ownership of any information, content and/or materials that they submit in the course of using the Services (“Content”); however, Adobe needs certain rights to Content in order to provide the Services. Accordingly, you hereby grant to Adobe and its service providers and designees a worldwide, non-exclusive, transferable, sublicensable (through multiple tiers), royalty-free, perpetual, irrevocable right and license, without compensation to you: to use, reproduce, distribute, adapt (including without limitation edit, modify, translate, and reformat), create derivative works of, transmit, publicly display and publicly perform such Content, in any media now known or hereafter developed.
    please explain the ramification of these new terms
    Thank you,
    Lana

    Hi guys,
    Correct as Liam noted there are various topics on these concerns. 
    However if still having issues/concerns I would suggest posting in the original thread below after reviewing Magda's response.
    - http://forums.adobe.com/message/4353638
    Kind regards,
    -Sidney

  • Could you please help me in joining these tables

    Could you please help me in joining these tables
    ra_customers
    oe_order_headers_all
    oe_order_lines_all
    mtl_system_items_b
    mtl_item_categories
    mtl_categories
    I wrote the condition like this.Is there any more possibilities for join
    Tell me what more to join in this query....?
    select x.customer_name,x.segment1,x.description,x.segment2,sum(x.week1) week1, sum(x.week2) week2,
    sum(x.week3) week3, sum(x.week4) week4, sum(x.week5) week5
              from
              select a.customer_name,d.segment1,d.description,f.segment2,
              case
              when to_char(to_date(c.request_date,'DD-MON-YYYY'),'w')= 1 then
    nvl(c.ordered_quantity,0)
              else null
              end as WEEK1,
              case
              when to_char(to_date(c.request_date,'DD-MON-YYYY'),'w')= 2 then
    nvl(c.ordered_quantity,0)
              else null
              end as WEEK2,
              case
              when to_char(to_date(c.request_date,'DD-MON-YYYY'),'w')= 3 then
    nvl(c.ordered_quantity,0)
              else null
              end as WEEK3,
              case
              when to_char(to_date(c.request_date,'DD-MON-YYYY'),'w')= 4 then
    nvl(c.ordered_quantity,0)
              else null
              end as WEEK4,
              case
              when to_char(to_date(c.request_date,'DD-MON-YYYY'),'w')= 5 then
    nvl(c.ordered_quantity,0)
              else null
              end as WEEK5
              from
              ra_customers           a,
              oe_order_headers_all          b,
              oe_order_lines_all           c,
              mtl_system_items_b          d,
              mtl_item_categories      e,
              mtl_categories           f
              where
              a.customer_id=b.sold_to_org_id and
              b.header_id=c.header_id
              and c.request_date between sysdate-7 and sysdate+7
              and c.inventory_item_id=d.inventory_item_id
              and d.inventory_item_id = e.inventory_item_id
              and e.category_id = f.category_id
              and d.organization_id=e.organization_id
              and e.category_set_id=1
              ) x
         group by x.customer_name,x.segment1,x.description,x.segment2;

    Hw will I join the tables that have no column in common?I need to retrieve a value from table 2 by refering the value in table 1Post some sample data and show us what you want.

  • What  does "Group" mean in get info windows?

    Hi
    What does "Group" mean in get info windows?
    and what do the numbers mean when i click other...?

    The group is the Unix group to which the file belongs. Every group has a numeric identifier (the gid) as well as an (alphanumeric) name. The numbers you see when you choose "other" in the drop-down menu which selects the group, are the gid's.
    For example, an administrative account obtains administrative permissions by virtue of being a member of the "admin" group. Although the folder /Applications is owned by the user root, it is also owned by the group admin which has been given write, as well as read permission. This write permission is precisely what allows any member of the admin group--that is, any administrator of the machine--to drag applications into /Applications. On my computer, the admin group has gid 80, and so that is what I see as the number next to "admin" under "other".
    See http://en.wikipedia.org/wiki/Groupidentifier%28Unix%29 for more explanation of groups.
    Message was edited by: Mr.Lobotomy to clarify that "other" is still referring to a "group" option, and not to the permission given to "others".

  • My iPhone 5 is not catching up my website, although having a big screen... What does it need to get the pages in auto mobile queries converting?

    my iPhone 5 is not catching up my website, although having a big screen... What does it need to get the pages in auto mobile queries converting?

    You need to code your web site to recognize the mobile browser and send a page that's actually usable when it does.

  • What does it take to get an app on the Ovi store?

    What does it take to get an app on the ovi store?  There are so many apps available that are not included in the ovi store.... like "s60spoton"  It allows you to use your cameras flash as a flash light! I've been wanting this forever.  If this app was easily available on the Ovi store, I would have been able to find it easily... but it was linked to me in a forum. 
    Why are there so many useful apps not cataloged in the Ovi store? 

    It's the maker of an apps responsibility to get it listed on the store so if it's not on there it's because the maker hasn't put it there.
    Nokia cannot put apps on the store without the makers consent.
    Only the maker/publisher of an app can tell you why their app isn't on the store. It may be for financial reasons, legal reasons, licensing issues, piracy concerns or they may just have ceased development and moved on.
    The ovi store isn't the only source of applications and some developers prefer to use independant sites like www.getjar.com instead.

  • What does clearing cookies and data from iPad 4 mean?

    What does clearing cookies and data from iPad 4 mean?

    http://ipad.about.com/od/ipad_basics/ss/How-To-Clear-Cookies-And-Web-History-In- The-iPad-Safari-Browser.htm
     Cheers, Tom

  • Easy Question:Select many rows from a table and execute BAPI for these rows

    Hi Experts,
    I have created one WD project. The WD project fetches some records of backend using BAPI and displays in a table. I have to select some rows from the table and then execute BAPI for selected rows.
    How I can select multiple records from the table and then execute another BAPI for selected rows.
    Regards,
    Gary

    Hi,
    In the Node which you binded to the table create one more attribute of type boolean.
    For example your node is as below:
    //Table Node
    TableNode
    > Att1
    > Att2
    > isSelected(boolean) - Newly created attribute for this requirement.
    //Result Node contains the elements selected in TableNode
    ResultNode
    >Att1
    >Att2
    Now in the table create one more Column with Checkbox as tablecell editor. Now bind this boolean attribute to that check box.
    Now in the code you can get the selected rows by user as below:
    for(int i=0;i<TableNode().size();i++)
      if(wdContext.nodeTableNode().getTableNodeElementAt(i).getIsSelected()==true)
        IPrivateTestView.IResultNode element=wdContext.createResultNodeElement();
        element.setAtt1(wdContext.nodeTableNode().getTableNodeElementAt(i).getAtt1());
        element.setAtt2(wdContext.nodeTableNode().getTableNodeElementAt(i).getAtt2());
       wdContext.nodeResultNode().addElement(element);
    Regards,
    Charan

  • Need of SQL query in selecting distinct values from two tables

    hi,
    I need a query for selecting distinct values from two tables with one condition.
    for eg:
    there are two tables a & b.
    in table a there are values like age,sex,name,empno and in table b valuses are such as age,salary,DOJ,empno.
    here what i need is with the help of empno as unique field,i need to select distinct values from two tables (ie) except age.
    can anybody please help me.
    Thanks in advance,
    Ratheesh

    Not sure what you mean either, but perhaps this will start a dialog:
    SELECT DISTINCT a.empno,
                    a.name,
                    a.sex,
                    b.salary,
                    b.doj
    FROM    a,
            b
    WHERE   a.empno = b.empno;Greg

  • Select multiple rows from dual table

    Is it possible to select multiple rows from dual table using a single select statement.
    i.e., i want the out put to be
    column_name
    1
    2
    3
    4
    Edited by: vidya.ramachandra on Dec 14, 2009 8:24 AM

    Aside from the fact you're responding to an old thread...
    1002424 wrote:
    While using CONNECT BY, I see it always leave behind one row.
    Suppose I have a condition based on which I have to generate constant rows like
    SELECT 1 FROM DUAL WHERE ROWNUM < N;
    Here if N = 0, still it gives out single row.... you are obviously doing something wrong in your code elsewhere, because that SQL statement does not always return a single row...
    SQL> SELECT 1 FROM DUAL WHERE ROWNUM < 0;
    no rows selected
    SQL>

  • Select max date from a table with multiple records

    I need help writing an SQL to select max date from a table with multiple records.
    Here's the scenario. There are multiple SA_IDs repeated with various EFFDT (dates). I want to retrieve the most recent effective date so that the SA_ID is unique. Looks simple, but I can't figure this out. Please help.
    SA_ID CHAR_TYPE_CD EFFDT CHAR_VAL
    0000651005 BASE 15-AUG-07 YES
    0000651005 BASE 13-NOV-09 NO
    0010973671 BASE 20-MAR-08 YES
    0010973671 BASE 18-JUN-10 NO

    Hi,
    Welcome to the forum!
    Whenever you have a question, post a little sample data in a form that people can use to re-create the problem and test their ideas.
    For example:
    CREATE TABLE     table_x
    (     sa_id          NUMBER (10)
    ,     char_type     VARCHAR2 (10)
    ,     effdt          DATE
    ,     char_val     VARCHAR2 (10)
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0000651005, 'BASE',    TO_DATE ('15-AUG-2007', 'DD-MON-YYYY'), 'YES');
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0000651005, 'BASE',    TO_DATE ('13-NOV-2009', 'DD-MON-YYYY'), 'NO');
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0010973671, 'BASE',    TO_DATE ('20-MAR-2008', 'DD-MON-YYYY'), 'YES');
    INSERT INTO table_x (sa_id,  char_type, effdt,                          char_val)
         VALUES     (0010973671, 'BASE',    TO_DATE ('18-JUN-2010', 'DD-MON-YYYY'), 'NO');
    COMMIT;Also, post the results that you want from that data. I'm not certain, but I think you want these results:
    `    SA_ID LAST_EFFD
        651005 13-NOV-09
      10973671 18-JUN-10That is, the latest effdt for each distinct sa_id.
    Here's how to get those results:
    SELECT    sa_id
    ,         MAX (effdt)    AS last_effdt
    FROM      table_x
    GROUP BY  sa_id
    ;

Maybe you are looking for