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

Dynamic screen size in BDC

Former Member
0 Likes
2,098

Hi ppl,

I have created a BDC program to upload certain data in a particular transaction which has a table control.

This program will be called from devices having different screen sizes.

In one of the devices, the table control of the transaction displays 3 lines, in another device, it displays 8 lines, while in the third device, it displays 12 lines.

I want to make the Page Down option independent of the number of lines displayed.

I am aware of CTU_PARAMS option, but, it is not working as desired.

Please let me know if I am making a mistake.


.
.
    IF w_lncnt = 12.
      PERFORM : f0017_bdc_field  USING 'BDC_OKCODE'
                                       '=P+',
                f0016_bdc_dynpro USING 'SAPML03T'
                                       '0105'.
      CLEAR: w_lncnt.
    ENDIF.
.
.
  MOVE: 'A' TO w_ctuparams-dismode,
        'S' TO w_ctuparams-updmode,
        'X' TO w_ctuparams-defsize.

  CALL TRANSACTION 'XYZ' USING t_bdcdata
                          OPTIONS FROM w_ctuparams
                          MESSAGES INTO t_messtab.
.
.

Regards.

Hi ppl,

I have created a BDC program to upload certain data in a particular transaction which has a table control.

This program will be called from devices having different screen sizes.

In one of the devices, the table control of the transaction displays 3 lines, in another device, it displays 8 lines, while in the third device, it displays 12 lines.

I want to make the Page Down option independent of the number of lines displayed.

I am aware of CTU_PARAMS option, but, it is not working as desired.

Please let me know if I am making a mistake.


.
.
    IF w_lncnt = 12.
      PERFORM : f0017_bdc_field  USING 'BDC_OKCODE'
                                       '=P+',
                f0016_bdc_dynpro USING 'SAPML03T'
                                       '0105'.
      CLEAR: w_lncnt.
    ENDIF.
.
.
  MOVE: 'A' TO w_ctuparams-dismode,
        'S' TO w_ctuparams-updmode,
        'X' TO w_ctuparams-defsize.

  CALL TRANSACTION 'XYZ' USING t_bdcdata
                          OPTIONS FROM w_ctuparams
                          MESSAGES INTO t_messtab.
.
.

Regards.

11 REPLIES 11
Read only

0 Likes
1,686

HI

Try like

When your doing recording. In the screen which you are entering Transaction code deselect the check box which is Default Size and select remaing all check boxes and click on start recording.

Read only

Former Member
0 Likes
1,686

Hi ,

there are two ways

1> In recording record the button Default size ticked.

2> In your recording : when you record the transaction , record a event of clicking on new page button. so whenever you enter new item it will be entered on new page (while displaying the items it displays all on one page .. no worries).

Hope it help will you.

Regards.

Uma Dave

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,686

Please specify the transaction name.

Why are you doing your page down , is it to insert new records ?

Read only

former_member182371
Active Contributor
0 Likes
1,686

Hi,

if my memory doesn´t fail me you need to do something like:

w_ctuparams-def_size = 'X'.

This program will be called from devices having different screen sizes.

are you using sapconsole?

Best regards.

Edited by: Pablo Casamayor on Jun 23, 2010 11:11 AM

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,686

Hello Pablo,

But the OP has passed the value to ctuparams-def_size parameter while calling his transaction which makes the problem a mystery to me

@OP: Why are you using the DISMODE as 'A'. It should be 'N', right ?

BR,

Suhas

Read only

0 Likes
1,686

Hi,

here is an example of how to deal with this:

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.
  CONCATENATE 'LFBK-BANKS(' IDX ')' INTO FNAM.
  perform bdc_field       using FNAM
                                IT_BANK-BANKS.
...

  IDX = IDX + 1.
ENDLOOP.

once you´ve assured that the number of lines in the tablecontol won´t change due to parameter DEF_SIZE, you just have to worry about the above code.

Best regards.

Edited by: Pablo Casamayor on Jun 23, 2010 11:42 AM

Read only

0 Likes
1,686

Hi Suhas,

The OP has aksed about the table control page down, i dont think the default_size deals with the table control scroll.

Its deals with the screen size.

@OP-Instead of P+ or P- , please check whether there is any button or any link in menu to create new entries, ehange entries etc.

Keshav

Read only

0 Likes
1,686

Hi,

The OP has aksed about the table control page down, i dont think the default_size deals with the table control scroll.

Its deals with the screen size.

depending on the screen size, more or less lines of the table control will be displayed and thus 'P+' would become very difficult to handle.

Best regards.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,686

Hi Keshav,

If you read the OP's post, he has mentioned

" ... This program will be called from devices having different screen sizes.

In one of the devices, the table control of the transaction displays 3 lines, in another device, it displays 8 lines, while in the third device, it displays 12 lines ... "

This is because of the different screen resolutions on different m/c's. DEF_SIZE handles this situation.

Read only

Former Member
0 Likes
1,686

Thank you all for the wonderful replies.

I figured out that everything in the code is correct, my understanding of the outcome was wrong.

Now, It has got clarified.

Read only

0 Likes
1,686

Please enlighten us .