Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dump in data transfer to application server

Former Member
0 Likes
791

Hi all,

We are using the FM AUTHORITY_CHECK_DATASET before the command OPEN Dataset to transfer a file to the application server.

The sy-subrc for the FM comes out to be 0, but the sy-subrc for the open dataset command = 8 (on Checking in the debug mode).

The code snippet is as follows

v_path1 = v_bkpf.

CALL FUNCTION 'AUTHORITY_CHECK_DATASET'

EXPORTING

program = 'ZZRFFI058_GL_ACCOUNT_MAPPING'

activity = 'WRITE'

filename = v_path1

EXCEPTIONS

no_authority = 1

activity_unknown = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE e195(zzfn) WITH

'No authorisation to write file on application server'

v_path1.

  • WRITE:/ 'File:', v_path1, ' not created'.

STOP.

ENDIF.

OPEN DATASET v_bkpf FOR OUTPUT. "DEL ACC012

TRANSFER i_bkpf_w TO v_bkpf LENGTH v_len.

So we have a dump at the TRANSFER command.

Not sure how the FM is successful and OPEN DATASET fails

Pls post your ideas.

Thanks ,

Stock.

4 REPLIES 4
Read only

Former Member
0 Likes
594

Hi,

Comment your open dataset ans paste this code and tell me what is the error msg ur getting.

DATA: msg(100).

OPEN DATASET v_bkpf FOR OUTPUT MESSAGE msg

IN TEXT MODE ENCODING DEFAULT.

IF sy-subrc <> 0.

WRITE / msg.

STOP.

else.

TRANSFER i_bkpf_w TO v_bkpf LENGTH v_len.

close dataset v_bkpf.

ENDIF.

Regds,

Senthil

Message was edited by:

senthil kumar

Read only

0 Likes
594

Hi Senthil,

I get a permission denied error (DATASET_CANT_OPEN).

But before the open dataset I am using the FM werein the error should have been captured, but surprisingly its not !!

Any ideas ?

Thanks,

Hari.

Read only

0 Likes
594

Hi,

You can use sy-subrc itself. The same type of issue was discussed here.

look at this thread..

Reward if it helps.

Regards,

Senthil

Read only

rahulkavuri
Active Contributor
0 Likes
594

hi please make sure that the strcuture which ur passing into the application server is entirely in character format

for example:

<b>

data: begin of itab occurs 0,

field1 like mara-matnr,

field2 like mara-menge,

end of itab.

loop at itab.

transfer itab to app_file.

endloop.

</b>

This will for a dump as the structure isnt in character format. all the fields should be of types C, N, D, T, STRING

<b>

in this case declare another itab with character fields of same field length

begin of itab1.

field1(18),

field2(17),

end of itab1.

loop at itab.

itab1-field1 = itab-field1.

itab1-field2 = itab-field2.

transfer itab1 to app_file

endloop.

award points if found helpful</b>