Wat is the use of casting in field symbols

wat is the use of casting in field symbols?

When you assign a data object to a field symbol, you can cast to any data type. This means that any area of memory can be viewed as having assumed a given type. You can then address parts of fields symbolically without having to use offset/length addressing.
A cast is performed using the CASTINGaddition of the ASSIGN statement. The CASTINGaddition allows you to assign a data object to a field symbol where the type of the data object is incompatible with that of the field symbol. There are two types of casting: casting with an implicit type declaration and casting with an explicit type declaration.
For details please have a look at below link:
[Casting|http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3930358411d1829f0000e829fbfe/frameset.htm]
I hope it helps.
Thanks,
Vibha
Please mark all the useful answers

Similar Messages

  • Wat is the use of occurs

    hi all
    wat is the use of occurs while declaring internal table.
    thankn in advance

    Hi
    The OCCURs Clause is used for declaring the SIZE of the Internal Table..
    For EG:
    Data: begin of itab occurs 0, means this will create an internal table with 8KB of memory.
    But if you are specifrying
    data:begin of itab occurs 10, this will create an internal table with 10 rows(according to the structure of the internal table)...
    Reward All Helpfull Answers........

  • Wat is the use of sid in extended star schema rather than linking masterdat

    hi bw gurus,
    wat is the use of sid in extended star schema rather than linking masterdata with dimention tables?
    thanx in advace,
    i will assign points,
    srinivas

    hi,
        the sid are used instead of the data in order to avoid the redunduncy of data.
    and reduce the datastorage size.
    the data will be present in the sid table and the data is linked used the corerponding sid in the dimension.
    regards

  • How can i know the number of lines in field-symbol internal table

    how can i know the number of lines in field-symbol internal table

    Hi,
    If your field symbol has been defined as an internal table :
    Use std describe as
    Data: l type i.
    describe <fs> lines l.
    'l' will contain the number of lines as needed.
    FYI
    The size of this storage area in a field symbols depends on the number of table lines which is not fixed, but determined dynamically at runtime.
    Regards,
    Amit

  • Wat is the use of ports those are used for EMconsole

    hi all;,
    Could anyone please tell me
    1. the use of the agent,rmi and jms ports used for the dbconsole?
    2. if i block those ports can i use dbconsole?
    3. what are all the ports used for the database like listener, dbconsole http, dbconsole agent etc. and use of those.
    Thanks & Regards,
    Sagar Maram

    What is the use of the rmi and jms ports i mean how those are getting used internally. if block those ports with firewal then wat happend to dbconsole.?They are more appserver related components and to be clear..if the apps and DB are in the same server...then if you block these ports your DBConsole/Appconsole continues to work as long you have not blocked http DBconsole/Appconsole ports...
    But if you apps and DB are across network with a firewall between them then there is a possibility some of the functionality might not work but http console should work as long as http console port is opened in the firewall.....

  • What is the use of CM relevance field in DMS ?

    Hi DMS gurus,
    What is the use CM relevance field in DMS ?
    Is there any specific scenario ?
    Regards,
    Sunny

    Hi Sunny,
    Usually CM (Configuration Management) is used when lifecycle phases come into picture as in lifecycle phases each phase has its own configuration which has to be maintained.
    During their life, products and projects go through various life-cycle phases such as engineering and design, sales, production, and maintenance. In each life-cycle phase, a product has different configurations. A configuration is made up of multiple different objects that describe the product in the relevant life-cycle phase. For example, these can be documents, materials, BOMs or other objects. The grouping of objects changes over the course of time and is different from life-cycle phase to life-cycle phase.
    Configuration Managment can be very much used when we make use of ECR/ECM (engineering change request/engineering change order) linked with DMS.
    Thank You,
    Manoj

  • Wat is the use of Advance tab in obiee

    hi all ,
    What is the use of advance tab , and that xml thing ..
    can any one tel me about it
    Thanks

    791907 wrote:
    hi all ,
    What is the use of advance tab , and that xml thing ..
    can any one tel me about it
    ThanksIf you actually go into the Advanced tab you will find some meaningful descriptions against everything on it.
    'That XML Thing' , its the definition of your report, criteria panel, views on the results tab.

  • Want to know that wat is the impact of changing a field label in master

    Dear Experts,
    Want to know that what is the impact of changing a field label in masters ?

    hai sap gurus,
                          kindly clear my doubt..
    Swetha

  • Better alternative to header lines, use of logical database, field-symbols

    Hello experts,
    I am wondering if theres a better and faster alternative than declaring a header line for an itab. are work areas faster?
    What is the use of logical database? can you please give me an example on how to use it in reports.
    how do I use field-symbols? I am confused on how it works.
    P.S. I recently installed SAP netweaver preview abap edition
    in my home PC and I am wondering if I could practice BDC, user exits, etc. If so, how?
    Again, thanks for all your help since I'm kinda new to ABAP.

    I always use this...It uses header lines, but at least is smaller -:)
    <b>DATA: BEGIN OF MY_TAB TYPE STANDARD TABLE OF BKPF WITH HEADER LINE.</b>
    For logical databases, you can check my blog...I always use LDB for HR programs -:)
    <a href="/people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports:///people/alvaro.tejadagalindo/blog/2006/02/19/how-to-deal-with-hr-payroll-reports
    LDB's provides a lot of information, because they gather it from a lot of different tables...
    A Field-Symbols is like a pointer in C++, like an alias for a variable...Here's a small example...
    REPORT Z_ATG_DUMMY.
    FIELD-SYMBOLS: <F1>, <F2> TYPE I.
    DATA: TEXT(20) TYPE C VALUE 'Hello, how are you?',
          NUM TYPE I VALUE 5,
          BEGIN OF LINE1,
          COL1 TYPE F VALUE '1.1e+10',
          COL2 TYPE I VALUE '1234',
          END OF LINE1,
          LINE2 LIKE LINE1.
    ASSIGN TEXT TO <F1>.
    ASSIGN NUM TO <F2>.
    DESCRIBE FIELD <F1> LENGTH <F2>.
    TEXT = 'CHAU'.
    WRITE: / <F1>, 'has length', NUM.
    WRITE: / TEXT, 'has length', NUM.
    ASSIGN LINE1 TO <F1>.
    ASSIGN LINE2-COL2 TO <F2>.
    MOVE <F1> TO LINE2.
    ASSIGN 'LINE2-COL2 =' TO <F1>.
    I just can't install SAPNWSP...I only got MiniSap...But I got all the development enviorment...Don't know about the User-Exits...Actually I don't think so...Because those "mini" systems doesn't come with any functional module.
    Greetings,
    Blag.

  • Who knows the use of  VBRP-MWSKZ field?

    If could be possible we'd like to have the tax code in the SD invoce, without use KOMV.
    We have found VBRP-MWSKZ, but we don't undertand its use, because  this field is always empty and it seems not use.
    Thanks.

    Hi Ariana,
    I think that you are using SMARTFORMS. So, you must print it after the invoice is saved, and the FI document too. If you want to print the amounts of VAT, you can use in the SMARTFORMS the proper coding to obtain it. With the function module AC_DOCUMENT_RECORD you can get the document FI. After, you can read the tables (BSEG or perhaps BSET) to try the amounts and indicators (check them with SE16N). Set a break point in AC_DOCUMENT_RECORD and read FI documents from invoice to check the parameters that you must set. In X_DIALOG set empty and then you get an internal table for  T_DOCUMENTS. Remeber to get only FI documents, because this function returns CO, COPA and other controlling documents.
    I hope this helps you
    Hasta luego,
    Eduardo

  • Wat is the use of "DATA var-name LIKE SY-INDEX" statement

    Hi to all,
           is there any use of "DATA <var-name> LIKE SY-INDEX"  statement in ABAP, do the variable <var-name> be changed with that of SY-INDEX when we declare like this.
             Could u give me a fast response,
                                            Thank you,
                                                 Srinivasa Rao k.

    hi check this example..
    data: v_index type sy-index value 10 .
    do 15 times .
    if sy-index = v_index .
    write:/ 'the system index is 10 '.
    exit.
    endif.
    enddo.
    the main use of the index is used in the hr programs..
    the user wants the emp salary and previous months   salary then you need to use the index .
    if the table had 10 records .then you need to catch the record of  index1(current) and index 2(for previous month)..
    select pernr ansal  from pa0008 into table it_pa0008 where pernr in s_pernr and begda in s_begda .
    loop at it_pa0008.
    case sytabix.
    when 1 .
    it_final-cursal =  it_pa0008-ansal.
    when 2 .
    it_final-prevsal =  it_pa0008-ansal.
    endcase .
    endloop.
    regards,
    venkat.

  • Wat is the use of sy-cucol and how to use tel me the syntax

    pls let me know

    Hi,
    SY-CUCOL: Position of the column in the window from which the event was triggered (counting starts with 2) i.e Horizontal cursor position.
    Ex.
    REPORT demo_list_system_fields NO STANDARD PAGE HEADING
    LINE-COUNT 12 LINE-SIZE 40.
    DATA: l TYPE i, t(1) TYPE c.
    DO 100 TIMES.
    WRITE: / 'Loop Pass:', sy-index.
    ENDDO.
    TOP-OF-PAGE.
    WRITE: 'Basic List, Page', sy-pagno.
    ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
    WRITE 'Secondary List'.
    ULINE.
    AT LINE-SELECTION.
    DESCRIBE FIELD sy-lisel LENGTH l TYPE t.
    WRITE: 'SY-LSIND:', sy-lsind,
    / 'SY-LISTI:', sy-listi,
    / 'SY-LILLI:', sy-lilli,
    / 'SY-CUROW:', sy-curow,
    / 'SY-CUCOL:', sy-cucol,
    / 'SY-CPAGE:', sy-cpage,
    / 'SY-STARO:', sy-staro,
    / 'SY-LISEL:', 'Length =', l, 'Type =', t,
    / sy-lisel.
    This program creates a list of ten pages. When you run the program, you can place the cursor within the basic list and create a detail list by choosing Choose. This displays the contents of the system fields.
    SY-LSIND is the index of the current list, SY-LISTI is the index of the previous list.
    SY-LILLI is the number of the selected line in the list, SY-CUROW contains the line number of the selected line on the current screen. SY-CUCOL is the position of the cursor in the window. This position exceeds the corresponding unscrolled list column by one. SY-CPAGE is the currently displayed page of the list. SY-STARO is the number of the topmost actual list line displayed on the current page. This does not include the page header. SY-CPAGE and SY-STARO do not depend on the cursor position. For SY-LISEL, the program displays length, data type, and contents. The length of SY-LISEL is always 255, independent of the list's width.
    Regards,
    Bhaskar

  • Wat is the use of writting

    "break-point" at the start of the program.

    Hi,
    A breakpoint is the signal, which is specified in the program, tells the system to stop the program execution and to start the debugger
    Static are set up with the BREAKPOINT keyword inside the program, which you can directly display with the ABAP/4 source code editor.  To set the breakpoint in the program enters the keyboard BREAKPOINT.
    The ABAP/4 debugger is the development workbench tool, which allows you to stop a program during its execution when a particular condition is met.  When the program is stopped, you can use the debugger to display the contents of the table and variable being used by the program.  It allows you to execute the program step by step, reviewing exactly the real flow of the program execution.
    Regards,
    Sruthi

  • Wat is the use of having a synchronized block

    instead of a synchronized????....Can anyone explain??...Is it because we can do the synchronization altogether for all the functions?//
    is this the only use of it??
    pls explain........

    You synchronize on an object, not a set of methods. If you write:
    public synchronized void f() {
    // code here
    }Then that's shorthand for:
    public void f() {
       synchronized(this) {
         // code here
    }But you don't always want to synchronize for the whole of a method, and you don't always want to synchronize on this.
    The Object you synchronize on is called a monitor, and it's that object that can't simultaneously be synchronized on by more than one threads.

  • How to use field symbol in select

    Hi,
        CONCATENATE 'WTG0' LV_MON INTO LV_FNAME.
        ASSIGN (LV_FNAME) TO <FS>.
        SELECT SINGLE <FS>  FROM COSP INTO LV_SAPRST
             WHERE OBJNR = LV_OBJ AND GJAHR = LV_YEAR AND WRTTP = '4' AND KSTAR = GT_INOUT-SAKNR
       Error message :    Unknown column name "<FS>" . field list. . field list. field list. 
       actually ,  if i use  if command,  i can do,  but i want to use simple code by fieldsymbol.
       is it possible in select command?
    Thanks in advance
    Benjamin

    Hi
    Hope it will help you.
    reward if help.
    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

  • ITunes no longer responds... Please help!

    Since I updated the latest version of iTunes, it no longer responds... I open it up and it'll just have an open window on the bottom of the screen. But not only does it only give me the option to close when I right click the window, after I close it

  • Batch creation at the time of order creation & confirmation on the batch.

    Hi all, My client's requirement is while creation of the production order of say 100 pcs, system should create 4 batches, each of 25 (this might be different every time) of that order & also the confirmation (CO11) should be done on those batches. Al

  • Payment medium program with DME format

    Hi! I am working for south african client. The standard DME format available for south africa is ACB_ZA ( acb format). The payment program used is RFFOZA_A and assigned to payment method "A- ACB clearing". But the format given by bank is different. S

  • Where can I find mac help on my imac ?

    Where can I find mac help on my imac ?

  • IPhone4 won't download from App store anymore

    I have an iPhone4 and therefore cannot download iOS 8, but I also have the issue many are talking about, where I cannot download anything from the App store.  I thought it was because I have switched my App store from UK to Germany because I just mov