‎2007 Jun 28 6:07 AM
Hi,
Iam very new to module pool.
i have to do some screen validation.
iam working on tabstrip with 8 tabs.
now, data is displaying in the table controls.
first i have to disable the rows which have data,
and enable the rows which do not have data.
please help.
kirthi.
‎2007 Jun 28 6:41 AM
in your case you meant to ask that you wnt to add new records other than those which are already being displayed on the table control.
in thata case you first need to make sure your table control has enof lines to be entered.
tablectrl is the table control name defined on the screen.
for this in PBO of the screen, just write this
tablectrl-lines = 100.now in the PBO of the table control module just write these statements
loop at screen.
if screen-name = 'tabctrl-field1' or
screen-name = 'tabctrl-field2' or ..... (for all fields of the table control)
if not itab-field1 is initial.
screen-input = 0.
modify screen.
endif.
endif.
endloop.Regards
Gopi
‎2007 Jun 28 6:11 AM
Hi,
You need to execute a module in PBO between the LOOT AT itab with Table control ENDLOOP statments.
LOOP AT itab with <table control>.
MODULE init_tab.
ENDLOOP.
In the module you can ise
MODULE init_tab OUTPUT.
LOOP AT SCREEN.
CHECK SCREEN-NAME = 'FIELD1' and field is not initial.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE
Regards,
Sesh
‎2007 Jun 28 6:25 AM
Hi Kirthi
For all the screen fields.
LOOP AT SCREEN.
CHECK SCREEN-NAME = 'TAB-F1' and SCREEN-VALUE IS NOT INITIAL.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDLOOP.Regards,
Kate
‎2007 Jun 28 6:41 AM
in your case you meant to ask that you wnt to add new records other than those which are already being displayed on the table control.
in thata case you first need to make sure your table control has enof lines to be entered.
tablectrl is the table control name defined on the screen.
for this in PBO of the screen, just write this
tablectrl-lines = 100.now in the PBO of the table control module just write these statements
loop at screen.
if screen-name = 'tabctrl-field1' or
screen-name = 'tabctrl-field2' or ..... (for all fields of the table control)
if not itab-field1 is initial.
screen-input = 0.
modify screen.
endif.
endif.
endloop.Regards
Gopi
‎2007 Jun 28 6:45 AM
PROCESS BEFORE OUTPUT.
MODULE SCR_INIT.
&----
*& Module SCR_INIT OUTPUT
&----
text
----
MODULE SCR_INIT OUTPUT.
LOOP AT SCREEN.
IF NOT G_AUTH IS INITIAL.
*If the user is BM then enable only BM related input fields and
*inactive RM and NSM input fields
if g_auth = 'BM'.
if screen-group1 = 'CB2'.
SCREEN-INPUT = '0'.
endif.
if screen-group1 = 'CB3'.
SCREEN-INPUT = '0'.
endif.
if bm_app1 = 'C'.
if screen-group1 = 'CB1'.
SCREEN-INPUT = '0'.
endif.
if screen-group1 = 'SB'. "Save Button
screen-input = '0'.
endif.
endif.
endif.
modify screen.
endloop.