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_OKCODE

Former Member
0 Likes
4,279

Hi gurus,

how can i get the list of all ok_code and there meaning.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
984

Hi,

check the table RSMPTEXTS

Regards,

Omkar.

6 REPLIES 6
Read only

Former Member
0 Likes
983

hi

hope it will help you.

Pls Reward if help.

There is a way to find the BDC ok codes. just findout the screen and press

F1 on any field and in that click on Technical info .in technical info u

can see GUI status of the screen and double click on that u will go to

display status of that Gui status in that click functional keys there u can

find all the OK_codes u required.

Read only

Former Member
0 Likes
983

Hi,

U cannot get the list of all okcodes at once.

if u want it for the particular t-code then goto se51 and check for that screen or while debugging u can get it.

Plzz reward points if it helps.

Read only

Former Member
0 Likes
985

Hi,

check the table RSMPTEXTS

Regards,

Omkar.

Read only

Former Member
0 Likes
983

Hi

Hope it will help you.

BDC_OKCODE identifies the command field

it can use function key number or function code

/ for function key number and = for function code

'/3' -->Back function key

'/15'-->Quit function key

'/11'--> save

reward if help.

Read only

Former Member
0 Likes
983

Hi Sir ,

Please have a look below .Hope it is suitable and simpler solution for your question.

Please do reward if useful.

Thankx.

In your ABAP programs, you should work with the OK_CODE field instead of SY-UCOMM. There are two reasons for this: Firstly, the ABAP program has full control over fields declared within it, and secondly, you should never change the value of an ABAP system field. However, you should also always initialize the OK_CODE field in an ABAP program for the following reason:

In the same way that the OK_CODE field in the ABAP program and the system field SY-UCOMM receive the contents of the corresponding screen fields in the PAI event, their contents are also assigned to the OK_CODE screen field and system field SYST-UCOMM in the PBO event. Therefore, you must clear the OK_CODE field in the ABAP program to ensure that the function code of a screen is not already filled in the PBO event with an unwanted value. This is particularly important when the next PAI event can be triggered with an empty function code (for example, using ENTER). Empty function codes do not affect SY-UCOMM or the OK_CODE field, and consequently, the old field contents are transported.

In your application programs, the first step in PAI processing should be to save the function code in an auxiliary variable and then initialize the OK_CODE field. You can then read the function code from the auxiliary variable (for example, using a CASE structure), and control the program flow from there.

The OK_CODE field can have a different name on each screen. However, common practice is to use the same name for the field on each screen of an ABAP program. You then only need one field in the ABAP program, with the same name, into which the function code is placed, and from which you can read it.

Refer the link:

http://help.sap.com/saphelp_47x200/helpdata/en/d1/801e61454211d189710000e8322d00/frameset.htm

plz reward, if found helpfull

thanx,

Read only

Former Member
0 Likes
983

Hi Amar,

we have to declare ok_code like this.

data: ok_code like sy-ucomm.

case ok_code.

when 'UPDATE'.

when 'DELETE'.

endcase.

After u click the push button and go to DEBUGGING then only u can see the ok_code values..Other wise u dont get the ok_code values ..

Reward points if helpful

Kiran Kumar.G.A