12-23-2008 9:47 AM
hi all,
i am getting syntax error ,while i am doing bdc recording, error is "=..."expected after "endloop"
regards,
lvk
12-23-2008 12:03 PM
data: begin of jtab OCCURS 0,
include, structure, bdcdata.
data: end of jtab.
Should be like this:
data: begin of jtab OCCURS 0,
include structure bdcdata.
data: end of jtab.
Regards,
12-23-2008 9:50 AM
12-23-2008 9:56 AM
hi naresh,
report ZERRMP
no standard page heading line-size 255.
*include bdcrecx1.
*
*start-of-selection.
*
*perform open_group.
tables:lfa1.
data: begin of itab OCCURS 0,
lifnr type lfa1-lifnr,
land1 type lfa1-land1,
name1 type lfa1-name1,
end of itab.
data: begin of jtab OCCURS 0,
include, structure, bdcdata.
data: end of jtab.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'c:\zses.txt '
FILETYPE = 'ASC'
* HAS_FIELD_SEPARATOR = ' '
* HEADER_LENGTH = 0
* READ_BY_LINE = 'X'
* DAT_MODE = ' '
* CODEPAGE = ' '
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* CHECK_BOM = ' '
* VIRUS_SCAN_PROFILE =
* NO_AUTH_CHECK = ' '
* IMPORTING
* FILELENGTH =
* HEADER =
TABLES
DATA_TAB = itab.
* EXCEPTIONS
* FILE_OPEN_ERROR = 1
* FILE_READ_ERROR = 2
* NO_BATCH = 3
* GUI_REFUSE_FILETRANSFER = 4
* INVALID_TYPE = 5
* NO_AUTHORITY = 6
* UNKNOWN_ERROR = 7
* BAD_DATA_FORMAT = 8
* HEADER_NOT_ALLOWED = 9
* SEPARATOR_NOT_ALLOWED = 10
* HEADER_TOO_LONG = 11
* UNKNOWN_DP_ERROR = 12
* ACCESS_DENIED = 13
* DP_OUT_OF_MEMORY = 14
* DISK_FULL = 15
* DP_TIMEOUT = 16
* OTHERS = 17
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
* CLIENT = SY-MANDT
* DEST = FILLER8
GROUP = 'vses'
HOLDDATE = sy-datum
KEEP = 'x'
USER = sy-uname
* RECORD = FILLER1
* PROG = SY-CPROG
* DCPFM = '%'
* DATFM = '%'
* IMPORTING
* QID =
* EXCEPTIONS
* CLIENT_INVALID = 1
* DESTINATION_INVALID = 2
* GROUP_INVALID = 3
* GROUP_IS_LOCKED = 4
* HOLDDATE_INVALID = 5
* INTERNAL_ERROR = 6
* QUEUE_ERROR = 7
* RUNNING = 8
* SYSTEM_LOCK_ERROR = 9
* USER_INVALID = 10
* OTHERS = 11
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at itab.
refresh jtab.
perform sub1 using 'zsm_mps' '100'.
perform sub2 using :'lfa1-lifnr' itab-lifnr,
'lfa1-land1' itab-land1,
'lfa1-name1' itab-name1.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'zsm_mps'
* POST_LOCAL = NOVBLOCAL
* PRINTING = NOPRINT
* SIMUBATCH = ' '
* CTUPARAMS = ' '
TABLES
DYNPROTAB = jtab
endloop
CALL FUNCTION 'BDC_CLOSE_GROUP'
* EXCEPTIONS
* NOT_OPEN = 1
* QUEUE_ERROR = 2
* OTHERS = 3
form sub1 using a b.
clear jtab.
jtab-program=a.
jtab-dynpro=b.
jtab-dynbegin='x'.
append jtab.
endform.
form sub2 using c d.
clear jtab.
jtab-fnam=c.
jtab-fval=d.
append jtab.
endform.
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* 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.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*perform bdc_dynpro using 'ZSM_MP' '0100'.
*perform bdc_field using 'BDC_OKCODE'
* '=SUBMIT'.
*perform bdc_field using 'BDC_CURSOR'
* 'LFA1-NAME1'.
*perform bdc_field using 'LFA1-LIFNR'
* '789'.
*perform bdc_field using 'LFA1-LAND1'
* 'IN'.
*perform bdc_field using 'LFA1-NAME1'
* 'err'.
*perform bdc_dynpro using 'ZSM_MP' '0100'.
*perform bdc_field using 'BDC_OKCODE'
* '=EXIT'.
*perform bdc_field using 'BDC_CURSOR'
* 'LFA1-LIFNR'.
*perform bdc_field using 'LFA1-LIFNR'
* '789'.
*perform bdc_field using 'LFA1-LAND1'
* 'IN'.
*perform bdc_field using 'LFA1-NAME1'
* 'err'.
*perform bdc_transaction using 'ZSM_MPS'.
*
*perform close_group.
Code Formatted by: Alvaro Tejada Galindo on Dec 23, 2008 10:18 AM
12-23-2008 9:58 AM
TABLES
DYNPROTAB = jtab
endloop
Should be like this,
TABLES
DYNPROTAB = jtab. "you are missing '.' here
endloop. "you are missing '.' here
Regards,
12-23-2008 10:24 AM
hi chandra,
i am getting one more error like
form sub1 using a b.
clear jtab.
jtab-program=a.
jtab-dynpro=b.
jtab-dynbegin='x'.
append jtab.
endform.
12-23-2008 10:32 AM
12-23-2008 10:37 AM
12-23-2008 10:44 AM
hi,
missing perion ..
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3. Add period at end
12-23-2008 10:45 AM
Dear,
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3. "Add '.' here
Regards
12-23-2008 10:59 AM
i am getting another error like statement "jtab_program=a"is not defined check your spelling
12-23-2008 11:05 AM
jtab_program = a " give space
jtab-dynpro = b." give space
jtab-dynbegin = 'x'." give space
12-23-2008 11:42 AM
hi chandra,
i am getting another error like the data object "jtab" does't have a component called "program"
regards
12-23-2008 10:05 AM
hi,
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'zsm_mps'
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
SIMUBATCH = ' '
CTUPARAMS = ' '
TABLES
DYNPROTAB = jtab. Add '.' at end
endloop. Add '.' at end
12-23-2008 10:09 AM
12-23-2008 12:03 PM
data: begin of jtab OCCURS 0,
include, structure, bdcdata.
data: end of jtab.
Should be like this:
data: begin of jtab OCCURS 0,
include structure bdcdata.
data: end of jtab.
Regards,
12-23-2008 12:23 PM
hi chandra,
again it is giving another like unable to interpret "structure".possible cause of error. incorrect spelling error or comma error
regards,
12-23-2008 12:25 PM
use this.
data: begin of jtab OCCURS 0.
include structure bdcdata.
data: end of jtab.