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

Table control using Page down

Former Member
0 Likes
870

Hi all,

I am working on QP01 trnasaction (BDC for uploading create Inspection Plans), where i can assign no. of materials in material assignment of particular inspection characteristics.

In material assignment screen it showed me 14 rows in one screen for uploading, if it is more than that data is not accepting. How to do page down dynamically in our program to accept more than 14 rows. I have more than 200 materials to assign. Can you please tell me hw to proceed.

Reward points for helpful answers

Thanks

Prabhu

5 REPLIES 5
Read only

Former Member
0 Likes
723

IF w_count >= 14.

PERFORM bdc_field USING 'BDC_OKCODE'

<b>'=P+.</b>

Read only

dani_mn
Active Contributor
0 Likes
723

HI,

Another option is that instead of using scrolling, you can use 'INSERT LINE' option to add a empty line in first place in table control, and fill this with your data and again use 'INSERT LINE' untill all items get finished.

In this way you don't have to take care of scrolling.

Regards,

Read only

Former Member
0 Likes
723

Hi

Go through the sample code you would get an idea

Sample code for vertical scrolling in PAI processing will look like this:

MODULE user_command_XXXX INPUT. (XXXX is screen no.)

CASE ok_code.

WHEN 'P--'.

CLEAR ok_code.

PERFORM paging USING 'P--'.

WHEN 'P-'.

CLEAR ok_code.

PERFORM paging USING 'P-'.

WHEN 'P+'.

CLEAR ok_code.

PERFORM paging USING 'P+'.

WHEN 'P++'.

CLEAR ok_code.

PERFORM paging USING 'P++'.

&----


*& Form PAGING

&----


  • Form to do scrolling for screen XXXX

----


  • >CODE OKCODE value (P, P-, P, P+ )

----


FORM paging USING code.

DATA: i TYPE i,

j TYPE i.

CASE code.

WHEN 'P--'. <table control name>-top_line = 1.

WHEN 'P-'.

<table control name>-top_line =

<table control name>-top_line - line_count.

IF <table control name>-top_line LE 0.

<table control name>-top_line = 1.

ENDIF.

WHEN 'P+'.

i = <table control name>-top_line + line_count.

j = <table control name>-lines - line_count + 1.

IF j LE 0. j = 1. ENDIF.

IF i LE j.

<table control name>-top_line = i.

ELSE.

<table control name>-top_line = j.

ENDIF.

WHEN 'P++'.

<table control name>-top_line =

<table control name>-lines - line_count + 1.

IF <table control name>-top_line LE 0.

<table control name>-top_line = 1.

ENDIF.

ENDCASE.

ENDFORM. " PAGING

Read only

Former Member
0 Likes
723

Hi,

In your BDC you need to insert a similar code

wv_var = wv_var + 1.

IF wv_var > 14.

wv_var = '02'.

PERFORM bdc_dynpro USING 'SAPLCSDI' '0140'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=FCNP'.

ENDIF.

Check the BDC ok code because here I have used "FNCP" in the above code, which is for new line item ,you need to take the appropriate value from your recording.Hope this helps.

Also make sure that you have use CTUPARAMS to take care of the screen resolution

DATA: wa_ctuparams TYPE ctu_params.

wa_ctuparams-defsize = 'X'.

wa_ctuparams-dismode = 'N'.

wa_ctuparams-updmode = 'S'.

regards,

Sangram

SAP Consultant

Read only

Former Member
0 Likes
723

Hello,

U just keep flag for the line excedding the rows.

For example

IF w_line_i > 14.

w_line_i = 1.

PERFORM bdc_dynpro USING 'SAPMM07M' '0421'.

PERFORM bdc_field USING 'BDC_OKCODE' '=NP'.

ENDIF.

Please check it.

Regards