This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*&---------------------------------------------------------------------* | |
*& Report Z_RTTI_VTF | |
*& | |
*&---------------------------------------------------------------------* | |
*& | |
*& | |
*&---------------------------------------------------------------------* | |
REPORT Z_RTTI_VTF. | |
TYPES in_type TYPE i. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*&---------------------------------------------------------------------* | |
*& Module Pool SAPMZAVAL003 | |
*& | |
*&---------------------------------------------------------------------* | |
*& | |
*& | |
*&---------------------------------------------------------------------* | |
*&---------------------------------------------------------------------* | |
*& Include MZAVAL003TOP Module Pool SAPMZAVAL003 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REPORT Z_JSON. | |
DATA it_aux TYPE TABLE OF c WITH EMPTY KEY. | |
it_aux = VALUE #( ( 'A' ) ( 'B' ) ( 'A' ) ( 'P' ) ). | |
DATA(lr_json) = | |
cl_sxml_string_writer=>create( type = | |
if_sxml=>co_xt_json ). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public User (String firstName, String lastName, int age, String phone, String address){ | |
this.firstName = firstName; | |
this.lastName = lastName; | |
this.age = age; | |
this.phone = phone; | |
this.address = address; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public User (String firstName, String lastName, int age, String phone){ ... } | |
public User (String firstName, String lastName, String phone, String address){ ... } | |
public User (String firstName, String lastName, int age){ ... } | |
public User (String firstName, String lastName){ ... } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class User | |
{ | |
//All final attributes | |
private final String firstName; // required | |
private final String lastName; // required | |
private final int age; // optional | |
private final String phone; // optional | |
private final String address; // optional | |
private User(UserBuilder builder) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
User user1 = new User.UserBuilder("Lokesh", "Gupta") | |
.age(30) | |
.phone("1234567") | |
.address("Fake address 1234") | |
.build(); | |
System.out.println(user1); | |
User user2 = new User.UserBuilder("Jack", "Reacher") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*&---------------------------------------------------------------------* | |
*& Form yf_om_display_alv_org | |
*&---------------------------------------------------------------------* | |
* text | |
*----------------------------------------------------------------------* | |
FORM yf_om_display_alv_org. | |
DATA: my_table TYPE REF TO cl_salv_table, | |
my_functions TYPE REF TO cl_salv_functions_list, | |
my_columns TYPE REF TO cl_salv_columns_table, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* ls_evento-arquivo_string is the XML that needs to be converted. | |
if ( ls_evento-arquivo_string is not initial ). | |
lv_len = strlen( ls_evento-arquivo_string ). | |
create data lo_cdata type c length lv_len. | |
clear lv_len. | |
assign lo_cdata->* to field-symbol(<fs_cdata>). | |
if ( <fs_cdata> is assigned ). | |
<fs_cdata> = ls_evento-arquivo_string. | |
assign <fs_cdata> to <ls_conv> casting. | |
if ( <ls_conv> is assigned ). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATA: lo_table TYPE REF TO cl_salv_table, | |
lo_event TYPE REF TO cl_salv_events_table, | |
lo_functions TYPE REF TO cl_salv_functions, | |
lo_aggrs TYPE REF TO cl_salv_aggregations, | |
lo_sort TYPE REF TO cl_salv_sorts, | |
lo_sort_column TYPE REF TO cl_salv_sort. | |
CALL METHOD cl_salv_table=>factory | |
IMPORTING | |
r_salv_table = lo_table |