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

bdc transfer

Former Member
0 Likes
559

what is the ctu_params . please give the explanation about the structure .

3 REPLIES 3
Read only

Former Member
0 Likes
500

Generally CTU_PARAMS Is used to avoid unnecessary screens,even though they will not appear in the recording.i also send a sample code for that to avoid this problem check it once ok..

we have to add the below code in ur bdc program at the begin of ur code.

SYNTAX AND CODE:


---------------------------------------------------------------------

    * For Elimination Of Illegal Screens

---------------------------------------------------------------------
DATA: opt TYPE ctu_params.

START-OF-SELECTION.
opt-nobinpt = 'X'.
opt-defsize = 'X'.
opt-updmode = 'A'.

while using call transaction we can make use of this as:

OPT-NOBINPT = 'X'.

OPT-DISMODE = 'N'.

OPT-UPDMODE = 'S'.

CALL TRANSACTION tcode USING bdcdata

MODE ctumode

UPDATE cupdate

OPTIONS FROM OPT

MESSAGES INTO messtab.

OPTIONS FROM opt

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,

Santosh

Read only

Former Member
0 Likes
500

hi check this...

check this example please..

FORM bdc_transaction tables return USING tcode p_rule.

*DATA : T_BDCMSGCOLL LIKE STANDARD TABLE OF BDCMSGCOLL WITH HEADER LINE.

CLEAR w_ctu_params.

w_ctu_params-dismode = 'N'.

w_ctu_params-updmode = 'S'.

w_ctu_params-cattmode = ' '.

w_ctu_params-defsize = ' '.

w_ctu_params-racommit = ' '.

w_ctu_params-nobinpt = 'X'.

w_ctu_params-nobiend = ' '.

CALL TRANSACTION tcode USING t_bdcdata OPTIONS FROM w_ctu_params

MESSAGES INTO t_bdcmsgcoll.

IF sy-subrc = 0.

IF p_rule = 'P'.

Add 1 to successful PWS creation

new_pws = new_pws + 1.

Add 1 to successful WSR creation

ELSEIF p_rule = 'W'.

new_wsr = new_wsr + 1.

ENDIF.

On successful WSR creation, create selection table for submit to

RPTSHF00 (to generate WSR)

IF new_wsr > 0.

PERFORM create_sel_tab.

ENDIF.

REFRESH t_bdcdata.

ELSE.

loop at t_bdcmsgcoll.

CALL FUNCTION 'FORMAT_MESSAGE'

EXPORTING

ID = t_bdcmsgcoll-msgid

LANG = SY-LANGU

NO = t_bdcmsgcoll-msgnr

V1 = t_bdcmsgcoll-MSGV1

V2 = t_bdcmsgcoll-MSGV2

V3 = t_bdcmsgcoll-MSGV3

V4 = t_bdcmsgcoll-MSGV4

IMPORTING

MSG = err_msg

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2.

IF sy-subrc 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

move err_msg to w_return-message.

append w_return to return.

endloop.

regards,

venkat

Read only

0 Likes
500

Hi Venkat

This is my code. How did u get this?