2007 Mar 05 5:14 AM
Hi Experts,
I have a problem with BDC Table Control (XD01, XK01, etc ).
If I actually have 10 records and say if only 3 records viewable. How can I view other records. Provide me the code.
Due to resolution, in other system I can only see 5 records by Default for the same BDC, then how does the code change.
Is there any Unique code for both the cases. Plz. Provide me the code which is suitable for both the cases.
Regards.
2007 Mar 07 2:24 PM
Do one thing raj...
When u encounter that screen.. u press <b>Find </b> button and in that specify the field u want to search and press enter ..
u will get a screen with the required field as the first field on the resolution..
I hope u understood what am saying...
U record all these things and then create a program...
This will definitely solve ur problem.....
regards,
sai ramesh
2007 Mar 05 3:52 PM
i guess while doing the recording if check the standard screen check box then ur problem is solved . Just open a standard screen and count the number of lines and code for the page down option.
2007 Mar 06 6:52 AM
Hi ,
Can u give me the code for the same.
Will be rewarded for the answer.
Regards
2007 Mar 06 11:11 AM
Hi raj,
Do something like this.
data x_ctuparams type ctu_params.
x_ctuparams-defsize = 'X'. " This would freeze the resolution in any system
x_ctuparams-dismode = 'N'.
x_ctuparams-updmode = 'S'.
call transaction <TCODE> using it_bdcdata options from x_ctuparams.
Regards,
Ravi
2007 Mar 06 11:35 AM
Hi Ravikanth,
I want the code for the same. Do provide it and also what would be hte default resolution.
Regards.
2007 Mar 07 4:57 AM
Hi Ravi,
Can u provide me a program of the same. I need the whole code to analyse and fit it accordingly into my Program.
I have already rewarded.
Thanks for the answer, will be surely rewarded again with healthy points.
Regards
2007 Mar 08 4:15 AM
Hi Ravi,
According to u, this is ok for call transaction method, but what about while doing in the <b>session method</b>. Do help me in this regard.
Thanks for the reply and will be rewarded with healthy points.
Regards
2007 Mar 07 2:16 PM
default resolution means SAP provides it when you are recording with SHDB when you say NEW Recording a popup comes where you give tcode there u find check box checked so here you find default no of rows wile recording it EX VA01 you find 2 lines at item level eventhough your resolution of screen is 5 ok check it out.
2007 Mar 07 2:24 PM
Do one thing raj...
When u encounter that screen.. u press <b>Find </b> button and in that specify the field u want to search and press enter ..
u will get a screen with the required field as the first field on the resolution..
I hope u understood what am saying...
U record all these things and then create a program...
This will definitely solve ur problem.....
regards,
sai ramesh
2007 Mar 08 4:13 AM
Hi Sai Ramesh,
I didn't get u. Can u explain me in Detail. Alo can u provide me the code for the same.
Will be surely rewarded.
Regards
2007 Mar 08 6:53 AM
Hi raj,
After encountering the screen, say u need to select a field in a table. One of the methods is to press<b> Control F </b>on that screen then enter the field name which u want.. and <b>press enter</b>.. then that field will be the <b>first field in the screen resolution</b> ....
just try this for a normal table like <b>spfli</b>... after going to the table display in SE11 press <b>control F or the Binoculars icon.</b>. then u will get a small window u just type in the name of the field u want.. and press enter .. see what happens,
u will come to know... that field will be the first field in the resolution of the screen ... ( No need of scrolling down and all these things, u will get any field u want by this way... )
sorry man i dont have any code with me right now.. u just start recorder in transaction SHDB and record all these things......
regards ,
sai ramesh.
2007 Mar 08 9:18 AM
Hi Ramesh,
Can u also provide me the code for the same in the case of session method.
Thanks for the answer and also try to provide the code when u do have it with u.
Will be surely rewarded with healthy points.
Regards
2007 Mar 08 9:39 AM
this is the example with<b> spfli table</b>..
i have opened this spfli in se11 transaction and in display mode..
Now '<b>PERIOD'</b> is the field which is not there in the resolution.. so i have opened the <b>find option</b> ,provided the field name <b>PERIOD </b> in the field of search window.
then pressed enter. Now i will get the same screen( spfli display screen ) with <b>period as the first field in that resolution</b> .. Now i can do whatever is i want with this field.. here i have double clicked on the domain of the field PERIOD.
so u analyse this and use it where ever u want....
*spfli display screen..
-
perform bdc_dynpro using 'SAPLSD41' '2200'. <u>( * spfli display screen , u can use ur screen number here )</u>
perform bdc_field using 'BDC_OKCODE'
'=FIND'. <u>(* To open the find window )</u>
perform bdc_dynpro using 'SAPLSD41' '0114'. <u>( * This is the find window )</u>
perform bdc_field using 'BDC_CURSOR'
'RSDXX-FINDSTR'.
perform bdc_field using 'BDC_OKCODE'
'=CANC'. <u>(* OK_CODE for enter )</u>
perform bdc_field using 'RSDXX-FINDSTR'
'PERIOD'. <u>( * Here i am giving the field name which i want to search or which is not there in the resolution or u can give a vaiable name which contains the value <FIELD NAME> ).</u>
( Now i got the spfli display screen with period as the first field in the screen resolution )
perform bdc_dynpro using 'SAPLSD41' '2200'. <u>(*The previous spfli display screen )</u>
perform bdc_field using 'BDC_OKCODE'
'=WB_SELECT_OBJECT'. <u> (* OK_CODE to double click on the domain of the field PERIOD )</u>
perform bdc_field using 'BDC_CURSOR'
'DD03D-ROLLNAME(01)'.
-
I HOPE U UNDERSTOOD .....
copy and paste the code in between two lines... AND replace screen numbers, program numbers, field names, field values with ur values...
2007 Mar 08 10:24 AM
Raj,
luk thro the following link..
DATA ZEILE(3). " variable used to concatenate the fieldname
DATA ERG TYPE N. " holds the line item number as seen on the screen
UNPACK BUZEI TO ZEILE.
ERG = BUZEI MOD 10 . "buzei is between 1 and 10 which is the record index
*fill head of dynpro for every first line item on the screen
IF ERG = 1.
PERFORM BDC_DYNPRO USING 'SAPMF10B' '0150'. "INS
ENDIF.
*fill table control runs for all line items on the screen
PERFORM BDC_FIELD_LOOP USING ZEILE 'RF10B-REFRC' SATZ-GSNR .
PERFORM BDC_FIELD_LOOP USING ZEILE 'RF10B-RITEM' SATZ-POSITION.
*
*page down for the last lineitem visible on the screen
IF ERG = 0 .
PERFORM BDC_FIELD USING 'BDC_OKCODE' ' '. "page down
CLEAR BUZEI.
ENDIF.
*concatenate fieldname to fill table
FORM BDC_FIELD_LOOP USING P_ZEILE P_FNAM P_FVAL.
DATA: L_FNAM LIKE BDCDATA-FNAM.
CONCATENATE P_FNAM '(' P_ZEILE ')' INTO L_FNAM.
PERFORM BDC_FIELD USING L_FNAM P_FVAL.
ENDFORM.
basically when i scroll down in a table control during a recording the screen is called again n u can fill the table line items all over again.. the above code runs the screen with table everytime the table is full..
Regards
aparna
2007 Mar 08 10:26 AM
note buzei mod 10..
10 is the max num of record u can enter into the table control tat u can view without scrolling..
hope this info helps u..
all the best
Aparna
2007 Mar 08 11:29 AM
Hi Ramesh,
Will this code work in the Session method.
Do give me the code for session method if the above code does not support for session method.
Will be surely rewarded.
Regards.
2007 Mar 08 1:04 PM
This will work in session method also...
There is no much difference between the CALL TRANSACTION and SESSION METHOD for populating the BDCDATA table ... Till this point both the methods are same... After that the difference comes....
Am sure this will work with SESSION method.....
regards,
sai ramesh
2007 Mar 09 6:04 AM
Hi Ramesh,
It will be greatly appreciable if u give me the code foer the same in session method.
Will be surely rewarded.
Regards