Skip to Content
0
Former Member
Jul 06, 2015 at 11:00 AM

Multiple mandatory fields in table control

72 Views

Hi experts,

i have created a table control. there are multiple fields in that table control . Now i want my few fields to be mandatory. Below u can find the logic which i have used to achieve this. But the problem is when i save the data. i does not allow me to go to back screen . and show error to fill the mandatory field again.

i tried doing it from table control > attrributes> display> input>required . but the input>required is not in editable mode. so i was unable to it that way.

MODULE INIT_TAB OUTPUT.

LOOP AT SCREEN.

IF SCREEN-NAME = 'ZTASK-VENDOR_NUMBER' OR SCREEN-NAME = 'ZTASK-VENDOR_NAME' OR SCREEN-NAME = 'ZTASK-APPROVAL_CAT' OR SCREEN-NAME ='ZTASK-SUPPLIER_TYPE' OR SCREEN-NAME = 'ZTASK-REEVAL_DATE' OR SCREEN-NAME = 'ZTASK-TERMS_N_COND'.

SCREEN-REQUIRED = '1'.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDMODULE.





PROCESS BEFORE OUTPUT.

LOOP AT IT_OUT WITH CONTROL DATA CURSOR DATA-CURRENT_LINE.

MODULE VENDOR.

MODULE STATUS_0101.

MODULE INIT_TAB.

ENDLOOP.

*

PROCESS AFTER INPUT.

LOOP AT IT_OUT.

MODULE USER_COMMAND_0101.

ENDLOOP.

Thanks in advance,

Aakash