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

Default value for a column in Table Control

leonardo_pavia
Participant
0 Likes
2,340

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
Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,080

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.

Read only

Former Member
0 Likes
1,080

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

Read only

Former Member
0 Likes
1,080

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.

Read only

0 Likes
1,080

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

Thankx!!!

Leonardo