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 in bdc

Former Member
0 Likes
1,245

hi im working on bdc in which i have a table control .in my screen im able to see 4 line items where i f i run the same program in other system it is not working as in that system only 2 line items of table control are visible.how to handle here.

hi im working on bdc in which i have a table control .in my screen im able to see 4 line items where i f i run the same program in other system it is not working as in that system only 2 line items of table control are visible.how to handle here.

8 REPLIES 8
Read only

Former Member
0 Likes
1,131

make the screen resolution of both machines same.

Read only

Former Member
0 Likes
1,131

Hi Babita

You could even use the variable CTUPARAMS in which the Default screen size for CALL TRANSACTION USING...

You can find this parameter in the FM "BDC_INSERT"

could be used to set the screen size which would not give an error when the line itme in the other screen are more or less.

cheer

Read only

Former Member
0 Likes
1,131

Dear Babita,

Let me know if you are dealing with a BDC for Header & Details, one to many relations. Please tell me the transaction for which u are developing this BDC.

Regards,

Alok.

9818122672

Read only

Former Member
0 Likes
1,131

Hi babita,

1. This a common practical problem with table control bdc.

2. We have a few solutions

a) don't use bdc, instead find some appropriate BAPI FM

to put data in the transaction

b) run bdc in Foreground, in the same machine,

and hardcode the number of lines (in table control)

in the program itself.

c) run bdc in background and check whethre

the number of lines is ok.

So, this ok number will always be the same,

whenever we run in background, from any machine.

regards,

amit m.

Read only

former_member182371
Active Contributor
0 Likes
1,131

hi,

long ago i found this example in a forum:

"CTU_PARMS will force the BDC to use the standard default screen size (rather than being dynamic based on the user's settings. I think I explained that right, but all I know is that it keeps the BDC from behaving differently between users and makes things more consistent for coding logic".

Here's an example (note that DEFSIZE is the key to the solution here):

data: begin of tran_opts,

dismode type ctu_params-dismode value 'N',

updmode type ctu_params-updmode value 'S',

cattmode type ctu_params-cattmode,

<b>defsize type ctu_params-defsize value 'X'</b>,

racommit type ctu_params-racommit,

nobinpt type ctu_params-nobinpt,

nobiend type ctu_params-nobiend,

end of tran_opts.

call transaction 'F-02'

using bdcdata

options from tran_opts

messages into bdc_messages

Hope it helps,

Best regards

Read only

former_member480923
Active Contributor
0 Likes
1,131

Try to use this code

a) count the number of line items (say i)

b) do i times.

c) concatenate 'itab-line(' i ')' into a variable (say FNAM)

d) preform BDC using FNAM and value.

Hope this helps

Anirban

Read only

Former Member
0 Likes
1,131

HI babita,

Because of the differences in screen resultion, these problem occur. This can be overcome by passing the Default Screen size option during CALL TRANSACTION.

Then this probem wont occur.

Call transaction in this way.



<b>DATA : it_ctu_params TYPE STANDARD TABLE OF ctu_params WITH HEADER LINE.</b>


it_ctu_params-dismode = 'A'.      "Processing mode  (same as MODE option)
it_ctu_params-updmode = 'S'.      "Update mode   (same as UPDATE option)

<b>it_ctu_params-defsize = 'X'.      "Default screen size for CALL TRANSACTION USING</b>

it_ctu_params-cattmode = space.   "CATT mode for CALL TRANSACTION USING...
it_ctu_params-racommit = space.   "CALL TRANSACTION USING... is not completed by COMMIT
it_ctu_params-nobinpt  = 'X'.     "Batch input mode
it_ctu_params-nobiend  = 'X'.     "Batch input mode also active after BDC data has been read

<b>APPEND it_ctu_params.</b>

CALL TRANSACTION 'IA06'
USING it_bdcdata
MESSAGES INTO  it_messtab
<b>OPTIONS FROM   it_ctu_params.</b>

<b>Refer to F1 help on CALL TRANSACTION for more details.</b>

<b>... OPTIONS FROM opt</b>

Effect

This addition gives you control using the values of the components of the structure opt, which must be of the Dictionary type CTU_PARAMS. The components have the following meaning:

DISMODE

Processing mode (comparable with the MODE addition)

UPDMODE

Update mode (comparable with the UPDATE addition)

CATTMODE

CATT mode (controlling a CATT procedure)

The CATT mode can have the following values:

' ' No CATT procedure active

'N' CATT procedure without single screen control

'A' CATT procedure with single screen control

DEFSIZE

Use standard window size

RACOMMIT

COMMIT WORK does not end CATT procedure

NOBINPT

No batch input mode, that s SY-BINPT = SPACE.

NOBIEND

No batch input mode after BDC data has been read

The components DEFSIZE , RACOMMIT, NOBINPT, NOBIEND always take the following values:

'X' Yes

' ' No

If the OPTIONS addition is omitted, the following settings are valid for the control parameters:

DISMODE from the MODE addition

UPDMODE

from the UPDATE addition

CATTMODE

No CATT procedure active

DEFSIZE

Do not use standard window size

RACOMMIT

COMMIT WORK ends procedure successfully

NOBINPT

Batch input mode, that is SY-BINPT =X.

NOBIEND

Batch input mode also active after BDC data has been read

Regards,

Arun Sambargi.

Read only

Former Member
0 Likes
1,131

Hi,

data: opt type ctu_params.
opt-dismode = 'N'.
opt-upmoade = 'A'.
<b>opt-defsize = 'X'.</b> "this will set the same no of lines in all the Systems.

Call transaction tcode options <b>opt</b> messages...

Regards

vijay