Difference b/w dates.can any one gve me conde argruntly plz..

i have oen problem.. in o/p selection screen we have ..2 parameters: there we will gve the dates...and we need to print the dates of saturday and sunday..in those date ranges..
ex:p1 =  24.08.2007
     p2 = 30.06.2007
o/p = 19 sunday
18 saturday
12 sunday
11 saturaday....like this..

HI,
Check the FM <b>CATSXT_GET_HOLIDAYS</b>.
Try this Program,
DATA : HOLIDAY TYPE CATSXT_ISCAL_DAY_ITAB,
       HOLI LIKE LINE OF HOLIDAY.
CALL FUNCTION 'CATSXT_GET_HOLIDAYS'
  EXPORTING
    IM_PERSONNEL_NUMBER       = 00000000
    IM_BEGIN_DATE             = '20070801'
    IM_END_DATE               = sy-datum
    IM_GET_WEEKEND_DAYS       = 'X'
IMPORTING
    EX_HOLIDAYS               = HOLIDAY.
LOOP AT HOLIDAY INTO HOLI.
CALL FUNCTION 'DATE_TO_DAY'
  EXPORTING
    DATE          = HOLI-DATE
IMPORTING
    WEEKDAY       = WEEKDAY.
WRITE : / HOLI-DATE,WEEKDAY.
ENDLOOP.            
Regards,
Padmam.

Similar Messages

  • Can any one tell me difference between 2 dates in days

    hi guys,
    can any one tell me the difference between 2 dates in days
    for eg: input  20.12.2006 and 06.11.2006 will be 34.
    thanks in advance for you answers
    Regards,
    Anil kumar P

    Hi Anil,
    Check this code for u r requirement
    REPORT ZDATEDIFF.
    DATA: EDAYS LIKE VTBBEWE-ATAGE,
    EMONTHS LIKE VTBBEWE-ATAGE,
    EYEARS LIKE VTBBEWE-ATAGE.
    PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
    TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
    call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
    exporting
    i_date_from = FROMDATE
    i_date_to = TODATE
    I_FLG_SEPARATE = ' '
    IMPORTING
    E_DAYS = EDAYS
    E_MONTHS = EMONTHS
    E_YEARS = EYEARS.
    WRITE:/ 'Difference in Days ', EDAYS.
    WRITE:/ 'Difference in Months ', EMONTHS.
    WRITE:/ 'Difference in Years ', EYEARS.
    INITIALIZATION.
    FROMDATE = SY-DATUM - 60.

  • I need to pass value for Actual GI date field in VL01N t code, I am using BAPI_DELIVERYPROCESSING_EXEC. can any one tell me how can i pass vaule ?

    I need to pass value for Actual GI date field in VL01N t code, I am using BAPI_DELIVERYPROCESSING_EXEC. can any one tell me how can i pass vaule ?

    Hi Abdul,
    Sorry for my unprecise answer, but you talk about a tcode, but you're using a BAPI Call. Maybe you want to call the transaction in batch mode?
    http://help.sap.com/saphelp_erp60_sp/helpdata/de/fa/09715a543b11d1898e0000e8322d00/content.htm
    Regards,
    Franz

  • I want to create org data profile in service scenario, with price determination from sales org, distribution centre , can any one help me with these

    i want to create org data profile in service scenario, with price determination from sales org, distribution centre , can any one help me with these
    IF I CREATE SERVICE ORG WITH SERVICE SCENARIO ORG DATA PROFILE,
    MY PRICING IS NOT GETTING DETERMINED AS IT IS LINKED TO SALES ORG AND DISTRIBUTION CHANNEL THROUGH PRICING DETERMINATION SO HOW TO DO THE CUSTOMIZATION FOR THIS SITUATION
    WITH REGARDS,
    SATHISH

    Hi Satish,
    Please assign the org det. rules to org det. profile with Sales and Service scenarios and then assign the org. det. profile to transaction type. The below screenshot is just for your reference.
    Hope it would fix your issue.
    Regards,

  • I have a string 2012-05-22T23:23:42.263-07:00. so i want to convert in date with indian time zone   can any one help me out

    i have a string 2012-05-22T23:23:42.263-07:00. so i want to convert in date with indian time zone   can any one help me out

    What does this have to do with iPhone tech support?

  • Can any one pls tell me the procedure of crm datasourse data extraction r/3

    hi
    pls can any one pls tell me the procedure of crm datasourse data extraction from r/3
    regards
    subbu

    Subbu,
    First off please don't post the same question twice.  I have locked your other question due to it being a duplicate.
    Second off:  don't expect an answer to your question immediately.
    Third off:  You need to read the rules of engagement before posting any more questions here:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/home/rulesofEngagement
    Fourth:  You question is way too vague and honestly if you would have done a search or read some introductory material on CRM, you would have learnt that the CRM middleware handles the data transfer.
    Last:  I'm locking this thread because your question is way too vague, please take a look at the CRM wiki and help.sap.com and read all the associated documentation about CRM on those sites.
    CRM wiki
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/crm/home
    Then you can come back here if you have a detailed question after reading those materials.
    Take care,
    Stephen
    CRM Forum Moderator

  • Can not down load new i tunes up date says old bonjour can not be removed seek advice i tunes is nothing but a pain can any one help

    can not down load i tunes up date because old bonjour can not be removed can any one help
    because apple must know about this problem but are not help full

    I would try uninstalling all of the Apple software and then reinstalling it using these instructions:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    You migh want to try doing this when in safe mode.

  • HT1349 my ipad has had all data and media deleted, i switch it on an it just shows that i n eed a connection to itunes, i went to the itunes site but could find nothing about reinstalling onto my ipad 2 can any one please help me

    my i pad has all the data and media deleted, it now shows me a diagram for connection to i tunes, I have visited i tunes but cannot find anywhere, that tells me to download to reinstall for my i pad can any one help me?

    You need to restore your iPad from iTunes. This assumes that you have a backup of your iPad either in iTunes or iCloud.
    Start iTunes.
    Plug in your iPad using the USB cable.
    Click on the iPad in the left hand column under "Devices".
    In the "Summary" tab, there are options to Back up, Update and Restore.
    Choose Restore and let it run.
    http://support.apple.com/kb/HT1414

  • Can any one tell me the difference between VK11 and MR21

    Hi Folks,
    I have changed price of a material using VK12.
    When I go to the transaction MR21, it is still showing the old price.
    Can any one help what is the difference between VK11 and MR21.
    And i which scenarios these two were used?
    Thanks in Advance
    Gopi Krishna

    Hii,
    VK11: This is price master record to determine the sale price or discounts or freight or taxes which we going to charge to the final customer.  Through this transaction we will determine the price automatically either in sales or billing document.  These transaction is only applicable for sales & distribution module for determining the pricing for customers.
    The price determined through this we use in revenue realisation.
    MR21: Through this trnsaction Finance or Cost users upload the cost of the material.  The cost is
    Standard Cost or Moving average cost.
    Cost= Raw Material CostProcessing Cost(product process cost )Overheads(employee salaries)
    This cost is maintained at each material master in accounting view either standard cost or moving average cost.
    These cost is determined for every material movement within the company.
    Example: Production, transfer posting, goods issue- system post the quantity and at the same time system create an inventory entry i.e accounting entry for the transaction.  In this accounting entries, system consider the values from material master for generating accounting entry.
    If you upload production for 10 MT of material A and in material master if kept the cost of the material as 1000 then the accounting entry in production time as
                  Finish Goods Dr          10000
                            To Cost of Production Cr        10000
    These cost also determined sales transaction through VPRS condition type.
    Rewards if it helps
    Regards
    Goutham

  • Can any one please tell me how to write labview program for data logging in electric motor bike.

    Can any one please tell me how to write labview program for data logging in electric motor bike. I am going to use CompactRIO for getting wide range of data from various sensors in bike. I need to write labview program for data logging of temperature, voltage and speed of the bike. Can any one help me?

    Yes, we can.   
    I think the best place for you to start for this is the NI Developer Zone.  I recommend beginning with these tutorials I found by searching on "data log rio".  There were more than just these few that might be relevant to your project but I'll leave that for you to decide.
    NI Compact RIO Setup and Services ->  http://zone.ni.com/devzone/cda/tut/p/id/11394
    Getting Started with CompactRIO - Logging Data to Disk  ->  http://zone.ni.com/devzone/cda/tut/p/id/11198
    Getting Started with CompactRIO - Performing Basic Control ->  http://zone.ni.com/devzone/cda/tut/p/id/11197
    These will probably give you links to more topics/tutorials/examples that can help you design and implement your target system.
    Jason
    Wire Warrior
    Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!

  • Can any one please tell me how to configure the oracle data gaurd. in steps

    can any one please tell me how to configure the oracle data gaurd. in steps

    Hi,
    http://docs.oracle.com/cd/E11882_01/server.112/e25608/create_ps.htm#i63561
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/ha/dataguard/physstby/physstdby.htm
    Regards
    Yoonas

  • Can any one tell me the difference between third party sales & intercompany

    Hai
    can any one tell me the difference between third party sales & intercompany billing
    reg

    Hi,
    In THIRD PARTY, Goods are sent to customer from the Vendor and no Delivery happens from Company Plant
    In THIRD PARTY, We will Pay to the Vendor and Bills Customer.
    In THIRD PARTY, the PR will be generated automatically from the Sales order
    In INTERCOMPANY Process, Goods are sent to customer from the Supplying Company code  to which an order was placed from the Ordering Company code
    In INTERCOMPANY,, Plant of the supplying company code will be assigned to the Ordering Sales Organisation
    In INTERCOMPANY , We Bills the customer and settles to the SUPPLY COMPANY CODE
    We will use two Pricing procedures, One Normal pricing and other is INTERCOMPANY pricing procedure.
    These are the Major differences.
    Please check these and revert back if you need more details
    regards,
    santosh

  • Can any one give the difference

    can any one give the difference
    between normal java class and java bean
    Is every java bean is a java class

    A java bean is a class (always)
    A class does not have to be a java bean:
    For a bean you need to have a no argument constructor
    follow any of the other java bean guidelines/requirements...
    http://java.sun.com/developer/onlineTraining/Beans/index.html

  • Can any one tell data match ticket with example  SD& MM

    hi
    this is jagadeesh
    can any one tell data match ticket with example in SD& MM

    Dear,
    Please refer below mention link.
    http://www.sap-img.com/sap-sd/link-between-sap-sd-mm-and-fi.htm
    Regards,
    Mahesh Wagh

  • Can any one explain me about Field symbols in Genral Reports?

    Can any one explain me about Field symbols in Genral Reports?
    If possible, plz explain me with the code to explain me about the field symbols.
    Regards,
    Krishna Chaitanya

    Syntax
    FIELD-SYMBOLS <fs> { typing | STRUCTURE struc DEFAULT dobj }.
    Extras:
    1. ... typing
    2. ... STRUCTURE struc DEFAULT dobj
    Effect
    The FIELD-SYMBOLS statement declares a field symbol <fs>. The naming conventions apply to the name fs. The angle brackets of the field symbols indicate the difference to data objects and are obligatory. You can declare field symbols in any procedure and in the global declaration section of an ABAP program, but not in the declaration section of a class or an interface. You can use a field symbol in any operand position in which it is visible and which match the typing defined using typing.
    After its declaration, a field symbol is initial - that is, it does not reference a memory area. You have to assign a memory area to it (normally using the ASSIGN statement) before you can use it as an operand. Otherwise an exception will be triggered.
    Addition 1
    ... typing
    Effect
    You can use the addition typing to type the field symbol. The syntax of typing is described under Syntax of Typing. The typing specifies which memory areas can be assigned to the field symbol (see Checking the Typing) and in which operand positions it can be used.
    Note
    You can omit the addition typing outside of methods. In this case, the field symbol has the complete generic type any and is implicitly assigned the predefined constant space during the declaration.
    Addition 2
    ... STRUCTURE struc DEFAULT dobj
    Effect
    If you specify the addition STRUCTURE instead of typing for a field symbol, and struc is a local program structure (a data object, not a data type) or a flat structure from the ABAP Dictionary, this structure is cast for the field symbol <fs>. You have to specify a data object dobj that is initially assigned to the field symbol.
    The field symbol copies the technical attributes of structure struc as if it were completely typed. When you assign a data object using the addition DEFAULT, or later using ASSIGN, its complete data type is not checked in non- Unicode programs. Instead, the system merely checks whether it has at least the length of the structure and its alignment.
    In Unicode programs, we differentiate between structured and elementary data objects. For a structured data object dobj, its Unicode fragment view has to match the one of struc. In the case of an elementary data object, the object must be character-type and flat, and struc must be purely character-type. The same applies to assignments of data objects to field symbols typed using STRUCTURE when using the ASSIGN statement.
    Note
    Field symbols declared using the addition STRUCTURE are a mixture of typed field symbols and a utility for casting structured data types. You should use the additions TYPE or LIKE for the FIELD-SYMBOLS statement to type field symbols, while the addition CASTING of the ASSIGN statement is used for casting.
    Example
    The first example shows the obsolete usage of the addition STRUCTURE.
    DATA wa1 TYPE c LENGTH 512.
    FIELD-SYMBOLS <scarr1> STRUCTURE scarr DEFAULT wa1.
    <scarr1>-carrid = '...'.
    The second example shows the replacement of STRUCTURE with the additions TYPE and CASTING.
    DATA wa2 TYPE c LENGTH 512.
    FIELD-SYMBOLS <scarr2> TYPE scarr.
    ASSIGN wa2 TO <scarr2> CASTING.
    <scarr2>-carrid = '...'.
    Also,
    Field Symbols
    Field symbols are placeholders or symbolic names for other fields. They do not physically reserve space for a field, but point to its contents. A field symbol cam point to any data object. The data object to which a field symbol points is assigned to it after it has been declared in the program.
    Whenever you address a field symbol in a program, you are addressing the field that is assigned to the field symbol. After successful assignment, there is no difference in ABAP whether you reference the field symbol or the field itself. You must assign a field to each field symbol before you can address the latter in programs.
    Field symbols are similar to dereferenced pointers in C (that is, pointers to which the content operator * is applied). However, the only real equivalent of pointers in ABAP, that is, variables that contain a memory address (reference) and that can be used without the contents operator, are reference variables in ABAP Objects.
    All operations programmed with field symbols are applied to the field assigned to it. For example, a MOVE statement between two field symbols moves the contents of the field assigned to the first field symbol to the field assigned to the second field symbol. The field symbols themselves point to the same fields after the MOVE statement as they did before.
    You can create field symbols either without or with type specifications. If you do not specify a type, the field symbol inherits all of the technical attributes of the field assigned to it. If you do specify a type, the system checks the compatibility of the field symbol and the field you are assigning to it during the ASSIGN statement.
    Field symbols provide greater flexibility when you address data objects:
    If you want to process sections of fields, you can specify the offset and length of the field dynamically.
    You can assign one field symbol to another, which allows you to address parts of fields.
    Assignments to field symbols may extend beyond field boundaries. This allows you to address regular sequences of fields in memory efficiently.
    You can also force a field symbol to take different technical attributes from those of the field assigned to it.
    The flexibility of field symbols provides elegant solutions to certain problems. On the other hand, it does mean that errors can easily occur. Since fields are not assigned to field symbols until runtime, the effectiveness of syntax and security checks is very limited for operations involving field symbols. This can lead to runtime errors or incorrect data assignments.
    While runtime errors indicate an obvious problem, incorrect data assignments are dangerous because they can be very difficult to detect. For this reason, you should only use field symbols if you cannot achieve the same result using other ABAP statements.
    For example, you may want to process part of a string where the offset and length depend on the contents of the field. You could use field symbols in this case. However, since the MOVE statement also supports variable offset and length specifications, you should use it instead. The MOVE statement (with your own auxiliary variables if required) is much safer than using field symbols, since it cannot address memory beyond the boundary of a field. However, field symbols may improve performance in some cases.
    check the below links u will get the answers for your questions
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3860358411d1829f0000e829fbfe/content.htm
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_sy.htm
    http://searchsap.techtarget.com/tip/1,289483,sid21_gci920484,00.html
    Syntax Diagram
    FIELD-SYMBOLS
    Basic form
    FIELD-SYMBOLS <fs>.
    Extras:
    1. ... TYPE type
    2. ... TYPE REF TO cif
    3. ... TYPE REF TO DATA
    4. ... TYPE LINE OF type
    5. ... LIKE s
    6. ... LIKE LINE OF s
    7. ... TYPE tabkind
    8. ... STRUCTURE s DEFAULT wa
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas. See Cannot Use Untyped Field Symbols ad Cannot Use Field Symbols as Components of Classes.
    Effect
    This statement declares a symbolic field called <fs>. At runtime, you can assign a concrete field to the field symbol using ASSIGN. All operations performed with the field symbol then directly affect the field assigned to it.
    You can only use one of the additions.
    Example
    Output aircraft type from the table SFLIGHT using a field symbol:
    FIELD-SYMBOLS <PT> TYPE ANY.
    DATA SFLIGHT_WA TYPE SFLIGHT.
    ASSIGN SFLIGHT_WA-PLANETYPE TO <PT>.
    WRITE <PT>.
    Addition 1
    ... TYPE type
    Addition 2
    ... TYPE REF TO cif
    Addition 3
    ... TYPE REF TO DATA
    Addition 4
    ... TYPE LINE OF type
    Addition 5
    ... LIKE s
    Addition 6
    ... LIKE LINE OF s
    Addition 7
    ... TYPE tabkind
    Effect
    You can define the type of the field symbol using additions 2 to 7 (just as you can for FORM parameters (compare Defining the Type of Subroutine Parameters). When you use the ASSIGN statement, the system carries out the same type checks as for USING parameters of FORMs.
    This addition is not allowed in an ABAP Objects context. See Cannot Use Obsolete Casting for FIELD SYMBOLS.
    In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs. See Defining Types Using STRUCTURE.
    Effect
    Assigns any (internal) field string or structure to the field symbol from the ABAP Dictionary (s). All fields of the structure can be addressed by name: <fs>-fieldname. The structured field symbol points initially to the work area wa specified after DEFAULT.
    The work area wa must be at least as long as the structure s. If s contains fields of the type I or F, wa should have the structure s or at least begin in that way, since otherwise alignment problems may occur.
    Example
    Address components of the flight bookings table SBOOK using a field symbol:
    DATA SBOOK_WA LIKE SBOOK.
    FIELD-SYMBOLS <SB> STRUCTURE SBOOK
    DEFAULT SBOOK_WA.
    WRITE: <SB>-BOOKID, <SB>-FLDATE.
    Related
    ASSIGN, DATA
    Additional help
    Declaring Field Symbols

Maybe you are looking for

  • Won't Boot From Install Disc

    Hi, I'm having some major issues trying to install OS X, and was hoping someone might have advice for me. I'm trying to format my hard drive on my MacBook Pro and install a clean copy of OS X Snow Leopard. However, whenever I try to boot from the ins

  • My ipad will not rotate when in mail. Can anyone help please?

    My I Pad will not rotate when I am in Mail. It is fine in safari and all the other apps. Can anyone help.

  • How do I get twitter installed on my iPad when it does not have iOS 5.0?

    How do I get twitter installed on my iPad when it does not have iOS 5.0? How can I upgrade my iPad?

  • Multiple landscapes in one NWDI?

    We have 2 distinct landscapes - one for BI java development (with ABAPJ2EE dev/qa/prod) and another for ERP (again, an ABAPJ2EE dev/qa/prd landscape). How could we use a single NWDI instance to manage both of those landscapes separately.  We would wa

  • Problem with network key

    I have a wireless network at home with two PC's and a laptop.  I brought my laptop to a vacation house that had a different linksys router on a secured network.  I entered the code in order to access the network, and got on fine.  When I came home, I