Friday, October 28, 2016
Selection Screen with Maximum Selection (UP TO ... ROWS) MXSEL
constants gc_max_rows type tbmaxsel value '100000'.
constants gc_default_rows type tbmaxsel value '200'.
parameter p_mxsel type tbmaxsel obligatory default gc_default_rows.
initialization.
select single tbmaxsel from rseumod into p_mxsel
where uname = sy-uname.
perform trim_mxsel.
at selection-screen on p_mxsel.
perform trim_mxsel.
start-of-selection.
p_mxsel = p_mxsel + 1.
select * from ...
into corresponding fields of table gt_my
up to p_mxsel rows
where
...
if gt_my is initial.
message s429(mo). " no data found
return.
endif.
if lines( gt_my ) = p_mxsel.
delete gt_my index p_mxsel.
message s016(es) with p_mxsel. " result cut off
endif.
p_mxsel = p_mxsel - 1.
form trim_mxsel.
if p_mxsel > gc_max_rows. p_mxsel = gc_max_rows. endif.
if p_mxsel < 1. p_mxsel = gc_default_rows. endif.
endform.
Subscribe to:
Post Comments (Atom)
SAP ABAP: Determine Timezone for Plant
DATA: lt_tzone TYPE STANDARD TABLE OF tznzone WITH DEFAULT KEY, l_tzone TYPE tznzone. " get time zone for plant ...
-
Sometimes the backend doesn't return the selected rows of an SALV. For my case get_metadata( ) was the solution: go_salv-> get_met...
-
GUIDs or UUIDs can be created with the class cl_system_uuid . try . data (lv_uuid) = cl_system_uuid => if_system_uuid_static...
-
AA PR-AUF(E) Prozessauftrag (eröffnet) AB PR-AUF(F) Prozessauftrag (freigegeben) AC FE...
No comments:
Post a Comment