2007 Sep 27 12:52 PM
Hi All,
I have this problem of handling Vertical Scroll Bar in Table Control.
I am doing a BDC recording to upload data.
In this transaction which is a custom transaction, the Event Page Up and Page Down is not working and I am using vertical scroll bar to update records (which does not get recorded).
When I see the table control there are four lines, after filling the four records if I have to fill the fifth I need scroll down using the vertical scroll bar (since page up and page down is not working).
I have tried different methods, like using index, using P+ for page down even though its not working but nothing seems to work.
Can anyone help me regarding how to handle vertical scroll bar without page up and page down event.
Please treat this as urgent. Thanks in advance.
Sam
Hi All,
I have this problem of handling Vertical Scroll Bar in Table Control.
I am doing a BDC recording to upload data.
In this transaction which is a custom transaction, the Event Page Up and Page Down is not working and I am using vertical scroll bar to update records (which does not get recorded).
When I see the table control there are four lines, after filling the four records if I have to fill the fifth I need scroll down using the vertical scroll bar (since page up and page down is not working).
I have tried different methods, like using index, using P+ for page down even though its not working but nothing seems to work.
Can anyone help me regarding how to handle vertical scroll bar without page up and page down event.
Please treat this as urgent. Thanks in advance.
Sam
2007 Sep 27 1:01 PM
Normally in a recording which can allow records to be entered in a multiple records view you can make the recording for each record which enters a new record everytime instead of trying to enter the records all at once..
further on you can also look if a bapi is available. since you give no more information about you're transaction I don't know if there is any
kind regards
arthur
2007 Sep 27 1:10 PM
Hi Arthur,
Thanks for the reply.
I have tried recording for each record at a time instead of entering multiple records but still its not working.
I am working on transaction PA30, Custom Infotype - 9000 (Job History).
Thanks,
Sam
2007 Sep 27 1:04 PM
Hi Sam,
For the table control BDC there might be insert option for in the table control, try to use that then there will ne no need to use page down.
for example while creating sales order, va01 in the line item table control , insert line is there with + display.
regards,
Santosh Thorat
2007 Sep 27 1:07 PM
Hi Santosh,
Thanks for the reply, but in my custom transaction, there isnt any insert line option is also not available.
Is there any other way ?
Thanks,
Sam
2007 Sep 27 1:15 PM
Hi sam,
The modify ur custom transaction, bcoz the best way is to use insert option , if insert option is not there then for screens having different resolution will have problem, so try ti change ur custom program by having insert option.
regards,
Santosh
2007 Sep 27 1:29 PM
Hi Santhosh,
Thanks for the reply.
I guess the best solution is to modify the custom Transaction, but before I ask them to change it. I want to find out if there is any other option available for it ..
Thanks,
Sam
2007 Sep 27 1:54 PM
if it's about purchase orders just make an import programm using a bapi
it's more flexible towards the future and future changes.
bdc's might not work after certain upgrades and changes when screens are altered by SAP
RIU
kind regards
arthur
2007 Sep 27 1:11 PM
Hi,
During recording, after entering a record in the table control use enter to go to second record instead of vertical scroll bar or page up and page down.
In this case, the BDC Recording also records the cursor position and cursor code for ENTER(that u have pressed). Use these BDC_CURSOR and BDC_CODE in building ur IT_BDCDATA(or whatever internal table u have taken)
Reward Points if helpful
Thanks,
Puneet Mehta
2007 Sep 27 1:18 PM
Hi Punnet,
Thanks for the reply.
I have tried recording using the enter to go to second record but still its not working.
After entering the first record and then pressing enter the cursor is not going to second line. I have four visible lines in my table control, after filling the four lines too the enter is not taking me to the fifth line.
please suggest.
Thanks,
Sam
2007 Sep 27 1:20 PM
i had used vertical scrolling in BDC, see the below pasted code for reference, give '=P+' to ok_code for scrolling.....
perform bdc_dynpro using 'SAPMF02K' '0610'.
perform bdc_field using 'BDC_CURSOR'
'LFBW-WITHT(06)'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-QLAND'.
perform bdc_field using 'LFB1-QLAND'
inrec-qland.
perform bdc_field using 'LFBW-WITHT(01)'
'1A'.
perform bdc_field using 'LFBW-WT_SUBJCT(01)'
'X'.
perform bdc_field using 'LFBW-QSREC(01)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(02)'
'1B'.
perform bdc_field using 'LFBW-WT_SUBJCT(02)'
'X'.
perform bdc_field using 'LFBW-QSREC(02)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(03)'
'1C'.
perform bdc_field using 'LFBW-WT_SUBJCT(03)'
'X'.
perform bdc_field using 'LFBW-QSREC(03)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(04)'
'1D'.
perform bdc_field using 'LFBW-WT_SUBJCT(04)'
'X'.
perform bdc_field using 'LFBW-QSREC(04)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(05)'
'1E'.
perform bdc_field using 'LFBW-WT_SUBJCT(05)'
'X'.
perform bdc_field using 'LFBW-QSREC(05)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(06)'
'1G'.
perform bdc_field using 'LFBW-WT_SUBJCT(06)'
'X'.
perform bdc_field using 'LFBW-QSREC(06)'
inrec-qsrec.
perform bdc_field using 'BDC_CURSOR'
'LFBW-WITHT(06)'.
perform bdc_field using 'BDC_OKCODE'
'=P+'.
perform bdc_dynpro using 'SAPMF02K' '0610'.
perform bdc_field using 'BDC_CURSOR'
'LFBW-WITHT(06)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFBW-WITHT(01)'
'1H'.
perform bdc_field using 'LFBW-WT_SUBJCT(01)'
'X'.
perform bdc_field using 'LFBW-QSREC(01)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(02)'
'1S'.
perform bdc_field using 'LFBW-WT_SUBJCT(02)'
'X'.
perform bdc_field using 'LFBW-QSREC(02)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(03)'
'1T'.
perform bdc_field using 'LFBW-WT_SUBJCT(03)'
'X'.
perform bdc_field using 'LFBW-QSREC(03)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(04)'
'E1'.
perform bdc_field using 'LFBW-WT_SUBJCT(04)'
'X'.
perform bdc_field using 'LFBW-QSREC(04)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(05)'
'E2'.
perform bdc_field using 'LFBW-WT_SUBJCT(05)'
'X'.
perform bdc_field using 'LFBW-QSREC(05)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(06)'
'E3'.
perform bdc_field using 'LFBW-WT_SUBJCT(06)'
'X'.
perform bdc_field using 'LFBW-QSREC(06)'
inrec-qsrec.
perform bdc_field using 'BDC_CURSOR'
'LFBW-WITHT(06)'.
perform bdc_field using 'BDC_OKCODE'
'=P+'.
perform bdc_dynpro using 'SAPMF02K' '0610'.
perform bdc_field using 'BDC_CURSOR'
'LFBW-WITHT(06)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFBW-WITHT(01)'
'E4'.
perform bdc_field using 'LFBW-WT_SUBJCT(01)'
'X'.
perform bdc_field using 'LFBW-QSREC(01)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(02)'
'E5'.
perform bdc_field using 'LFBW-WT_SUBJCT(02)'
'X'.
perform bdc_field using 'LFBW-QSREC(02)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(03)'
'E6'.
perform bdc_field using 'LFBW-WT_SUBJCT(03)'
'X'.
perform bdc_field using 'LFBW-QSREC(03)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(04)'
'E7'.
perform bdc_field using 'LFBW-WT_SUBJCT(04)'
'X'.
perform bdc_field using 'LFBW-QSREC(04)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(05)'
'E8'.
perform bdc_field using 'LFBW-WT_SUBJCT(05)'
'X'.
perform bdc_field using 'LFBW-QSREC(05)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(06)'
'E9'.
perform bdc_field using 'LFBW-WT_SUBJCT(06)'
'X'.
perform bdc_field using 'LFBW-QSREC(06)'
inrec-qsrec.
*Changes by Amit Singla to add 'S1 to S9'.
perform bdc_field using 'BDC_CURSOR'
'LFBW-WITHT(06)'.
perform bdc_field using 'BDC_OKCODE'
'=P+'.
perform bdc_dynpro using 'SAPMF02K' '0610'.
perform bdc_field using 'BDC_CURSOR'
'LFBW-WITHT(06)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFBW-WITHT(01)'
'S1'.
perform bdc_field using 'LFBW-WT_SUBJCT(01)'
'X'.
perform bdc_field using 'LFBW-QSREC(01)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(02)'
'S2'.
perform bdc_field using 'LFBW-WT_SUBJCT(02)'
'X'.
perform bdc_field using 'LFBW-QSREC(02)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(03)'
'S3'.
perform bdc_field using 'LFBW-WT_SUBJCT(03)'
'X'.
perform bdc_field using 'LFBW-QSREC(03)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(04)'
'S4'.
perform bdc_field using 'LFBW-WT_SUBJCT(04)'
'X'.
perform bdc_field using 'LFBW-QSREC(04)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(05)'
'S5'.
perform bdc_field using 'LFBW-WT_SUBJCT(05)'
'X'.
perform bdc_field using 'LFBW-QSREC(05)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(06)'
'S6'.
perform bdc_field using 'LFBW-WT_SUBJCT(06)'
'X'.
perform bdc_field using 'LFBW-QSREC(06)'
inrec-qsrec.
perform bdc_field using 'BDC_CURSOR'
'LFBW-WITHT(06)'.
perform bdc_field using 'BDC_OKCODE'
'=P+'.
perform bdc_dynpro using 'SAPMF02K' '0610'.
perform bdc_field using 'BDC_CURSOR'
'LFBW-WITHT(06)'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFBW-WITHT(01)'
'S7'.
perform bdc_field using 'LFBW-WT_SUBJCT(01)'
'X'.
perform bdc_field using 'LFBW-QSREC(01)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(02)'
'S8'.
perform bdc_field using 'LFBW-WT_SUBJCT(02)'
'X'.
perform bdc_field using 'LFBW-QSREC(02)'
inrec-qsrec.
perform bdc_field using 'LFBW-WITHT(03)'
'S9'.
perform bdc_field using 'LFBW-WT_SUBJCT(03)'
'X'.
perform bdc_field using 'LFBW-QSREC(03)'
inrec-qsrec.
*End of Changes for 'S1 to S9'.
perform bdc_dynpro using 'SAPMF02K' '0610'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-QLAND'.
perform bdc_field using 'BDC_OKCODE'
'=VW'.
Reward points if useful, get back in case of query...
Cheers!!!
2007 Sep 27 1:27 PM
Hi Tripat,
Thanks for the reply.
But as I said I have already tried using P+.
Anymore suggestions.
Thanks,
Sam
2007 Sep 28 6:54 AM
Sam i think u gotto change the custom program(of which u made BDC) yourself for Pageup Pagedown Functionality, here is a reference to do so
In Pfstatus assign P- to page down P-- for first page, P+ for next page,p++ for last page.Then define a variable like the e.g. given below:
data LINE_JUMP LIKE SY-LOOPC.
then in you PAI of screen in the module u have used in ur LOOP AT ITAB assign value to the variable like this:
MODULE MODIFY_DATA INPUT.
............Your Code lines
LINE_JUMP = SYST-LOOPC.
ENDMODULE. " MODIFY_DATA INPUT
And in Module user command add code like this:
MODULE USER_COMMAND_0102 INPUT.
CASE OK_CODE.
WHEN 'P+'.
CLEAR OK_CODE.
CONTROL_102-TOP_LINE = CONTROL_102-TOP_LINE + LINE_JUMP.
IF CONTROL_102-TOP_LINE GT CONTROL_102-LINES.
CONTROL_102-TOP_LINE = CONTROL_102-LINES - LINE_JUMP + 1.
ENDIF.
WHEN 'P--'.
CLEAR OK_CODE.
CONTROL_102-TOP_LINE = 1.
WHEN 'P-'.
CLEAR OK_CODE.
CONTROL_102-TOP_LINE = CONTROL_102-TOP_LINE - LINE_JUMP.
WHEN 'P++'.
CLEAR OK_CODE.
CONTROL_102-TOP_LINE = CONTROL_102-LINES - LINE_JUMP + 1.
ENDCASE.
ENDMODULE. " USER_COMMAND_0102 INPUT
Now incorporate the code in BDC like i have suggested in my previous post.
I hope this will solve your problem....
Reward points if useful, get back in case of query...
Cheers!!!
2007 Sep 27 2:09 PM
before adding the data to table control set the lines of the table control by the lines of your internal table then your scrolling will work.
with regards.
yours sree......
2007 Sep 27 10:03 PM
Hi,
1.- please do have a look at the following link:
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
the key here is:
DATA : FNAM(20) TYPE C,
IDX TYPE C.
MOVE 1 TO IDX.
LOOP AT IT_BANK WHERE LIFNR = IT_XK01-LIFNR.
<b>CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.</b>
perform bdc_field using FNAM
IT_BANK-BANKS.
.....................................
2,. Read as well my answer to this thread regarding <b>screen resolution</b>:
because in this way you make sure that the number of rows displayed does not change.
Best regards.