‎2007 Mar 08 9:33 AM
Hi,
I m having some problems to make a BDC call on a Z program.
I did a recording using se35 and came out with the codes listed below.
During the recording, in order to fill a table with a list of material no, i need to click on a button called "create template" in order to make the table editable.
The clicking of the button generates the code
'BDC_OKCODE' '=CREATE'.
So when i run the program, i will reach the screen 'ZMMR0021_SRTEMPLATE' '0100' and a dialog box will be shown and it shows OK-Code =CREATE and on the status bar, i have the following message
Field MAKT-MATNR(1) is not an input field.
After i click the dialog box, only then will it make my table editable.
Anyone has a clue of what could be the problem ?
Your help is much appreciated.
The BDC codes are as follows:
LOOP AT ITAB_DETAILS WHERE ERROR IS INITIAL.
CLEAR BDCDATA. REFRESH BDCDATA.
PERFORM BDC_DYNPRO USING 'ZMMR0021_SRTEMPLATE' '0100'.
PERFORM BDC_FIELD USING 'BDC_OKCODE' '=CREATE'.
PERFORM BDC_FIELD USING 'BDC_CURSOR' 'MAKT-MATNR(1)'.
PERFORM BDC_FIELD USING 'MAKT-MATNR(1)' ITAB_DETAILS-MATNR.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'ZSRTEMPLATE-DESCRIPTION'.
PERFORM BDC_FIELD USING 'ZSRTEMPLATE DESCRIPTION' ITAB_DETAILS-DESCRIPTION.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'ZSRTEMPLATE-REQTYPE'.
PERFORM BDC_FIELD USING 'ZSRTEMPLATE-REQTYPE'
ITAB_DETAILS-REQTYPE.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'ZSRTEMPLATE-PLANT'.
PERFORM BDC_FIELD USING 'ZSRTEMPLATE-PLANT'
ITAB_DETAILS-PLANT.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'ZSRTEMPLATE-RECV_SLOC'.
PERFORM BDC_FIELD USING 'ZSRTEMPLATE-RECV_SLOC'
ITAB_DETAILS-RECV_SLOC.
CALL TRANSACTION 'ZMM_SRTEMPLATE' USING BDCDATA MODE ' '
MESSAGES INTO ITAB_MSG.
CLEAR ITAB_DETAILS.
ENDLOOP.
‎2007 Mar 08 9:41 AM
Run the session in background and see what happens.Are you able to process the session completely or not.
Try again in foreground and check what happens.Once i was doing recording of changing authorization group in transaction SE11.I was facing the same problem. Have you generated the program directly from the recording.
‎2007 Mar 08 9:41 AM
Run the session in background and see what happens.Are you able to process the session completely or not.
Try again in foreground and check what happens.Once i was doing recording of changing authorization group in transaction SE11.I was facing the same problem. Have you generated the program directly from the recording.
‎2007 Mar 08 9:50 AM
Hi Mukesh,
When i run the session in background, it appears to have no problem but no data has been saved.
Yes i generated the code through the recording sm35 and then copy and paste it to the program.
I m interpreting the message "Field MAKT-MATNR(1) is not an input field" because the table is not editable and it only gets in edit mode after a button is pressed.
i.e. ok-code = CREATE
What do you think ?
Thanks.
Kind Regards,
Daniel
‎2007 Mar 08 9:54 AM
Oh yes, <b>sy-subrc = 1001</b> after the call transaction is executed.
‎2007 Mar 08 10:06 AM
Hi daniel,
Do not copy and paste the code.
After creating the session go to SM35.Press Recording Push Button your recording will be here,select the recording,press program push button,enter your program name,select the radio button tranfer from recording ,press enter it will ask for the package assign package now run this program i think it will solve your problem and it will not ask you to enter for going to editable mode.