‎2008 Mar 11 8:58 AM
Hi Gurus
I had a Custom Module Pool Program in that i have a Tabstrips on that Tabstrips i had a Table controls on different different tab strips
I am facing a problem while writing BDC for that Table controls when i do page down it takes me to next page in table control but when i process that BDC it wont take
please suggest me sumthing or help me with some test code ...
what i am Planning is i will add two buttons on the Sub screen for page up and page down on subsceen of TC
If this approach is good then please tell how to achieve this
regards
Hitesh
Answers will be rewarded
‎2008 Mar 11 9:27 AM
You r oing Fine. You Can do that
DATA:line_count TYPE i,
current_line TYPE i, "#EC *
selected_line TYPE i,
lv_i TYPE i,
lv_j TYPE i.
Write this code in PAI
WHEN 'P--'.
PERFORM paging USING 'P--'.
WHEN 'P-'.
PERFORM paging USING 'P-'.
WHEN 'P+'.
PERFORM paging USING 'P+'.
WHEN 'P++'.
PERFORM paging USING 'P++'.
----
Form paging
----
Form to do scrolling for screen 9001
----
>CODE OKCODE value (P, P-, P, P+ )
----
FORM paging USING code. "#EC *
CASE code.
WHEN 'P--'.
tc-top_line = 1. <<TC is table control Name
WHEN 'P-'.
tc-top_line = tc-top_line - line_count.
IF tc-top_line LE 0.
tc-top_line = 1.
ENDIF.
WHEN 'P+'.
lv_i = tc-top_line + line_count.
lv_j = tc-top_line - line_count + 1.
IF lv_j LE 0.
lv_j = 1.
ENDIF.
IF lv_i LE lv_j.
tc-top_line = lv_j.
ELSE.
tc-top_line = lv_i.
ENDIF.
WHEN 'P++'.
tc-top_line =
tc-lines - line_count + 1.
IF tc-top_line LE 0.
tc-top_line = 1.
ENDIF.
ENDCASE.
ENDFORM. " paging
‎2008 Mar 11 9:08 AM
Hi,
In ur custom module pool program check if Page down and Page up buttons are working or not, else write code for sy-ucomm P+ and P-
e.g
WHEN 'P+'.
TAB_PACK-TOP_LINE = TAB_PACK-TOP_LINE + 10.
CLEAR SY-UCOMM.
CLEAR OK_CODE.
WHEN 'P-'.
TAB_PACK-TOP_LINE = TAB_PACK-TOP_LINE - 10.
CLEAR SY-UCOMM.
CLEAR OK_CODE.
where TAB_PACK is table control, and default lines m displying is 10.
Write above code in PAI for user_command
and then check in BDC.
Reward if useful.
‎2008 Mar 11 9:11 AM
Try using P+ (next page), P++ (last page), P- (previous page)
P--(first Page) in BDC okcode it will work.
This is what i understand.
Thanks
‎2008 Mar 11 9:27 AM
You r oing Fine. You Can do that
DATA:line_count TYPE i,
current_line TYPE i, "#EC *
selected_line TYPE i,
lv_i TYPE i,
lv_j TYPE i.
Write this code in PAI
WHEN 'P--'.
PERFORM paging USING 'P--'.
WHEN 'P-'.
PERFORM paging USING 'P-'.
WHEN 'P+'.
PERFORM paging USING 'P+'.
WHEN 'P++'.
PERFORM paging USING 'P++'.
----
Form paging
----
Form to do scrolling for screen 9001
----
>CODE OKCODE value (P, P-, P, P+ )
----
FORM paging USING code. "#EC *
CASE code.
WHEN 'P--'.
tc-top_line = 1. <<TC is table control Name
WHEN 'P-'.
tc-top_line = tc-top_line - line_count.
IF tc-top_line LE 0.
tc-top_line = 1.
ENDIF.
WHEN 'P+'.
lv_i = tc-top_line + line_count.
lv_j = tc-top_line - line_count + 1.
IF lv_j LE 0.
lv_j = 1.
ENDIF.
IF lv_i LE lv_j.
tc-top_line = lv_j.
ELSE.
tc-top_line = lv_i.
ENDIF.
WHEN 'P++'.
tc-top_line =
tc-lines - line_count + 1.
IF tc-top_line LE 0.
tc-top_line = 1.
ENDIF.
ENDCASE.
ENDFORM. " paging
‎2008 Mar 11 10:10 AM