Using Constants in ABAP OO Method

V Jyothi
Updated on 13-Feb-2020 10:08:34

369 Views

Your INCLUDE should only contain definitions of constants nothing else and then the answer is straightforward.Select Goto → Class - whichever local definition and then add an INCLUDE statement. This will expose all the constants “INCLUDE” in your implementation.

Delete Actives While Looping Over Internal Table in SAP ABAP

Srinivas Gorla
Updated on 13-Feb-2020 10:07:31

988 Views

DELETE command will have a result. You should make sure that once you delete the row, there should not be any reference or use of row subsequently in the loop. The best is to use CONTINUE as soon as you perform deletion. I will suggest avoiding “DELETE lt_itab INDEX sy-tabix” because it will change the sy-tabix i.e. table index. In case if you just want to delete the current row in the loop then you can simply use.“DELETE lt_itab”One more thing if you are using statement “DELETE lt_itab FROM ls_wa” then whether knowingly or unknowingly, you are deleting the same lines ... Read More

Add Class on Click of Anchor Tag using jQuery

David Meador
Updated on 13-Feb-2020 09:56:22

1K+ Views

To add a class on click of anchor tag using jQuery, use the addClass() method. You can try to run the following code to learn how to implement adding a class on click of anchor tag using jQuery −ExampleLive Demo                       $(document).ready(function() {         $("a").click(function() {           $("a.active").removeClass("active");           $(this).addClass("active");         });       });                   .active {          font-size: 22px;         }                     One       Two       Click any of the link above and you can see the changes.    

Add Title in Anchor Tag Using jQuery

Ricky Barnes
Updated on 13-Feb-2020 09:54:55

3K+ Views

To add a title in anchor tag in jQuery, use the prop() method. The prop() method is used to set properties and values of the selected elements.You can try to run the following code to learn how to add a title in anchor tag using jQuery −ExampleLive Demo                        $(document).ready(function(){          $("#button1").click(function(){             $('.myClass').prop('title', 'This is your new title');             var myTitle = $('.myClass').prop('title');             alert(myTitle);          });        });                                        Get Title          

Add and Remove Class to Anchor Tag with jQuery

Ricky Barnes
Updated on 13-Feb-2020 09:48:48

2K+ Views

To add and remove a class to an anchor tag, use the toggleClass. Using it you can add and remove a class on a click.You can try to run the following code to learn how to add and remove a class to an anchor tag with jQuery −ExampleLive Demo                         $(document).ready(function(){          $("#mylink").click(function (e) {             e.preventDefault();                     $(this).toggleClass("selected");            });         });                     .selected {            color: red;         }                     Click me       The above will add and remove class (change color) on click.    

Set New Value for an Attribute Using jQuery

Ricky Barnes
Updated on 13-Feb-2020 09:47:58

749 Views

The jQuery attr() method is used to get the value of an attribute. It can also be used to set new value. We will set new value of attribute href to tutorialspoint.com/html5 from tutorialspoint.com/css.You can try to run the following code to learn how to set new value for an attribute in jQuery −ExampleLive Demo           Selector Example                      $(document).ready(function(){             $("button").click(function(){                $("#tpoint").attr("href", "https://www.tutorialspoint.com/html5");             });       ... Read More

Change Attribute Value Using jQuery

Ricky Barnes
Updated on 13-Feb-2020 09:46:57

8K+ Views

The jQuery attr() method is used to get the value of an attribute. It can also be used to change the value. In the example, we will change the attribute value tutorialspoint.com to tutorialspoint.com/java.You can try to run the following code to learn how to change the value of an attribute using jQuery −ExampleLive Demo           Selector Example                    $(document).ready(function(){          $("button").click(function(){            $("#tpoint").attr("href", "https://www.tutorialspoint.com/java");          });        });                     tutorialspoint.com       Change attribute value       The value of above link will change on clicking the above button. Check before and after clicking the link.    

Use attr() Method in jQuery to Get Attribute Value

David Meador
Updated on 13-Feb-2020 09:45:45

458 Views

The jQuery attr() method is used to get the value of an attribute, with the attribute, for example, href. Mention the attribute as the parameter of the attr() method.You can try to run the following code to learn how to use the attr() method to get the value of an attribute:ExampleLive Demo           Selector Example                      $(document).ready(function(){              $("button").click(function(){                  alert($("#tpoint").attr("href"));              });          });                     Website tutorialspoint       Show complete link    

Get Value of Custom Attribute in jQuery

Amit D
Updated on 13-Feb-2020 09:44:48

2K+ Views

To get the value in jQuery, use the data-attributes with the data() method. You can try to run the following code to implement how to get the value of custom attribute:ExampleLive Demo           Selector Example                      $(document).ready(function() {             alert($('#my_id').data('original-title'));          });                               Demo    

Get the Value of src Attribute in jQuery

Amit D
Updated on 13-Feb-2020 09:43:51

5K+ Views

To get the value of src attribute in jQuery is quite easy. We will get the src attribute of the img tag. This attribute has the URL of the image. Let’s first see how we can add jQuery −You can try to run the following code to learn how to get the value of src attribute in jQuery −ExampleLive Demo           Selector Example                      $(document).ready(function() {             alert($('#myimg').attr('src'));          });                     Logo          

Advertisements