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' menaing

Former Member
0 Kudos

can anyboy explain me what is the meaning of this .

in what conditions it will get exicute ?

PERFORM bdc_field USING 'BDC_OKCODE'

'=NEW'.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi baarathi,

After the record that identifies the screen, use a new bdcdata record for each field you want to fill. These records use the fields fnam and fval. You can fill the following fields:

u2022 Input/output fields (with data)

u2022 The command field bdc_okcode, (with a function code)

u2022 The cursor positioning field, bdc_cursor (with a field name)

The filled internal table in bdcdata format is illustrated above. At runtime, stands for the customer name from the input field, stands for the city.

You use the field BDC_OKCODE to address the command field, into which you enter the function code that would have been triggered by the user choosing a function key, pushbutton, or menu entry in dialog mode (or by entering a code directly in the command field

thanks

shankar

reward me if usefull

9 REPLIES 9

Former Member
0 Kudos

Hi,

While executing the BDC when evr the BDc ok_Cdoe will eb NEW at that time the perform wil be called.

prasanth_kasturi
Active Contributor
0 Kudos

Hi,

with that statement you will be populating the table bdcdata with the FCT code

its a fctcode which will be triggered if you create anything new

example if you are doing recording for SE38,

if you craete a new program the FCT code will be '=NEW'.

regards

prasanth

Former Member
0 Kudos

Hi baarathi,

After the record that identifies the screen, use a new bdcdata record for each field you want to fill. These records use the fields fnam and fval. You can fill the following fields:

u2022 Input/output fields (with data)

u2022 The command field bdc_okcode, (with a function code)

u2022 The cursor positioning field, bdc_cursor (with a field name)

The filled internal table in bdcdata format is illustrated above. At runtime, stands for the customer name from the input field, stands for the city.

You use the field BDC_OKCODE to address the command field, into which you enter the function code that would have been triggered by the user choosing a function key, pushbutton, or menu entry in dialog mode (or by entering a code directly in the command field

thanks

shankar

reward me if usefull

0 Kudos

and if you want to find out how and when which ok codes are executed you can create a recording with SM35

here you can find in detail which ok codes and fieldcodes are populated when running a transaction.

it's the start of almost each bdc programming to examine the recording of you're tcode you want to make the bdc for

kind regards

arthur de smidt

Edited by: A. de Smidt on Jun 9, 2008 9:32 AM

0 Kudos

can you please tell me

why its coming out from the loop if lv_amount values suppose 0.36 (even thought its NE 0 )

LOOP AT t_output INTO wa_output.

lv_amount = <fv_output>.

CONDENSE lv_amount.

IF lv_amount NE 0.

PERFORM bdc_field USING 'BDC_OKCODE'

'=NEW'.

PERFORM bdc_field USING 'GLU1-TSL'

lv_amount.

PERFORM bdc_field USING 'RGBUK-O_V01'

wa_output-racct.

PERFORM bdc_field USING 'RGBUK-O_V04'

p_rprctr.

PERFORM bdc_field USING 'RGBUK-O_V05'

wa_output-rzzplat.

PERFORM bdc_dynpro USING 'SAPMGBUK' '0110'.

ENDIF. "

ENDLOOP.

0 Kudos

to test it you can note alle the values of all variables you pass to this bdc in debugging, and try to enter those values when running the t-code. if an error raises you get the idea of what is wrong with the data you entered

kind regards

arthur de smidt

Former Member
0 Kudos

this code will execute when you want to perform task through your driver program.It is also a default command action which is use to perform required result.

Former Member
0 Kudos

Hi,

BDC_OKCODE tells which action is to be executed on the screen.

like save, back, quit.

Edited by: Indireddy Raveendrareddy on Jun 9, 2008 10:32 AM

Former Member
0 Kudos

thank you