How important it is to understand Concept of Narrow & Wide casting in ABAP Objects

Hi Friends,
I Understood that, it is very important to understand the concept of "Casting ( Narrow Casting & Wide Casting )" properly.
Let us see the following cases where the concept of "Casting ( Narrow Casting & Wide Casting )" comes into the picture in various practices of Abap, Webdynpro abap and FPM.
1. ABAP:-
When we are working with RTTS in abap it is very much important we must know the Casting Techniques. Without knowledge of the Casting of objects, there will be a lot of trouble we may faces.
Mainly RTTS offers Runtime Type Services, means RTTS Programming enables us to find the type of the particular data obejct or data type or data reference in the run time.
RTTS also enables us to create the data in the run time very dynamically.
So, in the run time when we finding the type of the data objects or creation of data objects in the run time, We must do the Wide casting and Narrow casting also some times on the references provided by SAP Dynamically.
So, here we go to have knowledge on Casting is mandatory.
2. WEBDYNPRO ABAP:-
The another point where the concept of casting comes into picture is , When we working with the ALV Reports and Dynamic programming of WEBDYNPRO. Here also we should posses good casting skills.
3. FPM:-
The major use of casting comes in hand is none other than FPM. When we working with certain Floor Plans or when we woking with Feeder Class concept of FPM, Casting comes into picture again.
Along with Casting ( Narrow casting & Wide casting ), We must have the knowledge of 'Field Symbols' and 'Data References (known & Unknown)' to work with our all complex scenarios of Webdynpro and FPM and all.
So guys, please have Knowledge on the following, befor you master on advanced techniques of WEBDYNPRO and FPM etc.
     1. Field Symbols
     2. Data References (known & unknown)
     3. Casting (Narrow casting & Wide casting)
     4. Brief Idea about RTTS
All the above 4 concepts will definitely make our life easy when dig more into WEBDYNPRO ABAP and FPM.
Thank You.
Please share your comments on the same.

Hi Shankar,
It's really good to know.
It could be great if you can share few technicalities for the concepts explained.
Regards,
Rafi

Similar Messages

  • How would YOU retype these old XM08 types for use in an ABAP OO method?

    The XM08 function group has the following type declarations:
    TYPES: BEGIN OF mmcr_drseg_co.
            INCLUDE STRUCTURE cobl_mrm_d.
    TYPES: cr LIKE drseg_cr    OCCURS 0,
           unpl_refwr TYPE refwr,
           END OF mmcr_drseg_co.
    TYPES: mmcr_tdrseg TYPE mmcr_drseg OCCURS 0,
    TYPES: BEGIN OF mmcr_drseg.
            INCLUDE STRUCTURE drseg.
    TYPES: cr LIKE drseg_cr OCCURS 0,
           co TYPE mmcr_drseg_co OCCURS 0,
           sm LIKE drseg_sm OCCURS 0,
           charact TYPE rbcharact_instance OCCURS 3,
                                           "instances of characteristics
           uebgmat  TYPE matnr,
           uebrblgp TYPE rblgp,
           selkz_db TYPE selkz,
           rblgp_old TYPE rblgp,           "rblgp before aggregation
           END OF mmcr_drseg.
    How would YOU redeclare these types so that they work in an ABAP Objects class?  
    Some of the "fixes" are easy, like replacing "LIKE" with "TYPE:".
    But what about the "INCLUDE STRUCTURE" and the "occurs 0" specifications?
    The reason I'm asking this is that I have to call a method from ZXM08U16 and I'd like to be able to pass this method exactly what XXM08U16 gets from SAP, i.e. the table E_TDRSEG of type  MMCR_TDRSEG

    David,
    I wonder it can be directly in ABAP (I would like to hear opinions from others as well!), I needed to use Data Dictionary as well:
    TYPES: BEGIN OF mmcr_drseg_co.
            INCLUDE STRUCTURE cobl_mrm_d.
    TYPES: cr TYPE z_tt_drseg_cr,
           unpl_refwr TYPE refwr,
           END OF mmcr_drseg_co.
    z_tt_drseg_cr is a table type created in SE11, based on structure drseg_cr.
    the way to create internal table and work area, based on the above:
    DATA : gt_... TYPE TABLE OF mmcr_drseg_co.
    DATA : gw_... TYPE mmcr_drseg_co.
    hope this helps some
    ec
    UPDATE : Rich is right, it is possible to do it only in ABAP with the DEFAULT KEY addition.

  • How import pictures from Computer To itunes??

    How import pictures from Computer To itunes??

    I'd like to add some personal photos to my iTunes account, library...WHATEVER!...so that I can attempt to use them as screensaver pics for my Apple TV component. Screensaver takes to the screen while playing music from my iTunes library that displays on the TV screen. Understandable....but if I can transfer some of my personal photos into my iTunes library/account...whatever...I'm sure there's a way to use them on my screensaver, rather than looking at friggin' ducks, fish, and trees, etc. seems like a simple and obvious concept to me! How do I do it?

  • How Important Are Broadcast Colors?

    I know the purpose of broadcast colors, keeping your IRE levels above 7.5 and below 100, but how important is this if you're not going to broadcast? If you're just making a video for DVD and web, do you still need to apply Broadcast Colors to your entire project? Is there a chance of your video damaging televisions? Are the newer televisions (i.e. LCDs, Plasmas, etc) still prone to this type of damage?

    >Is there a chance of your video damaging televisions? Are the newer televisions (i.e. LCDs, Plasmas, etc) still prone to this type of damage?
    A DVD is digital, meaning it will whatsoever NEVER give out more than all bits set to 1 (or set to high in other wording). That is an absolute limit! And then, the digital to analog converter will only put out what its max is for all bits = 1, also an absolute limit. And I can assure you that any input circuity that receive that output from the digital to analog converter will tolerate that signal (unless the designers were drunk and everybody in the quality assurance department also was more than drunk).
    Now, of course, if you made a DVD with only white video that made all bits be 1, and played that over and over for a long time on your TV (CRT, or "tube"), yes, you would probably, after a year or two, see some degradation to your TV's screen.
    By now I hope you understand that plasma and LCD which is digital to "the end", just can't get over-loaded.
    But, screen-savers are there for a reason, and that's only for "tear and wear" (sp?) and "burn in" (burn in is mostly for CRT's though).
    Broadcast colors are something to be aware of though. It is a hang-over from an all analog world with signals that could go "all over the limits" and screw up circuitry. Probably not so much ruin them (they made limiters before also) but make them to behave funny.
    It seems to me like some encoders (maybe more codecs) have this "taste of the hang-over" because sometimes they do strange things when it comes to "very high luminance in some spots".
    So, have it mind, but like Jim, I haven't had too much problems with that (making sure I'm within broadcast colors). I think it's all about testing your output (DVD or web) before delivery.
    Dag

  • How to do LUW in OO concept?

    Hi everyone,
      I have a question: how to do luw in OO concept?
      I know that in SAP ABAP, there are two ways to do LUW
    first is function module ,the other is subroutine.
      And now, I have a method of my class. In this method,
    I will do some database updating, and I want to do these database
    operations in a SAP LUW,  I don't know how to do that.
    Because in method attributes, it seems there is not an attribute
    in update model. And I try to create a function module ,pass a reference
    to it, and call the method in the function module,but when a function
    module is in update module , reference can not be passed.
      is there anyway to accomplish LUW in OO way?
    Thanks for your help.

    http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4bca79e11d1950f0000e82de14a/content.htm
    http://www.*******************/2007/08/lesson-46-lws-and-clientserver.html
    http://help.sap.com/saphelp_nw70/helpdata/EN/41/7af4bfa79e11d1950f0000e82de14a/content.htm

  • How important is using optical audio, since no surround?

    I'm out of optical inputs on my A/V receiver. How important is using the digital optical audio output, since there is no surround sound on the Apple TV?
    Is using analog audio cables that bad, since the content on Apple TV is stereo to begin with?
    Thanks for the help.

    I don't think the issue will be surround sound since surround sound isn't supported by the tv, although as capaho points out there are some files floating around out there that appear to work with the tv, however as far as I know these are all test files and there isn't actually any content as such available.
    The issue for you will be one of quality, which of course means different things to different people. Personally I can only tell the difference between analogue and digital sound on some tunes and my personal taste in music does not always include those tunes (more of a Rolling Stones listener than Debussy) , so I'm quite happy to use analogue audio for my set up. Whether you are happy to do so will be one of personal taste.

  • How importing illustrator CS4(or 5) gradients into InDesign CS5?

    How importing illustrator CS4(or 5) gradients into InDesign CS5?
    Many gradients for illustrator we can download in Internet, but nothing for InDesign ...
    ( Way, where copy (Ctrl + C) and paste (Ctrl + V) no work in this products, when gradient selected - button "Copy" - off )
    I try create ASE file, but his only for Colors, without beautiful gradient...
    What i must do?

    Thanks, copy to clipboard - it's working,
    but why developers not create "Simple converter" in InDesign
    Menu -> Load Swatches, what will get swatches in *.ai (or other) files??

  • How important is it to have non-flash content for iPAD?

    Hi there.
    I'm busy building a site with an image rotater in the header with a couple of images from the products. This rotater works with flash which does not work with iPAD. How important do you rate it to definitely have non-flash content as to have the odd cosmetic slide show here and there?
    Regards,
    Deon

    hgholtz wrote:
    Wonder why iOS does not like flash?
    Hi
    On Android devices the reason given for dropping support, (or no support in the case of iOS) was because it was literally possible to watch the battery power indicator drop whilst watching anything that required flash.
    On a Samsung Galaxy it only required 7 minutes of Flash video to drain the battery, and on an Android budget tablet I also use for testing, (sub £150)  3 minutes.
    PZ

  • How import AVI files to my I Mac for editing in Final Cut?

    How import AVI files to my I Mac for editing in Final Cut?

    You first convert them to ProRes with Compressor or MPEG STREAMCLIP, then import the ProRes files into FCP.  FCP doesn't work with the AVI container...footage must be Quicktime, and must be in a codec FCP works with.

  • How import AVCHD video file ( Sony NEX 7) to FCPX ? Thank you !

    How import AVCHD video file ( Sony NEX 7) to FCPX ? Thank you !

    https://discussions.apple.com/community/professional_applications/final_cut_pro_ x
    is where the FCP folks hang out.

  • How can I implement recipe control concept in SAPME?

    Dears,
    How can I implement recipe control concept in SAPME?
    For example,
    We can config the standard temperature setting needs to be between 100~120 degree C for Operation OP1 and Material MA1
    So, before user start the SFC of MA1 at OP1, system can display the config values(100~120) for user reference, then, user need to input the real temperature when process the SFC, if it's out of spec, system can warning. System will collect the input data for analysis in future.
    Thank you.

    Thank you for your information.
    Since customer prefer to use a custom UI which can communicate with SAPME by web service.
    So I can not use SAPME default data collection or work instruction user interface.
    I'm considering by using data collection and work instruction config data to develop a web service in MII and poblish to custom UI in which it can display the spec data and reject user's input if out of spec.
    Please feel free to inform me if any other good idea, thanks!

  • How important is gathering statistics on SYS objects?

    Hi,
    How important is gathering statistics on Data dictionary tables and other X$ tables in SYS schema. Is it bad to keep the statistics. Recently our Sr.DBA has deleted all the SYS schema stats telling that it will inversely affect the DB performance. Is it true?
    Regards
    Satish

    Hi Satish,
    *10g:*
    A new DBA task in Oracle Database 10g is to generate statistics on data dictionary objects which are contained in the SYS schema. The stored procedures dbms_stats.gather_database_stats and dbms_stats.gather_schema_stats can be used to gather the SYS schema stats. Here is an example of using dbms_stats.gather_schema_stats to gather data dictionary statistics:
    EXEC dbms_stats.gather_schema_stats(’SYS’);
    *9i*
    While it is supported in 9.2 to gather statistics on the data dictionary and fixed views, doing so isn't the norm.
    There is a bug fixed only in 10gR2 (not expected to be back-ported to 9.2) that caused this error. The fix is – don’t generate statistics against SYS – especially not the Fixed tables.
    For this query, let's see if we can get a better plan by removing statistics or by getting better statistics, or if we need to do something else to tune it. Take the SYS statistics as before, but with gather_fixed => false.
    I would like for you to test first by deleting the statistics on these two X$ tables and see how the query runs (elapsed time, plan).
    delete_table_stats('SYS','X$KQLFXPL');
    delete_table_stats('SYS','X$KGLOB');
    Then you can take statistics on them using gather_table_stats and check again (elapsed time, plan).
    gather_table_stats('SYS','X$KQLFXPL');
    gather_table_stats('SYS','X$KGLOB');
    The issue with this is that the contents of these fixed views, particularly x$kqlfxpl, can change dramatically. Gathering fixed object statistics may help now and cause problems later as the contents change.
    Warning, this is a bit dangerous due to latch contention, see the following note. I've supported a couple of very busy systems that were completely halted for a time due to latch contention on x$kglob due to monitoring queries (particularly on v$open_cursors).
    Note.4339128.8 Ext/Pub Bug 4339128 - Heavy latch contention from queries against library cache views.
    Hope this answers your question . . .
    Donald K. Burleson
    Oracle Press author
    Author of "Oracle Tuning: The Definitive Reference":
    http://www.dba-oracle.com/bp/s_oracle_tuning_book.htm

  • HT3775 How import my DVD to the iphoto and imovie ?

    Dear
    May I know how import my DVD to the iphoto and imovie ?
    I've a DVD movie , I want import it to iphoto and imovie , but it doesn't work and my laptop doesn't support it.
    It show" You may need to install additional software to open this type of file."
    May I know how  to do, because I want make a imovie from the scene of the DVD if possible ?
    Thanks in advance for your kind help and support!
    Regards
    Hong

    If they are commercial DVDs, we are not allowed to help since it would violate the ToU of these forums as it involves copyright and DRM issues. Did your friend copy a commercial DVD? If not, and it is homemade, you'll need to figure out what format the movie is in - you should be able to import the footage to iMovie and may have to use a converter to get it into a format iMovie can read. I can't help with iPhoto since I never use it.

  • How important is it to set an administrative password on my MacBook?

    My administrative password for my MacBook has been blank since I bought it. How important is it to set an administrative password on my MacBook?

    If you are the only one to use the MacBook you don't really need an administrative password. The main use for it is to stop other users from accessing and making changes on the Macbook.

  • How important is a dedicated metadata controller?

    Hello,
    I'm currently setting up a computational cluster consisting of 16 XServes (eventually 32) and 5 Mac Pros, each of which need to simultaneously write to a single volume on a shared 10TB Promise VTrak RAID. My motivation for using XSan is data integrity and redundancy (which is critical) and not speed (which is nice, but not necessary).
    For this type of setup, how important is it to have a dedicated metadata controller? Ideally, I'd like to have one XServe as a dedicated controller for both XGrid and metadata, the Mac Pros as XGrid clients and agents, and the remaining XServes as XGrid agents. Everything I read says that there will be "decreased performance" if the metadata controller is used for functions other than XSan, but what exactly is this decreased performance? I can live with some latency in data access while the metadata controller is doing other things, provided all data gets written eventually. There will be no other traffic (mail, web, etc) on this network.
    I know the first thought is that with so many machines, why not just use one as a dedicated metadata controller? Again, data access isn't the primary goal here; each machine performing computations takes about a day off my computation time so I want every available asset working towards that goal. Even if I have to wait five minutes to access the data, I'm still way ahead of the game using the other machine for computations.
    In the event that using a dedicated metadata controller is vital to using XSan in this situation, are there other solutions which would perhaps better suit my needs?

    The question really is 'how important is the reliability of your Xsan' and because its become a single shared resource everything depends on it, this is the same in post or data centre workflows.
    The ideal situation is to have no other services pulling any clock cycles from the processor because it could coincide with xsan requiring resources. The tricky thing in xsan deployment is latency reduction, the controllers and switches don't look busy and they aren't but the smooth running of the system depends on that reduced latency and when you lose it your going to run into some strange and probably intermittent problems.
    Ive cut corners in the past by running open directory and DNS on the backup controller but never on the primary. Really it depends how busy the whole system is going to get but dont expect Xsan to behave simply when the latency starts to go. Its a very robust file system but it wont slow down in a linear way like a busy web server it will slow then hiccup stop, start or fall over entirely, which is not good in a critical situation.
    One solution Ive used in a similar situation is a smalltree 6 port ethernet card in an xserve with all ports bound together, make sure your switch can handle link aggregation but it creates a nice big pipe to a fileshare in a situation where xsan wont work. You can't edit video like this but you can remove the server bottleneck when you have several client computers requiring big file transfers.
    Another route is iSCSI but its still early days in the Apple world, ATTO now make an iSCSI initiator for Macs but I can say Ive deployed it.

Maybe you are looking for