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

Code: Error Msg when Table Control field is left blank by user

Former Member
0 Likes
834

Team,

I want to know how to code in PAI Error Msg e0001 when two fields in Table Control TC100 are left blank by user.

My table control has five fields. I want to make sure there is data in field2 and field3 and are not left blank by user.

I know how to code if fields is outside table control. For example,

PROCESS AFTER INPUT.

CHAIN.

FIELD: S_ACCOUNT, S_ACCOUNTEMAIL,

MODULE CHECK_INPUT.

ENDCHAIN.

But I don't kknow how to code this for fields in Table Control.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
625

Try:

 process after input.

loop at itab    "Table control Internal table
    chain 
      field screen_field_1.
      field screen_field_2.
    endchain.
  endloop.

Rob

4 REPLIES 4
Read only

Former Member
0 Likes
625

Hi

The same way you can validate the fields only thing is that you have to jeep the fields in the loop..endloop. in PAI

PROCESS AFTER INPUT.

LOOP AT TC_100.

CHAIN.

fields: tc_100-f1, tc_100-f2.

module check_input on chain-request.

ENDCHAIN

ENDLOOP.

double click on module and write the validation code

<b><REMOVED BY MODERATOR></b>

regards

Anji

Message was edited by:

Alvaro Tejada Galindo

Read only

Former Member
0 Likes
626

Try:

 process after input.

loop at itab    "Table control Internal table
    chain 
      field screen_field_1.
      field screen_field_2.
    endchain.
  endloop.

Rob

Read only

0 Likes
625

Rob,

Your code did the trick.

Thanks

Points awarded.

Message was edited by:

SAPna2000

Read only

0 Likes
625

Glad to help.

Rob