Skip to Content
avatar image
Former Member

applicationserver file

Hello friends,

I am able to open a directory and write data to it.

However when I go to AL11 and find for it am unable to see the file.

In debug mode I see the SY-subrc = 0.

OPEN DATASET p_apmap1 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

Where Else should I see the file.

Thanks,

Ster.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 06, 2008 at 07:33 PM

    Hello,

    A couple of questions.

    Is the directory that you are writing defined in AL11?

    Did you CLOSE DATASET?

    Can you open the file that you wrote?

    Regards

    Greg Kern

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hello,

      Is the directory(or even the parent of the directory) that you are writing defined/listed in AL11?

      Or do you create the directory with your program?

      You may need to configure AL11 to read the directory that you are writing to.( or have Basis configure it for you ).

      Regards

      Greg Kern

  • Oct 07, 2008 at 03:36 AM

    Hello,

    Try using this FM

    Change i_path to whichever directory you are writing to

    you should be able to see the file then

    data: lv_opath like dxfields-longpath.
      data: ev_server_name like btctgtsrvr-srvname,
            server_name like msxxlist-name.
      call 'C_SAPGPARAM'
      id 'NAME' field 'rdisp/myname'
      id 'VALUE' field ev_server_name.
      if sy-subrc <> 0.
        clear ev_server_name.
      endif.
    
      move ev_server_name to server_name.
    
      call function 'F4_DXFILENAME_TOPRECURSION'
       exporting
         i_location_flag       = 'X'
         i_server              = server_name
         i_path                = 'D:\'
    *     FILEMASK              = '*.*'
    *     FILEOPERATION         = 'R'
       importing
    *     O_LOCATION_FLAG       =
    *     O_SERVER              =
          o_path                = lv_opath
    *     ABEND_FLAG            =
       EXCEPTIONS
         RFC_ERROR             = 1
         ERROR_WITH_GUI        = 2
         OTHERS                = 3
                .
      if sy-subrc <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    
    

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 07, 2008 at 04:13 AM

    Hi,

    Use this FM

    If you have multiple application sever best use this FM

    CALL FUNCTION 'DX_FILE_WRITE'

    EXPORTING

    filename = target_filename

    server = target_server

    pc = space

    TABLES

    data_tab = lt_data_fix

    EXCEPTIONS

    OTHERS = 4.

    Thanks,

    Durai.V

    Edited by: Durai V on Oct 7, 2008 6:14 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 07, 2008 at 04:17 AM

    hi use the transaction CG3z to move the file from presentation server to application server, instead of doing code for that , u can use this

    Add comment
    10|10000 characters needed characters exceeded