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

Disabling the checbox in Module pool.

Former Member
0 Likes
913


Hi,

I have strange requirement in the module pool. I have a table control in which there are two fields

1. Goods Supplier ( Vendor)

2. Default ( Checkbox).

This is being executed for a given material. One Material can have multiple Goods supplier but can have only one Default supplier.

Hence If there are more than one checkboxes ticked for a given material the system should give me an Error .

Some how I do not know how to do it. Also I tried on curso comandr. Tthis will need to have the Functions code CS and and function type 's' in the Screen.

But it does not work in a loop.

Now withing the table control if one vendor is marked as default the moment I try to check the other  vendor as default it needs to throw an error.

Also I need to do the Validatioon for the Vendor. In case the Vendor does not exist in the vendor master then also it should throw an error.

Can any one please let mek now how Should I handle this requirement.

Many thank.

Regards,

Deepak.


Hi,

I have strange requirement in the module pool. I have a table control in which there are two fields

1. Goods Supplier ( Vendor)

2. Default ( Checkbox).

This is being executed for a given material. One Material can have multiple Goods supplier but can have only one Default supplier.

Hence If there are more than one checkboxes ticked for a given material the system should give me an Error .

Some how I do not know how to do it. Also I tried on curso comandr. Tthis will need to have the Functions code CS and and function type 's' in the Screen.

But it does not work in a loop.

Now withing the table control if one vendor is marked as default the moment I try to check the other  vendor as default it needs to throw an error.

Also I need to do the Validatioon for the Vendor. In case the Vendor does not exist in the vendor master then also it should throw an error.

Can any one please let mek now how Should I handle this requirement.

Many thank.

Regards,

Deepak.

3 REPLIES 3
Read only

dibyajeeban_jena
Active Participant
0 Likes
665

Hi,

At first if the check box is ticked on screen , it should go to the PAI for any validation check . For the same you need to assign a function code to the check box in screen painter . now once control goes to PAI for any activity  on check box..  u can put logic for any validation or disable check box for the same material .

Put logic like if one checkbox = 'X'  for  a  material

                       then for the same material any attempt to put  tick on checkbox

                      put   error message .

Regards

DJ

Read only

hiriyappa_myageri
Participant
0 Likes
665

Hi Depak,

if you want do validations for loop kind of thing means after PBO event there will be LOOP ENDLOOP.

in between this loop you can define one module like valdation_check. inside this write your own logic and putt error message there.

Module valdation_check.

IF CHECK = 'X'.

****HERE U NEED SET ONE MORE COUNTER for how many records have ticked. if counter is more than one that time u just trigger ur message***

if screen-name = 'WA-F1'.

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDIF.

ENDMODULE.

Regards,

Hiriyappa

Read only

Former Member
0 Likes
665

Hi, do this check in PAI module of screen .

Smth like this:

data def_count type i .

clear def_count .

Loop at itab where default = 'X' .

add 1 to def_count.

endloop .

if def_count > 1 .

  message e001 .

endif .

raise error message and don't let save to DB if more then one record with set checkbox.