Save HTML BDS document to Presentation server in the background

Hello all,
Can anybody please advice me how to save a BDS HTML document to a local directory in background.
Appreciate any kind of help.
Thanks and Regards,
Mona

Well, I solved the problem and wanted to share with all who face this problem and dont have to debug the SAP standard module again and again to reach this point.
I used the following steps to save the BDS HTML/Text documents to local directory in background mode. Infact this solution works for all document types.
1) Get the Physical class and object id for the Business document, using GET_INFO method of CL_BDS_DOCUMENT_SET
e.g
CALL METHOD cl_bds_document_set=>get_info
  EXPORTING
    classname         = 'BUS2091'        "Class name e.g BUS2091 or your custom class
    classtype           = 'BO'                 "Class type
    object_key          = '1000003111'   " object key
  IMPORTING
    extended_components = t_comp    " extneded information for the Business dcument
  EXCEPTIONS
    nothing_found       = 1
    error_kpro          = 2
    internal_error      = 3
    parameter_error     = 4
    not_authorized      = 5
    not_allowed         = 6
    others              = 7.
The extneded components  table returns the Physical class (CLASS) and object id (OBJID) for all the documents stored under that class, classtype and object id.
2) Use function 'SDOK_PHIO_LOAD_CONTENT' to get the binary/ascii content for your file
e.g
        call function 'SDOK_PHIO_LOAD_CONTENT'
          exporting
            object_id           = v_phio_object    " this is of type SDOKOBJECT and
                                                               " has the physical class and objid key
            raw_mode            = 'X'
          tables
            file_content_binary = i_content
          exceptions
            not_existing        = 1
            not_authorized      = 2
            no_content          = 3
            bad_storage_type    = 4
            others              = 5.
In the above case, i have selected raw_mode and the binary content is returned in table I_CONTENT.
3) Step 3 - transfer content to dataset using OPEN DATASET, TRANSFER and CLOSE DATASET
And thats it

Similar Messages

  • Communicating with presentation server in the background mode

    Hi Folks,
        I have a requirement to communicate the presentation server in the background mode. I'm following the below article for achieving it.
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2?quicklink=index&overridelayout=true|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9831750a-0801-0010-1d9e-f8c64efb2bd2?quicklink=index&overridelayout=true]
    But I'm getting an error while testing in the dos prompt. The error is as following.
    The system cannot execute the specified program.
    Kindly Help.
    Regards,
      santosh

    But I'm getting an error while testing in the dos prompt. The error is as following. The system cannot execute the specified program.
    You see this error usually if some libraries (dll's) are missing. To investigate this issue it might help to use the [dependency walker|http://www.dependencywalker.com/] tool on the executable and check for any missing libraries. If you cannot figure it out yourself, please try to post exact comments of what you're doing and complete error messages including ideally version of your RFCSDK.
    Cheers, harald

  • Reading file from the presentation server in the background

    Hi,
    I am trying to read a .csv file from the presentation server into an internal table in the background. what should I do for it? In the foreground it works fine.
    I have declared a selection parameter 'p_file' that has the path of the file. It wokrs fine in the foreground and how to set it up in the background?
    Any thoughts would be helpful. Thanks in advance,
    VG

    hii
    did you achieved the required functionality , i,e, accessing presentation server file i nbackground .
    I too got the same requirement, can you explain the process.
    There is no way you can do it... The best method is to put the file on Appln server and then call it in the background mode.
    Regards,
    Vishwa.

  • How to save HTML file with images present in the server to local machine

    Hi all
    In my application i have a option for the user to save HTML files with images present in the server. The HTML file is getting saved but the images are not being saved.
    The code i am using is below :-
    l
                        File fname = new File(filePath);
                        if(!fname.exists())                return;
                        FileInputStream istr = null;
                        OutputStream ostr = null;
                        response.setContentType("application/"+format);
                        response.setHeader("Content-Disposition", "attachment; filename=\"" + fname.getName() + "\";");
                        try { 
                             istr = new FileInputStream(fname);
                             ostr = response.getOutputStream();
                             int curByte=-1;
                             while( (curByte=istr.read()) !=-1)
                                  ostr.write(curByte);
                             ostr.flush();
    Can anyone suggest what i need to do
    regards

    The client should probably parse the html that comes down, and look for <img> links, and request those of the server as well.

  • Accessing presentation server file in background

    Hi gurus,
    my requirement is to access presentation server file in background mode.
    I got the below documentation regarding this ,but i'm not able to complete the setup as mentioned in this document.
    please help .
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/communication%20to%20presentation%20server%20in%20background%20mode.doc]
    As per documentation i need rfc.car and car.exe file in my system. I cant see any rfcsdk folder in my system. Please help.
    any other solutions ,please suggest.
    sastry.
    Edited by: prssastry on Oct 15, 2008 7:13 AM

    Hi,
    In general practice we don't access a file from presentation server in background because at that point of time i might not logon to SAP server, so it is always preferable to access the file from Application layer incase of background processing.
    Unless it is a client requirement, don't access files from the presentation layer in background./
    thanks,
    Mahesh.

  • Downloading .xml/.tx data to presentation server while running background.

    Hi experts,
    I have a requiremnt to downloading .xml/.txt data to presentation server while running background.
    when i run the program in foreground with use of GUI_upload/ Gui_download its working fine but not working in background.
    i can't use email/data download to database file and than get it  option as data can be huge.
    Can anybody help me out regarding this.
    Thanks
    Anuj jain

    Hi anjui,
    it'snt possible to download a file in background using gui_download.
    You could try to create a Shell Command (transaction SM69) to transfer data in a shared directory.
    You can execute Os Commands using function module SXPG_COMMAND_EXECUTE
    Alessandro

  • Every time I try to save my Indesign document as an Interactive PDF, the option of either saving it as Interactive PDF or PDF is not showing.

    Every time I try to save my Indesign document as an Interactive PDF, the option of either saving it as Interactive PDF or PDF is not showing.

    You export to PDF, not save.

  • Download the file in presentation server while the program runs in backgrou

    Hi,
    Usually we will never download the file in presentation server while the job is scheduled in back ground.
    But now i need to do that. I need to download the data in excel file and the same program is scheduling in background.
    Can any one suggest how can we do this?
    Thanks in Advance,
    Ravi

    Hi,
    There is an alternative provided by SAP. The program RFCEXEC has to be installed locally on the PC.
    In SAP R/3 we have to define a destination link to your local PC to the RFCEXEC program. And in the ABAP program we have to invoke the connection by calling the FM  RFC_REMOTE_FILE.
    I haven’t tried this before but a detailed documentation is available in this link.
    http://sapabap.iespana.es/sap/info/rfcexec/rfcexec_e.htm
    Reward if useful
    Regards
    Shiva

  • Save interactive adobe form in presentation server through report program

    Hi All,
              We have developed a interactive adobe form in SFP transaction and we are calling this form
              from report program  and we are able to save the form in presentation  server.
              But my scenario is that user provides input in interactive adobe form and i need to save the interactive adobe form
              in display mode that to in  presentation server with input values provided by the user.
             could  any help to achieve this or guide me if i am  moving in a wrong path.
    Thank you,
    Harsha P

    It all depends on what you want to do.
    If you are planning on users to fill out on-line form only and submit to SAP, it is pretty easy to do (that is once you understand how to create web dynpro and interactive form).
    You can also have users fill a form offline and upload to online and save it to SAP.
    You do need to know little bit about coding (ABAP or JAVA),
    but can be done w/ very minimum coding.
    If you are planning on doing in Web Dynpro ABAP,
    go to SE 80 and select WebDynpro and create form.
    To save data/form to SAP, you probably want to use BAPI or Function module already available so that you don't have to do much coding to save data.
    See some of these links for helpful tutorials. Thomas Jung has several good tutorials, but none of them probably have all the information you need... you just have to pick some from here and some from other places... If you have specific question, I will be happy to guide you...
    Practical tips for developing with ABAP WebDynpro
    Practical tips for developing with ABAP WebDynpro
    http://help.sap.com/saphelp_nw2004s/helpdata/en/7c/3545415ea6f523e10000000a155106/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/c766e918-0b01-0010-99b1-c2b78cd059b3

  • Urgent: loading a pdf file  to presentation server at the end of the day

    hi
    I got a requirement like smartform will be converted into pdf file and it will loaded into application server, at the End of the day all the pdf files which are generated on that day will be loaded to in file at presentation server ,
    so please help me out regarding
    Thanks in advance
    regards
    krishna

    Hi Chris,
    this problems are in fact new to me, but I'm just starting on a new workplace where they have these issues since forever.
    I'm hoping that new point of view may find a solution to it ;-)
    I'll try to watch the traffic - it could be related to the particular network we have. Will ask and post some more info tomorrow.
    Thank you!
    /best
    /j

  • Contracts - 'Document still being processed in the background; try again la

    Hello,
    When trying to make adjustments to multiple contracts we are receiving the error message 'Document is still being processed in the background; try again later.'  We have tried again later to no effect.
    Ultimately, this means that these contracts (30 altogether) cannot be altered in anyway i.e. held, deleted, released, approved and it means that they just sit there.
    This also has implications when raising another contract to replace these contracts.  For example if you want to use the same vendor this will cause great confusion for our users when trying to select the correct correct to spend money against when raising purchase orders.  Often the result is the user selecting the wrong contract.
    Have you any suggestions on why this error message is appearing?
    Many Thanks,
    Sarah

    1465740 - SRM document is stuck in the approval process
    Symptom
    Workflow hangs.
    Workflow gets stuck.
    SRM document in status waiting.
    Approval process cannot continue.
    SRM document frozen in status 'awaiting approval'.
    BBP_PD 443 Document is still being processed in the background; Try again later
    BBP_ICON_TEXTS 049 No workflow started. Application error occurred                 
    Environment
    SAP Supplier Relationship Management
    Reproducing the Issue
    Create or change a document in SRM.
    Cause
    *Not possible to identify root cause without further deeper analysis
    Resolution
    Find the object guid of your SRM document via transaction BBP_PD.
    Then display the relevant workflow instance via transaction SWI6 using the following steps:
    Select BOR object type.
    Enter your object type.
    Enter your guid (or document number in the case of shopping cart) in the Key field.
    Select variant All Instances.
    Select selection period All.
    Hit execute.
    Click on icon 'Display workflow log'.
    Click on icon 'List with technical details'.
    Click on icon 'Print Log'.
    Record the date and time of the very last step in the workflow log.
    Using the date and time of the last workflow step, here are some transactions that can be used to investigate the root cause of the problem.
    SM58 - check for stuck remote function calls
    ST22 - check for system dumps
    SM13 - check for stuck update requests
    SM21 - check in the system log for anything unusual
    SWUD - run a consistency check on the workflow
    Enter the task number and hit enter e.g. 14000044
    Choose 'Test Environment' and flag 'Including parts'
    Execute
    Choose 'Consistency check for components' and flag 'Including subworkflows'
    Execute
    Red lights indicate an error in the definition.
    Header Data
    Released on  05.05.2010 09:53:08 
    Release status  Released to Customer 
    Component  SRM-EBP-WFL Workflow 
    Priority  Normal 
    Category  Problem 

  • Can iCloud documents stay in sync in the background on iOS devices?

    Hi everyone.
    I've been using iCloud document syncing for a few years and now I feel a little bit puzzled.
    My DayOne app on iPhone & iPad only start downloading entries after I launch the app. Is it true that I have to open the app for iCloud documents to start syncing? Or is it supposed to sync in the background (periodically or pushed) and that I just do not get it work?
    The same goes for my Readdle Documents app. Everything starts syncing when the app is open and active. Is that the way iCloud document should work?
    (I am running iOS 7.1 on iPhone 5 & iPad 3, OS X 10.9.2 on MBA 2013; iCloud documents set to ACTIVE on all devices; background apps are all turned ON for both iPhone & iPad.)
    Thanks.
    -Teng

    Many thanks to @randers4
    Just can't believe Apple do not sync docs in the background (still do not after 3 years)

  • What's the recommended way to run a WebLogic Server in the background?

    I'm new to WebLogic Server and I've been looking at the documentation. There's instructions for starting and stopping servers on Linux but they all seem to rely on foreground processes. What's the correct way to run these processes in the background in a production environment? Is it just by using nohup somewhere in a script /etc/init.d/ or is there some other way I should be running it?

    Meatwad,
    Of course, running the WLS processes using nohup would place the process in the background. However, the recommended way to run the WLS servers on a production system would be to configure node manager and use this. This places the servers as a background process but also provides some additional functionality, that would be useful - for instance, allowing starting and stopping via the admin console and the ability to auto restart failed or stuck servers.
    For more information, please consult the documentation.
    http://docs.oracle.com/cd/E17904_01/web.1111/e13740/starting_nodemgr.htm

  • Print html document from presentation server with no intervention of user

    Hello,
    I have been able to create HTML output for my smartform.
    They are saved on my machine.
    I need to print these HTML outputs as a part of process without intervention of the user.
    Is it possible?
    I have tried method 'EXECWB' of 'cl_gui_html_viewer', but that gets fired only on some action and shows the Print dialog for the selection of printer.
    It would be great if anyone can help me with us.
    Thanks
    Mona

    PDL -- thank you for your reply.
    What you gave me did spawn the print dialog allowing me to select a printer. However, when the document printed, the number of pages in the document was correct but the pages were empty except for the page x of y along the top and the name of the document along the bottom. Have you seen this before and do you know how to correct? Also, how do you suppress the info across the top and bottom of the report from printing?
    Thanks

  • How is possible to save a pdf document from a email to the memory of my Nokia 520?

    I installed Adobe Reader to read the pdf documents present in the memory of my Nokia Lumia 520 and those arrive by email.
    Particulary important for is to save, the pdf that arrive by email, in the memory of my phone but I didn't understand how it is possible.
    Someone can help me?
    Thank you
    Mauro

    Now it's impossible to save PDF files to memory or SD card because Windows Phone 8 simply doesn't allow this action for 3d party apps.
    That's why all available readers can't do it.

Maybe you are looking for

  • Why are LabView Graphics so sloooooow?

    Why does it take so long to load an application onto a PC even if it is only a single panel with a few dials and gauges. And then after it is loaded, if I click a button with a mouse I'm not really sure if it has registered the action. I have built a

  • DFS Error 9061 (Replicated folder offline for too long) won't go away

    We have a server that got disconnected from a DFS replication group for too long. The error says to remove the server from the group and re-add it. I've done that about 6 times and I keep getting the error. I even tried deleting the replicated folder

  • Bex Query on ABAP WEB

    Dear Experts, When we go to T-code RSRT and give the technical name of the query and afer that when we select the ABAP WEB option the query goes to internet explorer. After that one variable selection screen pops up now my question is how can we have

  • Cant Connect to Wifi

    Ever since I updated my iphone 4s, I cant connect to WiFi. I've read various threads on WiFi connectivity issues, and tried numerous things to fix it, but none have worked In my household, there are 2 iphone 4's, mine and my girlfriends, which are bo

  • Skype customer support e-mail address

    I find no e-mail address to communicate with SKYPE for a serious matter. Does ANYBODY know their address ? Better said:  DOES IT EXIST, or only SKYPE can e-mail us with a "no anser" address ? Is this to FORCE customers to use the phone AND leave no t