‎2006 Aug 30 6:57 AM
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
‎2006 Aug 30 7:01 AM
IF w_count >= 14.
PERFORM bdc_field USING 'BDC_OKCODE'
<b>'=P+.</b>
‎2006 Aug 30 7:02 AM
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,
‎2006 Aug 30 7:06 AM
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
‎2006 Aug 30 7:12 AM
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
‎2006 Aug 30 7:06 AM
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