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

Regarding Module pool

Former Member
0 Likes
659

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
635

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

4 REPLIES 4
Read only

Former Member
0 Likes
635

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.

Read only

Former Member
0 Likes
635

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

Read only

Former Member
0 Likes
636

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

Read only

Former Member
0 Likes
635

Hi Gurus

Any more inputs on this Post

Regards

Hitesh