Skip to Content
0
Former Member
Apr 13, 2008 at 02:58 AM

OPEN DATASET

22 Views

I want to store report output in application sever .For that i followed open dataset.

My problem:

when i used below statements.

1) 1st

+OPEN DATASET PFILE FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.+_

+TRANSFER WAOUTPUT TO P_FILE.+_

+loop at ioutput into wa_output.+_

+write:/0 waoutput-werks,+_

+10 waoutput-matnr,+_

+25 waoutput-lgort,+_

+35 waoutput-labst.+_

endloop.

+CLOSE DATASET PFILE.+_

i got dump error:

Only character-type data objects are supported at the argument

position "f" for the statement

"TRANSFER f TO ..." .

In this case, the operand "f" has the non-character-type "TYOUTPUT" ._

The current program is flagged as a Unicode program. In the Unicode context ,

type X fields are seen as non-character-type, as are structures that

contain non-character-type components.

2) 2nd type

OPEN DATASET P_FILE FOR OUTPUT IN BINARY MODE.

TRANSFER WA_OUTPUT TO P_FILE.

loop at i_output into wa_output.

write:/0 wa_output-werks,

10 wa_output-matnr,

25 wa_output-lgort,

35 wa_output-labst.

endloop.

CLOSE DATASET P_FILE.

i donot get any error,but in t-code AL11.This file is creates without any data in it.

Kindly help me.