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

Pressing Enter as ABAP code

Former Member
0 Likes
4,518

Hi.

I recorded transaction XK01 using transaction recorder(SHDB) .

At one of the screens warning message appears after entering data and I should

press enter to continue processing in other screens.

Problem is:

pressing enter is not recorded.

How to write code of pressing enter ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,344

Hi,

No need to worry about warning messages in BDC. BDC recording does not take ENTER for warning messages. But it will be surpressed while executing the program.

So try to insert OK CODE instead of pressing ENTER

call BDC

CALL TRANSACTION 'XK01' USING it_bdcdata

mode 'E'

update 'S'

messages into it_message.

or

PERFORM bdc_field USING 'BDC_OKCODE' '=/ENTER'.

Regards,

Jyothi CH.

8 REPLIES 8
Read only

Former Member
0 Likes
2,344

Hi

Write below perform where you want ENTER.

PERFORM bdc_field USING 'BDC_OKCODE'

'/00'.

Amresh

Read only

Former Member
0 Likes
2,344
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.

OKCODE Description

/nn Function Key nn

/00 Enter

Best regards,

Prashant

Read only

former_member194669
Active Contributor
0 Likes
2,344

Try to call BDC in this way with MODE E


CALL TRANSACTION 'XK01' USING IT_BDCDATA
MODE 'E'
UPDATE 'S'
MESSAGES INTO IT_MESSAGES

or


perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.

a®

Read only

Former Member
0 Likes
2,344

try to attach the following in ur code at nec place

perform bdc_field using 'BDC_OKCODE'

'=/00'.

Read only

asik_shameem
Active Contributor
0 Likes
2,344

Hi Marat,

Don't worry about warning messages in BDC. By default, BDC recording does not take ENTER for Warning Messages. It will be suppressed while executing the program. Though you forcefully put OK CODE as ENTER, it doesn't make any difference.

br

Asik.

Read only

0 Likes
2,344

Yes, when I was recording code for XD01 warning messages were supressed.

But for XK01 it doesn't work.

Read only

Former Member
0 Likes
2,345

Hi,

No need to worry about warning messages in BDC. BDC recording does not take ENTER for warning messages. But it will be surpressed while executing the program.

So try to insert OK CODE instead of pressing ENTER

call BDC

CALL TRANSACTION 'XK01' USING it_bdcdata

mode 'E'

update 'S'

messages into it_message.

or

PERFORM bdc_field USING 'BDC_OKCODE' '=/ENTER'.

Regards,

Jyothi CH.

Read only

Former Member
0 Likes
2,344

Hi,

No need to worry about warning messages in BDC. BDC recording does not take ENTER for warning messages. But it will be surpressed while executing the program.

So try to insert OK CODE instead of pressing ENTER

call BDC

CALL TRANSACTION 'XK01' USING it_bdcdata

mode 'E'

update 'S'

messages into it_message.

or

PERFORM bdc_field USING 'BDC_OKCODE' '=/ENTER'.

Regards,

Jyothi CH.