Application Development 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: 

ctu parameters

Former Member
0 Kudos

i need some information about ctu parameters and why we use ctu parameters.

3 REPLIES 3

Former Member
0 Kudos

Hello Surya,

Already i answered this question in other thread ,if not then see again

Check the below code :

data: f_option type ctu_params,

f_option-updmode = 'S'.

f_option-defsize = 'X'.

f_option-dismode = 'N'.

call transaction 'VA01' using bdcdata options from f_option messages into bdcerror.

Normally we use above statement if screen is small from system to system then we use screen resolution.

Example :

suppose you are uploading the data into one transaction,there you can see table control total lines per each page 13 lines ,if you upload from other system ,then it may vary,if you use above command then system will keep exact table controls lines for all system.

Hope you got it.

Thanks

Seshu

varma_narayana
Active Contributor
0 Kudos

Hi Surya..

Check one of the Important usage of CTUPARAMS

In BDC.........while Recordingthe screen resolution for line items differs from system to system. .......how to make the coding fit for all the resolutions in case of BATCH INPUT METHOD

While using CALL TRANSACTION ...we can declare a structure with type CTUPARAMS....and set the DEFAULT SIZE ....By doing so...the screen resolution becomes 10.no matter where u r executing the program.

And so we can write as....

CALL TRANSACTION 'VK11' OPTIONS FROM S_CTUPARAMS.

But how to do with Batch I/p...... ..As we use FM's...BDC_OPEN_GROUP, BDC_INSERT, BDC_CLOSE_GROUP.

We can handle this in Session method also.

If you check the FM BDC_INSERT there is a parameter

CTUPARAMS LIKE CTU_PARAMS which can be used to fill the Default size.

<b>reward if Helpful.</b>

Former Member
0 Kudos

See this post

How to insert data in table control through bdc ....problem is every system displays different no of rows in the table control when you enter the application....for ex .. purchase order, pur req, bom....

Solution:

Use CALL TRANSACTION 'ME21N' OPTIONS FROM w_ctu_params.( type CTU_PARAMS)

This structure contains the follwing.

DISMODE : Display mode (like the MODE addition)

UPDMODE: Update mode (like the UPDATE addition)

CATTMODE: CATT mode (controls a CATT)

CATT mode can have the following values:

' ' No CATT active

'N' CATT without single-screen control

'A' CATT with single-screen control

DEFSIZE : Use default window size (Here we are handling those transaction by giving default window size)

RACOMMIT: Do not end transaction at COMMIT WORK

NOBINPT : No batch input mode (that is, SY-BINPT = SPACE)

NOBIEND : No batch input mode after the end of BDC data.

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

'X' Yes

http://www.sap-img.com/ab001.htm

Regards