Application Development 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: 

Default value for a column in Table Control

leonardo_pavia
Participant
0 Kudos
1,423

Hi friends, can i set dinamcally a default value for a column in table control?, this column is check type. This default value must appear in empty rows,

thanks

4 REPLIES 4

hymavathi_oruganti
Active Contributor
0 Kudos
163

yes, u can do it,

suppose, u r placing table control of table MARA,

suppose xyz is the fieldname.

in the module pool program, in PBO, u can put default values like below.

IF MARA-XYZ is initial.

MARA-xyz = '1'.

endif.

Former Member
0 Kudos
163

Leonardo - first of all, you'll probably get more responses if you mark your thread as a question.

I'm not sure I understand exactly what you're trying to do. You have a table control and can display say 10 rows. If 5 of them are populated, do you want the remaining ones opened up and have some value in the cheque type?

Rob

Former Member
0 Kudos
163

ADD A MODULE AS Module yyyy In ur PAI.

as

In PAI.

-


LOOP at itab.

Module YYYY

ENDLOOP.

-


Module YYYY.

LOOP AT SCREEN.

IF SCREEN-NAME = 'ITAB-VAL’.

ITAB-VAL = 'XXXXXXXX' "(DEFAULT VALUE)

SCREEN-INPUT = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

End module.

*note

make this event work only if the previous column is filled okay.

*

the display will be in display mode on the screen as screen-input = 0.

see that in the table control u can get the table field for all the rows even though you are processing on some fields .

so what u do is make that particular filed masked(no i/p field and populate the field that will be better instead of populating all the columns okay.

hope this helps you out ,

regards,

vijay.

0 Kudos
163

Thank you Hymavathi nad Kan, my problem was solved by your proposed solutions. Rob, next time I will mark topic as question.

Thankx!!!

Leonardo