‎2008 Feb 18 4:30 AM
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.
‎2008 Feb 18 4:37 AM
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
‎2008 Feb 18 4:37 AM
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
‎2008 Feb 18 4:41 AM
Can you please tell me how to use that coz have never used that thing.
‎2008 Feb 18 4:50 AM
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
‎2008 Feb 18 4:48 AM
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
‎2008 Feb 18 4:54 AM
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
‎2008 Feb 20 12:19 PM