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
15,783

Hi,

What is the BDC OKcode for enter? (is it \00 or /00).

Where we can check the BDC Okcodes.

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
7,001

Hi,

It is the user command that was executed. eg. '/00' means Enter command. The user command can varies during a bdc program. Therefore, we need to used tcode shdb to check what it actually contains.

'/00' is generally the BDC_OKCODE for the ENTER key.

You don't need to know the list of the BDC_OKCODE s.

You go to the transaction SHDB.

You can execute any transaction here.

Then you can replay the execution of the trasaction afterwards.

Select 'display all screens' mode.

BDC_OKCODEs for each one functions you use is displayed on the screen.

Regards,

Bhaskar

8 REPLIES 8
Read only

Former Member
0 Likes
7,001

BDC OK code for enter is /00.

The command field is identified by okcode,

You can find okcodes in structure BDCDATA field name is FVAL.

Reward if helpful.

Edited by: dhanashree wadkar on Apr 30, 2008 7:24 AM

Read only

Former Member
0 Likes
7,001

In Recording u can check for ok code value or ucan check this value in in structure BDCDATA.

In simple words , OK_Code is a variable used to keep the system user command values , which is nothing but sy-comm.

ok_code acts just as a temporary variable that stores the value of sy-ucomm.

When user interacts with the screen elements, the function code that you have assigned is filled in the sy-ucomm field which is turn gets reflected in OK_CODE.

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.

sy-ucomm is the system variable, which is maintained by the system automatically. U need take care of that variable. U ca find the Function-Code that was pressed on a particular screen.

Ok_code is an variable which u have to maintain(means u have to declare and initialize). Usually it is used to copy the sy-ucomm in the PAI and clear the sy-ucomm. Because the value should not be processed in the next screen.

as it is general variable. it cna be 'okcode' also.

you use it like this ina screen or any operation :

EX :

Data: ok_code like sy-ucomm .

*in PAI at user-command event ..

ok_code = sy-ucomm.

case ok_code .
when 'SAVE'.
w3rite logic for saving .
when 'EXIT'.
write logic for exit .
when 'BACK'.
write logic for back .
endcase .

Reward if found helpful.

Read only

0 Likes
7,001

Hello,

I think BDC OKCODE is the 'last entry' for any screen.

Thanks

Ashish Tiwari

Read only

Former Member
7,001

if u want to find okcode value for any button or menu keep the cursor over the button,press f1 by click dragging the button out somewhere....u will be getting a popup showing the ok code

Read only

Former Member
0 Likes
7,001

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

Kiran Sure

Read only

Former Member
0 Likes
7,002

Hi,

It is the user command that was executed. eg. '/00' means Enter command. The user command can varies during a bdc program. Therefore, we need to used tcode shdb to check what it actually contains.

'/00' is generally the BDC_OKCODE for the ENTER key.

You don't need to know the list of the BDC_OKCODE s.

You go to the transaction SHDB.

You can execute any transaction here.

Then you can replay the execution of the trasaction afterwards.

Select 'display all screens' mode.

BDC_OKCODEs for each one functions you use is displayed on the screen.

Regards,

Bhaskar

Read only

Former Member
0 Likes
7,001

how to use filed symbols for dynamic programming

Read only

RaymondGiuseppi
Active Contributor
0 Likes
7,001

/00 is the code.

Try to record some transcation calls via transaction SHDB.

You may also look at SE41 or SE16 on table RSMPTEXTS which contains status (statically) defined in the system.

Regards