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-required not working..??

Former Member
0 Likes
1,165

Dear Expert,

My program used screen-required = '1'.

And it was working fine.

But after I switch my table to dd07t.

The screen-required check not working anymore.

but the screen looks still working.there is check show up in the fields as normal.

but if i do not fill in any value and press save , it should tell me to fill all fields.

Regards

Jack Lee

Edited by: jack lee on Aug 23, 2010 5:46 AM

5 REPLIES 5
Read only

Former Member
0 Likes
887

Hi,

Did you change your name field, or group in screen corresponding to change of table.

Ie:

before change:


Loop at screen.
if screen-name = 'ABC'.
screen-required = '1'.
endif.
endloop.

but after change to table field dd07t you did no change your code accordingly.

please check,

regards,

Read only

Former Member
0 Likes
887

Hi,

Please share tthe code which you had writen, so that we can help you..

regards,

Kiran

Edited by: kiran kumar on Aug 23, 2010 6:45 AM

Read only

0 Likes
887

SCREEN 6000 Code:

PROCESS BEFORE OUTPUT.

MODULE get_dd07t.

MODULE mytc_change_tc_attr.

LOOP AT it_dd07t

INTO wa_dd07t

WITH CONTROL mytc

CURSOR mytc-current_line.

MODULE mytc_get_lines.

MODULE mytc_change_field_attr.

ENDLOOP.

MODULE status_6000.

PROCESS AFTER INPUT.

LOOP AT it_dd07t .

CHAIN.

FIELD wa_dd07t-ddtext.

FIELD wa_dd07t-domvalue_l.

MODULE mytc_modify ON CHAIN-REQUEST.

ENDCHAIN.

FIELD wa_dd07t-marked

MODULE mytc_mark ON REQUEST.

ENDLOOP.

MODULE mytc_user_command.

MODULE user_command_6000.

MODULE mytc_change_field_attr OUTPUT.

*跑進行螢幕上面的迴圈資料

LOOP AT SCREEN.

  • 如果新增的那一行等於目前迴圈跑的那一行且user按下了+號按鈕則將那一行變成可編輯

IF add_line = mytc-current_line AND is_insert = 'X'.

  • 變成可編輯此行

screen-input = '1'.

  • 防呆的檢驗,若欄位中是需要輸入的以下兩個欄位,則設定為必填欄位

IF screen-name = 'WA_DD07T-DDTEXT' OR screen-name = 'WA_DD07T-DOMVALUE_L'.

screen-required = '1'.

ENDIF.

MODIFY SCREEN.

ELSE.

  • 如果非user按下+按鈕或是新增那一行不等於目前迴圈跑的這一行則將編輯關掉並且設為不需要填寫欄位

screen-input = '0'.

screen-required = '0'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDMODULE. " MYTC_CHANGE_FIELD_ATTR OUTPUT

Read only

0 Likes
887

Hi;

Are you changing the screen elements of a table control?

If yes, please try below.

Add a module just after the loop with control under 'Process before output'.

Sample:

Process before output.

LOOP AT gt_uexit2 INTO wa_uexit2 WITH CONTROL TABCON.

ENDLOOP.

MODULE m_initial_tabcon.

-


Codes for the module minitial_tabcon:_

DATA :l_wa_tabcon LIKE LINE OF tabcon-cols.

LOOP AT tabcon-cols INTO l_wa_tabcon.

IF l_wa_tabcon-screen-group1 eq 'G1' .

l_wa_tabcon-require = 1.

modify tabcon-cols from l_wa_tabcon.

ENDIF.

ENDLOOP.

Read only

Former Member
0 Likes
887

Thanks