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

Function code cannot be selected

ravi_kumar221
Participant
0 Likes
15,127

Hi   in bdc  for VD02 i am getting  ' Function code cannot be selected'     error  please help me when     i clicked  on help

Diagnosis

You entered an inactive function code.

You can trigger this by:

inputting directly in the OK code field,

inputting the fastpath of an inactive menu function,

choosing an inactive function key, or even by

choosing ENTER, if ENTER has an inactive function.

In batch input, a function code is included in field BDC_OKCODE of the session, as long as this function code is not assigned to ENTER.

As well as activating function codes statically in the Menu Painter (Transaction SE41), they can also be deactivated dynamically using the EXCLUDING addition with statement SET PF-STATUS.

ating function codes statically in the Menu Painter (Transaction SE41), they can also be deactivated dynamically using the EXCLUDING addition with statement SET PF-STATUS.

4 REPLIES 4
Read only

Former Member
0 Likes
6,814

Hi Ravi,

Please let me know what are fields that you ra updating through VD02.

Cheers

~Niranjan

Read only

0 Likes
6,814

DATA ls_opt TYPE ctu_params.

   CLEAR: gta_bdcdata.

   ls_opt-dismode = 'E'.

*  ls_opt-defsize = 'X'.

   PERFORM bdc_dynpro      USING 'SAPMF02D' '0108'.

   PERFORM bdc_field       USING 'BDC_CURSOR'

                                 'RF02D-D0310'.

   PERFORM bdc_field       USING 'BDC_OKCODE'

                                 '/00'.

   PERFORM bdc_field       USING 'RF02D-KUNNR'

                                  ist_lreq_cu-kunnr .        "'1400'.

   PERFORM bdc_field       USING 'RF02D-VKORG'

                                 ist_lreq_cu-vkorg.          "'1000'.

   PERFORM bdc_field       USING 'RF02D-VTWEG'

                                 ist_lreq_cu-vtweg.          "'10'.

   PERFORM bdc_field       USING 'RF02D-SPART'

                                 ist_lreq_cu-spart.          "'20'.

   PERFORM bdc_field       USING 'RF02D-D0310'

                                 'X'.

   PERFORM bdc_dynpro      USING 'SAPMF02D' '0310'.

   PERFORM bdc_field       USING 'BDC_OKCODE'

                                 '=AO02'.

   PERFORM bdc_dynpro      USING 'SAPMF02D' '4000'.

   IF NOT ist_addldata-custprio IS INITIAL.

     PERFORM bdc_field       USING 'KNVV-CUSTPRIO'

                                   ist_addldata-custprio.

   ENDIF.

   IF NOT ist_addldata-planterri IS INITIAL.

     PERFORM bdc_field       USING 'KNVV-PLANTERRI'

                                   ist_addldata-planterri.

   ENDIF.

   IF NOT ist_addldata-custtype IS INITIAL.

     PERFORM bdc_field       USING 'KNVV-CUSTTYPE'

                                   ist_addldata-custtype.

   ENDIF.

   IF NOT ist_addldata-contcust IS INITIAL.

     PERFORM bdc_field       USING 'KNVV-CONTCUST'

                                   ist_addldata-contcust.

   ENDIF.

   IF NOT ist_addldata-orderwindowday IS INITIAL.

     PERFORM bdc_field       USING 'KNVV-ORDERWINDOWDAY'

                                   ist_addldata-orderwindowday.

   ENDIF.

   CALL TRANSACTION 'VD02' USING gta_bdcdata OPTIONS FROM ls_opt.

Read only

0 Likes
6,814

Hi,

Please let me know what is the action related to '=AO02'.

Cheers

~Niranjan

Read only

0 Likes
6,814

Hi,

I think the issue might be with the okcode AO02. Instaed of AO02, can you try using the menu options?

Once you are into the VD02 transaction, try using any of the menu EXTRAS to navigate to other screens.

Cheers

~Niranjan