‎2006 Apr 26 7:28 AM
Hello everyone,
I am Confused with onething.
I have done the BDC's but now i am not getting whts the difference in Normal BDC and BDC done for table Control.
So if someone can help me in this and can also send me the code for how to begin with BDC for Table control it will be great help.
Thanks in advance
Anu
‎2006 Apr 26 7:36 AM
‎2006 Apr 26 7:39 AM
Taking care of Table Control
What is the problem here?
First Problem:-
In a table control,in a given column,the screen name of the field does not change irrespective of the row number.
We will have to distinguish the screen fields in the same column.
This is done by concatenating the row number at the end of screen field.For example in transaction va02 in second screen we have field material number(VBAP-MATNR) in the table control.
So we will refer to material number in first row as vbap-matnr(01) and the second row as vbap-matnr(02)
Taking care of Table Control
Syntax:-
data:int type I,
L_MATNR(14).
I = 0.
Loop at itab.
I = I + 10.
Concatenate VBAP-MATNR ( I ) INTO L_MATNR.
PERFORM fill_bdctab.
..
ENDLOOP.
Form fill_bdctab will look like following
FORM fill_bdctab.
Perform populate_bdctab using:
l_matnr itab-matnr
..
ENDFORM.
Taking care of Table Control
Second Problem:-
In case, the table control contains number of populated rows greater then visible on the screen.What do we do?.Two ways:-
1st method :- Use the page down button in standard toolbar.We will have to give okcode corresponding to that while filling bdctab table.
The problem is that number of rows visible on table control varies from user to user and it depends on user profile.
Taking care of Table Control
2nd method:-
Use the item to top button on the bottom of table control.
Press on this button and programmatically give row number on the popup screen and press enter.
The row number that you gave will come on top.
Start doing it from 1st row onwards and your code will work irrespective of user settings
For new page :
perform bdc_field using `BDC_OKCODE =FCNP.
THANX and REGARDS
Vinay Swarup
‎2006 Apr 26 7:40 AM
Hi,
In normal BDC no where U find a table like structure
so u fill the fields normally.
But when using Table control U need to handle the
'page up' and 'page down' in order to fill in the
table . Also U need to fix the rows per page.
(This differs because of the screen resolution)
Check the no. of rows appearing in the Recording and
set the DEFSIZE as 'X' while calling the
CALL TRANSACTION
structure opt, which must have the ABAPDictionary type
CTU_PARAMS
CALL TRANSACTION tcod
OPTIONS FROM opt ...
Regards,
GSR.
‎2006 Apr 26 7:53 AM
Hai Anu
Go through the following links
http://www.sapfans.com/sapfans/repos/comelite.htm
http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
Thanks & Regards
Sreenivasulu P