‎2006 Oct 25 5:42 PM
Hi frens,
I got an error while trying to execute the statement:
TRANSFER z_file_hdr TO p_fname.
I am giving the structure of the internal table. In this everything is declared as Char type but only one filed as type X. Is this the possible reason for short dump?
DATA: BEGIN OF z_file_hdr,
h1(13) TYPE c VALUE 'Material Desc',
c1(1) TYPE c VALUE ',',
h2(10) TYPE c VALUE 'Material #',
c2(1) TYPE c VALUE ',',
h3(11) TYPE c VALUE 'Plant',
c3(1) TYPE c VALUE ',',
h4(13) TYPE c VALUE 'Req Del Date',
c4(1) TYPE c VALUE ',',
h5(13) TYPE c VALUE 'First Date',
c5(1) TYPE c VALUE ',',
h6(13) TYPE c VALUE 'DelCreateDate',
c6(1) TYPE c VALUE ',',
h7(13) TYPE c VALUE 'NewAvail.Date',
c7(1) TYPE c VALUE ',',
h8(13) TYPE c VALUE 'Days Late',
c8(1) TYPE c VALUE ',',
h9(12) TYPE c VALUE 'Ord or STO #',
c9(1) TYPE c VALUE ',',
h10(6) TYPE c VALUE 'Item #',
c10(1) TYPE c VALUE ',',
h11(10) TYPE c VALUE 'Shipto No',
c11(1) TYPE c VALUE ',',
h12(11) TYPE c VALUE 'Shipto Name',
c12(1) TYPE c VALUE ',',
h13(13) TYPE c VALUE 'Customer PO #',
c13(1) TYPE c VALUE ',',
h14(3) TYPE c VALUE 'MOT',
c14(1) TYPE c VALUE ',',
h15(10) TYPE c VALUE 'Dest Plant',
c15(1) TYPE c VALUE ',',
h16(8) TYPE c VALUE 'Stor Loc',
c16(1) TYPE c VALUE ',',
h17(16) TYPE c VALUE 'Quantity',
c17(1) TYPE c VALUE ',',
h18(10) TYPE c VALUE 'CSR Number',
c18(1) TYPE c VALUE ',',
h19(32) TYPE c VALUE 'CSR Name',
c19(1) TYPE c VALUE ',',
h20(10) TYPE c VALUE 'CredStatus',
c20(1) TYPE c VALUE ',',
h21(10) TYPE c VALUE 'DelivBlock',
z_eol TYPE x VALUE '0A', " end of line
END OF z_file_hdr.
OPEN DATASET p_fname FOR OUTPUT IN TEXT MODE ENCODING DEFAULT."Unicode
IF sy-subrc = 0.
PERFORM GET_RUNTIME.
CONCATENATE sy-datum4(2) '/' sy-datum6(2) '/'
sy-datum+0(4) INTO zdate.
CONCATENATE sy-uzeit0(2) ':' sy-uzeit2(2) ':'
sy-uzeit+4(2) INTO ztime.
CONCATENATE 'ORDER IN JEOPARDY RPT-'
zdate ztime zeol INTO zheadr
SEPARATED BY space.
TRANSFER zheadr TO p_fname.
TRANSFER z_file_hdr TO p_fname.
thanks
Asha
‎2006 Oct 25 5:48 PM
That's rt, type X is the reason for dump.
TRANSFER automatically adds line break 0A at the end of the line when you open dataset in text mode. You don't need z_eol field.
Regards
Sridhar
‎2006 Oct 25 5:48 PM
That's rt, type X is the reason for dump.
TRANSFER automatically adds line break 0A at the end of the line when you open dataset in text mode. You don't need z_eol field.
Regards
Sridhar