2006 Jul 25 6:20 AM
Can anyone plz give me sample code to handle pageup, nextpage, previouspage, lastpage options for a table in screen in Dialog Program.
Thanks.
2006 Jul 25 6:50 AM
FOR NEXT PAGE
current-line = current-line + sy-loopc
For previous page
current-line = current-line - sy-loopc
For first page
current-line = top_line (ie. 1)
for last page:
first use describe table to know the no of records
devide the records by sy-loopc get quotient.
current_line = sy-loopc * quotient .
FOR NEXT PAGE
current-line = current-line + sy-loopc
For previous page
current-line = current-line - sy-loopc
For first page
current-line = top_line (ie. 1)
for last page:
first use describe table to know the no of records
devide the records by sy-loopc get quotient.
current_line = sy-loopc * quotient .
2006 Jul 25 6:25 AM
Hi,
Have a look at these good links-
http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
http://fuller.mit.edu/tech/dialog_programming.html
http://www.sappoint.com/abap/dptc1.pdf
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sappoint.com/faq/faqdiapr.pdf
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
http://www.sapdevelopment.co.uk/tips/tipshome.htm
<b>check sample code.</b>http://www.sapgenie.com/abap/example_code.htm
http://www.sap-img.com/abap.htm
http://www.allsaplinks.com/dialog_programming.html
Mark useful answers.
Regards,
Tanuja.
2006 Jul 25 6:25 AM
refer..'
Eg of table Control:
http://members.aol.com/_ht_a/skarkada/sap/table_control/
table_control.htm
TABLE CONTROL -
http://www.geekinterview.com/Interview-Questions/SAP-R-3
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbaa4735c111d1829f0000e829fbfe/content.htm
2006 Jul 25 6:25 AM
hi vinutha,
check the below links u will find the answers for your questions
http://www.sapgenie.com/abap/example_code.htm
http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
http://www.sapgenie.com/links/abap.htm
http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
check these links
http://www.allsaplinks.com/dialog_programming.html
http://www.sap-img.com/abap.htm
http://sap.ittoolbox.com/code/archives.asp?i=10&t=450&a=t
http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
if u find it useful plz mark the points
Regards,
Naveen
2006 Jul 25 6:35 AM
hi,
use this code afret making table control manually and gave scrolling buttons, and than gave that coding in the TAB control PAI.
here tab_vbap is the table control name, t_vbap is the table which is use in Table contol making, ok_code is sy-ucomm,
PERFORM scrolling_inserting USING 'TAB_VBAP'
'T_VBAP'
'MARK'
CHANGING ok_code.
FORM scrolling_inserting USING p_tc_name TYPE dynfnam
p_table_name
p_mark_name
CHANGING p_ok LIKE sy-ucomm.
DATA l_table_name LIKE feld-name.
FIELD-SYMBOLS <table> TYPE STANDARD TABLE.
FIELD-SYMBOLS <tc> TYPE cxtab_control.
ASSIGN (p_tc_name) TO <tc>.
CONCATENATE p_table_name '[]' INTO l_table_name. "table body
ASSIGN (l_table_name) TO <table>. "not headerline
DESCRIBE TABLE <table> LINES l.
CASE p_ok.
WHEN 'FP'.
<tc>-top_line = 1.
WHEN 'LP'.
<tc>-top_line = ( l - g_tab_marc_lines ) + 1.
WHEN 'NP'.
chek = <tc>-top_line + g_tab_marc_lines.
IF chek < l.
<tc>-top_line = ( <tc>-top_line + g_tab_marc_lines ).
ELSE.
<tc>-top_line = ( l - g_tab_marc_lines ) + 1.
ENDIF.
WHEN 'PP'.
chek = <tc>-top_line - g_tab_marc_lines.
IF chek <= 0.
<tc>-top_line = 1.
ELSE.
<tc>-top_line = ( <tc>-top_line -g_tab_marc_lines ).
ENDIF.
ENDCASE.
ENDFORM. " scrolling_inserting
hope it will help u.
with regards
chetan vishnoi
2006 Jul 25 6:37 AM
hi vinutha,
here is no need to define this typeof coding if u make ur table contro with help of wizard,
i think u try this and see the coding , it will help u
with regards
chetan vishnoi
2006 Jul 25 6:44 AM
hi
ucan also use that FM 'SCOLLING_IN_TABLE'
with regards
chetan vishnoi
2006 Jul 25 7:08 AM
2006 Jul 25 6:50 AM
FOR NEXT PAGE
current-line = current-line + sy-loopc
For previous page
current-line = current-line - sy-loopc
For first page
current-line = top_line (ie. 1)
for last page:
first use describe table to know the no of records
devide the records by sy-loopc get quotient.
current_line = sy-loopc * quotient .
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |