Skip to Content
avatar image
Former Member

How to Read word file Template from DMS and update the word file with variables data in DMS

Hello Experts,

I have a Requirement that I need to read the Word file from DMS which is having the data in some template format.

Ex :-Sb number : gw_sb_num.

SB type : gw_sb_type like so on...

So i have to read the file from DMS and replace the global variable with our local variable lw_sb_num data and update the file in DMS.

how to achieve it ..let me know the flow...


like below is the process I am trying to achieve the functionality.


1) Sending the word file from DMS to application server using Bapi

--> Data is storing in application server is unreadable format like p###

2)Reading the file from application server to ZF.M using

open dataset gw_path

but the file is coming # format how to convert in string format?

I have tried 'SCMS_BINARY_TO_FTEXT and 'SCMS_BINARY_TO_string

and some FMs but they are not converting the data into readable format.

How to achieve it?


Need Experts help please..

Thanks In Advance..



Add comment
10|10000 characters needed characters exceeded

  • Could you please tell us which format is your Word file? Do you expect several formats? Formats are DOCX (Office Open XML for Word), DOC (Microsoft-owned binary format), Word XML 2003, etc. Based on that, you'll have different strategies. If it's format DOCX, it's a ZIP file that you'll have to unzip, then read the various XML/non-XML parts. There are a few information in the forum but you'll need a tremendous effort to come to the final solution.

  • Former Member

    Hello Sandra Rossi,

    Thanks for responding.

    Actually its a word file present in DMS

    There is a path for DMS

    if i give Document number, Document type, Document part, Document version then i am able to get the file in CV03N T-code

    I have to get the data from the word file and where ever the global variables are present replace the data with respective.

    In word file the data will be

    Authoring date : gw_auth_dat

    1st draft date : gw_drafft.

    where ever Global variable present there we need to replace the data like

    Authoring date : 04-05-2017

    1ST DRAFT DATE : 07-05-2017.

    like way .

    local variable will get the data from se11 transparent tables.



  • Former Member

    Hello Every One,

    The word file format is DOCX file,

    can any one please suggest how to achieve it.

    Really need Expert Help.



  • Get RSS Feed

0 Answers