‎2009 May 13 11:58 AM
Hi experts,
I have done recording for sm 62 screen for creating events.
i have created events for that using "create" button from screen sm 62.
after recording i have created a functionmodule using recorded bdc.
In that i have used one
TABLES
*" MESSTAB STRUCTURE BDCMSGCOLL OPTIONAL.
In output i am getting thios error.
Message id:00.
Message NO:255.
Message :Function code cannot be selected.
Can you tell me how to solve this one.
Thanks.
Sailu
‎2009 May 13 12:03 PM
I think there is a problem with your recording... It is not able to identify a user command. Please check your recording..
‎2009 May 13 12:11 PM
Hi,
It looks like probs in your recording.
Please record the transaction once again.
Please do not manipulate recorded coding and have them as given by SAP recorded coding.
Incase the problem persists, probable you can share your coding also with us.
We would check and revert you back.
Rgds,
Ramani N.
‎2009 May 13 12:17 PM
Hi Sailu ,
Rerecord that and create the program .
I think there might be problem with screen no.
Because some time recording screen no and original screen no differs.
So please after recording check all the screen no with the original screen no.
Any way if the message issue does not solve then please share the code .
Regards
Pinaki
‎2009 May 13 12:23 PM
Hi,
1. Might be mistake in recording
2. Might be not passing the required value to the screen field
Test it in all screens display mode... then you came to know where the problem is...
Regards
Ramesh.
‎2009 May 13 1:36 PM
*"----
""Local interface:
*" IMPORTING
*" VALUE(CTU) LIKE APQI-PUTACTIVE DEFAULT 'X'
*" VALUE(MODE) LIKE APQI-PUTACTIVE DEFAULT 'N'
*" VALUE(UPDATE) LIKE APQI-PUTACTIVE DEFAULT 'L'
*" VALUE(GROUP) LIKE APQI-GROUPID OPTIONAL
*" VALUE(USER) LIKE APQI-USERID OPTIONAL
*" VALUE(KEEP) LIKE APQI-QERASE OPTIONAL
*" VALUE(HOLDDATE) LIKE APQI-STARTDATE OPTIONAL
*" VALUE(NODATA) LIKE APQI-PUTACTIVE DEFAULT '/'
*" VALUE(EDIT_SYSEV_001) LIKE BDCDATA-FVAL DEFAULT ''
*" VALUE(SHOW_SYSEV_002) LIKE BDCDATA-FVAL DEFAULT '.'
*" VALUE(EDIT_USREV_003) LIKE BDCDATA-FVAL DEFAULT 'X'
*" VALUE(SHOW_USREV_004) LIKE BDCDATA-FVAL DEFAULT '.'
*" VALUE(EVENTID_005) LIKE BDCDATA-FVAL
*" DEFAULT 'Eventid'
*" VALUE(DESCRIPT_006) LIKE BDCDATA-FVAL
*" DEFAULT 'Description'
*" EXPORTING
*" VALUE(SUBRC) LIKE SYST-SUBRC
*" TABLES
*" MESSTAB STRUCTURE BDCMSGCOLL OPTIONAL
*"----
subrc = 0.
perform bdc_nodata using NODATA.
perform open_group using GROUP USER KEEP HOLDDATE CTU.
perform bdc_dynpro using 'SAPLBTCH' '1080'.
perform bdc_field using 'BDC_CURSOR'
'BTCH1080-EDIT_USREV'.
perform bdc_field using 'BDC_OKCODE'
'=DOIT'.
perform bdc_field using 'BTCH1080-EDIT_SYSEV'
EDIT_SYSEV_001.
perform bdc_field using 'BTCH1080-SHOW_SYSEV'
SHOW_SYSEV_002.
perform bdc_field using 'BTCH1080-EDIT_USREV'
EDIT_USREV_003.
perform bdc_field using 'BTCH1080-SHOW_USREV'
SHOW_USREV_004.
perform bdc_dynpro using 'SAPMSSY0' '0120'.
perform bdc_field using 'BDC_OKCODE'
'=NEW'.
perform bdc_dynpro using 'SAPLBTCH' '1090'.
perform bdc_field using 'BDC_CURSOR'
'BTCH1090-DESCRIPT'.
perform bdc_field using 'BDC_OKCODE'
'=SAVS'.
perform bdc_field using 'BTCH1090-EVENTID'
EVENTID_005.
perform bdc_field using 'BTCH1090-DESCRIPT'
DESCRIPT_006.
perform bdc_transaction tables messtab
using 'SM62'
CTU
MODE
UPDATE.
if sy-subrc <> 0.
subrc = sy-subrc.
exit.
endif.
perform close_group using CTU.
ENDFUNCTION.
‎2009 May 13 1:38 PM
Can any body tell me the wrong where i done in this recording.
i didnt change any thing.i put sap code as well.
‎2009 May 13 2:19 PM
Hi Sailu ,
Instead of going SESSION METHOD if you try the call transaction method also.
You can proceed like the following code (Copy paste the code and execute it once ).
DATA : T_BDC TYPE TABLE OF BDCDATA,
FS_BDC TYPE BDCDATA ,
T_MESSAGES TYPE TABLE OF BDCMSGCOLL.
START-OF-SELECTION.
PERFORM BDC_DYNPRO USING 'SAPLBTCH' '1080'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'SYSTEMEVENTIDTEXT'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=BACK'.
PERFORM BDC_FIELD USING 'BTCH1080-EDIT_SYSEV'
'X'.
PERFORM BDC_FIELD USING 'BTCH1080-SHOW_SYSEV'
'.'.
PERFORM BDC_FIELD USING 'BTCH1080-EDIT_USREV'
'.'.
PERFORM BDC_FIELD USING 'BTCH1080-SHOW_USREV'
'.'.
CALL TRANSACTION 'SM62' USING T_BDC MESSAGES INTO T_MESSAGES.
*&---------------------------------------------------------------------*
*& Form bdc_dynpro
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_0013 text
* -->P_0014 text
*----------------------------------------------------------------------*
FORM BDC_DYNPRO USING VALUE(P_0013)
VALUE(P_0014).
CLEAR FS_BDC .
FS_BDC-PROGRAM = 'P_0013'.
FS_BDC-DYNPRO = 'P_0014'.
FS_BDC-DYNBEGIN = 'X'.
APPEND FS_BDC TO T_BDC.
ENDFORM. " bdc_dynpro
*&---------------------------------------------------------------------*
*& Form bdc_field
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_0018 text
* -->P_0019 text
*----------------------------------------------------------------------*
FORM BDC_FIELD USING VALUE(P_0018)
VALUE(P_0019).
CLEAR FS_BDC .
FS_BDC-FNAM = 'P_0018'.
FS_BDC-FVAL = 'P_0019'.
APPEND FS_BDC TO T_BDC.
ENDFORM. " bdc_fieldRegards
Pinaki