Skip to Content
avatar image
Former Member

How to download MSDS documents to pc desktop and convert to pdf.

Dear all,

Actually i have a doubt regarding download of MSDS documents to frontend system.

can any one tell how can i make that process to run? i done it by using dms_kpro_read in which i filled the structure ls_phio and called one perform to download the reports in cg02 enhancement point but problem is when i run and create report in cg02 then it is directly showing destop folder but report is also not coming .

can any one help me out were i need to write this enhancement to achieve that functionality. the need is when i create a report in cg02 it should go to cg50 and it should also save in active directly.

when i run this in cg02 it is taking document type as SBV but i need to take SBE and tell me how to solve it .

Please find the document which shows what i had done.

Help me out with an explanation if possible document.

Thanks in advance.

DATA : object_id like sdokobject.
DATA : ls_phio like sdokobject.
DATA : gf_phio like sdokobject.
DATA : ls_doc2lo1o like dms_doc2loio.

LOOP AT l_gen_report_tab.

ls_phio-class = l_gen_report_tab-ehsdoccat .
ls_phio-objid = l_gen_report_tab-dmskey .


gf_phio = ls_phio.

export gf_phio to MEMORY id 'MUM'.

PERFORM phio_check_out IN PROGRAM dms_kpro_read IF FOUND.

I had done the above coding which fills the class and object id and saves document but the problem is I am achieving the functionality but not the result.

Were I need to write the code in which enhancement that’s is CG50 or Cg54 or CG02.

In some documents if I see they are showing EXP_Call what is it.

It is filling in table as DMSkey and dms cat.

I used this fields and filled the structure.

Once I execute the following popup is blinking but not able to save report .

This is what I had done.

msds 1.PNG (127.3 kB)
msds 2.PNG (214.1 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Dec 04, 2015 at 08:59 AM

    Hello Akula,

    I would question the business process or business need for downloading MSDS Word Document to a Front End PC and THEN convert to PDF.

    Report Shipping of an MSDS is Standard EHS functionality and provides a business process within SAP for automatic conversion to PDF. It also provides a history of creation, by who and the dates that the report was sent/shipped. This ensures trace-ability of documents sent to potential customers or clients within SAP, also ensures that no users have changed the data, accidentally or otherwise, on the MSDS Word Document.

    I cannot assist in regards to the code you have provided otherwise.


    Add comment
    10|10000 characters needed characters exceeded

    • Hello

      this is exactly what report shipment can do / will do (as explained by mark as well); the "standard" is to do the download in a "server" (application server) etc.

      PLease check the links as provided. Nearly nobody is "reprogramming" the tool if SAP delivers what you need (after some set up and some additional framework clearly).

      Your topic is discussed so often here..


      PS: check e.g.

  • avatar image
    Former Member
    Dec 04, 2015 at 09:11 AM

    Hello Nick,

    Greetings for the day!!

    my requirement is once the report has been created in cg02 it should also send the created msds report to desktop and save as a pdf file.

    Here they are not doing automatic report shipping so i need to enhance by sending the released reports to destop and save in one folder.

    So please suggest me for further process as it is the main and urgent requirement.

    Thanks in advance.

    Add comment
    10|10000 characters needed characters exceeded