Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

screen validations

Former Member
0 Likes
512

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.

1 ACCEPTED SOLUTION
Read only

gopi_narendra
Active Contributor
0 Likes
493

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

4 REPLIES 4
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
493

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

Read only

Former Member
0 Likes
493

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

Read only

gopi_narendra
Active Contributor
0 Likes
494

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

Read only

Former Member
0 Likes
493

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.