‎2007 Jul 09 5:08 AM
Hi ,
when i tried to write the data in application server using open dataset concept ,
while transfering the data to file (Transfer string to file ) the program is giving dump if the file size is less than 8 MB. The program is run by batchjob. If the file size is greater than 8 MB it is not giving any dump .The data is stored in the global directory in the application server .
‎2007 Jul 09 6:12 AM
Hi !
Could you please add the text of the dump .... or parts of it ... ??
I do not think that the different size is the reason for that dumps !
Regards
rainer
‎2007 Jul 10 5:28 AM
CONCATENATE wa_zwpkhdr-aufnr
wa_zwpkhdr-compno
wa_zwpkhdr-silo
wa_zwpkhdr-lotnumber
wa_zwpkhdr-matnr
v_psmng
wa_zwpkhdr-meins
wa_zwpkhdr-batch
wa_zwpkhdr-datum
INTO field SEPARATED BY semicolon.
>>>>>>>TRANSFER field TO file.
This is the place where it went to dump .
Dump text : The current program has to be terminated because a capacity limit has reached .
‎2007 Jul 10 5:39 AM
Hi,
This seems to be a weird problem
First check sy-subrc after your Open dataset statement to ensure that the file is getting created properly
‎2007 Jul 10 6:01 AM
There is no problem with file opening .
Some times it is writing into application serevr .
Some times it is giving a dump .
‎2007 Jul 10 6:06 AM
If the size is more than 8 MB it is allowing ,if the file size is less than 8 mb then it is giving a dump .
‎2007 Jul 10 6:18 AM
clear the field before populating it and check for sy-subrc after opening the file .
sastry
‎2007 Jul 10 6:19 AM
‎2007 Jul 10 6:46 AM
CALL FUNCTION 'FILE_GET_NAME'
EXPORTING
CLIENT = SY-MANDT
logical_filename = file1
OPERATING_SYSTEM = SY-OPSYS
PARAMETER_1 = ' '
PARAMETER_2 = ' '
USE_PRESENTATION_SERVER = ' '
WITH_FILE_EXTENSION = ' '
USE_BUFFER = ' '
IMPORTING
EMERGENCY_FLAG =
FILE_FORMAT =
file_name = file
EXCEPTIONS
file_not_found = 1
OTHERS = 2.
IF sy-subrc eq 0.
OPEN DATASET file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT it_zwpkhdr INTO wa_zwpkhdr.
SHIFT wa_zwpkhdr-compno LEFT DELETING LEADING C_ZERO.
MOVE WA_ZWPKHDR-PSMNG TO V_PSMNG.
SHIFT V_psmng LEFT DELETING LEADING C_ZERO.
WRITE:/ wa_zwpkhdr-aufnr,
16 wa_zwpkhdr-compno,
26 wa_zwpkhdr-silo,
68 wa_zwpkhdr-lotnumber,
88 wa_zwpkhdr-matnr,
108 V_psmng,
126 wa_zwpkhdr-meins,
132 wa_zwpkhdr-batch,
144 wa_zwpkhdr-datum.
CONCATENATE wa_zwpkhdr-aufnr
wa_zwpkhdr-compno
wa_zwpkhdr-silo
wa_zwpkhdr-lotnumber
wa_zwpkhdr-matnr
v_psmng
wa_zwpkhdr-meins
wa_zwpkhdr-batch
wa_zwpkhdr-datum
INTO field SEPARATED BY semicolon.
TRANSFER field TO file.
clear: V_PSMNG,
wa_zwpkhdr.
ENDLOOP.
endif.
‎2007 Jul 10 8:12 AM
OPEN DATASET file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT it_zwpkhdr INTO wa_zwpkhdr.
SHIFT wa_zwpkhdr-compno LEFT DELETING LEADING C_ZERO.
MOVE WA_ZWPKHDR-PSMNG TO V_PSMNG.
SHIFT V_psmng LEFT DELETING LEADING C_ZERO.
CONCATENATE wa_zwpkhdr-aufnr
wa_zwpkhdr-compno
wa_zwpkhdr-silo
wa_zwpkhdr-lotnumber
wa_zwpkhdr-matnr
v_psmng
wa_zwpkhdr-meins
wa_zwpkhdr-batch
wa_zwpkhdr-datum
INTO field SEPARATED BY semicolon.
<b>if not field is initial.</b>
<b>condense field.</b>
TRANSFER field TO file.
<b>endif.</b>
clear: V_PSMNG,
wa_zwpkhdr,
field.
ENDLOOP.
<b>close datase file</b>
endif.
you can use write after testing above code currently i have removed it you can comment (as u r running it in background bettoer dont use)it .
try & let us know output.
reward points if helpful
‎2007 Jul 10 6:51 AM
‎2007 Jul 10 7:05 AM
‎2007 Jul 10 7:28 AM
Soumya,
Do you have authorization to write files to app server? And are you working in a Unicode enabled system?
‎2007 Jul 10 7:21 AM
Try top use WRITE after the TRANSFER...
OPEN DATASET file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT it_zwpkhdr INTO wa_zwpkhdr.
SHIFT wa_zwpkhdr-compno LEFT DELETING LEADING C_ZERO.
MOVE WA_ZWPKHDR-PSMNG TO V_PSMNG.
SHIFT V_psmng LEFT DELETING LEADING C_ZERO.
CONCATENATE wa_zwpkhdr-aufnr
wa_zwpkhdr-compno
wa_zwpkhdr-silo
wa_zwpkhdr-lotnumber
wa_zwpkhdr-matnr
v_psmng
wa_zwpkhdr-meins
wa_zwpkhdr-batch
wa_zwpkhdr-datum
INTO field SEPARATED BY semicolon.
TRANSFER field TO file.
WRITE:/ wa_zwpkhdr-aufnr,
16 wa_zwpkhdr-compno,
26 wa_zwpkhdr-silo,
68 wa_zwpkhdr-lotnumber,
88 wa_zwpkhdr-matnr,
108 V_psmng,
126 wa_zwpkhdr-meins,
132 wa_zwpkhdr-batch,
144 wa_zwpkhdr-datum.
clear: V_PSMNG,
wa_zwpkhdr.
ENDLOOP.
thanks,
Chetan Shah
‎2007 Jul 10 7:55 AM
The code is working for the file size greater than 8 MB and giving a dump for file size less than 8 mb
‎2007 Jul 10 8:14 AM