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

regarding screen painter

Former Member
0 Likes
714

1) Hi I have two fileds in my internal table..

like field 1(matnr) filed2(quantity)

now what i want that for a particular material the quantiy field should be entered by the user and for some particular materials the quantity should come automatically from the database table and the quantity field in table control should come in display mode.

i am having all the materials in my internal table ie.mixture of materials of both kinds specified above.

2) and one more thing in table control if we are entering some data in a particular cell after entering the data the cell should automically convert into display mode once the entry has been done in that cell.

waiting for you replies.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
696

Hi Ashish,

I would suggest to use an Editable ALV rather than using table control. It would be easier o implement and has lot more functionality than TC.

Thanks

Vijay

PLZ reward points if helpful

6 REPLIES 6
Read only

Former Member
0 Likes
697

Hi Ashish,

I would suggest to use an Editable ALV rather than using table control. It would be easier o implement and has lot more functionality than TC.

Thanks

Vijay

PLZ reward points if helpful

Read only

0 Likes
696

Can you please tell me how to use that coz have never used that thing.

Read only

0 Likes
696

Hi Ashish,

Plz check the program BCALV_TEST_GRID_EDITABLE

This will give you an idea of editable alv and will help you to create one based on your requirements.

THanks

Vijay'

PLZ reward points if helpful

Read only

Former Member
0 Likes
696

hi,

Tr this for ur second question. you can use 'Loop Screen' for this. i am pasting a example code.

code:

module 0003_pai_customer input.

case sy-ucomm.

when 'CREATE'.

autoc = 0.

call screen 004.

when 'MODIFY'.

flg1 = 1.

when 'SAVE'.

flag1 = 'X'.

endcase.

endmodule.

module setscreenfields output. " setting screen fields

loop at screen.

if flg1 is initial.

screen-input = 0. "making screen fields uneditable

elseif ( flg1 eq 1 ).

if ( ( screen-name = 'WI_ZCUST-CUSTOMERNAME' or

screen-name = 'WI_ZCUST-ADDRESS' or

screen-name = 'WI_ZCUST-CITY' or

screen-name = 'WI_ZCUST-STATE' or

screen-name = 'WI_ZCUST-COUNTRY' or

screen-name = 'WI_ZCUST-PHONE' or

screen-name = 'WI_ZCUST-EMAIL' or

screen-name = 'WI_ZCUST-FAX' )

and table1-current_line <= sy-dbcnt ).

screen-input = 1. "making screen fields editable

elseif ( ( screen-name = 'WI_ZCUST-CUSTOMERID' or

screen-name = 'WI_ZCUST-STATUS' ) and table1-current_line <= sy-dbcnt ).

screen-input = 0. "making screen fields editable

endif.

endif.

modify screen.

endloop.

Regards,

Sri

Read only

Former Member
0 Likes
696

hi,

Try this too. After entering the data in the table control and saving it,just set a flag for ex diable1 = 1. then create a module and write the following code in pai.

module disable1 input.

if disable1 = 1.

screen-input = 0.

screen-output = 1.

endif.

endmodule.

Regards,

Sri

Read only

Former Member
0 Likes
696

thnx