Code: Alles auswählen.
function z_show_properties.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(IO_EVENT_HANDLER) TYPE REF TO OBJECT OPTIONAL
*" REFERENCE(IT_ENUMS) TYPE WDY_WB_FREE_ENUM_TAB OPTIONAL
*" REFERENCE(IT_PROPERTIES) TYPE WDY_WB_PROPERTY_TAB OPTIONAL
*" REFERENCE(IS_DATA) TYPE ANY
*" REFERENCE(IV_POPUP) TYPE BOOLEAN_FLG OPTIONAL
*" REFERENCE(IV_POPUP_BOTTOM) TYPE I DEFAULT 20
*" REFERENCE(IV_POPUP_LEFT) TYPE I DEFAULT 25
*" REFERENCE(IV_POPUP_RIGHT) TYPE I DEFAULT 110
*" REFERENCE(IV_POPUP_TOP) TYPE I DEFAULT 4
*" REFERENCE(IV_UNLOCKED) TYPE BOOLEAN_FLG OPTIONAL
*" EXPORTING
*" REFERENCE(ES_DATA) TYPE ANY
*"----------------------------------------------------------------------
data(lo_data_handler) = new lcl_data_handler( is_data ).
data(lo_property_box_handler) = new lcl_property_box_handler(
io_data_handler = lo_data_handler
io_event_handler = io_event_handler
it_enums = it_enums
it_properties = it_properties
).
lo_dynpro_0100 = new #(
io_property_box_handler = lo_property_box_handler
iv_unlocked = iv_unlocked
).
lo_dynpro_0100->open(
iv_popup = iv_popup
iv_popup_bottom = iv_popup_bottom
iv_popup_left = iv_popup_left
iv_popup_right = iv_popup_right
iv_popup_top = iv_popup_top
).
if lo_data_handler->has_been_adjusted( ).
data(lo_data_reference) = lo_data_handler->get_data_reference( ).
assign lo_data_reference->* to field-symbol(<data>).
es_data = <data>.
else.
es_data = is_data.
endif.
endfunction.
" ___ MODULES _______________________________________________________
module 0100_pai input.
check lo_dynpro_0100 is bound.
lo_dynpro_0100->process_after_input( ).
endmodule.
module 0100_pbo output.
check lo_dynpro_0100 is bound.
lo_dynpro_0100->process_before_output( ).
endmodule.
Code: Alles auswählen.
" --- get type ------------------------------------------------
data(lv_is_boolean) = abap_false.
data(lv_is_date) = abap_false.
data(lv_is_enum) = abap_false.
if ls_property-type is not initial.
" do nothing
elseif line_exists(
mt_enums[
prop_category = |PROPERTIES|
prop_name = <catalogue_entry>-fieldname
]
).
lv_is_enum = abap_true.
elseif <catalogue_entry>-datatype = |DATS|.
lv_is_date = abap_true.
elseif <catalogue_entry>-datatype = |CHAR| and <catalogue_entry>-outputlen = 1.
select *
into table @data(lt_domain_values)
from dd07l
where domname = @<catalogue_entry>-domname
and as4local = 'A'.
if sy-dbcnt = 2.
lv_is_boolean = abap_true.
loop at lt_domain_values assigning field-symbol(<domain_value>)
where ( <domain_value>-domvalue_l <> space
and <domain_value>-domvalue_l <> abap_true )
or <domain_value>-domvalue_h is not initial.
free lv_is_boolean.
exit.
endloop.
endif.
endif.
data(lv_type) = cond #(
when ls_property-type is not initial then ls_property-type
when lv_is_boolean is not initial then cl_wdy_wb_property_box=>property_type_boolean
when lv_is_date is not initial then cl_wdy_wb_property_box=>property_type_date
when lv_is_enum is not initial then cl_wdy_wb_property_box=>enum_item
when <catalogue_entry>-dd_roll is not initial then <catalogue_entry>-dd_roll
else cl_wdy_wb_property_box=>property_type_string
).
Code: Alles auswählen.
public section.
methods:
set_property_box importing io_property_box type ref to cl_wdy_wb_property_box.
Da oben ist doch ein Screenshot oder wovon meinst du?black_adept hat geschrieben: ↑06.09.2024 13:05Ich bin einerseits beeindruckt und würde gerne mal einen Screenshot sehen wie du das gemacht hat
Mmh... möglich 😄black_adept hat geschrieben: ↑06.09.2024 13:05andererseits glaube ich, dass du das Rad gerade ein 2. Mal erfindest ( nochmal der Hinweis auf POPUP_GET_VALUES )
Sorry - übersehen.tar hat geschrieben: ↑11.09.2024 01:30Da oben ist doch ein Screenshot oder wovon meinst du?black_adept hat geschrieben: ↑06.09.2024 13:05Ich bin einerseits beeindruckt und würde gerne mal einen Screenshot sehen wie du das gemacht hat