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

screen error table control not refreshed

Former Member
0 Likes
1,369

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 .

1 ACCEPTED SOLUTION
Read only

bbalci
Contributor
0 Likes
902

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.

2 REPLIES 2
Read only

sarang_gujrati2
Explorer
0 Likes
902

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

Read only

bbalci
Contributor
0 Likes
903

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.