Skip to Content

Read PDF files from file server(windows share)

Hi,

I have a requirement to read PDF files from File server.

These PDF files are transferred to the file server by SAP OMS. (Nacha = 8 special function).SAP OMS (Output Management System) is responsible for generating a PDF-version of documents and it will store the PDF-documents in the "XXXXX" directory on the file server.

The PDF file is stored via SAMBA on a windows share.

Now i have to read this PDFs from the file server and edit it if necessary in different SAP system.

Please let me know how should I approach for this. Any suggestions will be appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Mar 12 at 10:34 AM

    Hello Sachin,

    any SAP instance is running under the credentials of SAPService<SID>. If used in a Windows domain (Active Directory) environment, each instance service is running under \\<domain>\SAPService<SID>.

    On your SAMBA share you have set the ACLs to allow read/write to the SAP OMS system.

    Now you want to read these files from another SAP system. Simply add the SAPService<SID> user to the ACL of your SAMBA share.

    Connect to your second SAP system via SAP GUI:
    Got to SE38 -> run report RSBDCOS0 -> this provides a "command prompt" within your SAPGUI.

    In the SAP GUI you can run "whoami" command to find out, under which credentials this SAP instance runs? Should be SAPService<SID> and not <SID>adm - for security reasons.

    Then try to browse a folder on the SAMBA share:
    dir \\<name of SAMBA host>\<share>

    Does it work? Or do you get an access denied? Then check ACLs.


    Best regards,

    Kalle

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Kalle,

      "In the SAP GUI you can run "whoami" command to find out, under which credentials this SAP instance runs? Should be SAPService<SID> and not <SID>adm - for security reasons."

      I have checked the above and SAP instance runs on <SID>adm .

      Is that a problem? Will i be able to read the files from another system? If no, what should I do ?

      Regards,

      Sachin.

  • Mar 19 at 09:43 AM

    Hello Sachin,

    it's "just" a security issue, because <SID>adm is a local administrator and therefore, your SAP instance runs under an administrative account. And all processes, which will be started from within this instance, are using administrative rights.

    Anyway, <SID>adm must have read and write permissions on the SAMBA share, and that was your primary problem. Did you try "

    dir \\<name of SAMBA host>\<share>" from within SE38 / RSBDCOS0? Does it work? If not ... check SAMBA configuration. Also, analyze if naming resolutions work (a simple ping -4 <SAMBA hostname> should answer this ...).

    Best regards,

    Kalle

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 26 at 08:18 AM

    Hello Sachin,

    once you have access to SE 38 -> rsbdcos0 you have a "command prompt". This cmd runs under the credentials of the started SAP instance, in default cases it's SAPService<SID> user, domain or local user.

    From there you can first check, if the naming solution works: ping <samba host>

    Then check if you can access the share: dir \\<samba host>\<share name>

    To verify, if you have write access you can copy a file to this share or create a directory: mkdir \\samba\sapmnt\test

    Best regards,

    Kalle

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Kalle,

      If i give the \\<name of SAMBA host>\<share> in SE38 / RSBDCOS0>>> i am getting [1] returncode = 127 and path name.

      Regards,

      Sachin

  • Mar 26 at 08:36 AM

    It's a command prompt.

    Try ping command, net view .... dir \\....\...

    Therefore I recommend to first use ping command, if the name of cours SAMBA host can be resolved:

    ping -4 SAMBAHOSTNAME

    Fine?

    Then try the dir command ...

    Best regards,

    Kalle

    Add comment
    10|10000 characters needed characters exceeded