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: 

BDC_OKCODE

Former Member
0 Kudos

what is BDC_OKCODE? explain it?

9 REPLIES 9

Former Member
0 Kudos

Hi Spart,

BDC_OKCODE: It is the Function Code , Sap provide Function code for every user action, like when user clike any button or menu item each and every thing having Function code, that is called OKcode.

u can see okcode Like: 1 single click on one button on screen & drake

ur mouse cursor down (out of sap screen) then press F1

2. U can see Function code

if it is helpful ..Reward points

Thanks

ganesh

Former Member
0 Kudos

Hi,

BDC_OKCIDE will store all the ok codes in the BDC program, when you pass the Fields to a scrren after filling the fields we need to click any button to move other screens, so here the Button will be have a OK_CODE internally to know this we do the recording of the Program, after that we will store this OK code in the BDC_OKCODE field to trigger the next operation

Regards

Sudheer

Former Member
0 Kudos

hi,

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

All functions in menus and buttons are identified by function codes

Former Member
0 Kudos

Hi,

<b><u>Few lines to understand what is BDC-OK code:</u></b>

In BDC recording/program processing we pass OK Code for the User actions like ENTER or SAVE or pressing some button on screen.

so these actions will be stored in some function codes and we use them in BDC

like the sy-ucomm of ABAP programs.

You should also always initialize the OK_CODE field in an ABAP program .

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.

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.

<b><i>Reward point if find useful

Debjani Lahiri</i></b>

Former Member
0 Kudos

BDC_OKCODE identifies the command field

it can use function key number or function code

/ for function key number and = for function code

'/00'-->Enter

'/3' -->Back function key

'/15'-->Quit function key

'/11'--> save

All functions in menus and buttons are identified by function codes

regards,

srinivas

<b>*reward for useful answers*</b>

former_member235056
Active Contributor
0 Kudos

Hi,

The data in BDC tables is saved by using the field name ‘BDC_OKCODE’ and field value of ‘/11’.

Refer this link:

Pls reward points.

Regards,

Ameet

Former Member
0 Kudos

bdc ok_code

enter button.

Former Member
0 Kudos

Hi,

BDC OK_CODE is the key which gets filled when u click on user-commands(like buttons).

you need not to fill any thing. System will take care of the values.

Execute the transaction SHDB and give the transaction for which you want to do a BDC. Enter all the details and then save it.

Now, when you see the saved data, you can see that in many places, BDC_OKCODE would have some values like /00 and such things..

These indicate, what is the action that you have done ,

For example, /00 indicates ENTER.

Note : Close the Thread if ur Problem is Solved.

Regards,

Padmam.

Former Member
0 Kudos

Hi,

Simple we can say a word that recognizes block of code to execute during processing of corresponding screens.

Let's say when ur doing bdc for purchase order if you will pass the bdc_okcode = '#entr' in the program then system executes corresponding functionality related to that code.

Regards,

Kishore