Hi All,
I was trying to do Bdc recording with the call transaction method through tcode:SHDB and my programming is syntactilly corret but after executing ,in my first screen itself coming the zunk values.
Here is my code and please let me know what was the wrong and I am uploading the file in the sequence of my Internal table and my tcode is FK01.
report ZAN_VENDORDATA
no standard page heading line-size 255.
include bdcrecx1.
DATA: BEGIN OF ITAB OCCURS 0,
lifnr(10),
bukrs(4),
ktokk(4),
name1(35),
sortl(10),
stras(35),
pfach(10),
ort01(35),
PSTLZ(6),
land1(3),
spras(1),
telf1(16),
End of ITAB.
start-of-selection.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\BDC\VENDE.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 = #
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.
perform open_group.
LOOP AT ITAB.
perform bdc_dynpro using 'SAPMF02K' '0105'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-KTOKK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
ITAB-LIFNR. "'33'.
perform bdc_field using 'RF02K-BUKRS'
ITAB-BUKRS. "'1000'.
perform bdc_field using 'RF02K-KTOKK'
ITAB-KTOKK. "'0001'.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-PSTLZ'.
perform bdc_field using 'BDC_OKCODE'
'UPDA'.
perform bdc_field using 'LFA1-NAME1'
ITAB-NAME1. "'Kidambi1'.
perform bdc_field using 'LFA1-SORTL'
ITAB-SORTL. "'KD'.
perform bdc_field using 'LFA1-STRAS'
ITAB-STRAS. "'VIVEKANADA STREET'.
perform bdc_field using 'LFA1-PFACH'
ITAB-PFACH. "'641024'.
perform bdc_field using 'LFA1-ORT01'
ITAB-ORT01. "'COIMBATORE'.
perform bdc_field using 'LFA1-PSTLZ'
ITAB-PSTLZ. "'008536'.
perform bdc_field using 'LFA1-LAND1'
ITAB-LAND1. "'IN'.
perform bdc_field using 'LFA1-SPRAS'
ITAB-SPRAS. "'EN'.
perform bdc_field using 'LFA1-TELF1'
ITAB-TELF1. "'4089216020'.
perform bdc_dynpro using 'SAPMF02K' '0210'.
perform bdc_field using 'BDC_CURSOR'
'LFB1-FDGRV'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
perform bdc_field using 'LFB1-AKONT'
'31000'.
perform bdc_field using 'LFB1-FDGRV'
'A1'.
perform bdc_transaction using 'FK01'.
ENDLOOP.
perform close_group.
Thanks
ANGKS.