Skip to Content
avatar image
Former Member

Meter reading order download

Hi All,

I have a requirement to download the meter reading order to the application server in the CSV format. The file name should be the MRU name concatenated with the system data with the file extension as txt.

I have checked the download MRO option in EL35, but the file which getting generated is laying in the spool.

could you please help me maping this requirement.

Thanks and Regards,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jun 08, 2009 at 01:39 PM

    Hi,

    You can download the spools to application server by having the setting done for the output device.

    Also, for the output device, you can specify the path for the application server and the script name to rename the output to a particular format as required,

    Go to Transaction SPAD -

    Create output device -

    On "Device Attribute Tab" Provide the necessary details as:

    Output device name

    Short Name

    Device type as "ASCIIPRI": Some Generic ASCII printer".

    Spool Server - Provide name of app server running spool wok process and whose file system you would like to use for print files.

    Provide other details as required.

    On Access method tab, provide details such as -

    Host spool Acess method as "L: Print locally using LP/LPR"

    Host printer any name you would like to have this is just a dummy name.

    Click Edit: Command Set

    You will get one more box in Access tab named u201CCommand Set IDu201D

    Provice one character name and double click on that.

    A pop up screen would appear.

    Provide the necessary details as:

    Description : Any description for command set ID

    Command to transfer print data :

    /usr/bin/cp &F <File System Path>

    This will copy the contents of output to file system you specified in place of <File System Path>

    Command to query job status : This is required to know the status of the output at OS level, if this not that much important you can provide u201Cecho oku201D but donu2019t leave it blank.

    -


    EG:

    Command to transfer print data -

    /usr/bin/cp &F /intf/rq1/outb; /var/adm/scripts/general/spool_output_to_os.sh

    Command to Query Job status -

    echo ok .

    -


    Explaination -

    For example if you would like to create the file to /intf/rq1/outb and rename the file to <CREATOR>-<TITLE>-<SPOOL ID>_<YYYYMMDDHHMMSS>.done

    Create the following script (say name spool_output_to_os.sh and placed at /var/adm/scripts/general )

    Print to Text File at OS Level

    -


    Script ddetails -


    J=$1

    N=$2

    O=$3

    T=$4

    E=".done"

    d=`date '+20%y%m%d%H%M%S'`

    FN=`echo $J | awk -F/ '{printf("%s",$7)}'`

    FN1=$-$-$_$$

    mv /intf/rq1/outb/mm/pending/$ /intf/rq1/outb/mm/pending/$

    and in u201CCommand to transfer print data u201C enter

    /usr/bin/cp &F /intf/rq1/outb/ ; /var/adm/scripts/general/spool_output_to_os.sh &F &N &O &T

    Here parameter &F &N &O &T are passed to scripts.

    Hope this helps!!

    Thanks & Regards,

    Rajesh Popat

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 07, 2009 at 11:25 AM

    You can use the standadrd FM's

    BAPI_MTRREADDOC_GETLIST

    BAPI_MTRREADDOC_UPLOAD

    The upload FM does a lot of validation when MRR is tranferred into SAP. You can use the Int MRO ID as the key between the two FM's.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks for the response...

      I my requirement is to download the MRO to a file in a specified directory in application server. I am not able to find a way the option to specify the option of dir location and file name format.

      When i execute the order from EL35 with download option, order file getting created and is laying in sp01(spool area).

      How would i specify that whenever the download is executed from EL35, the order file should get created with a particular naming format and should go and get saved in a particular directory in application area.

      Thanks

  • avatar image
    Former Member
    Jun 11, 2009 at 02:46 PM

    Thanks a lot....

    Got the issue solved. Your answer is really helpfull

    Add comment
    10|10000 characters needed characters exceeded