‎2010 Aug 02 7:40 AM
hi expertS ,
i created one gui screen . in screen paiinter with i/o(PRODUCTION ORDER) field and table control . first i entred orderno value in i/o text field that is in theexists data base .
when ever click on ok button (select the data base from data base) the data comes to table control. .
now i didnt refresh table control .
now in the first i/o text field (production order) i given onother number that value not there not in the data base .
so i write code .
chain .
pai .
fields : zbarcode_db-aufnr ( this is the screen field name) .
module xyz .
endchain .
in program
module xyz .
select single aufnr ....from zbarcode_db ..where aufnr .. = zbarcode_db-aufnr ..
if sy-subrc ne 0 .
REFRESH CONTROL 'TBC_QT' FROM SCREEN '0300'. refreshing table control properties
clear t_table . ( iam clear internal table)
message e001. ( u entered document not there in the data base ) .
endif .
endmodule .
but when ever sy-subrc ne 0 . the error message will come .
its giving error message are coming . but table control data not refreshing internal table (t_barcode) ..
any solstion for this .
‎2010 Aug 02 10:24 PM
Hello,
Move your select statement to PBO and
use a "loop with control" statement instead of REFRESH CONTROL statement,
and set TBC_QT-LINES = row count of your internal table.
LOOP WITH CONTROL TBC_QT.
MODULE TRANSP_ITAB.
ENDLOOP.
in the module TRANSP_ITAB :
READ TABLE itab INDEX table-current_line.
By this way you are moving the content of internal table to screen
on every time PBO - PAI
Demo program DEMO_DYNPRO_TABLE_CONTROL_1 is a good example for that.
I hope it helps you.
‎2010 Aug 02 6:34 PM
hi,
chk whether ur internal table is with header line.
if it is with header line the use refresh instead of clear e.g. refresh itab.
Regards ,
Sarang
‎2010 Aug 02 10:24 PM
Hello,
Move your select statement to PBO and
use a "loop with control" statement instead of REFRESH CONTROL statement,
and set TBC_QT-LINES = row count of your internal table.
LOOP WITH CONTROL TBC_QT.
MODULE TRANSP_ITAB.
ENDLOOP.
in the module TRANSP_ITAB :
READ TABLE itab INDEX table-current_line.
By this way you are moving the content of internal table to screen
on every time PBO - PAI
Demo program DEMO_DYNPRO_TABLE_CONTROL_1 is a good example for that.
I hope it helps you.