Re: About Date Functions

Vansuypeene Laurent wrote:
>
Hello Forte Users,
I'm looking for a function that returns the number of the week
in the year (from 1 to 53) and the number of the day in the year (from 1
to 365).
Has anyone written it ?
Thanks
L. VANSUYPEENE
e-mail : [email protected]
Try this code for day of year
DayOfYear :
-------------------------START OF CODE--------------------------------
dtd1,dtd2 : DateTimeData = new;
df: dateformat = new(template = 'd/m');
-- Set dtd1 to 1 januari
dtd1 = df.decodedate('1/1');
dtd2.SetCurrent();
intd : IntervalData = new;
intd.SetUnit(months = dtd2.GetUnit(DR_MONTH) - 1,
days = dtd2.GetUnit(DR_DAY));
-- Normalize : calculate days starting from dtd1
intd.Normalize(dtd1);
return intd.GetUnit(DR_DAY);
-------------------------END OF CODE--------------------------------
Try this code for week of year :
Week of Year :
-------------------------START OF CODE--------------------------------
OFFSET_WEEKDAY : Integer = 6;
THURSDAY : Integer = 4;
wd : DateTimeData;
jul_31dec : Integer;
wd_1jan : Integer;
jul_mon1 : Integer;
yr : Integer;
mn : Integer;
dy : Integer;
jul : Integer;
weeknr : Integer;
month_cm_365 : Array of IntegerData = new;
month_cm_365[1] = IntegerData(value=0);
month_cm_365[2] = IntegerData(value=31);
month_cm_365[3] = IntegerData(value=59);
month_cm_365[4] = IntegerData(value=90);
month_cm_365[5] = IntegerData(value=120);
month_cm_365[6] = IntegerData(value=151);
month_cm_365[7] = IntegerData(value=181);
month_cm_365[8] = IntegerData(value=212);
month_cm_365[9] = IntegerData(value=243);
month_cm_365[10] = IntegerData(value=273);
month_cm_365[11] = IntegerData(value=304);
month_cm_365[12] = IntegerData(value=334);
month_cm_366 : Array of IntegerData = new;
month_cm_366[1] = IntegerData(value=0);
month_cm_366[2] = IntegerData(value=31);
month_cm_366[3] = IntegerData(value=60);
month_cm_366[4] = IntegerData(value=91);
month_cm_366[5] = IntegerData(value=121);
month_cm_366[6] = IntegerData(value=152);
month_cm_366[7] = IntegerData(value=182);
month_cm_366[8] = IntegerData(value=213);
month_cm_366[9] = IntegerData(value=244);
month_cm_366[10] = IntegerData(value=274);
month_cm_366[11] = IntegerData(value=305);
month_cm_366[12] = IntegerData(value=335);
wd = new;
wd.SetValue(dateTimeData().SetCurrent().Value);
yr = wd.GetUnit(DR_YEAR);
mn = wd.GetUnit(DR_MONTH);
dy = wd.GetUnit(DR_DAY);
-- always needed : the julian date of 31 december of the
-- previous year
jul_31dec = 365 * (yr - 1) + (yr - 1) / 4
- (yr - 1) / 100
+ (yr - 1) / 400;
begin
-- calculate the julian date
yd : Integer; -- days in current year
yr_366 : Boolean;
yr_366 = ( (yr % 400) = 0 ) OR
( ((yr % 4) = 0) AND ((yr % 100) <> 0));
if yr_366 then
yd = month_cm_366[mn].Value + dy;
else
yd = month_cm_365[mn].Value + dy;
end if;
jul = yd + jul_31dec;
end;
wd_1jan = (jul_31dec + 1 + OFFSET_WEEKDAY) % 7 + 1;
if ( wd_1jan <= THURSDAY) then
jul_mon1 = jul_31dec + 1 - wd_1jan + 1;
else
jul_mon1 = jul_31dec + 1 - wd_1jan + 1 + 7;
end if;
weeknr = (jul - jul_mon1 + 7) / 7;
-- Treat the special cases : week 0 and 53
if ( weeknr = 0 ) then
-- calculate the julian date of the first monday of 2
-- years ago and use this to calculate the week number
jul_31dec : Integer = 365 * (yr-2)
+ (yr-2) / 4
- (yr-2) / 100
+ (yr-2) / 400;
wd_1jan = (jul_31dec + 1 + OFFSET_WEEKDAY) % 7 + 1;
if ( wd_1jan <= THURSDAY ) then
jul_mon1 = jul_31dec + 1 - wd_1jan + 1;
else
jul_mon1 = jul_31dec + 1 - wd_1jan + 1 + 7;
end if;
weeknr = (jul - jul_mon1 + 7) / 7;
end if;
if ( weeknr = 53 ) then
-- week 53 of this year or week 1 of the next year
-- calculate the weekday of january 1st of the next year
-- and decide week 1 or 53
jul_31dec : Integer = 365 * yr
+ yr / 4
- yr / 100
+ yr / 400;
wd_1jan = (jul_31dec + 1 + OFFSET_WEEKDAY) % 7 + 1;
if ( wd_1jan <= THURSDAY ) then
weeknr = 1;
end if;
end if;
return weeknr;
-------------------------END OF CODE--------------------------------
Thanks to Franky De Lamper of Cap Gemini
Steven Arijs
[email protected]

e.g.
SQL> ed
Wrote file afiedt.buf
  1  with t as (select to_date('15-may-1982', 'dd-mon-yyyy') as dt from dual union all
  2             select to_date('24-may-1982', 'dd-mon-yyyy') from dual)
  3  -- END OF TEST DATA
  4  select dt,
  5         round(dt,'mm') as rnd_date,
  6         trunc(dt,'mm') as trnc_date
  7* from t
SQL> /
DT          RND_DATE    TRNC_DATE
15-MAY-1982 01-MAY-1982 01-MAY-1982
24-MAY-1982 01-JUN-1982 01-MAY-1982
SQL>Note: In case you didn't realize, rounding will round dates as with numbers (up or down), and you should use TRUNC if you want to remove the day portion (i.e. truncate to the start of the month)

Similar Messages

  • [b]About date function[/b]

    hai,
    Is there any function in oracle to find difference between 2 date.

    sorry.I think i must be somewhat detail about my question.here is this.
    1. My table desc
    SQL> desc date4;
    Name Null? Type
    EDATE1 DATE
    EDATE2 DATE
    2. Values inside it.
    SQL> select * from date4;
    EDATE1 EDATE2
    08-JUN-2004 14:37:01 08-JUN-2004 14:39:01
    08-JUN-2004 14:39:38 08-JUN-2004 14:41:38
    08-JUN-2004 14:44:11 08-JUN-2004 14:46:11
    08-JUN-2004 14:53:55 08-JUN-2004 14:55:55
    08-JUN-2004 14:55:33 08-JUN-2004 14:57:33
    3. Answer for your reply
    SQL> select edate2-edate1 from date4;
    EDATE2-EDATE1
    .001388889
    .001388889
    .001388889
    .001388889
    .001388889
    4. Whether we should format to get difference of hours for the given 2 dates.
    5. Pls do help.

  • I need to know about date function in Java

    Hi All,
    Here is my question - I need to subract 18 months from a particular date. How do I do that using Java coding?
    eg: 09/30/2003 - 18 months = 03/30/2002
    I have to to code this in Java in order to use it in one of my application. I would appreciate your help.
    Thanks & Regards
    Simly

    Hi There,
    Thank you for your reply...Need some more help...
    This is the case I want to deal with. I need to calculate the value for the field called "mydate"
    These are the three dates, I am going to deal with:
    1.olddate = I have a value for it -> eg: 05/12/1998
    2.today = Today's date -> eg: 09/30/2003
    3.newdate = today.month - 18 months -> eg: today.month =09-18=03/30/2002
    These are the three dates values.
    Now what I need to do is,
    If olddate(05/12/1998) > newdate (03/30/1998)
    then "mydate" = newdate -> 03/30/2002
    Else "mydate" = olddate -> 05/12/1998
    I am a good C++ programmer & a student and I am right now learning all the Java packages. I am having the greatest problem with the calcuation of value to the variable "new date". And also with the "If condition statement". I am aware of the before, after, getMonth methods. But, I am having problem in using them in this case. Could you please give me the exact coding for the declaration of the variables and the value calculation(in this specific case). I would appreciate your time and help.
    Thanks & Regards
    Simly

  • About disable the cellular data function

    Hi everyone, I get a big problem...
    I have just come back to HK after my holiday. I'm really sure that I had turned off the cellular data function when I left HK.
    However, I was really surprised  when I received the bill. There is a big charge for data roaming. I have contact my mobile phone company and he replied that it is impossible to completely turn off the cellular data function of the iPhone. iPhone will get updating some data, such as weather automatically.
    is it true??
    Thx for your help!!!!

    Hi,
    This topic interests me.  Can I just confirm that navigating to Settings>General>Mobile Data and turning:
    1) Mobile Data
    2) Enable 3G
    3) Data Roaming
    to "Off" will not entirely prevent access to cellular data networks?  What if you navigated a step further to >Mobile Data Networks and simply deleted all entries, or replaced existing entries with garbage?

  • I have a question about Data Rates.

    Hello All.
    This is a bit of a noob question I'm sure. I don't think I really understand Data Rates and how it applies to Motion... therefore I'm not even sure what kind of questions to ask. I've been reading up online and thought I would ask some questions here. Thanks to all in advance.
    I've never really worried about Data Rates until now. I am creating an Apple Motion piece with about 15 different video clips in it. And 1/2 of them have alpha channels.
    What exactly is Data Rate? Is it the rate in which video clip data is read (in bits/second) from the Disc and placed into my screen? In Motion- is the Data Rate for video only? What if the clip has audio? If a HDD is simply a plastic disc with a dye read by "1" laser... how come my computer can pull "2" files off the disc at the same time? Is that what data transfer is all about? Is that were RAM comes into play?
    I have crunched my clips as much as I can. They are short clips (10-15seconds each). I've compressed them with the Animation codec to preserve the Alpha channel and sized them proportionally smaller (320x240). This dropped their data rate significantly. I've also taken out any audio that was associated with them.
    Is data rate what is slowing my system down?
    The data rates are all under 2MBs. Some are as low as 230Kbs. They were MUCH higher. However, my animation still plays VERY slowly.
    I'm running a 3GigRam Powerbook Pro 2.33GHz.
    I store all my media on a 1TB GRaid Firewire 800 drive. However for portability I'm using a USB 2 smartdisk external drive. I think the speed is 5200rpm.
    I'm guessing this all plays into the speed at which motion can function.
    If I total my data rate transfer I get somewhere in the vicinity of 11MBs/second. Is that what motion needs for it to play smoothly a 11MBs/second data connection? USB 2.0 is like what 480Mbs/second. So there is no way it's going to play quickly. What if I played it from my hard drive? What is the data rate of my internal HDD?
    I guess my overall question is.
    #1. Is my thinking correct on all of these topics? Do my bits, bytes and megs make sense. Is my thought process correct?
    #2. Barring getting a new machine or buying new hardware. What can I do to speed up this workflow? Working with 15 different video clips is bogging Motion down and becoming frustrating to work with. Even if only 3-4 of the clips are up at a time it bogs things down. Especially if I throw on a glow effect or something.
    Any help is greatly appreciated.
    -Fraky

    Data rate DOES make a difference, but I'd say your real problem has more to do with the fact that you're working on a Powerbook. Motion's real time capabilities derive from the capability of the video card. Not the processor. Some cards do better than others, but laptops are not even recommended for running Motion.
    To improve your workflow on a laptop will be limited, but there are a few things that you can try.
    Make sure that thumbnails and previews are turned off.
    Make sure that you are operating in Draft Mode.
    Lower the display resolution to half, or quarter.
    Don't expect to be getting real time playback. Treat it more like After Effects.
    Compressing your clips into smaller Animations does help because it lowers the data rate, but you're still dealing with the animation codec which is a high data rate codec. Unfortunately, it sounds necessary in your case because you're dealing with alpha channels.
    The data rate comes into play with your setup trying to play through your USB drive. USB drives are never recommended for editing or Motion work. Their throughput is not consistent enough for video work. a small FW drive would be better, though your real problem as I said is the Powerbook.
    If you must work on the powerbook, then don't expect real-time playback. Instead, build your animation, step through it, and do RAM previews to view sections in real time.
    I hope this helps.
    Andy

  • How to  use data function using characterstics variable for calculation on

    how to  use data function using characterstics variable for calculation on  attribute as key figure

    Hi Gayatri
    Did you not see my answer for CASE because CASE does indeed offer the use of the BETWEEN clause, but DECODE does not. Let me give you a little synopsis of DECODE.
    In its most simple form it takes 4 values and looks like this: DECODE(A, B, C, D)
    This essentially means, IF A = B THEN C ELSE D
    The trick to solving BETWEEN in a DECODE is to work out algoriths where A = B. Because we don't know how many values are between 00 and 99, although I could guess there were 100 we could of course have 100 parts in the DECODE but that would be awful. How about if we look at it another way and say this:
    IF PART_NUMBER < 'SDK00' THEN pay_amount
    ELSE IF PART_NUMBER > 'SDK99' THEN pay_AMOUNT
    ELSE pay_amount + 100
    This statement only had 2 hard coded values, but how to make DECODE work with less than? Easy, we use the LEAST function. The LEAST function takes 2 values and returns the one with the lowest value. So I use LEAST(PART_NUMBER, 'SDK00') then whenever the PART_NUMBER is lower than SDK00 it will be true. A similar situation exists for the opposite function GREATEST. Putting all of this together then, you can do this:
    DECODE(PART_NUMBER, GREATEST(PART_NUMBER, 'SDK00'), DECODE(PART_NUMBER, LEAST(PART_NUMBER, 'SDK99'), PAY_AMOUNT * 100, PAY_AMOUNT), PAY_AMOUNT)
    In English this can be read as follows:
    IF the PART_NUMBER is greater than or equal to SDK00 and the PART_NUMBER is less than or equal to SDK99 THEN PAY_AMOUNT x 100 ELSE 0
    Best wishes
    Michael

  • Trunc date function not working correctly

    Hi,
    Another quick question if people don't mind. Bit confused about the trunc date function. I'm following the sql fundamentals exam guide and using their examples:
    select trunc(to_date('02-jun-2009 13:00','dd-mon-yyyy hh24:mi')) day from dual;
    this returns the 2nd of june, as it should, because, as far as i'm aware, leaving the optional variable out defaults the precision to 'day'. but when i explicitly add the variable 'day', as the guide has done with 'week' 'month' and 'year' in the following examples (so i assume this format is correct rather than dd/mon/yyyy), something goes wrong:
    select trunc(to_date('02-jun-2009 13:00','dd-mon-yyyy' hh24:mi'), 'day') day from dual;
    this returns the 31st of may. which is incorrect.
    however replacing 'day' with 'dd' provides the correct answer of the 2nd again.
    this isn't a major issue, it just bothers me that the guide seems (again) to be mistaken, something that is rapidly becoming a trend in their examples. i'd also quite like to know why this is happening, as it will help improve my understanding of sql in general - perhaps there is some sort of default to allow the correct use of the variable 'day' i'm overlooking and that the guide hasn't made clear.
    btw, i'm working in sqlplus - although developer has some odd results too.
    thanks alot,
    nick

    967660 wrote:
    Hi,
    Another quick question if people don't mind. Bit confused about the trunc date function. I'm following the sql fundamentals exam guide and using their examples:
    select trunc(to_date('02-jun-2009 13:00','dd-mon-yyyy hh24:mi')) day from dual;
    this returns the 2nd of june, as it should, because, as far as i'm aware, leaving the optional variable out defaults the precision to 'day'. but when i explicitly add the variable 'day', as the guide has done with 'week' 'month' and 'year' in the following examples (so i assume this format is correct rather than dd/mon/yyyy), something goes wrong:
    select trunc(to_date('02-jun-2009 13:00','dd-mon-yyyy' hh24:mi'), 'day') day from dual;
    this returns the 31st of may. which is incorrect.
    however replacing 'day' with 'dd' provides the correct answer of the 2nd again.
    this isn't a major issue, it just bothers me that the guide seems (again) to be mistaken, something that is rapidly becoming a trend in their examples. i'd also quite like to know why this is happening, as it will help improve my understanding of sql in general - perhaps there is some sort of default to allow the correct use of the variable 'day' i'm overlooking and that the guide hasn't made clear.
    btw, i'm working in sqlplus - although developer has some odd results too.
    thanks alot,
    nick'day' doesn't trunc to the beginning of the day. It truncates to the first day of the week: in your case 31st May.
    'ddd' truncates to the beginning of the day.
    So, leaving the second parameter out defaults to 'ddd' not 'day'.

  • Problem About Date Format in Dashboard

    Hi All:
    I still have problem about date format in dashboard and dashboard prompt. When I use cast(dealdate as date) in dashboard prompt(coloumn formula of deal_date) and filter view(In edit view of filter coloumn formula) Then It converts the date format from mm/dd/yyyy to yyyy-mm-dd But I want format in dd-mm-yyyy.
    ANd also one problem more that is when I use cast function in filter coloumn formula then how I give alias to it. Because it shows same like that cast(deal_date as date) on dashboard filter view.
    Pluzz help me to solve this problem
    Haroon

    Changing the ini files should change the date format. Have you amended the correct instances of the date format? In dbFeatures there is one for every ODBC connection.
    For example in my DBFeatures.INI
    [ DATA_SOURCE_FEATURE = ODBC_300 ]
    DATE_FORMAT = 'dd-mm-yyyy' ;
         TIME_FORMAT = 'hh:mi:ss' ;
         DATE_TIME_FORMAT = 'dd-mm-yyyy hh:mi:ss' ;
         IDENTIFIER_QUOTE_CHAR = '"';Also a file on the presentation side in OracleBI \web\Config called localedefinitions.xml.
    Inside that there appears to be defaults for localisations - maybe it is possible to amend your locale in the Administration settings of the dashboard.
    However, I haven't tried this sorry.

  • XLR Get Other Data Function

    Hi all,
    Im wondering if I can use cell valeu data in the Where clause of the GetOtherData function.
    EG Get Invoice Key where Payment No = whatever is in cell D9.
    I keep getting syntax errors.
    I'm trying to report accross 2 modules - AR and Banking.
    I need to display Invoice data as well as related payment data.
    In report composer after making my AR selections, I try to drag and drop data from the Banking module to show payment data related to the Invoices.
    The data is not retrieved.
    I was wondering if this might be possible using the GetOtherData function in Advanced Report Builder.
    Can I show data related to whats in a certain cell in my report?
    Thanks for any suggestions.
    John O'Brien

    Hello,
    In composer, you cannot use two modules together to get the information in each module.
    Get other Data function can get the value in a specific field in tables. Please check online help file, there is detailed example about it.
    the syntax in using Get Other Data is exactly same in SQL.
    Thanks,
    Maggie An
    SAP Business One Forum Team

  • Date function problem

    i am student and using Oracle 11g XE, now while trying out the date function..when time 15:00:00 was entered an error is being shown
    the * is being shown under 15:00:00
    SQL> create table ticket_header(ticket_no number(5), doi date, dot date, time_travel date, board_place varchar2(15), origin varchar2(15), destination varchar2(15), adults number(5), children number(5), total_fare number(5), route number(5));
    SQL> insert into ticket_header values(01, '01-apr-96', '10-may-96', '15:00:00', 'Parrys', 'Madras', 'Madhurai', 1, 1, 60, 101);
    insert into ticket_header values(01, '01-apr-96', '10-may-96', '15:00:00', 'Parrys', 'Madras', 'Madhurai', 1, 1, 60, 101)
    ERROR at line 1:
    ORA-01843: not a valid month

    What's the purpose of time_travel column ? Will you do calculations on it, or it's only for reporting ? If the former, then date is better, otherwise you could use a varchar2 column. See this example :SQL> create table test(a date, b varchar2(8));
    Table created.
    SQL> insert into test values(to_date('15:00:00','hh24:mi:ss'),'15:00:00');
    1 row created.
    SQL> select to_char(a,'hh24:mi:ss'),b from test;
    TO_CHAR(A,'HH24:MI:SS')  B
    15:00:00                 15:00:00
    SQL>About the error, you get it because your date format is 'DD-MON-RR' (the default), and inserted values have to conform with it, as in your other date columns, or you have to format them (e.g. to_date).

  • Due Date function for Reminders

    Apple needs to incorporate the due date function into the Reminders app so we don't have to do this separately from the icloud website
    This is obviously a glitch,   if we complain enough maybe this will be fixed  
    currently the only way to set due dates for reminders requires being sneaking as this article explains
    this needs to be fixed
    http://reviews.cnet.com/8301-13727_7-57495293-263/how-to-set-a-due-date-for-moun tain-lion-reminders/

    I've found a way, but it's annoyingly complicated:
    1. Export your reminders list (produces a .ics file)
    2. Open the .ics file with a plain text editor (I used TextMate, but I'm sure any editor would work).
    3. Search for the reminder.
         -Say you are looking for "Homework 5", you should find something like this:
              SUMMARY:Homework 5
    4. Below that field (but before END:VTODO) there are 2 fields:
              DUE;TZID=America/Los_Angeles:20121108T140000
         and
              TRIGGER;VALUE=DATE-TIME:20121108T140000Z
    5. TRIGGER is when you want to be reminded. DUE is the missing due field if it doesn't match TRIGGER.
    6. Modify TRIGGER to a legit time (24-hr, of course):
              TRIGGER;VALUE=DATE-TIME:20121107T180000Z
    7. Save and Import the modified .ics file back into a new list in reminders. Then, delete the original list.
    8. You should see the due field now and be able to edit the dates natively within the app.
    9. You're killing me, Apple. The due field would be extremely useful, especially for students like me. I wish the presence of the due field were toggle-able in Settings>Reminders.
    10. While I'm ranting about my wishes, the repeat feature would be much more useful if the frequency were completely customizable (i.e. Repeat every [#] [wks/hrs/days] or Repeat every [1st/2nd/3rd/etc.] [Day of week] of every [1st/2nd/3rd/etc.] [month/week] and so on... ).

  • Set data function

    hi folks,
    i'm new to flex and that is why i don't know when the set data function of item renderer is called. means what causes the call for set data function of item renderer?
    i inherited a flex application (the developer left) and i am wondering why the set data function of one item renderer is called when an item of the item renderer was clicked but the set data function of another item renderer is called just one time (when the view is created) but never again even if an item of the item renderer was clicked.
    so please can someone explain me or mention a good ressource for reading about how it works?

    Whenever data changes in some way, for example when the dataprovider is changed, the set data function is called automatically.
    Some tips:
    1. Make sure the dataprovider is bound (<s:List dataprovider="{myDataCollection}"/>
    2. If you change the dataprovider, call the refresh() function (like when the dataprovider is a IListCollectionView)
    3. override the set data function in your itemRenderer to do additional things there.
    Hope this helps
    Dany

  • Using user hold data function in FB65

    Dear Guru's
    In FB65, I input amount, gl account, amount in doc currency, calculate tax tax box and tax type. Then I select Hold data function. When I exit FB65 and re-enter again, all saved data is available except for the calculate tax tick box and tax type.
    Is there anyway to get this hold as well?
    Regards
    Shakeer

    Hi,
    This is standared functionality when you process final account document from Hold Doc user should Select Tax & Process the same.
    Clear Information about Hold Doc
    "With Hold Document, data which has been entered can be saved temporarily in order to continue the entries at a later time. Documents held by the system do not have to be complete. No account balances are updated and the data of the
    document is not available for evaluation. No document number is assigned. The person making the entries is asked to name the document after selecting the Hold Document function. The document can be found under this name at a later time."
    Regards
    Viswa

  • Can anybody tell me about SD Functionality and the main tables used in SD

    Hi,
    Can anybody tell me about SD Functionality and the main tables used in SD.
    Thanks,
    bsv.

    Hi
    SD FLOW
    SD Flow Cycle:
    INQUIRY ( VA11)
    |
    QUOTATION (VA21)
    |
    PURCHASE ORDER (ME21)
    |
    ORDER CONFIRMATION (VA01)
    |
    PICKING LIST – (VL36)
    |
    PACKING LIST - (VL02, VL01)
    |
    SHIPPING – (VT01)
    |
    INVOICE – (VF21, VF01)
    |
    AR
    Enquiry - Customer enquires about the Products services that were sold by a company - VA11
    Quotation - Company Gives a Quotation for the products and Services to a Customer
    Sales Order - Customer gives a Purchase order to the company agaionst which a Sales order will be raised to Customer in SAP.
    VBAK: Sales Document(Header Data) (VBELN)
    VBAP: Sales Document(Item Data) (VBELN,POSNR,MATNR,ARKTX,CHARG)
          Enquiry, Quotation, Sales Order are differentiated based on Doc.
          Type(VBTYP field) in VBAK,VBAP Tables( for Enquiry VBTYP = A,
          for Quotation 'B' & for Order it is 'C'.)
    Delivery(Picking, Packing, Post Goods Issue and Shipment)->
    Company sends the material after picking it from Godown and Packing it in a Handling Unit(box) and Issues the goods
    LIKP: Delivery Table (Header Data)(VBELN,LFART,KUNNR,WADAT,INCO1)
    LIPS: Delivery Table (Item Data)(VBELN,POSNR,WERKS,LGORT,MATNR,VGBEL)
          (LIPS-VGBEL = VBAK-VBELN, LIPS-VGPOS = VBAP-POSNR)
    Billing - Also company bills to the customer for those deliveries
    And in FI against this billing  Accounting doc is created.
    VBRK: Billing Table(Header Data)(VBELN,FKART,BELNR)
    VBRP: Billing Table(Item Data)(VBELN,POSNR,FKIMG,NETWR,VGBEL,VGPOS)
          (VBRP-AUBEL = VBAK-VBELN, VBRP-VGBEL = LIKP-VBELN)
          Apart from these tables there are lot of other tables which starts with
          ‘V’, but we use the following tables frequently.
    other tables and imp fields
    VBUK: All Sales Documents status & Admn. Data(Header)(VBELN,VBTYP)
          VBTYP= ‘C’(Sales Order) VBTYP=’J’(Delivery) VBTYP=’M’(Invoice) 
    VBUP: Sales Documents status & Admn. Data(Item)(VBELN,POSNR)
    VBEP: Sales Doc. Schedule Lines Data(VBELN,POSNR,EDATU,WMENG)
    VBKD: To get sales related Business data like Payment terms etc.(VBELN,ZTERM)
    VBFA: sales document flow data(VBELV,VBELN,POSNV,VBTYP)
    VBPA: Partner functions Data(VBELN,PARVW,KUNNR,LIFNR)
    VEDA: Contract Data(VBELN,VPOSN)
    VEDAPO: Contract Data(VBELN,VPOSN)
    KONA:  Rebate Agreements (KNUMA,VKORG,VTWEG,SPART)
    VBRL:  SD Document: Invoice List(VBELN,POSNR,VBELN_VF,NETWR,KUNAG)
    VKDFS: SD Index: Billing Indicator(FKTYP,VBELN,FKART,VKORG)
    VBSK:  Collective Processing for a Sales Document Header(SAMMG,SMART)
    VBSS:  Collective Processing: Sales Documents(SAMMG,VBELN,SORTF)
    VRKPA: Sales Index: Bills by Partner Functions(VBELN,BELNR,KUNDE,PARVW)
    VRPMA: SD Index: Billing Items per Material(MATNR,VBELN,BELNR,KUNNR)
    TVLKT: Delivery Type: Texts(LFART,VTEXT)
    KNA1: Customer Master-General(KUNNR,NAME1,LAND1)
    KNB1: Customer Master(Company Code)(KUNNR,BUKRS,PERNR)
    KNC1: Customer Master Data (Transaction Figures)(KUNNR,BUKRS,GJAHR)
    KNVK: Customer Master Contact Partner(PARNR,KUNNR,NAME1)
    KNVV: Customer Master sales data(KUNNR,VKORG,VTWEG,KDGRP)
    KNBK: Customer Bank Details(KUNNR,BANKS,BANKL,BANKN)
    KNVH: Customer Hierarchy (HITYP,KUNNR,VKORG,VTWEG,SPART)
    KNVP: Customer Master Partner Functions(KUNNR,PARVW,KUNN2)
    KNVS: Customer Shipment data(KUNNR,VSTEL,TRANS)
    KNVI: Customer Tax data(KUNNR,ALAND,TATYP)
    LFA1: Vendor Master-General (LIFNR,NAME1,ORT01)
    LFB1: Vendor Master(Company Code)(LIFNR,BUKRS,PERNR)
    LFC1: Vendor Master (Transaction Figures)(LIFNR,BUKRS,GJAHR)
    MARA: Material Master-General (MATNR,MTART,MATKL)
    MARC: Material Master-Plant data(MATNR,WERKS,EKGRP)
    MARD: Material Master- St.Location Data(MATNR,WERKS,LGORT,LABST)
    EBEW:  Sales Order Stock Valuation(MATNR,VBELN,BWKEY,BWTAR)
    TVKO:  Sales Organizations(VKORG)
    TVTW:  Distribution Channel(VTWEG)
    TSPA:  Divisions(SPART)
    TVKOV: Distribution Channels for S.Orgn(VKORG,VTWEG)
    TVKOS: Divisions for S.Orgn(VKORG,SPART)
    TVTA:  Sales Areas(VKORG,VTWEG,SPART)
    TVBUR: Sales Offices(VKBUR,ADRNR)
    TVKBT: Sales Office Texts(VKBUR,SPRAS,BEZEI)
    TVKBZ: Sales Office Assign.to Sales Area(VKORG,VTWEG,VKBUR)
    TVKGR: Sales Group(VKGRP)
    TVGRT: Sales Group Texts(VKGRP,SPRAS,BEZEI)
    TVBVK: Sales Group to Sales office(VKBUR,VKGRP)
    TVKWZ: Plants Assign.to S.Orgn(WERKS,VKORG)
    T171T: Sales District Texts(BZIRK,BZTXT,SPRAS)
    TVLA:  Loading Points(LSTEL)
    TVST:  Shipping Points (VSTEL)
    TVSWZ: Shipping Point to Plant(VSTEL,WERKS)
    TVPT:  Item Categories (PSTYV)
    TINC:  Customer Incoterms(INCO1)
    T077D: Customer Account Group (KTOKD)
    T001W: Plants (WERKS)
    T001L: Storage Locations (LGORT)
    T499S: Locations(WERKS,STAND,KTEXT)
    TWLAD: To get address of Storage Location and Plant(LGORT,ADRNR)
    TVAK:  Sales Document (Order) Types (AUART)
    TVAU:  Sales Documents: Order Reasons (AUGRU)
    TVFK:  Billing Document Types (FKART)
    TVLK:  Delivery Types(LFART)
    TVSB:  Shipping Conditions (VSBED)
    TTDS:  Transportation Points(TPLST)
    TVKT:  Account Assignment Groups (KTGRD)
    KONV:  Condition Types pricing)(KNUMV,KSCHL,KWETR)
    ADRC:  To get Addresses of Partners(ADDRNUMBER,NAME1)
    VBBE:  Sales Requirements: Individual records(VBELN,POSNR,MATNR)
    VBBS:  Sales Requirement totals Record(MATNR,WERKS,LGORT,CHARG)
    VBKA:  Sales Activities Data(VBELN,KTAAR)
    VBPV:  Sales Document Product Proposal(VTWEG,MATNR,KUNNR,CHARG)
    T682:  Access Sequences (KOZGF)
    T682T: Access Sequence Texts (KOZGF,VTXTM)
    T683:  Pricing Procedures (KALSM)
    T683T: Pricing Procedures Texts(KALSM,KAPPL,SPRAS,VTEXT)
    T685:  Pricing Condition Types (KSCHL)
    T685T: Condition Type Texts(KSCHL,SPRAS,KAPPL,VTEXT)
    KONH:  Conditions (Header)(KNUMH,KAPPL,KSCHL)
    KONP:  Conditions (Item)(KNUMH,KOPOS,KAPPL,KSCHL)
    KONV:  Conditions (Transaction Data)(KNUMV,KSCHL,KBERT,KWERT)
    KOND:  Conditions (KNUMD,ZUSKO,KSCHL)
    for sd go through the links
    http://www.sapgenie.com/abap/tables_sd.htm
    Please check this SD online documents.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CAARCSD/CAARCSD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_SD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMSD/BCBMTWFMSD.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LOLISPLN/LOLISPLN.pdf
    Also please check this SD links as well.
    http://help.sap.com/saphelp_47x200/helpdata/en/92/df293581dc1f79e10000009b38f889/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/dd/55f33e545a11d1a7020000e829fd11/frameset.htm
    http://www.sap-basis-abap.com/sapsd.htm
    http://www.sap-img.com/sap-sd.htm
    http://www.sapgenie.com/abap/tables_sd.htm
    http://searchsap.techtarget.com/featuredTopic/0,290042,sid21_gci961718,00.html
    http://www.sapbrain.com/TUTORIALS/FUNCTIONAL/SD_tutorial.html
    All help ebooks are in PDF format here
    http://www.easymarketplace.de/online-pdfs.php
    Reward points if useful
    Regards
    Anji

  • Question about the function module (RFC_READ_TABLE)

    Dear everyone
    Could I ask you a question about the function module (RFC_READ_TABLE)?
    I was asked if it's possible to create a report which compares the data between different SAP systems (both production systems).
    Now, the easiest way would be to use the function module (RFC_READ_TABLE) within a SAP infoset query (SQ01 type query).
    But I heard the rumor that using the function module (RFC_READ_TABLE) is not advisable due to the security reason.
    However, I am not exactly sure what sort of security problems this function module can possibly have...
    Would you help me on this?
    I also would like to know if using "remote enabled module" type function module can always overcome this possible security issue.
    Or, are there any points that I need to be careful about even when I use "remote enabled module" function module?
    Thank you very much in advance.
    Takashi

    Dear Fred-san
    Thank you very much for your support on this.
    But, may I double check about what you mentioned above?
    So, what you were mentioning was that if some user executes the query with
    the function module (RFC_READ_TABLE), under the following conditions, he can access to
    the HR data even when he does not have the authorizations for HR transactions?
    <Conditions>
    1. the user has the authorization for HR database tables themselves
    2. RFC_READ_TABLE is called to retrieve the data from HR database
    <example>
    Data: LF_HR_TABLE like  DD02L-TABNAME value 'PA0000'.
    CALL FUNCTION 'RFC_READ_TABLE'
       EXPORTING
        query_table                = LF_HR_TABLE
      TABLES
       OPTIONS                    =
       fields                     =
       data                       =    .
    But then, as long as we call this function module for a non-critical tables such as
    VBAP (sales order) or EKKO (purchase order) within our query, it wouldn't seem to be
    so security risk to use RFC_READ_TABLE...
    Besides, each query (infoset query) has got the concept of user groups, which limits
    the access to the queries within the user group.
    ※If someone does not belong to the user group, he cannot execute the queries within that
       user group, etc
    So, my feeling is that even infoset queries does have authorization concept...
    Would you give me your thought on this?
    I also thank you for your information for SCU0.
    That is an interesting transaction
    Kind regards,
    Takashi

Maybe you are looking for