Hi experts,
i am using tcode xd02 in bdc for recording.i want to download the data present in xd02 into a flatfile.is it possible.if it is possible send me a sample coding or give me some points......i will must reward the points once i got the result.......help me please........
Hi,
Use FM GUI_DOWNLOAD
&----
*& Form sub_download
&----
text
----
--> p1 text
<-- p2 text
----
FORM sub_download.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = p_path
filetype = 'ASC'
APPEND = ' '
write_field_separator = 'X'
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
TABLES
data_tab = it_final
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " sub_download
Reagrds,
Prashant
Hi Manjula,
My suggsstion is, u press F1 in each field, find out the table or structure which
gets affected out of this tcode.then u can select and then download.as per my knowledge, i dont think its possible to download directly the data from the tcode.
regards,
kavitha
hi manjula,
Try to find Function modules that gives Customer details.
This will give the data in internal table.
Then download this table.
Regards
Megha
Hi,
if u want xd01 screen felds to be uploaded then go for shdb tcode for recording tht table fields.
press Tcode: SHDB say new recording and use either call transaction or bdc session method .
u can use a bapi rather than other methods we hav bapi like bapi_customer_getdetail or getlist i am not sure but chck for it iam sure this will solve ur problem .check for this link for sample code.ths might help u..http://www.sap-img.com/bapi.htm http://www.sap-img.com/bapi.htm" target="_blank">http://www.sap-img.com/bapi.htm">http://www.sap-img.com/bapi.htm href=" http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm">http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm>
Add a comment