ABAP reports to ABAP Objects

Hi all,
What are the steps to be taken while converting a normal ABAP report program to ABAP objects? Also, How do we write a module(of a module pool program) in ABAP objects?
Thanks in Advance,
Aswin

Use methods of a class instead of subrouties wherever possible.
Declare the global variables in the attributes section of a class.
Make sure that your design itself is more data centric than process centric.
Regards,
Ravi

Similar Messages

  • Send ABAP Report as an Attachment with Workflow Function Module

    Hi all.
    Hopefully someone ever experienced with this requirements.
    My requirements to send ABAP Report result to user as an attachment. Together with this attachment user need to receive work item/notification. Single workflow task has been defined based on SELFITEM object type to send workflow notification and its attachment.
    Function module for this requirement is SWU_START_WORKFLOW. And this function module provide table parameter ATTACHMENT_LIST.
    My question how to pass this ABAP report result/ ABAP internal table into this ATTACHMENT_LIST?
    Thanks in advance

    check the help on the SUBMIT statement ther are options to write the report to memory or spool.
    Kind regards, Rob Dielemans

  • Interactive reports in abap objects

    Hi,
           plz send me the code of  interactive report using ABAP Objects .
    Thanks,
    T.Sreekanth.

    Hi,
    It will be similar to what you do in normal report.
    Here you may create an object instance and then call some method on the object.
    AT LINE-SELECTION.
    create object obj.
    CALL METHOD obj->method1
    IMPORTING
      text = im_text.
    write: im_text.
    Regards,
    Sesh

  • How to get list of custom objects used in abap report program?

    Hi friends,
    I have a requirement in which I have to scan the entire abap report and retrieve list of custom objects used in it for example custom tables, data elements, structures, table types etc,. Is there any provision in SAP like fuction modules to do this functionality?  As of now I am coding everything manually where so many possibilities are there for all kinds of objects. Provide your answers and suggestions...
    Thanks,
    Nastera

    Hi,
    The best way to do this is environment analysis. Follow the steps:
    1. Open se38, type in the program name (don't click on on display/change or create button, stay on first screen only)
    2. Click on environment analysis button (hot key SHIFT+F4)
    3. It will throw a pop-up, which will ask for type of object you want to see, which are linked /used by this program. select all (or may be if you are only interested in Tables, then select table only)
    4. Hit 'Enter'
    You will get the full list of all objects used in this report program. Just note down the one which starts with Z or Y and that's it.
    Cheers,
    Anid

  • BW authorizations objects in Custom abap report

    Hi,
    we develop a BW custom abap report which we have to roll out to certain end users.
    We would like use our BW authorization design, and need therefore to incorperate these auth. objects into the abap.
    What is the best way to this? Can we use function modules?
    Any help welcome?
    Regards,
    Hans

    Hello Hans,
    please check out the following
    http://help.sap.com/bp_biv235/BI_EN/documentation/Authorization_BW_Proj.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/39f29890-0201-0010-1197-f0ed3a0d279f
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e1cba990-0201-0010-43ae-af579aee7a73
    Hope it helps..
    thanks,

  • Simple report on ABAP OBJECTS

    Hi Experts,
         Can any body send one simple report using abap object....
    Thanks
    kris

    Hi,
    Check this example..
    CLASS MY_CLASS DEFINITION.
    PUBLIC SECTION.
    METHODS: ADDITION IMPORTING IP_1 TYPE INT4
    IP_2 TYPE INT4
    EXPORTING OP_1 TYPE INT4,
    SUBTRACTION IMPORTING IP_1 TYPE INT4
    IP_2 TYPE INT4
    EXPORTING OP_1 TYPE INT4.
    ENDCLASS.
    CLASS MY_CLASS IMPLEMENTATION.
    METHOD ADDITION.
    OP_1 = IP_1 + IP_2.
    ENDMETHOD.
    METHOD SUBTRACTION.
    OP_1 = IP_1 - IP_2.
    ENDMETHOD.
    ENDCLASS.
    START-OF-SELECTION.
    DATA: OBJ TYPE REF TO MY_CLASS.
    CREATE OBJECT OBJ.
    DATA: V_OUTPUT TYPE INT4.
    CALL METHOD OBJ->ADDITION EXPORTING IP_1 = 1
    IP_2 = 3
    IMPORTING OP_1 = V_OUTPUT.
    WRITE: / V_OUTPUT.
    Thanks,
    Naren

  • CALLING BUSINESS OBJECT FROM AN ABAP REPORT

    Hi friends,
               I have a business object to which a Custom Function Module is assigned in one of its method.This Function Module calls a Bapi to update a Service Order.I need to capture the status of Idocs regarding success or failure from the function Module in the ABAP Report.I would like to know if there is any way to call this business object from my report and get the status of IDOC.
    Regards,
    Dev Reddy

    sorry I think i was not clear in explaining .I am calling a BAPI to update 'Priority' field of service orders in a custom function module(remote enabled) and I have assigned this bapi to a custom business object. Also I have developed an ALE interface thru BDBG transaction which automatically generates custom basic idoc type,messsage type ,Ale i/b and o/b function modules.
    Actually my requirement deals with a report where we have list of service orders in an internal table and pass each service order to update Priority field.
    Is there any way to create an IDOC from the report and update the priority field and pass back the status of IDOC.
    I have tried calling ALE O/B function function module generated thru BDBG transaction in my report but as a result i am unable to get any of the message whether idoc is created or not.
    Here is my report code.
    data: it_methods type table of BAPI_ALM_ORDER_METHOD with header line,
          it_header type table of BAPI_ALM_ORDER_HEADERS_I with header line,
          it_header_up type table of BAPI_ALM_ORDER_HEADERS_UP with header line,
          RECEIVERS TYPE TABLE OF BDI_LOGSYS WITH HEADER LINE.
    T_METHODS-REFNUMBER = '000001'.
    IT_METHODS-OBJECTTYPE = 'HEADER'.
    IT_METHODS-METHOD = 'CHANGE'.
    IT_METHODS-OBJECTKEY = '000004000768'.
    APPEND IT_METHODS.
    CLEAR IT_METHODS.
    IT_METHODS-REFNUMBER = '000000'.
    IT_METHODS-METHOD = 'SAVE'.
    APPEND IT_METHODS.
    IT_HEADER-ORDERID = '000004000768'.
    IT_HEADER-PRIORITY = '2'.
    APPEND IT_HEADER.
    IT_HEADER_UP-ORDERID = '000004000768'.
    IT_HEADER_UP-PRIORITY = 'X'.
    APPEND IT_HEADER_UP.
    CALL FUNCTION 'ZZ_FM_SM_ORD_PRIOR_UPDATE'
    EXPORTING
       OBJ_TYPE                      = 'ZBOSMPRUPD'
       SERIAL_ID                     = '0'
      TABLES
        ITMETHODS                     = IT_METHODS
        ITHEADER                      = IT_HEADER
        ITHEADERUP                    = IT_HEADER_UP
        RECEIVERS                     = RECEIVERS
      COMMUNICATION_DOCUMENTS       =
      APPLICATION_OBJECTS           =
    EXCEPTIONS
       ERROR_CREATING_IDOCS          = 1
       OTHERS                        = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Thanks,
    Dev Reddy

  • SAP ERP 2005 SR 2 IDES installation error in step "Run ABAP Reports"

    Hello,
    I'm installing SAP ERP 2005 SR 2 IDES on Win2003 R2 SP2 and Oracle 10.2 to create a test-system for my diploma thesis.
    During the step "Import ABAP" I got the following message:
    object_checker.log
    ERROR: 2008-05-21 20:50:38
    1 objects have error/ignore/execute or unknown status in the task lines.
    Invalid objects are saved in 'invalid_objects.txt' file.
    invalid_objects.txt
    package   object  type  action  status
    SAPDFACT  ?N      pkey  create
    but the installation went on until "Run ABAP Reports".
    Warnings and Errors in sapinst.log are:
    WARNING 2008-05-27 15:09:36
    Execution of the command "C:\usr\sap\IMP\SYS\exe\uc\NTI386\stopsap.exe name=IMP nr=00 SAPDIAHOST=imperia-sap" finished with return code -1. Output:
    STOPSAP: execution of C:\usr\sap\IMP\SYS\exe\uc\NTI386\sapntwaitforhalt.exe name=IMP nr=00 SAPDIAHOST=imperia-sap 3600 failed
    Details are written to C:\Programme\sapinst_instdir\ERP\SYSTEM\ORA\CENTRAL\AS\stopsap.log
    WARNING 2008-05-27 15:09:36
    Could not stop instance 'DVEBMGS00' of SAP system IMP.
    WARNING 2008-05-27 15:09:38
    Connect to message server (imperia-sap/3900) failed: NIECONN_REFUSED.
    WARNING[E] 2008-05-27 15:12:05
    FSL-06002  Error 1060 (Der angegebene Dienst ist kein installierter Dienst.) in execution of a 'OpenService' function, line (266), with parameter (sapccmsr.00).
    WARNING[E] 2008-05-27 15:21:42
    FRF-00007  Unable to open RFC connection.
    ERROR 2008-05-27 16:30:15
    FRF-00025  Unable to call function. Error message: connection closed without message (CM_NO_DATA_RECEIVED) .
    INFO 2008-05-27 16:30:19
    RFC connection closed.
    ERROR 2008-05-27 16:30:45
    MUT-03025  Caught ERfcExcept in Modulecall: connection closed without message (CM_NO_DATA_RECEIVED).
    ERROR 2008-05-27 16:30:47
    FCO-00011  The step runRADDBDIF with step key |NW_Onehost|ind|ind|ind|ind|0|0|NW_Onehost_System|ind|ind|ind|ind|1|0|NW_CI_Instance|ind|ind|ind|ind|11|0|NW_CI_Instance_ABAP_Reports|ind|ind|ind|ind|2|0|runRADDBDIF was executed with status ERROR .
    Full log of today is available at [http://pastebin.com/f43531f97]
    Has anyone an idea how I can finish this installation?
    Thx
    Daniele

    It seems that the system did not come up and thus the RFC call fails.
    What´s the output of
    dev_w0
    dev_disp
    (in the ...work directory)?
    Markus

  • How can I print PDF attachments from ABAP report in transaction ME23N?

    Hi,
    Users attach PDF files using "services for objects" in transaction ME23N.
    How can I print the PDF attachments from ABAP report ?
    Thanks in advance,,

    Hi,
      check this link,this might help you to solve your problem
    /people/thomas.jung3/blog/2005/04/28/setting-up-an-adobe-writer-for-abap-output
    Regards
    Kiran Sure

  • How to open a Promotion from an ABAP report/program?

    Hello SDN,
    I have a normal ABAP report and would like to open a specific promotion (markteing project) after a PAI event.
    I know it is the OBJTYPE=BUS2010030 (the businesspartner is objtype BUS1006), but how can I open it?
    Regards from Germany,
    Friederike

    The solution:
    DATA: lt_time   TYPE crmt_mktpl_cldr_time_ranges,
          lo_tpm    TYPE REF TO cl_crm_mktpl_cldr_data,
         prom_guid TYPE cgpl_guid16.
      CREATE OBJECT lo_tpm
      EXPORTING
        im_add_periods = lt_time.
    Jump to the Marketing Planner
      CALL METHOD lo_tpm->navigate_to_object
        EXPORTING
          im_data_object = promotion_guid.

  • How to port a ABAP report into ITS? Please help!

    Hi Experts,
              I have a ABAP report that contains a selection screen with 3 select-option elements and a search button. On pressing search button an ALV grid opens with data from a SAP table based on selection screen criteria.
    I want to web enable it so that it can be accessed from Enterprise Portal. i will be using IAC iview in Portal.
    Now the IAC iview needs my ABAP report to be ported to ITS?
    1.How to port it to ITS? What are the steps?
    2.In order to port in to ITS do I need to change my ABAP code?
    3.Are there any known limitations of porting ABAP reports in ITS? For example Performance, ALV not supported, Table control not supported etc.
    4. Does it handle dynamic programming?
    5. Are there any documentation for porting report to ITS?
    6. How much time effort it will be for porting ABAP reportys to ITS?
    To add some more points. SAP transaction iview is not allowed in my organization. Webdynpro/BSP is also not supported. Thats why I am using IAC iview which needs ITS.
    Please help
    Thanks
    Gopal
    Message was edited by: gopalkrishna baliga

    hi,
      step1.create a transaction for ABAPreport in SE93.
      step2.Go to transaction SICF and create a service in the following path sap/bc/gui/sap/its.
    Check the following Url to create a service.
    /people/durairaj.athavanraja/blog/2005/08/21/running-your-first-its-webgui-application-in-sap-netweaver-04-abap-edition--nsp
      step3. create a system object setting the following property categories.
       1.Connector
       2.Usermanagement
       3.ITS
       4.WAS
    In the usermanagement do the user mapping.
    step4. While creating  an IAC iview, in the third step for the <b>Internet Application Component (IAC)</b> property give the service name you have created in SICF.
    you need not change the abap code. The only limitation while porting abap report in ITS is you cannot view the icons in the tool bar, instead you view the buttons.
    ALV is supported. Functionality wise nothing will change except the appearance mainly with the icons.
    Regards,
    Gopi

  • Want to have own selection screen  in HR-ABAP report using LDB

    Hi experts,
            I am working on HR-ABAP report using LDB pnp and infotypes..But, here we get the built in selection criterion..but I want my own selection screen to be displayed..whats the solution for this??? Is it possible to create my own selection screen instead of default one..and how???
    Please help me..its very urgent..

    Hi,
    chk this out:
    Create Report Categories                                                                               
    In this step, you define the report categories and determine the layout
       of the standard selection screen for these report categories. You can 
       create report categories for programs or queries that are based on the
       PNP or PNPCE logical databases.                                                                               
    The definition of report categories is divided into two sections:                                                                               
    o   In the Change Report Category view, you define general attributes 
           such as sort order, input fields for date, and so on.                                                                               
    o   In the Change Selection Criteria view, you define which selection 
           fields of the logical database should be avaliable on the selection
           screen.                                                                               
    Example                                                                               
    You want to set up your system so that your employees can only start  
       evaluation reports for Payroll if they use a payroll area. Within a   
       payroll area, you should be able to select according to personnel     
       number. Additional selection criteria should not be possible and you  
       should not be allowed to enter a sort sequence.                       
    Standard settings                                                                               
    The standard system already contains report categories. You can find the 
    attributes of the report categories in the table.                                                                               
    Note the following five report categories in particular:                                                                               
    o   Report category ' ' is the SAP default report category for     
        programs that are based on the PNP logical database.                                                                               
    o   Report category PNPCE is the SAP default category for programs that  
        are based on the PNPCE logical database.                                                                               
    o   Report category '00000000' is the customer-specific default category 
        for programs that are based on the PNP logical database.                                                                               
    o   Report category '0PNPCE' is the customer-specific default category   
        for programs that are based on the PNPCE logical database.                                                                               
    o   Report category __X2001 is the default category for Queries  that    
        are based on an InfoSet of the PNP LDB.                                                                               
    o   Report category QUEPNPCE is the default category for queries that    
        are based on an InfoSet of the PNPCE LDB.                                                                               
    The default report categories are used when a report is called if    
        the report has not been assigned a report category.                  
    Parameters and Options for Report Categories of the LDB PNP and PNPCE  
    Parameters and Options in Screen Area General Data                     
       If you activate this parameter, you can only enter data on the data
       selection period if you use reports that have been assigned. The   
       same date entries are then used for the person selection as for the
       date selection.                                                                               
    o   Matchcode allowed                                                  
       If you activate this parameter, you have use of a Matchcode        
       pushbutton (search help) if you use reports that have been assigned.
       This pushbutton enables you to perform the person selection.                                                                               
    o   Sort allowed                                                       
       If you activate this parameter, you have use of a Sort pushbutton if
       you use report that have been assigned. This pushbutton enables you
       to define a sort order before you execute the report.                                                                               
    o   Organizational structure allowed                                   
       If you activate this parameter, you have use of an Org.Structure   
       pushbutton if you use reports that have been assigned. This        
       pushbutton enables you to perform the person selection.            
       Note:                                                              
       For more information about these options, see the online           
       documentation under this path:                                     
       SAP Library -> Human Resources -> Reporting in Human Resources     
       Management -> Standard HR Reports -> Report Selection Screen in    
       Human Resources Management.                                                                               
    Parameters and Options in Screen Areas Data Selection Period/Person    
    Selection Period/Payroll Area/Period/Year                                                                               
    o   Options for data selection period and person selection period (key 
        date and so on)                                                    
        Here you define which options for date and person selection are    
        available for reports that have been assigned.                                                                               
    o   Options for payroll area/period/year                               
        Here you define which options for selection using payroll          
        area/period/year are available for reports that have been assigned.                                                                               
    Parameters and Options in Screen Area Selection View                                                                               
    o   Type/Name                                                          
        This parameter enables you to use selection views to define report 
        categories. You use the selection view selected here to determine  
        which fields are available in the Dynamic Selectionsy.                                                                               
    Note:                                                              
        You create selection views for the PNP and PNPCE logical databases 
        in the Object Navigator (SE80):                                    
        1. Start the Object Navigator (SE80)                               
        2. Choose Workbench -> Edit Object.                                
        3. Choose the More... tab page and the Selection view on this tab  
        page.                                                              
        4. Choose Create.                                                  
        5. In the Create Selection View dialog box, choose the For any     
        tables option.                                                     
        6. In the Name of view field, enter a name for your selection view.
        7. In the Tables dialog box, enter the name of the table from which
        you want to use fields.                                            
        Note:                                                              
        When you enter the table name, observe the naming convention in    
        Personnel Administration:                                          
        Infotype number: nnnn -> table name: PAnnnn                        
        8. Choose Continue.                                                
        9. In the Functional groups area, define functional groups by      
        assigning a name and a number.                                     
        10. Assign fields from the selected tables to the functional groups
        by entering the number of the desired functional group in front of 
        each field.                                                        
        11. Save your entries.                                                                               
    For more information about adjusting the dynamic selections using 
    your own selection views, see the online documentation under the  
    following menu path:                                              
    SAP Library -> Human Resources -> Reporting in Human Resources    
    Management -> HR Standard Reports -> Report Selection Screen in   
    Human Resources Management -> Enhancing the Selection Screen -    
    Dynamic Selections.                                                                               
    If you do not want to offer dynamic selections, make the following
    settings:                                                                               
    -   LDB PNP: In the Selection view field, enter PNP_NO_FREE_SEL.  
    -   LDB PNPCE: Leave the Selection view field empty.                                                                               
    Parameters and Options in Screen Area Data Selection Period/Person   
    Selection Period/Payroll Area/Period/Year                                                                               
    o   Available input parameters, date or period entry (today, key date,
       all, and so on), and standard value.                             
       Using the Standard value option, you define which of the selected
       options is shown.                                                                               
    Parameters and Options in Screen Area CE Selection Fields                                                                               
    o   CE selection fields (external person ID, grouping reason, grouping
       value)                                                           
       Using the options in this area, you define whether the external  
       person Id, grouping reason, or grouping value are available on the
       selection screen.                                                
       Note:                                                            
       These parameters are only relevant for you if you implement      
       Concurrent Employment (see also note 517071).                                                                               
    Parameters and Options in Screen Area Selection view                                                                               
    o   Dynamic selections as dialog box                                  
        If this switch is set, you can call the dynamic selections as a   
        dialog box.                                                                               
    o   Dynamic selections active                                         
        If this switch is set, the dynamic selections of the logical      
        database are active at the start of the report.                                                                               
    Note that the following combinations are possible for the last two
        options mentioned:                                                                               
    Dyn.Sel. as dialog box/Dyn.Sel. active: inactive/inactive         
        Dyn.Sel. as dialog box/Dyn.Sel. active: inactive/active           
        Dyn.Sel. as dialog box/Dyn.Sel. active: active/inactive                                                                               
    Activities                                                                               
    1.  Choose Edit -> New entries.                                                                               
    2.  Enter an abbreviation and a long text for the report category.         
        The customer name range for report categories is 0-9.                                                                               
    3.  Select the For the PNPCE logical database checkbox, if you want to     
        create a report category for a program or for queries of the PNPCE     
        logical database.                                                                               
    4.  In the General Data screen area, choose the desired options.           
        If you want to use selection IDs, you must have first created and      
        grouped selection Ids. The IMG path to do this is given in the         
        parameter description section.                                                                               
    5.  In the Data selection period/person selection period or Selection      
        period screen area, choose the desired options.                                                                               
    6.  In the Selection view screen area, choose the desired options.                                                                               
    7.  In the CE selection fields screen area, choose the desired (only       
        possible for report categories of the LDB PNPCE).                                                                               
    8.  Save your entries.                                                                               
    9.  Choose the subactivity Permitted selection criteria.                                                                               
    10. Choose Edit -> New entries.                                                                               
    11. In the Select option field, use the input help to select each field    
        that should be available on the selection screen.                                                                               
    12. Select the checkbox in the 1.page column, if you want this selection   
        field to be available directly when you call the selection screen.                                                                               
    Further notes                                                                               
    13. If you want to copy entries, you still have to enter the selection     
        parameters again in the subsequent screen.                                                                               
    o   If you create the report category '000000000', a selection screen is   
        generated according to report category '00000000'for all reports for   
        which a report category has not explicitly been assigned.                                                                               
    Assign Report Categories                                                                               
    In this step, you assign a report category to your reports.                                                                               
    Example                                                                               
    You have created your own report, for example ZPCTEST1, and would like
        it to have the selection screen that corresponds to that of the       
        evaluation report for Payroll, which is assigned to report category   
        '__M00001'.                                                           
        Assign report category '__M00001' to the report.                                                                               
    Requirements                                                                               
    You must have defined the Report Categories.                                                                               
    Standard settings                                                                               
    SAP Standard Reports:                                                                               
    In the standard system, reports are assigned a report category. If you
        want to override these assignments, perform the activities described  
        here. If you want to assign report categories to standard reports using
        SE38, this represents a modification.                                                                               
    Customer-Specific Reports:                                                                               
    For reports you have developed yourself, you can either assign report 
        categories by performing the activities described here or directly in SE38.
    Recommendation                                                                               
    Only assign a report category if you have created your own reports or if  
    the selection screens in the standard system do not meet your             
    requirements.                                                                               
    Activities                                                                               
    1.  Choose Edit -> New entries.                                                                               
    2.  Perform the required assignment using the Program name and Report     
       category fields.                                                                               
    3.  Save your entries.                   
    reward if helpful
    regards,
    madhumitha

  • How to write ABAP HR reports in ABAP web dynapro

    Hi All,
    How  to write ABAP HR reports in ABAP web dynapro? We can add HR REPORT CATEGORY in ABAP HR using logical database like PNP.How to add HR REPORT CATEGORY in ABAP Webdynapro ?
    Thanks.

    You can't use legacy concepts like logical databases directly in Web Dynpro ABAP.  Even if you could do so, you shouldn't.  Web Dynpro ABAP should always follow MVC - meaning that your business logic (the model) should be separated from WD as much as possible. This means calling function modules or class methods to consume the business logic and data.  So in general there should be no difference between building HR reports or any other type of report in WDA - since from the WDA side you are calling other objects to consume the data. 
    This probably does mean that you will need to create classes to expose the HR data that you want in your WDA.

  • HEADER in ABAP report  ....

    Hi all,
        Pls help me. How can change font size when we write report in ABAP program (screen 1000).

    HI,
    First you have to create a document object:
    Try this code:
    data:     gref_doc   type ref to cl_dd_document.          " Dokument
    data:     gref_txc   type ref to cl_gui_custom_container. " Container
    data:     lt_text      type standard table of aab_var_descript,
                lv_repid     type sy-repid,
                lv_bcol      type i,
                lref_form    type ref to cl_dd_form_area.
          lv_repid = sy-repid.
          create object gref_txc
                 exporting
                    container_name        = gc_cntrl " Name of the Custom Contzrol in Dynpro
                    repid                        = lv_repid  " Report Name
                    dynnr                       = gc_dyn001 " Dynpro Number
                 exceptions
                    cntl_error                  = 1
                    cntl_system_error           = 2
                    create_error                = 3
                    lifetime_error              = 4
                    lifetime_dynpro_dynpro_link = 5
                    others                      = 6.
          if sy-subrc ne 0.
             message 'ERROR CONTAINER INIT!'     type 'A'.
          endif.
    *:--- Dokument an sich initialisieren. Farbe dunkel / hell
    *:--- cl_dd_area=>col_background_level1 / 2
          lv_bcol = p_backg.  " '1'
          gref_doc->initialize_document(
                    exporting
                      background_color = lv_bcol ).
           if not ( gref_doc is bound ) .
             message 'Fehler beim DOKUNEBT-Init' type 'A'.
          endif.
    *:--- Den Ausgabebereich FORM initialisieren
          gref_doc->add_form(
               importing
                  formarea = lref_form ).
          if not ( lref_form is bound ) .
             message 'Fehler beim FORM-Init'     type 'A'.
          endif.
          lref_form->add_text(
               exporting
                 text          = p_text  " 'Any Text"
               sap_style     = cl_dd_area=>heading
                 sap_color     = cl_dd_area=>list_positive
                 sap_fontsize  = cl_dd_area=>large
                 sap_fontstyle = cl_dd_area=>serif
                 sap_emphasis  = cl_dd_area=>strong
               style_class   = cl_dd_area=>heading
          lref_form->add_text(
               exporting
                 text          = p_text " ANY TEXT "
                sap_style     = cl_dd_area=>heading ).
    *:--- 2 Leerzeilen drucken
          cref_form->new_line(
               exporting
                 repeat = 2 ).
    Hope this will help you
    BR
    Michael

  • Add Image in ABAP Report

    Hi All,
    I want add image in ABAP Report.
    Please let me know how it can be done?
    Regards,
    Jagdish More

    Hi Jagdish,
    to upload the image follow these steps.
    1. Upload image in web repository.
    Go to Transaction SMW0 to upload the image in SAP web Repository. elect second radiobutton u201DBinary data for WebRFC applicationsu201D and click on find.
    2.     Click on Execute.
    3.     Click on Create and give the obj.name and description and click on import.
    once the image gets uploaded.in your program do the following
    1.     Create a Screen.Go to Layout and create Custom Control.I have named it as u2018CONTAINERu2019.
    2.     Declare container(Custom Control name),picture(child of Container) and url in Top of the program.
    data container type ref to cl_gui_custom_container.
    data picture type ref to cl_gui_picture.
    data url(256).
    3.     Now create the object Container and Picture.
    create object container
           exporting container_name = 'CONTAINER'.//name of the custom control
        create object picture
           exporting  parent = container
           exceptions error = 1.
    4.     Now we have to load the picture from the database which we have uploaded. For this we need to declare the following:-
      data query_table like w3query occurs 1 with header line.
      data html_table like w3html occurs 1.
      data return_code like  w3param-ret_code.
      data content_type like  w3param-cont_type.
      data content_length like  w3param-cont_len.
      data pic_data like w3mime occurs 0.
      data pic_size type i.
    5.     Refresh the Query table and give the name of Query table as u2018_OBJECT_ID_u2019 and value as the name of logo/Image which u have uploaded.Append the value in the Query Table.
      refresh query_table.
      query_table-name = '_OBJECT_ID'.
      query_table-value = 'ZLOGO.GIF'."name of logo
      append query_table.
    6.     Now call the function WWW_GET_MIME_OBJECT to get the logo/image which u have uploaded and call the function DP_CREATE_URL to create the url where the image is present.
    call function 'WWW_GET_MIME_OBJECT'
        tables
          query_string        = query_table
          html                = html_table
          mime                = pic_data
        changing
          return_code         = return_code
          content_type        = content_type
          content_length      = content_length
        exceptions
          object_not_found    = 1
          parameter_not_found = 2
          others              = 3.
      if sy-subrc = 0.
        pic_size = content_length.
      endif.
      call function 'DP_CREATE_URL'
        exporting
          type     = 'image'
          subtype  = cndp_sap_tab_unknown
          size     = pic_size
          lifetime = cndp_lifetime_transaction
        tables
          data     = pic_data
        changing
          url      = url
        exceptions
          others   = 1.
    7.     Finally we have to upload the image from the URL, this can be done by calling the method: picture->load_picture_from_url
    call method picture->load_picture_from_url
    exporting
    url = url.
    Now Save,Activate and Execute the Program , Image/Logo got successfully uploaded.
    I have already done this program and uploaded the image...
    this will surely help you
    Thanks and regards,
    Tanmaya

Maybe you are looking for