SAP ABAP [2020] - ABAP 7.40/7.50- Read and Modify Internal Table

Поділитися
Вставка
  • Опубліковано 2 сер 2024
  • SAP ABAP [2020] - ABAP 7.40/7.50- Read and Modify Internal Table
    #sapabap #oopsabap #ooabap
    In this session, we will discuss how to read an entry of an internal table and also how to modify the record of the table.
    What is SAP ABAP?
    ABAP is a high-level programming language created by the German software company SAP SE.
    ABAP is one of the many application-specific 4th generation languages first developed in the 1980s.
    It was originally the report language for SAP R/2, a platform that enabled large corporations to build mainframe business applications for materials management and financial and management accounting.
    In ABAP we have basically 2 types of programs:
    1)Reports
    2)Module pools
    The module pool program defines more complex patterns of user interaction using a collection of screens.
    The term “screen” refers to the actual, physical image that the user sees.
    Each screen also has a "flow logic", which refers to the ABAP code implicitly invoked by the screens, which is divided into a "PBO" (Process Before Output) and "PAI" (Process After Input) section.
    Dynpro - Dynamic program - refers to the combination of the screen and its flow logic.
    Introduction to ABAP module pool programming.
    Module pool programs are also called dialog programs.
    The module Pool programs are basically reports that are prepared for different screens and to manage the sequence of events of these screens.
    In the transaction SE80, you can see all the dynpros that you have for this kind of report, add new ones, add all types of elements to the report.
    In this program, we will discuss new syntaxes in ABAP 7.40

КОМЕНТАРІ • 118

  • @bsismanoglu
    @bsismanoglu 3 роки тому +11

    Hi Sooraj, great video. In addition I would like to add a few comments.
    I would read the table line as follows:
    assign it_data[ name = 'sam' ] to field-symbol().
    First this is faster than direct assignment.
    Second and the foremost reason is that you can check if line exists with a sy-subrc check (because sy-subrc check works 4 or 5 times faster than line_exists statement)

    • @SoorajSasidharanABAP
      @SoorajSasidharanABAP  3 роки тому +7

      Hi Bekir.. Thanks for your wonderful comment.. yes, the field symbol assignment also just works fine..it was put in to avoid the dump that may happen if line doesnt exist.
      There is another approach also from SPS08, which is resut = value #( itab[ name = 'sam'] optional/default). This I had mentioned in my value Operator video.
      I will try to include the field symbol assignment part in my upcoming video. The subscribers shouldn't miss on any detail regarding the subject. That's the whole idea :-)

    • @bsismanoglu
      @bsismanoglu 3 роки тому +3

      @@SoorajSasidharanABAP Hi Sooraj, thanks for the update. I just wrote a test application to compare the field-symbol assignment and the assignment with value (with optional extension), and yes it works as fast as field symbol assignment and with no short dumps. Once again, thank you very much.

  • @raghz100
    @raghz100 3 роки тому

    I'm a legacy pre 7.4 ABAP developer learning 7.5 syntaxes. Very well presented.

  • @INGagan
    @INGagan 3 роки тому

    Always waiting for your videos. So that i can rewrite my existing lengthy code 😁😁🙏

  • @23188himanshu
    @23188himanshu 3 роки тому +1

    Very well explained !!! Looking for some more on similar Topic in SAP ABAP 7.50

  • @pradipkesarkar2521
    @pradipkesarkar2521 3 роки тому +1

    Helping information,keep posting

  • @majidkhan-pg4xp
    @majidkhan-pg4xp 3 роки тому +1

    Superb Suraj..Salute to u for sharing n helping other..appreciat👍

  • @AnilKumar-zx4nq
    @AnilKumar-zx4nq 3 роки тому +2

    Great insights Sooraj. Thanks! Keep uploading these useful videos

  • @Vishal-wl6gx
    @Vishal-wl6gx 2 роки тому

    Great video, sirji

  • @arnabchaudhury8911
    @arnabchaudhury8911 3 роки тому

    Very useful helping information

  • @minakshisinghmehta111
    @minakshisinghmehta111 3 роки тому

    Like the way you explain. Thank you!

  • @mpredolim
    @mpredolim 2 роки тому

    Well explained. Keep going!

  • @Isaque574
    @Isaque574 Рік тому

    Very nice video, greetings from Brazil

  • @Babies_channel124
    @Babies_channel124 3 роки тому

    Great content👍.... Keep posting

  • @NickChecan
    @NickChecan 3 роки тому

    Awesome content Sooraj!

  • @chandrasekhar9788
    @chandrasekhar9788 3 роки тому

    Thank for your good info.....we are waiting for more updates in new syntaxes

  • @gouravjain3495
    @gouravjain3495 3 роки тому

    Short video with lots of knowledge... Would like to see many more

  • @nikhilkumar-jw1wz
    @nikhilkumar-jw1wz 3 роки тому +7

    Your ABAP 7.4 syntaxes are helping me alot in my coding .....thank you so much 🙂

  • @tirumalrao1968
    @tirumalrao1968 3 роки тому

    Nice Suraj.

  • @rvdadhich
    @rvdadhich 3 роки тому

    great learning... thank you 👏

  • @vijaybhaskar1092
    @vijaybhaskar1092 3 роки тому

    Hi sooraj,
    Great information and thanks for the sharing 😀😀😀

  • @hiranmayepisupati6909
    @hiranmayepisupati6909 3 роки тому +2

    Really simple...easy to learn ....thanks a lot

  • @moralstoryforkids.1981
    @moralstoryforkids.1981 3 роки тому

    Awesome Suraj। Thanks for updating 😊

  • @sardorbek9892
    @sardorbek9892 3 роки тому

    Good job!

  • @dewankjamjare6985
    @dewankjamjare6985 3 роки тому

    Very nicely explained.

  • @AbhishekYadav-qo9fq
    @AbhishekYadav-qo9fq 3 роки тому +4

    Thank you so much Sir for your time and efforts

    • @SoorajSasidharanABAP
      @SoorajSasidharanABAP  3 роки тому

      Thanks Abhishek..Keep watching, will try to upload more videos. :-)

  • @vijayashri610horadi9
    @vijayashri610horadi9 3 роки тому

    Useful thanks!

  • @itsMyMusik
    @itsMyMusik 3 роки тому

    Thanks for the video Sooraj, really useful.
    Can you tell what's the performance of instructions like line_exists compared to binary search in large tables? Would you recomend it there?
    Thanks

  • @madz3764
    @madz3764 3 роки тому

    Useful. Thanks.

  • @HaaanNahiiiiiToooo1523
    @HaaanNahiiiiiToooo1523 3 роки тому

    Well explained Sooraj !

  • @mf-vt7sj
    @mf-vt7sj 3 роки тому

    Thank you, great video.

  • @katjaczajkov8694
    @katjaczajkov8694 3 роки тому +1

    great work, thanks.

  • @bdk1371
    @bdk1371 3 роки тому

    Hi, is the new syntax sequential read or binary read? I am thinking we need to be careful based on the size of your table?

  • @shubhadippanda1039
    @shubhadippanda1039 Рік тому

    Thanks Happy Diwali Sir 🙏. I have learned new syntaxes in ABAP. It's really helpful and overall it's free. Thanks & Please do continue Sir.

  • @tamilvananmunirathinam6689
    @tamilvananmunirathinam6689 3 роки тому

    Very nice👍

  • @chkasyap
    @chkasyap 3 роки тому

    Thank you for detail explaination👍

  • @Srirampavan1985
    @Srirampavan1985 2 роки тому

    great video ...easy to understand

  • @dennyivan
    @dennyivan 3 роки тому

    Thanks man

  • @pavanmadhusudan6646
    @pavanmadhusudan6646 3 роки тому +1

    thanks sooraj!

  • @lilvirdose12
    @lilvirdose12 3 роки тому

    great content bro

  • @mithundas4817
    @mithundas4817 3 роки тому

    Very useful video

  • @MrReachashish
    @MrReachashish 3 роки тому

    Nice video

  • @suria2469
    @suria2469 3 роки тому

    Great work... Thanks

  • @gaurav-cj8pd
    @gaurav-cj8pd Рік тому

    👍🏼 very helpful

  • @chintamanichitnis479
    @chintamanichitnis479 Рік тому

    Great tips. Thank you so much

  • @daniel13danishka
    @daniel13danishka 3 роки тому

    VERY NICE BRO , THANKS

  • @ssbundestag9668
    @ssbundestag9668 3 роки тому

    Great job

  • @RachakondaSrinivas
    @RachakondaSrinivas 3 роки тому

    Hi sooraj . Are these syntaxes used in HANA ABAP coding ?

  • @anish109
    @anish109 3 роки тому

    Nice video. Could you make a video on abap units with practical examples

  • @vamsikrishna-rx3ox
    @vamsikrishna-rx3ox 2 роки тому

    Nice

  • @ginsyo6112
    @ginsyo6112 3 роки тому

    thanks learned a lot

  • @sudheerkumar-jp8qk
    @sudheerkumar-jp8qk 3 роки тому +2

    Your modifying single entry. Can you post example of looping one table and reading 2nd table to Modify first table basing on index.
    Can post an example on that with latest syntax.
    Thanks.

  • @ajitmhatre9
    @ajitmhatre9 3 роки тому

    amazing .. so simple

    • @SoorajSasidharanABAP
      @SoorajSasidharanABAP  3 роки тому +1

      Glad you like it!

    • @ajitmhatre9
      @ajitmhatre9 3 роки тому

      @@SoorajSasidharanABAP i was searching for new techniques in abap to be updates then I found your channel, even some things i m using already line new inline declaration ...many of abapers dont know about it...they just following old stuff.

    • @SoorajSasidharanABAP
      @SoorajSasidharanABAP  3 роки тому

      @@ajitmhatre9 haha that's very correct. you see change is inevitable :) Coding in the same way is boring :D

  • @saivamsi6091
    @saivamsi6091 3 роки тому +1

    Can you discuss something related to Amdp's and some typical solutions in HANA

  • @suwandicahyadi9213
    @suwandicahyadi9213 3 роки тому +1

    What is the performance of this array like internal table access compared to hash table read/ binary search table read?

    • @SoorajSasidharanABAP
      @SoorajSasidharanABAP  3 роки тому

      in case of sorted/hashed tables, there will be implicit BINARY search happening. We cannot use an explicit BINARY SEARCH addition with the new syntax.

  • @ximeninho1965
    @ximeninho1965 3 роки тому +1

    Are there any Loop...EndLoop example with a new sintaxe ?

    • @SoorajSasidharanABAP
      @SoorajSasidharanABAP  3 роки тому

      Can u see if this video helps?
      ua-cam.com/video/WPNcz7nXQQg/v-deo.html
      You can check out my other videos as well.. Thanks for watching.. :-)

  • @aksh9422
    @aksh9422 3 роки тому

    Thankyou so much...can u post videos on abap -json conversion

  • @harishgarlanki861
    @harishgarlanki861 3 роки тому

    superb explinations sir...can u explain explicit enhancements by real time examples

  • @vsubbakrishna
    @vsubbakrishna 3 роки тому +1

    How about read with binary search in parallel cursor..how to exit loop in new syntax??please let us know

    • @SoorajSasidharanABAP
      @SoorajSasidharanABAP  3 роки тому +3

      In case of sorted tables, there is an implicit BINARY SEARCH that happens. We cannot forcefully include the BINARY SEARCH option with the new syntax though :-)

  • @sumanpanja5637
    @sumanpanja5637 3 роки тому

    Hi watched..but we can also use the below new syntax to avoid try catch block...
    Data(ls_line) = VALUE #( LT_TAB[ key = value ] OPTIONAL/DEFAULT ).

    • @sumanpanja5637
      @sumanpanja5637 3 роки тому

      In this we don't have to handle exception...also for addition of DEFAULT - you can give default value also if read fails... Also one more point in new syntax it always go for linear search , first it will check the table type ( if sorted table used then only perform binary) then do accordingly....

    • @SoorajSasidharanABAP
      @SoorajSasidharanABAP  3 роки тому +1

      Hi Suman, I had already explained this in my VALUE operator video. :-) Thanks for your comment :)

  • @ankit_malviya
    @ankit_malviya 3 роки тому

    is CL_DEMO_OUTPUT=>write( ) and CL_DEMO_OUTPUT=>display( ) different?

  • @alexpulido2431
    @alexpulido2431 3 роки тому

    what about performance ? is it better than a Read Table ? can you Binary Seach somehow ?

    • @SoorajSasidharanABAP
      @SoorajSasidharanABAP  3 роки тому

      We cannot use a forced BINARY SEARCH addition.. But if the table is a sorted table, it does an implicit Binary Search as per my understanding :-)

  • @luckyfin4572
    @luckyfin4572 2 роки тому

    how to populate all entries from another internal table using value operator?

  • @maumaumassa
    @maumaumassa 3 роки тому

    despite to simplify the code, what is the gain using this new code ?

  • @nikhilkumar-jw1wz
    @nikhilkumar-jw1wz 3 роки тому +2

    Can you please post video's on RICEF object's

  • @HoshiyarMummyOnMission
    @HoshiyarMummyOnMission 3 роки тому

    how loop will work .pls explain

  • @pallavic9903
    @pallavic9903 5 місяців тому

    how to give OR condition in Try catch block

  • @tirumalrao1968
    @tirumalrao1968 3 роки тому

    Suraj, what is the future for ABAPer?

  • @pavithranss8921
    @pavithranss8921 3 роки тому +1

    Difference between cl_demo_output=>write andcl_demo_output=>display

    • @SoorajSasidharanABAP
      @SoorajSasidharanABAP  3 роки тому

      its just for displaying the contents as output. I use write before display so that both the outputs are on the same screen :)
      Please dont use this class in productive version :)

  • @abdabd5678
    @abdabd5678 3 роки тому

    Suraj, please zoom when u r displaying the code and thanks a lot

  • @OmPrakash-sd7gb
    @OmPrakash-sd7gb 3 роки тому

    ABAP 7.4/7
    5 read statement perform linear search not binary search

    • @SoorajSasidharanABAP
      @SoorajSasidharanABAP  3 роки тому +1

      For sorted tables it does perform an implicit binary search as per
      my understanding. We cannot use the extra keyword BINARY SEARCH with the new syntax.

  • @starmika4782
    @starmika4782 2 роки тому

    9:45
    TYPES: BEGIN OF ty_data,
    name TYPE char20,
    role TYPE char20,
    END OF ty_data.
    DATA: it_data TYPE STANDARD TABLE OF ty_data.
    it_data = VALUE #( ( name = 'Ken' role = 'java' )
    ( name = 'Rom' role = 'abap' )
    ( name = 'Ben' role = 'c++' )
    ).
    DATA(lv_index) = line_index( it_data[ name = 'Ken' ] ).
    WRITE: / lv_index.

  • @starmika4782
    @starmika4782 2 роки тому

    TYPES: BEGIN OF ty_data,
    name TYPE char20,
    role TYPE char20,
    END OF ty_data.
    DATA: it_data TYPE STANDARD TABLE OF ty_data.
    it_data = VALUE #( ( name = 'Ken' role = 'java' )
    ( name = 'Rom' role = 'abap' )
    ( name = 'Ben' role = 'c++' )
    ).
    cl_demo_output=>display( it_data ).
    3:00

  • @starmika4782
    @starmika4782 2 роки тому

    TYPES: BEGIN OF ty_data,
    name TYPE char20,
    role TYPE char20,
    END OF ty_data.
    DATA: it_data TYPE STANDARD TABLE OF ty_data.
    it_data = VALUE #( ( name = 'Ken' role = 'java' )
    ( name = 'Rom' role = 'abap' )
    ( name = 'Ben' role = 'c++' )
    ).
    Data(result) = it_data[ name = 'Ben' ]. "inside [ ] key the column name
    WRITE: / result.
    4:00

  • @starmika4782
    @starmika4782 2 роки тому

    5:00
    TYPES: BEGIN OF ty_data,
    name TYPE char20,
    role TYPE char20,
    END OF ty_data.
    DATA: it_data TYPE STANDARD TABLE OF ty_data.
    it_data = VALUE #( ( name = 'Ken' role = 'java' )
    ( name = 'Rom' role = 'abap' )
    ( name = 'Ben' role = 'c++' )
    ).
    DATA(result) = it_data[ name = 'Ben' ].
    DATA(result1) = it_data[ name = 'Ben' ]-role.
    DATA: result2 TYPE char20.
    result2 = it_data[ name = 'Ben' ]-name.
    WRITE: / 'result =', result.
    WRITE: / 'result 1 =', result1.
    WRITE: / 'result 2 =', result2.

  • @starmika4782
    @starmika4782 2 роки тому

    6:00
    TYPES: BEGIN OF ty_data,
    name TYPE char20,
    role TYPE char20,
    END OF ty_data.
    DATA: it_data TYPE STANDARD TABLE OF ty_data.
    it_data = VALUE #( ( name = 'Ken' role = 'java' )
    ( name = 'Rom' role = 'abap' )
    ( name = 'Ben' role = 'c++' )
    ).
    TRY.
    DATA(result_try) = it_data[ name = 'Malvina' ]. "dump without try!
    CATCH cx_sy_itab_line_not_found.
    WRITE: / 'Not found!'.
    ENDTRY.

  • @starmika4782
    @starmika4782 2 роки тому

    7:30
    TYPES: BEGIN OF ty_data,
    name TYPE char20,
    role TYPE char20,
    END OF ty_data.
    DATA: it_data TYPE STANDARD TABLE OF ty_data.
    it_data = VALUE #( ( name = 'Ken' role = 'java' )
    ( name = 'Rom' role = 'abap' )
    ( name = 'Ben' role = 'c++' )
    ).
    IF line_exists( it_data[ name = 'ken' ] ).
    WRITE: / 'The value exists.'.
    ELSE.
    WRITE: / 'Sorry, not found.'.
    ENDIF.
    IF line_exists( it_data[ name = 'Ken' ] ).
    WRITE: / 'The value exists.'.
    ELSE.
    WRITE: / 'Sorry, not found.'.
    ENDIF.

  • @sandeepsai9756
    @sandeepsai9756 3 роки тому

    Read with binary search runs faster than this