2011 Nov 16 5:54 PM
Hi Everyone,
I am trying to create a BDC program to insert values to MM01 transaction code. As far as I have debugged, I am getting the values correctly in my itab_bdc (BDCDATA)
After BDC_INSERT, I am not getting any error. It says sy-subrc is 0. But the values are not getting populated in my table.
Below is the code that I have used for BDC_INSERT.
DATA : itab_bdc type standard table of bdcdata with header line.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'MM01'
* POST_LOCAL = NOVBLOCAL
* PRINTING = NOPRINT
* SIMUBATCH = ' '
* CTUPARAMS = ' '
TABLES
dynprotab = itab_bdc
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7
.
IF sy-subrc <> 0.
write :/ 'Error while inserting'.
ENDIF.
write :/ wa_xls-matnr, 'Successfully inserted into session'.Please help me with this.
Hi Everyone,
I am trying to create a BDC program to insert values to MM01 transaction code. As far as I have debugged, I am getting the values correctly in my itab_bdc (BDCDATA)
After BDC_INSERT, I am not getting any error. It says sy-subrc is 0. But the values are not getting populated in my table.
Below is the code that I have used for BDC_INSERT.
DATA : itab_bdc type standard table of bdcdata with header line.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'MM01'
* POST_LOCAL = NOVBLOCAL
* PRINTING = NOPRINT
* SIMUBATCH = ' '
* CTUPARAMS = ' '
TABLES
dynprotab = itab_bdc
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7
.
IF sy-subrc <> 0.
write :/ 'Error while inserting'.
ENDIF.
write :/ wa_xls-matnr, 'Successfully inserted into session'.Please help me with this.
2011 Nov 16 6:25 PM
Have you processed the session? What is the status in SM35?
Rob
2011 Nov 16 7:07 PM
Resolved by myself. I had error when processing through SM35. In the error log, I noticed that I have given a wrong table name for a field.