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: 

ok code

Former Member
0 Kudos

hi,

how can we find out ok code for bdc method ?

Regards

AQSHOK KUMAR

6 REPLIES 6

Former Member
0 Kudos

using SHDB create a BDC routinue for the transaction code u require.... in this u will find the BDC OK CODE for corresponding entries...

Former Member
0 Kudos

Hi

Do a recording of the transaction by giving the necessary values, using trxn <b>SHDB</b>.

Regards

Raj

Former Member
0 Kudos

Hi

Do a recording of the transaction by giving the necessary values, using trxn <b>SHDB</b>.

Regards

Raj

Former Member
0 Kudos

<b>Place the TAB on the field you want to know the OK-CODE and then press F1, you'll get the OK-CODE of that button.</b>

Regards,

Pavan

Former Member
0 Kudos

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

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

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

Few lines to understand what is BDC-OK code:

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.

if it is helpful ..Reward points

Message was edited by:

Karthikeyan Pandurangan

Former Member
0 Kudos

Hi

Do a recording of the transaction by giving the necessary values, using trxn <b>SHDB</b>.

Regards

Raj