Dynamic Documents ( CL_DD_DOCUMENT ) in background to generate spool

Hi Everyone,
Is it possible for a Dynamic Document with the use of CL_DD_DOCUMENT to run in background and generate spool output?
If it is possible, can you please tell me how?
Thanks in advance.

Hi Denver,
dynamic documents are screen controls to be put in a (enjoy) container controlled by SAPGUI. In background, SAP just ignores any display processing for GUI controls.
The CL_GUI_ALV_GRID is an exception here, in background output is converted to an ALV list. I don't know and I don't think that for dynamic documents anything comparable exists.
Regards,
Clemens

Similar Messages

  • Regarding running a report in background and generate spool

    Hi,
    I am developing a report [<b>REPORT1</b>].
    It is taking long to execute if data is more.
    Now i want to schedule this report in background and generate spool along with.
    So once i execute REPORT1 it should run in background & generate spool?
    Can anybody give inputs for the same!
    Thanks,
    Deep.

    Hi,
              to generate spool, use below code
    FORM create_spool .
    CONSTANTS : l_c_device(4) VALUE 'LOCL'.
    Create Spool Request
    NEW-PAGE PRINT ON
    LINE-SIZE 120
    DESTINATION l_c_device
    IMMEDIATELY ' '
    KEEP IN SPOOL 'X'
    NEW LIST IDENTIFICATION 'X'
    NO DIALOG.
    ENDFORM. " create_spool
    And after createing spool to get the spool number use below code,
    FORM obtain_spool_id .
    TYPES : BEGIN OF t_tsp01,
    rqident TYPE tsp01-rqident,
    rqowner TYPE tsp01-rqowner,
    END OF t_tsp01.
    DATA : it_tsp01 TYPE STANDARD TABLE OF t_tsp01,
    wa_tsp01 LIKE LINE OF it_tsp01.
    SELECT rqident
    rqowner
    FROM tsp01
    INTO TABLE it_tsp01
    WHERE rqowner = sy-uname.
    SORT it_tsp01 BY rqident DESCENDING.
    READ TABLE it_tsp01 INTO wa_tsp01 INDEX 1.
    IF sy-subrc = 0 .
    v_spool_nr = wa_tsp01-rqident.
    ENDIF.
    Capture the immediate spool created for this report
    v_spool_nr = sy-spono.
    ENDFORM. " obtain_spool_id
    <b>Reward points</b>
    Regards

  • Wrapper program when run in background not generating SPOOL

    I have created Program A which calls internally Program B or C based on the condition. When I run the program B or C independently in Background it generates the spool on completion. But When I run the program A in Background, Spool is not getting generated.
    My requirement is that Spool should be generated when Program A is executed in Background.
    Below is the code of program A:
    PROGRAM A.
        IF p_cons = 'X'.
    *-->Detailed Details of Interim or Final Settlement
          SUBMIT B               WITH  p_vtnr   EQ p_vtnr
                                 WITH  p_setqty EQ p_setqty
                                 WITH  p_test   EQ p_test
                                 WITH  s_abrdat IN s_abrdat
                                 WITH  r2       EQ r2
                                 WITH  r1       EQ r1
                                 AND RETURN.
        ELSE.
    *-->Summary Details of Interim or Final Settlement
          SUBMIT C                   WITH  p_vtnr   EQ p_vtnr
                                     WITH  p_setqty EQ p_setqty
                                     WITH  p_test   EQ p_test
                                     WITH  s_abrdat IN s_abrdat
                                     WITH  r2       EQ r2
                                     WITH  r1       EQ r1
                                     AND RETURN.
        ENDIF.
    Please guide me on this.
    Regards,
    Naveen

    Hi Naveen,
    Check this
    Submit report to job
    submit ztest via job l_jobname
                                   number l_jobcount
                                  to sap-spool without spool dynpro
                                 spool parameters ls_params
                              and return.

  • Create Dynamic documents without screen.

    Is this possible ?
    Create a dynamic document (CL_DD_DOCUMENT) without creating any screen.
    Thank you.

    Is this possible ?
    Create a dynamic document (CL_DD_DOCUMENT) without creating any screen.
    Thank you.

  • Is there any FM to generate spool request for error log of a background job

    Hi,
        I am going to create a program to create deliveries and do PGI. This program will be assigned to periodic background job.Now whatever  errors are generated in program i have to send the error log to spool request.Is there any FM for generating spool request with this error log  or how can this be done? Kindly provide sample code if possible.
    Thanks.
    Nimish Dongare.

    Hi Nimish,
    How are you doing, This is Shreekant working as ABAP developer, I sow your post in sdn forum, I have a similar requirement like I am changing the delivery taking some data from a flat file which is coming from other system and do PGI. If any error occurs during this process I need to capture it and present it as a report or create log file.. whichever is easier.
    Please can u help me how did u achieved this functionality for your requirement?.. pls. can u share some details.
    If u don mind, can u give me ur email id to communicate.
    Thanks,
    Shreekant

  • Afer background job finished, spool was not generated

    hi all
    Afer background job finished, spool was not generated but all background jobs is not
    soem background jobs was created spool.
    even if same user and same backgorund job, sometime generated spool or not.
    how can I solve??
    thanks

    Hi,
    Spool will be generated only spool specification wil be defined for that job.
    Select the job go to steps spool specification you can see the device assigned to it.
    Regards
    Ashok

  • Generating spool request

    Hi Experts,
    My rquirement is to generate spool request without getting the output displayed  on the screen.
    <fs_outtab> is the dynamic internal table containing data. It will have several fields.
    I want to send this data to spool so that it can be seen when the background job runs.
    But I do not want the output to be displayed on the screen.
    << Removed >> Please don't forward links as it cannot be opened in my system.
    Thanks.
    Edited by: Rob Burbank on Jun 25, 2010 11:17 AM

    See try to make an alv grid diaplay program for the internal table.( like this)
    form fill_catalogue .
      wa_fieldcatalog-fieldname   = 'WERKS'.
      wa_fieldcatalog-seltext_m   = 'Plant'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'LGORT'.
      wa_fieldcatalog-seltext_m   = 'St.Loc'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'SHKZG'.
      wa_fieldcatalog-seltext_m   = 'Iss/Rec'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'BUDAT'.
      wa_fieldcatalog-seltext_m   = 'Posting Date'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'CHALAN'.
      wa_fieldcatalog-seltext_m   = 'Document No'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'BOLNR'.
      wa_fieldcatalog-seltext_m   = 'Bill of Lading'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'BRGEW'.
      wa_fieldcatalog-seltext_m   = 'Gross Wt.'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'NTGEW_CH'.
      wa_fieldcatalog-seltext_m   = 'Net Chargeable Wt.'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'SHIP_PARTY'.
      wa_fieldcatalog-seltext_m   = 'Customer/Vendor/Plant'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
      wa_fieldcatalog-fieldname   = 'SAL_GRP'.
      wa_fieldcatalog-seltext_m   = 'Sales Group'.
      wa_fieldcatalog-tabname     = 'IT_FINAL'.
    wa_fieldcatalog-emphasize   = 'X'.
      append wa_fieldcatalog to fieldcatalog.
      clear  wa_fieldcatalog.
    endform.                    "fill_catalogue
    *&      Form  display
          text
    form display .
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program = sy-repid
          it_fieldcat        = fieldcatalog[]
        tables
          t_outtab           = it_final
        exceptions
          program_error      = 1
          others             = 2.
    Then you must be accepting some parameters fromthe screen. just take the values from the selection screen
    press F9, and proceed as your requirement is.
    endform.                    "display

  • Dynamic Documents & Exercise

    Hi guyzzzzzz,
    i want the document for the following........
    ·  Dynamic Documents Display
    ·  Structure of Program that Use Dynamic Documents
    ·  Classes for Dynamic Documents
    ·  Important Methods of DD Classes
    Demo/Exercise
    Its very urgent, plz help me in this
    Thanks in advance,
    Vishnu. R

    Hi,
    Dynamic documents in ABAP Objects are HTML documents that are generated during runtime using ABAP code.
    Dynamic documents enable developers to give totally a new look and feel to ABAP screens and report outputs (provided screens are used in the report output). Many features that are not possible in the traditional ABAP programming are available in dynamic documents. Why we are saying a new look and feel is it uses SAP HTML Viewer internally to bring HTML web page kind of look and feel to screens.
    Dynamic documents may contain Forms and Tables, which intern can contain elements like input fields, push buttons, dropdown lists, texts, icons and pictures in different sizes. Of course some of these features are also available in ALV reports with limited usage, but not like in dynamic documents.
    Features
    The below mentioned are some of the features of dynamic documents.
    Large font sizes and more colour options than traditional ABAP/4 (There are some limitations also)
    ICONS and pictures in different sizes
    Texts
    Links
    Pushbuttons
    Input fields
    Dropdown list boxes
    Tables with row span and with column span
    Tables with frames and without frames
    Tables with buttons, icons, pictures, input elements and texts in it
    Steps for using dynamic documents in ABAP program:
    For using dynamic documents, all that we need is a screen and a custom control in that.
    The following steps need to be done in the program in order to display a dynamic document in a screen.
    Create a screen and a custom control in that using Screen Painter (This step is not required if we already have a screen and custom control in the program)
    Define an object reference to the class CL_DD_DOCUMENT and instantiate it.
    For example:
    DATA: OBJ_DD  TYPE REF TO CL_DD_DOCUMENT.
    CREATE OBJECT OBJ_DD.
    Dynamic document is ready now for including elements in that. The below are few methods, which we can use for adding elements to the dynamic document. Method Description
    NEW_LINE To generate a line break
    UNDERLINE To draw a horizontal line across the full width of the document
    ADD_GAP To place a gap in a line
    ADD_TEXT To add a text
    ADD_PICTURE To add a picture
    ADD_ICON To add a SAP icon
    ADD_TABLE To add a table
    ADD_FORM To add a form area
           For example:
           DATA: OBJ_TABLE      TYPE REF TO CL_DD_TABLE_ELEMENT.
           CALL METHOD OBJ_DD->ADD_TABLE    
                  EXPORTING
                  NO_OF_COLUMNS        = 2
                  WIDTH                = u2018100%u2019
                  IMPORTING
                    TABLE              = OBJ_TABLE.
    Once all the elements are included, all these elements need to be merged into a single dynamic document. This can be done using method MERGE_DOCUMENT.
                            For example: CALL METHOD OBJ_DD->MERGE_DOCUMENT.
    Dynamic document is now ready for display/print/export.
    Method DISPLAY_DOCUMENT can be used to display document in the screen. Here it is possible to display dynamic document in an existing container or in the existing document also.
    Method PRINT_DOCUMENT can be used to print the dynamic document. Here system enables local printing.
    Method EXPORT_DOCUMENT can be used to export the document as a HTML file into PC.
    In case of the dynamic document need to be refreshed based on the user action, one should first call the method INITIALIZE_DOCUMENT to clear the dynamic document contents. This method does not clear the dynamic document object reference. So it is possible to include another set of elements in the same dynamic document.
    After displaying the document, any user action can be handled in the event RESOURCES_CHANGED of the class CL_GUI_RESOURCES. For example refreshing the document contents, displaying new contents on the same document etcu2026
    Event RESOURCES_CHANGED can be triggered explicitly using the method ON_RESOURCES_CHANGED of the class CL_GUI_RESOURCES.
    For showing a dynamic document in a report, a screen with custom control in it must be called from the program.
    Example programs:
    SAP provided a complete set of example programs (Package: SDYNAMICDOCUMENTS), which explain all the features mentioned in this weblog.
    Program Description
    DD_ADD_FORM_BUTTON Buttons on Forms
    DD_ADD_FORM_INPPUT Interactive Elements: Forms with buttons
    DD_ADD_LINK Interactive Elements: Links
    DD_ADD_PICTURE SAP icons and pictures stored in BDS(transaction OAOR)
    ADD_PICTURE To add a picture
    DD_ADD_TABLE Tables
    DD_ADD_TEXT Text input
    DD_SPLIT_DOCUMENT Distribution of areas on dynamic documents
    DD_STYLE_TABLE Style types & list colours
    Also refer to this links:
    /people/venkata.ramisetti/blog/2005/12/20/dynamic-documents-in-abap-objects
    http://www.sapdevelopment.co.uk/reporting/ddhome.htm
    www.saptips.com/WorkshopDescriptionsABAP.asp
    Reward Points if found helpfull..
    Cheers,
    Chandra Sekhar.

  • Dynamic documents in ABAP Objects (weblog)

    Hi SDNers,
    Do you want to implement the following features in ABAP Screens?
    1. Large font sizes and more colour options than traditional ABAP/4 (There are some limitations also)
    2. ICONS and pictures in different sizes
    3. Texts
    4. Links
    5. Pushbuttons
    6. Input fields
    7. Dropdown list boxes
    8. Tables with row span and with column span
    9. Tables with frames and without frames
    10. Tables with buttons, icons, pictures, input elements and texts in it.
    Then please read the below weblog to incorporate these features...
    <a href="/people/venkata.ramisetti/blog/2005/12/20/dynamic-documents-in-abap-objects">Dynamic Documents in ABAP Objects</a>
    Thanks,
    Ramakrishna

    one limitation which comes to my mind immediately is that you cannot create spool output of the dynamic document.
    Regards
    Raja

  • Unable to generate spool for two tables in report output

    Hi,
    I created report with two custom containers displaying two tables in output. When I execute the report in background spool is created only for one table in top custom container.
    What should be done to generate spool for both the tables in two different custom containers.
    Thanks,
    Abhiram.

    Hi,
    Check the bellow link for your requirement.
    <<link removed>>
    Regards,
    Goutam Kolluru.
    Edited by: kishan P on Feb 2, 2012 1:50 PM

  • What are the advantages to using SAP Dynamic Documents?

    Sorry, didn't realize I had this post in the Objects forum. Posting this in ABAP General.
    Posted: Dec 6, 2010 11:58 PM
    Hello,
    Are there any advantages like portability and others to using dynamic documents rather than list programming.
    The SAP provided classes have not been much used by any other SAP delivered programs, and there is less than 10 subclasses. A method CL_DD_DOCUMENT->ADD_STYLE, apparently to add style sheets, has related code commented out. The class CL_DD_STYLE_CLASS, has no methods. And we are with NetWeaver 7.0.
    Is dynamic documents something that got left hanging midway, and probably not going to have further developments?
    Would you suggest proceeding with dynamic documents for reports, would appreciate your input.
    Thank you.
    Posted: Dec 8, 2010 7:45 PM 
    Just in case, if some of you haven't read this thread, would appreciate your replies and suggestions.

    I had moved it to the objects forum because it seemed more object oriented.
    However, if you want it here, I will leave it. I have also removed the other thread.
    Rob

  • Dynamic Documents in ABAP

    Hi,
    I have a doult about Dynamic Documents.
    It seems very good and better than normal reports, and it's not very hard to implement.
    My doult is, whether it's so good, why it's not very very used? does it have some big problem ou limitations?
    Thanks,
    Alexandre Nogueira.

    one limitation which comes to my mind immediately is that you cannot create spool output of the dynamic document.
    Regards
    Raja

  • Exporting Dynamic Document Output to a file

    Hi,
         Is it possible to export the output generated using Dynamic documents to a file other than *.html format? I am now using the method EXPORT_DOCUMENT, but it allows only HTML format. Please help

    hi,
    we can also view output in an excel sheet using BEx analyser.

  • How can we stop generating spools for some batch jobs?

    HI guys,
    Is memory will be occupied in SAP  during spool generation from batch jobs ?
    If yes, to reduce occupied memory, we want to stop generating spools for few batch jobs. Please suggest me the way how we can acheive this.(Step details)
    Please help me.
    Thanks in Advance.
    Regards,
    Sahil

    Stopping the spool generation for background jobs will not help you to reduce the memory load.
    First check what is the total memory utilization and type of processes where the memory is being utilized more.
    EWA can give you better idea to get the above details.
    Spooling concept doesn't eat that much of memory what you are expecting.
    Regards,
    Nick Loy

  • How to run the basic list in background to generate secondary.

    How to run the basic list in background to generate secondary and spool for the secondary.Please note that Basic list will run in foreground.

    Problem solved.

Maybe you are looking for

  • Can't print wireless test report

    Been through the install/deinstall/reinstall process several times.  Trying to connect a Photosmart c4580 to a Netgear router.  Laptops connecting to router OK.   When I try to print a Network test report, it locks up the printer - I have to unplug i

  • BDoc extension

    I have created new fields into the BP transaction using EEWB My next step is ..I have to extend the BDoc. Anyone please tell me in clear steps / code How should I do I them. Also tell me what would be my next steps to move them to R/3.

  • Passwd : command not found

    I have created a whole-root zone on solaris 10 update 3. I installed it and try to create new user to it. However i am unable to create the passwd as passwd commant not found. bash-3.00# useradd -d /export/home/ariffs -m -s /bin/sh -c "Ariffudeen" ar

  • Suggestion for a better launchpad

    Here is my concept of what launchpad in lion should be: - first we need the ability to hold down on an app and when it jiggles, press cmd and click other apps to be able to move multiple apps to a folder. - next, ability to hide apps from within laun

  • How to display their books

    How to display their books in research on iTunes store ? Finally I saw the green light on iTunes connect, I received an email from Apple with the link to download my book, but by searching on iTunes store is not existing.