‎2012 Jul 16 6:35 AM
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.
‎2012 Jul 16 6:46 AM
Hi Ravi,
Please let me know what are fields that you ra updating through VD02.
Cheers
~Niranjan
‎2012 Jul 16 6:52 AM
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.
‎2012 Jul 16 7:03 AM
Hi,
Please let me know what is the action related to '=AO02'.
Cheers
~Niranjan
‎2012 Jul 16 7:13 AM
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