Application Development 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: 

Table view control

Former Member
0 Kudos
135

Hi to all abap guru's can u pls give some sample programs for the table view control with screen shots or can u suggest any site for this . poitns will be rewarded . pls it's urgent .

1 ACCEPTED SOLUTION

Former Member
0 Kudos
98

Hi,

goto tcode ABAPDOCU.

and select

ABAP User Dialogs ->Screens ->Complex Screen Elements ->Table Control with Scrolling /Table Control With Modifications .

see those example.

see this link u can find example with screen shots.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm

reward if helpful

rgds,

bharat.

4 REPLIES 4

Former Member
0 Kudos
99

Hi,

goto tcode ABAPDOCU.

and select

ABAP User Dialogs ->Screens ->Complex Screen Elements ->Table Control with Scrolling /Table Control With Modifications .

see those example.

see this link u can find example with screen shots.

http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm

reward if helpful

rgds,

bharat.

0 Kudos
98

Hi,

Check the demo program

RSDEMO_TABLE_CONTROL.

Regards,

Sesh

Former Member
0 Kudos
98

Hi

Table view generation (SE54)

Former Member
0 Kudos
98

Hello Sunil,

Please find the program for table control..

PROGRAM zssr_modulepool_ex1 .

INCLUDE zssr_modulepool_ex1_d01i.

INCLUDE zssr_modulepool_ex1_f01i.

INCLUDE zssr_modulepool_ex1_pbo.

INCLUDE zssr_modulepool_ex1_pai.

-


----


  • INCLUDE ZSSR_MODULEPOOL_EX1_D01I *

----


tables: vbak, vbap.

constants: begin of c_ts,

tab1 like sy-ucomm value 'HEAD',

tab2 like sy-ucomm value 'ITEM',

end of c_ts.

controls: tab_ctrl type tableview using screen 0300,

tab type tabstrip.

data: ok_code type sy-ucomm,

save_ok type sy-ucomm.

data: scr_no(4) type n value '0200'.

data: begin of g_ts,

subscreen like sy-dynnr,

prog like sy-repid value 'ZSSR_MODULEPOOL_EX1',

pressed_tab like sy-ucomm value c_ts-tab1,

end of g_ts.

data: begin of g_t_item occurs 0,

posnr like vbap-posnr,

matnr like vbap-matnr,

arktx like vbap-arktx,

end of g_t_item.

data: begin of g_t_tab_item occurs 0,

posnr like vbap-posnr,

matnr like vbap-matnr,

arktx like vbap-arktx,

end of g_t_tab_item.

data: g_s_vbak1 like vbak.

data: begin of g_s_vbak ,

kunnr like vbak-kunnr,

auart like vbak-auart,

spart like vbak-spart,

vtweg like vbak-vtweg,

audat like vbak-audat,

ernam like vbak-ernam,

erdat like vbak-erdat,

end of g_s_vbak.

-


----


  • INCLUDE ZSSR_MODULEPOOL_EX1_F01I *

----


&----


*& Module transfer OUTPUT

&----


  • text

----


module transfer output.

g_t_item-posnr = g_t_tab_item-posnr.

g_t_item-matnr = g_t_tab_item-matnr.

g_t_item-arktx = g_t_tab_item-arktx.

endmodule. " transfer OUTPUT

&----


*& Form print_detail

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


form print_detail.

call function 'OPEN_FORM'

exporting

  • APPLICATION = 'TX'

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMS =

  • DEVICE = 'PRINTER'

  • DIALOG = 'X'

form = 'ZSSR_SCRIPT_MOD'

language = sy-langu

  • OPTIONS =

  • MAIL_SENDER =

  • MAIL_RECIPIENT =

  • MAIL_APPL_OBJECT =

  • RAW_DATA_INTERFACE = '*'

  • IMPORTING

  • LANGUAGE =

  • NEW_ARCHIVE_PARAMS =

  • RESULT =

exceptions

canceled = 1

device = 2

form = 3

options = 4

unclosed = 5

mail_options = 6

archive_error = 7

invalid_fax_number = 8

more_params_needed_in_batch = 9

spool_error = 10

others = 11

.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

call function 'WRITE_FORM'

exporting

  • ELEMENT = ' '

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

window = 'STP'

  • IMPORTING

  • PENDING_LINES =

exceptions

element = 1

function = 2

type = 3

unopened = 4

unstarted = 5

window = 6

bad_pageformat_for_print = 7

spool_error = 8

others = 9

.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

call function 'WRITE_FORM'

exporting

  • ELEMENT = ' '

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

window = 'MAIN'

  • IMPORTING

  • PENDING_LINES =

exceptions

element = 1

function = 2

type = 3

unopened = 4

unstarted = 5

window = 6

bad_pageformat_for_print = 7

spool_error = 8

others = 9

.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

call function 'CLOSE_FORM'

  • IMPORTING

  • RESULT =

  • RDI_RESULT =

  • TABLES

  • OTFDATA =

  • EXCEPTIONS

  • UNOPENED = 1

  • BAD_PAGEFORMAT_FOR_PRINT = 2

  • SEND_ERROR = 3

  • SPOOL_ERROR = 4

  • OTHERS = 5

.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

endform. " print_detail

-


----


  • INCLUDE ZSSR_MODULEPOOL_EX1_PAI *

----


&----


*& Module USER_COMMAND_0010 INPUT

&----


  • text

----


module user_command_0010 input.

case sy-ucomm.

when 'ENTR'.

select single kunnr auart spart vtweg audat ernam erdat

from vbak

into g_s_vbak

where vbeln = vbak-vbeln.

select posnr matnr arktx

from vbap

into corresponding fields of table g_t_tab_item

where vbeln = vbak-vbeln.

select single *

from vbak

into g_s_vbak1

where vbeln = vbak-vbeln.

call screen 100.

when 'BACK'.

leave program.

when 'EXIT'.

set screen 0.

leave screen.

endcase.

endmodule. " USER_COMMAND_0010 INPUT

&----


*& Module user_command_0100 INPUT

&----


  • text

----


module user_command_0100 input.

save_ok = ok_code.

clear ok_code.

case save_ok.

when 'BACK'.

leave to screen 0010.

when 'EXIT'.

set screen 0.

leave screen.

when 'HEAD'.

tab-activetab = save_ok.

scr_no = '0200'.

when 'ITEM'.

tab-activetab = save_ok.

scr_no = '0300'.

  • when 'PRINT'.

  • perform print_detail.

endcase.

endmodule. " user_command_0100 INPUT

-


----


  • INCLUDE ZSSR_MODULEPOOL_EX1_PBO *

----


&----


*& Module STATUS_0010 OUTPUT

&----


  • text

----


module status_0010 output.

set pf-status 'STATUS_100'.

set titlebar 'TITLE_0010'.

endmodule. " STATUS_0010 OUTPUT

&----


*& Module status_0100 OUTPUT

&----


  • text

----


module status_0100 output.

set pf-status 'STATUS_100'.

set titlebar 'TITLE_0100'.

endmodule. " status_0100 OUTPUT

-


its not possible to send screen shots....

Reward If Helpful.

Regards

--

Sasidhar Reddy Matli.