Forcing an error on ABAP program (SE38)

Hi all,
i'm creating an ABAP program on SE38 and i'm going to use it on a process chain.
I need that under certain condition the program return error so the process gets red and the chain don't continue.
How do i generate the error on the program ?
thx in advance

Hi Juan,
you use the "MESSAGE" statement to give out any kind of messages (error, warning or information). I think you need to have a custom message class and a custom message in the class. Please look into SAP help for syntax and usage.
Thanks and Regards
Subray Hegde

Similar Messages

  • How to avoid time out error in abap program

    How to avoid time out error in abap program
    based on performance wise i want please help

    Timeout occurs when a statement exceeds its time limit.To avoid this we need to tune the statements.
    I can give give you few tips for tune a select stament.
    1.The order of the feilds in the select statement should be same as the order of fields in the database table.
    2.It is always advisible to use the key fields when you are using the where clause.
    3. Sort the internal table while using the for all entreis statements.
    4.Use index in where clause if necessary.
    5.When you have a read statement user binary search but before this a sort statement should be there.
    6. Check your program with the Tcode ST05 and check which statement takes much time based on that tune that.

  • Error in ABAP program CL_UC_VERSIONS_FACTORY, no UCMON/UCWB

    Hi guys,
    I was changing the data stream in UCWB, but when I quit I did NOT save my changes because I was not sure if they will be ok.
    Now I am not able to enter UCWB or UCMON anymore.  I have looked this error in google, toolbox for IT, OSS Notes with no success.  This error appears:
    Runtime Errors         DATREF_NOT_ASSIGNED  
    Short text                                              
         No access possible via the 'NULL' data reference      
    What happened?  
      Error in the ABAP Application Program                                                                               
    The current ABAP program "CL_UC_VERSIONS_FACTORY========CP" had to be
      terminated because it has                                          
    come across a statement that unfortunately cannot be executed.
    Error analysis                                                         
        There was an attempt to access a data object via a 'NULL' data     
        reference (points to 'nothing').                                   
        A data reference must point to data object before it can be used to
        access the referenced data object.                                 
        The reference was either never set or it was set to 'NULL' using the
        CLEAR statement.                                                   
    Trigger Location of Runtime Error                                                       
        Program                                 CL_UC_VERSIONS_FACTORY========CP            
        Include                                 CL_UC_VERSIONS_FACTORY========CM007         
        Row                                     254                                         
        Module type                             (METHOD)                                    
        Module Name                             VRS_SET_AREA                                
    Any help will be greatly appreciated,
    David Guerra

    Hi,
    It looks to me as a typical picture of data basis and/ or ConsArea inconsistency. Try to regenerate them.
    For access to the DB and ConsArea screen you may use UCWB01 and UCWB02 t-codes.

  • Runtime Errors         ITAB_DUPLICATE_KEY ABAP Program           CL_BSP_WD_REPOSITORY==========CP

    We are doing the CRM Upgrade from EHp1 to EHp3
    after running the TC: WCF_CC as post upgrade activity
    Enhancement Set      ZXXX  and UI Component BP_ADDR  i got a short dump while trying to open the views in the component workbench as following
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "CL_BSP_WD_REPOSITORY==========CP" had to be
         terminated because it has    come across a statement that unfortunately cannot be executed.
    Error analysis
        An attempt was made to insert an entry into table
         "\CLASS=CL_BSP_WD_REPOSITORY\METHOD=CREATE_INSTANCE_FROM_XML\DATA=LT_VIEWS".
         Updating
        unique table key "PRIMARY_KEY" resulted in a duplicate entry however. The key
         in
        question could be either the primary key or a secondary key.
        The key components of the duplicate entry have the values "{BP_A;X}" " " " "
        With primary keys, termination can occur during block insert
        operations. The can affect numerious statements, for example
        (1) MOVE
        (2) INSERT/APPEND ... LINES OF ... INTO/TO
        (3) SELECT ... INTO/APPENDING ...
        With secondary keys, termination can also occur due to a single record
        insert operation. In particular, the following modifying statements can
        cause the system to terminate due to duplicate key values as soon as
        the key is used again (delayed update):
     Please advice me how to solve it

    Hello Madhuri,
    Can you please deactivate your enhancement via setting user parameter WCF_IGNORE_ENHANCEMT =A using transaction code SU3? Then retest the issue? If it's works, then the error is happening due to your enhancement.
    If the error persist please check if note 1941320 can be applied in your system.
    thanks
    Willie

  • Error:Dataflows abap program

    Hi,
    Dataservices 4.2
    Sql server 2008
    SAP (4.6
    I make a migration of dataservices 11.5 towards 4.2 on new waiter.
    when I try to execute my dataflow abap, I have this message  error :
    error:"RFC Call Receive error<Function/BODS/ABAP_RUB:RFC_ABAP_EXCEPTION( PROGRAM_DOES_NOT_EXIT)aucun numéro de pager n'est généré pour cette adresse
    I have make install on the Server SAP 2 functions ( K900187.R22 and R900187.R22) which allowed me to import my SAP tables on the datastore and
    reading the data.
    I use "execute preloaded " option for execute my dataflows
    since migration the dataflows abap do not function any more
    it would have installations or configuration has to make on the Server SAP
    Somebody  has an idea
    Thanks you

    Dear Marie,
    You will have to have to import the new ABAP Program group "BODS/BOS" which you can find in the local install folder...
    Here are some details:
    Installing Functions on the SAP Server
    SAP BusinessObjects Data Services provides functions that support the use of the ABAP, BAPI, and
    IDoc interfaces on SAP servers. You will need some or all of these functions in the normal operation
    of the software in an SAP environment. These functions perform such operations as dynamically loading
    and executing ABAP programs from Data Services, efficiently running preloaded ABAP programs,
    allowing for seamless metadata browsing and importing from SAP servers, and reporting the status of
    running jobs. Some of these functions read data from SAP NetWeaver BW sources.
    You must upload the provided functions to your SAP server in a production environment. It is
    recommended that you always upload the functions to your SAP server whether you are in a
    development, test, or production environment. The functions provide seamless integration between
    Data Services and SAP servers.
    The default installation places two function module files for SAP servers in the ...\Data
    Services\Admin\R3_Functions\transport directory. You then upload these files to SAP servers
    using the SAP Correction and Transport System (CTS) or manually. Using CTS allows for version
    control as the functions evolve across releases.
    The installation provides two versions of transport files (depending on the server version you are using)
    to install the functions on the SAP server. To obtain the names of the latest transport files for installing
    or upgrading these SAP server functions, see the readme.txt file
    And I've found those files and text files in the local install folder....in:
    Program Files\SAP BusinessObjects\Data Services\admin\R3_Functions
    (that's where I've installed it).
    There you'll find some descriptive txt as how to proceed.
    After installing, it might happen that the executing user is missing some authorizations.
    Here my authorizations team helped me by tracing the user and then adding the necessary rights.
    Sure hope this will help you.
    Notes to check:
    see SAP Note 1919255
    Note 1916294

  • ABAP program(SE38) documentation

    Dear all,
    I've save/create the abap program documentation via SE38, radiobutton "Documentation".
    Right now, i need to know where does the text being stored. I did try on the STXH (FM READ_TEXT) but not success.
    Please comment.
    Thanks in advance.

    Hi,
    You can use the FM: 'RS_TOOL_ACCESS' to call the documentation in your program.
    If you really want to know where the doc. is  stored, you can use ST05 to find it out yourself!
    Here is a helpful sample of this FM.
    call function ''RS_TOOL_ACCESS'
    exporting
    OPERATION                 =      'DOCS'
    OBJECT_NAME            =         'ZHCHTEST'
    OBJECT_TYPE             =        'PROG'
    Try it yourself!
    Best regards!
    David Hu

  • Error in ABAP Program

    hi ,
    I am a basis person and very new to ABAP.
    Pls let me know the error in the folllowing program
    REPORT  Z_ROLES.
    data : count type i.
    data : begin of it_role occurs 0,
                agr_name type AGR_NAME,
           end of it_role.
           data : begin of obj_table occurs 0,
                objct type XUOBJECT,
           end of obj_table.
    select OBJCT from TOBJ into table obj_table
      where OCLSS IN ('RS','RSR', 'RSBC').
      clear count.
      loop at obj_table.
    add 1 to count.
    endloop.
    select AGR_NAME from AGR_1250
    into   table it_role
    for all entries in obj_table
      where OBJECT = obj_table.objct
         AND
    AGR_NAME LIKE 'Z%'.
    clear count.
    loop at it_role.
    add 1 to count.
    endloop.
    write : count.

    Hi,
    I've boldened the mistakes, plz make the changes accordingly,
    REPORT Z_ROLES.
    data : count type i.
    data : begin of it_role occurs 0,
    agr_name type AGR_NAME,
    end of it_role.
    data : begin of obj_table occurs 0,
    objct type XUOBJECT,
    end of obj_table.
    select OBJCT from TOBJ into table obj_table
    where OCLSS IN ('RS','RSR', 'RSBC').
    clear count.
    loop at obj_table.
    add 1 to count.
    endloop.
    select AGR_NAME from AGR_1250
    into table it_role
    for all entries in obj_table
    where OBJECT = <b>obj_table-objct</b>
    AND
    AGR_NAME LIKE 'Z%'.
    clear count.
    loop at it_role.
    add 1 to count.
    endloop.
    write : count.
    <b>Reward points if this helps,</b>
    Kiran

  • Syntatical error in ABAP program

    Hi,
    I have a table called ZEX1_DEPT. Now I am trying to design a screen and written the follwoing program to insert data in the table ZEX1_DEPT. The structure of the table ZEX1_DEPT is DEPTNO NUMC, DEPTNAME CHAR.
    REPORT  Y_INSERT_INTO_DEPT_TABLE.
    TABLES  ZEX1_DEPT.
    DATA: ok_code TYPE sy-ucomm,
          save_ok LIKE ok_code,
          v_dept_no TYPE n,
          v_dept_name TYPE c,
          v_dept TYPE ZEX1_DEPT.
    CALL SCREEN 100.
    MODULE init_screen_0100 OUTPUT.
      CLEAR v_dept_no.
      CLEAR v_dept_name.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'BUTTON_EXIT'.
          LEAVE PROGRAM.
        WHEN 'BUTTON_INSERT'.
          v_dept.deptno = v_dept_no.
          v_dept.deptname = v_dept_name.
          INSERT INTO ZEX1_DEPT VALUES v_dept.
      ENDCASE.
    ENDMODULE.
    But I am getting the following error during chek syntax.
    Program Y_INSERT_INTO_DEPT_TABLE     33     @0A\QError@
    Statement "V_DEPT" is not defined. Check your spelling. spelling.          
    spelling. spelling.          
    Can you please tell me why I am getting the error and how can I get rid of it.
    Regards,
    Koushik

    Hi,
    Try like below
    MODULE user_command_0100 INPUT.
    save_ok = ok_code.
    CLEAR ok_code.
    CASE save_ok.
    WHEN 'BUTTON_EXIT'.
    LEAVE PROGRAM.
    WHEN 'BUTTON_INSERT'.
    v_dept-deptno = v_dept_no.
    v_dept-deptname = v_dept_name.
    INSERT INTO ZEX1_DEPT VALUES v_dept.
    ENDCASE.
    ENDMODULE.
    Instaed of (v_dept.deptno) write (v_dept-deptno)
    In all case when you are assigning values to structure.
    Regards,
    Sujit

  • Error IN ABAP PROGRAM AT PRINT PREVIEW

    Dear All experts.
    i got an error at gone to print preview of sales order delivery ALV reports. it gives an error follwing.
    GETWA_NOT_ASSIGNED.
    FIELD SYMBOL HAS BEEN NOT ASSIGNED.
    BHAVESH PANCHAL

    Dear Expert.
    thnks for reply.
    Just check my code. Also check my output.
    thnks
    *& Report  Z_SALES_EXP_BHAVESH
    REPORT  Z_SALES_EXP_BHAVESH.
    TYPE-POOLS:slis.
    TABLES
    TABLES: vbep,
            vbap,
            vbpa,
            vbkd,
            vbak,
            likp,
            lips,
            vbup,
            vbbe,
            konv,
            kna1.
    DATA :BEGIN OF itab OCCURS 0,
    vbeln LIKE vbak-vbeln,
    posnr LIKE vbap-posnr,
    edatu LIKE vbep-edatu,
    knumv LIKE vbak-knumv,
    wmeng LIKE vbep-wmeng,
    bmeng LIKE vbep-bmeng,
    lfimg LIKE lips-lfimg,
    omeng LIKE vbbe-omeng,
    posar LIKE vbap-posar,
    netwr LIKE vbap-netwr,
    ntgew LIKE vbap-ntgew,
    kbetr LIKE konv-kbetr,
    kwert LIKE konv-kwert, " CONDITION VALUE.
    kunnr LIKE vbak-kunnr,
    name1 LIKE kna1-name1,
    *BRGEW LIKE VBAP-BRGEW,
    bstkd LIKE vbkd-bstkd,
    bstdk LIKE vbkd-bstdk,
    lfsta LIKE vbup-lfsta,
    *KNUMV LIKE VBAK-KNUMV,
    *posnr LIKE LIPS-POSNR,
    *NETWR LIKE VBAK-NETWR,
    brgew LIKE vbap-brgew,
    LFMNG like vbap-LFMNG,
    lfdat LIKE likp-lfdat,
    *NTGEW LIKE LIKP-NTGEW,
    delivery LIKE lips-vbeln,
    *LFIMG LIKE LIPS-LFIMG,
    KWMENG like VBAP-KWMENG,
    op_qty like VBAP-KWMENG,
    weight LIKE vbap-ntgew,
    pending_val LIKE vbap-netwr,
    END OF itab.
    *variable for Report ID
    DATA: v_repid LIKE sy-repid .
    *declaration for fieldcatalog
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
    wa_fieldcat TYPE slis_fieldcat_alv.
    DATA: it_listheader TYPE slis_t_listheader.
    declartion for layout
    DATA: alv_layout TYPE slis_layout_alv.
    *Title displayed when the alv list is displayed
    *DATA: i_title_main TYPE lvc_title VALUE 'FIRST LIST DISPLAYED'.
    DATA: i_title_main TYPE lvc_title VALUE 'Reports : Bhavesh Panchal'.
    DATA : it_vbak TYPE vbak OCCURS 0 WITH HEADER LINE,
           it_vbap TYPE vbap OCCURS 0 WITH HEADER LINE,
           it_vbrk TYPE vbrk OCCURS 0 WITH HEADER LINE,
           it_vbrp TYPE vbrp OCCURS 0 WITH HEADER LINE,
           it_vbep TYPE vbep OCCURS 0 WITH HEADER LINE,
           it_vbpa TYPE vbpa OCCURS 0 WITH HEADER LINE,
           it_lips TYPE lips OCCURS 0 WITH HEADER LINE ,
           it_likp TYPE likp OCCURS 0  WITH HEADER LINE,
           it_konv TYPE konv OCCURS 0 WITH HEADER LINE,
           it_kna1 TYPE kna1 OCCURS 0 WITH HEADER LINE,
           it_adrc TYPE adrc OCCURS 0 WITH HEADER LINE,
           it_makt TYPE makt OCCURS 0 WITH HEADER LINE,
           it_mara TYPE mara OCCURS 0 WITH HEADER LINE,
           it_vbkd TYPE vbkd OCCURS 0 WITH HEADER LINE,
           it_vbbe TYPE vbbe OCCURS 0 WITH HEADER LINE,
           it_vbup TYPE vbup OCCURS 0 WITH HEADER LINE,
           it_itob TYPE itob OCCURS 0 WITH HEADER LINE.
    INITIALIZATION.
      v_repid = sy-repid.
      SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
      SELECT-OPTIONS : so_vbeln FOR vbak-vbeln ,
      so_kunnr FOR vbpa-kunnr,
      so_edatu FOR itab-edatu.
      SELECTION-SCREEN: END OF BLOCK b1.
    START-OF-SELECTION.
    get the details required to be displayed in the report
      PERFORM fetch_data.
    *& End-of-Selection
    END-OF-SELECTION.
      IF itab[] IS NOT INITIAL.
    initialize the fieldcatlog to be used for alv grid display
        PERFORM field_catalog.
    display actual data in the alv grid
        PERFORM display.
      ELSE.
    initialize the fieldcatlog to be used for alv grid display
        PERFORM field_catalog.
    display actual data in the alv grid
        PERFORM display.
      ENDIF.
    *&      Form  build_fieldcatlog
          text
    FORM field_catalog.
    *- Show quoted text -
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'VBELN'.
      wa_fieldcat-seltext_m = 'SalesOrderNo'.
      wa_fieldcat-outputlen = '12'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field for Customer Name.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'NAME1'.
      wa_fieldcat-seltext_m = 'Customer Name'.
      wa_fieldcat-outputlen = '30'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Po Number.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'BSTKD'.
      wa_fieldcat-seltext_m = 'PO No'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Order Value
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'NETWR'.
      wa_fieldcat-seltext_m = 'Order Value '.
      wa_fieldcat-outputlen = '12'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Po Date.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'BSTDK'.
      wa_fieldcat-seltext_m = 'PO Date'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'EDATU'.
      wa_fieldcat-seltext_m = 'Delivery Date'.
      wa_fieldcat-outputlen = '12'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Order Qty.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'KWMENG'.
      wa_fieldcat-seltext_m = 'Ord.QTY'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    field For Delivery Qty.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'op_qty'.
      wa_fieldcat-seltext_m = 'DEL QTY.'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Open Qty from ITAB.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'OMENG'.
      wa_fieldcat-seltext_m = 'OPEN QTY.'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Pending Weight from ITAB.
    wa_fieldcat-tabname = 'ITAB'.
    wa_fieldcat-fieldname = 'BRGEW'.
    wa_fieldcat-seltext_m = 'Pending Weight'.
    wa_fieldcat-outputlen = '12'.
    APPEND wa_fieldcat TO i_fieldcat.
    CLEAR wa_fieldcat.
    Field For netweight.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'NTGEW'.
      wa_fieldcat-seltext_m = 'Net Weight'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For Actual Delivery.
    wa_fieldcat-tabname = 'ITAB'.
    wa_fieldcat-fieldname = 'LFDAT'.
    wa_fieldcat-seltext_m = 'Actual Delivery'.
    wa_fieldcat-outputlen = '12'.
    APPEND wa_fieldcat TO i_fieldcat.
    CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'KBETR'.
      wa_fieldcat-seltext_m = 'RATE'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-tabname = 'VBUP'.
      wa_fieldcat-fieldname = 'LFSTA'.
      wa_fieldcat-seltext_m = 'Delivery Status'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    Field For pending weight.
      wa_fieldcat-tabname = 'ITAB'.
      wa_fieldcat-fieldname = 'PENDING_VAL'.
      wa_fieldcat-seltext_m = 'Pending VALUE'.
      wa_fieldcat-outputlen = '20'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
    ENDFORM. "BUILD_FIELDCATLOG
    *&      Form  fetch_data
          text
    FORM fetch_data.
      break mtabap.
      SELECT *
              FROM vbep
              INTO TABLE it_vbep
              WHERE edatu IN so_edatu
              AND vbeln IN so_vbeln.
      IF NOT it_vbep[] IS INITIAL.
        SELECT *
                       FROM vbak
                       INTO TABLE it_vbak
                       FOR ALL ENTRIES IN it_vbep
                       WHERE vbeln = it_vbep-vbeln
                       AND kunnr IN so_kunnr.
      ENDIF.
      IF NOT it_vbak[] IS INITIAL.
        SELECT *
                FROM vbpa
                INTO TABLE it_vbpa
                FOR ALL ENTRIES IN it_vbak
                WHERE vbeln = it_vbak-vbeln
                AND   posnr = space.
        SELECT *
                 FROM vbap
                 INTO TABLE it_vbap
                 FOR ALL ENTRIES IN it_vbak
                 WHERE vbeln = it_vbak-vbeln.
    Select all Customer Data
        SELECT * FROM kna1 INTO TABLE it_kna1
        FOR ALL ENTRIES IN it_vbak
        WHERE kunnr = it_vbak-kunnr .
        SELECT *
                 FROM vbkd
                 INTO TABLE it_vbkd
                 FOR ALL ENTRIES IN it_vbap
                 WHERE vbeln = it_vbap-vbeln.
               and posnr = IT_VBAP-POSNR.
        SELECT *
                 FROM vbbe
                 INTO TABLE it_vbbe
                 FOR ALL ENTRIES IN it_vbap
                 WHERE vbeln = it_vbap-vbeln
                 AND posnr = it_vbap-posnr.
        SELECT *
                 FROM vbup
                 INTO TABLE it_vbup
                 FOR ALL ENTRIES IN it_vbap
                 WHERE vbeln = it_vbap-vbeln
                 AND posnr = it_vbap-posnr.
        SELECT *
                 FROM konv
                 INTO TABLE it_konv
                 FOR ALL ENTRIES IN it_vbak
                 WHERE knumv = it_vbak-knumv
                 AND kinak = space .
        SELECT *
              FROM vbrp
              INTO TABLE it_vbrp
              FOR ALL ENTRIES IN it_vbak
              WHERE aubel = it_vbak-vbeln.
        IF NOT it_vbrp[] IS INITIAL.
          SELECT * FROM likp
                            INTO TABLE it_likp
                            FOR ALL ENTRIES IN it_vbrp
                            WHERE vbeln = it_vbrp-vgbel.
          SELECT * FROM lips
                            INTO TABLE it_lips
                            FOR ALL ENTRIES IN it_vbrp
                            WHERE vbeln = it_vbrp-vgbel
                            AND posnr = it_vbrp-vgpos.
                           itab-lfimg = it_lips-lfimg.
      ENDIF.  ENDIF.
      LOOP AT it_vbap.
        itab-posnr = it_vbap-posnr.
        itab-posar = it_vbap-posar.
        itab-brgew = it_vbap-brgew.
        itab-ntgew = it_vbap-ntgew.
        itab-KWMENG = it_vbap-kwmeng.
        itab-LFMNG = it_vbap-LFMNG.
        itab-LFIMG = it_lips-LFIMG.
        itab-op_qty = it_vbap-kwmeng - it_lips-LFIMG.
        READ TABLE it_vbak WITH KEY vbeln = it_vbap-vbeln.
        itab-vbeln = it_vbak-vbeln.
        itab-netwr = it_vbak-netwr.
        itab-kunnr = it_vbak-kunnr.
        READ TABLE it_vbep WITH KEY vbeln = it_vbap-vbeln.
        itab-edatu = it_vbep-edatu.
        READ TABLE it_kna1 WITH KEY kunnr = it_vbak-kunnr.
        itab-name1 = it_kna1-name1.
        READ TABLE it_vbkd WITH KEY vbeln = it_vbap-vbeln .
        itab-bstdk = it_vbkd-bstdk.
        itab-bstkd = it_vbkd-bstkd.
        READ TABLE it_vbrp WITH KEY aubel = it_vbap-vbeln aupos = it_vbap-posnr.
        READ TABLE it_lips WITH KEY vbeln = it_vbrp-aubel posnr = it_vbrp-aupos.
        itab-delivery = it_lips-vbeln.
       itab-del_qty = it_lips-lfimg.
       itab-del_qty = LIPS-LFIMG.
        READ TABLE it_likp WITH KEY vbeln = it_vbrp-aubel   .
        itab-lfdat = it_likp-lfdat.
       itab-ntgew = it_likp-ntgew.
        break mtabap.
        READ TABLE it_vbup WITH KEY vbeln = it_vbap-vbeln posnr = it_vbap-posnr.
        itab-lfsta = it_vbup-lfsta.
        READ TABLE it_vbep WITH KEY vbeln = it_vbap-vbeln posnr = it_vbap-posnr.
        itab-wmeng = it_vbap-kwmeng .
        itab-bmeng = it_vbep-bmeng.
        READ TABLE it_vbbe WITH KEY vbeln = it_vbap-vbeln posnr = it_vbap-posnr.
        itab-omeng = it_vbbe-omeng .
        READ TABLE it_konv WITH KEY knumv = it_vbak-knumv
                                    kposn = it_vbap-posnr
                                    kschl = 'PR00'.
       ITAB-KBETR = IT_KONV-KBETR / 10. " CONDITION RATE
        itab-kbetr = it_konv-kbetr.
        itab-kwert = it_konv-kwert . "CONDITION VALUE
       itab-pending_val =  ITAB-OMENG * ITAB-KWERT .
        itab-pending_val =  itab-omeng * itab-kbetr .
        APPEND itab.
      ENDLOOP.
    ENDFORM. "data_retrieval
    *&      Form  build_listheader
          text
         -->IT_LISTHEADER  text
    Show quoted text -
    FORM build_listheader USING it_listheader TYPE slis_t_listheader.
    DATA HLINE TYPE SLIS_LISTHEADER.
      DATA: ls_line TYPE slis_listheader.
    bhavesh
    HLINE-INFO = 'report Developed by Bhavesh'.
    HLINE-TYP = 'H'.
    Header
    Bhavesh
      CLEAR ls_line.
      ls_line-typ = 'H'.
    LS_LINE-KEY: not used for this type
      ls_line-info = 'Sales ORDER Report'.
      APPEND ls_line TO it_listheader.
    bhavesh
    ***Selection
      CLEAR ls_line.
      ls_line-typ = 'S'.
      ls_line-key = 'Key 1'.
      ls_line-info = 'SFEL'.
      APPEND ls_line TO it_listheader.
      ls_line-key = 'Key 2'.
      ls_line-info = 'SFEL'.
      APPEND ls_line TO it_listheader.
    ***Action
      CLEAR ls_line.
      ls_line-typ = 'A'.
    LS_LINE-KEY: not used for this type
      ls_line-info = 'Status list'.
      APPEND ls_line TO it_listheader.
    ENDFORM. "BUILD_LISTHEADER
    *ENDFORM. "build_listheader
    *&      Form  display
    *&       text
    FORM display.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
            EXPORTING
              i_callback_program      = sy-repid
            i_callback_top_of_page  = 'TOP_OF_PAGE'
              is_layout               = alv_layout
              it_fieldcat             = i_fieldcat
            it_events               = gt_events[]
              i_callback_user_command = 'USER_COMMAND'
              i_grid_title            = 'BHAVESH REPORT'
              TABLES
              t_outtab                = itab[].
      CLEAR : itab .
    ENDFORM.                    "display
    *&      Form  top_of_page
          text
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_listheader[].
    i_logo = 'ENJOYSAP_LOGO'.
    I_END_OF_LIST_GRID =
    ENDFORM. "TOP_OF_PAGE

  • 'OBJECTS_OBJREF_NOT_ASSIGNED_NO' Runtime Error in abap program

    When my dubugger goes on this line..it gives me Runtime error'
    'OBJECTS_OBJREF_NOT_ASSIGNED_NO'
    CX_SY_REF_IS_INITIAL
    Code :
    CALL METHOD determine_budget_values->determine_budget_values
      EXPORTING
         plvar  = '.:'
         butyp  = 'BU'
         begda  = '20060101'  "'01.01.2006'
         endda  = '20061231'  "'31.12.2006'
         kcurr  = 'X'
         budot  = 'BU'
         budid  = '50012433'  "objektid
         oldam  = 1000
         oldcu  = 'USD'
         oldno  = 10
         oldsu  = 'USD'
      IMPORTING
        NEWAM  = newam
        NEWCU  = newcu.
      NEWNO  =
      NEWSU  =
    Thanx in advance....Its very urgent..

    Thanks a lott...for u r rhelp///
    but one thing i would like to know after executing properly this method....will my HRP1520 will get those new values of budget of i will have to code it in Method ..specifically.
    i m sending code for Method...
    method IF_EX_HRECM00_BDG0001~DETERMINE_BUDGET_VALUES.
      DATA: BEGIN OF fs_budgets               ,
              objid(8) TYPE n                 ,             " Object Id
              flag     TYPE c                 ,             " Monetary/Non Monetary
              newam    TYPE CHAR22            ,             " Budgeted Amount,
              newcu    TYPE CHAR05            ,             " Currency Key,
            END OF fs_budgets                 ,
            t_budgets LIKE TABLE OF fs_budgets.
      DATA: w_sobid   TYPE hrp1001-sobid      ,             " Org. Unit
            w_file    TYPE rlgrap-filename    .             " File Name
      DATA: t_orgunit      TYPE hap_t_hrsobid    ,          " Id of Org. unit
            t_suborgunits  TYPE hap_t_hrsobid    ,          " Ids of Sub Org Units
            fs_orgunit     LIKE LINE OF t_orgunit.          " Work Area of orgunit
      REFRESH: t_orgunit,
               t_suborgunits.
      CLEAR  : fs_orgunit..
    The Budget values are stored in the file 'BUDGETS' on the App Server*
    This data will be read from the App Server                          *
      w_file = 'BUDGETS'.
      OPEN DATASET w_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    Fetching the corresponding Org Unit for the Budget Id               *
      SELECT sobid                         " Org. Unit
        FROM hrp1001
        INTO w_sobid
       WHERE plvar EQ '01'
         AND otype EQ 'BU'
         AND objid EQ  budid
         AND rsign EQ 'B'
         AND relat EQ '300'
         AND istat EQ '1'
         AND begda LE  endda
         AND endda GE  begda.
      ENDSELECT.                           " SELECT sobid
      IF sy-subrc EQ 0.
        fs_orgunit-plvar = '01'.
        fs_orgunit-otype = 'O'.
        fs_orgunit-sobid = w_sobid.
        APPEND fs_orgunit TO t_orgunit.
        CLEAR  fs_orgunit.
    Fetching the Sub Org units for a given Org unit                     *
        CALL FUNCTION 'HRHAP_SEL_OBJECTS_OF_EVAL_PATH'
          EXPORTING
            T_OBJECTS_BASE   =  t_orgunit
            EVALUATION_PATH  = 'ORGEH'
            FROM_DATE        =  begda
            TO_DATE          =  endda
          IMPORTING
            T_OBJECTS        =  t_suborgunits.
      ENDIF.                               " IF sy-subrc EQ 0.
      CLEAR newam.
    Accumulating the budget values of all the Sub org units for a given *
    Org unit and populating the fields 'newam' and 'newcu'.             *
      LOOP AT t_suborgunits INTO fs_orgunit.
        CLOSE DATASET w_file.
        OPEN DATASET w_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
        DO.
          READ DATASET w_file INTO fs_budgets.
          IF sy-subrc EQ 0.
            IF fs_budgets-objid EQ fs_orgunit-sobid.
              ADD fs_budgets-newam TO newam.
              newcu = fs_budgets-newcu.
              EXIT.
            ENDIF.
          ELSE.
            EXIT.
          ENDIF.                           " IF sy-subrc EQ 0.
        ENDDO.                             " DO
      ENDLOOP.                             " LOOP AT t_suborgunits
    Giving default values for the Budget Amount and Currency if they are*
    containing Initial values                                           *
      IF newam IS INITIAL.
        newam = 0.
      ENDIF.                               " IF newam IS INITIAL.
      IF newcu IS INITIAL.
        newcu = 'USD'.
      ENDIF.                               " IF newcu IS INITIAL.
      CLOSE DATASET w_file.
    endmethod.
    After this code will i require to code anything specific to get this newam(new amount) uploaded to HRP1520 infotype or automatically it will upload if i write above mentioned code only...
    Please revert......thanx  a lot

  • ABAP Programming Error, OBJECTS_OBJREF_NOT_ASSIGNED, CL_GRFN_FPM_UTIL======

    Hi All,
    I am running GRC 10.0 SP07 when trying to add a response to a risk I get the following ABAP programming error,
    Category               ABAP Programming Error
    Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED
    ABAP Program           CL_GRFN_FPM_UTIL==============CP
                                                                                    |
    |    Access via 'NULL' object reference not possible.  
    You attempted to use a 'NULL' object reference (points to 'nothing')    
    |    access a component (variable: " ").                                                  
    |    An object reference must point to an object (an instance of a class)
    |    before it can be used to access components.                                  
    |    Either the reference was never set or it was set to 'NULL' using the              
    |    CLEAR statement.
    Any help on the error would be greatly appreciated.
    Thanx
    Warren

    Hi Victor,
    When I am on a risk in NWBC, I select the "Response Plan" Tab, then when I try create a response I get the error.
    This is the error that is displayed:
    Error while processing your query
    What has happened?
    The URL call http://ravenclaw.cqs.co.za:8000/sap/bc/webdynpro/SAP/GRRM_WD_RNP was terminated because of an error.
    Note
    The following error text was processed in system GRC : Access via 'NULL' object reference not possible.
    The error occurred on the application server ravenclaw_GRC_00 and in the work process 7 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: GET_OIF_INFO of program CL_GRFN_FPM_UTIL==============CP
    Method: GET_INSTANCE of program CL_GRFN_OIF_BASE==============CP
    Method: INIT_UIBB of program /1BCWDY/06EI2HED04NJ1RLM34O4==CP
    Method: IF_COMPONENTCONTROLLER~INIT_UIBB of program /1BCWDY/06EI2HED04NJ1RLM34O4==CP
    Method: HANDLEDEFAULT of program /1BCWDY/06EI2HED04NJ1RLM34O4==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/06EI2HED04NJ1RLM34O4==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    Method: NAVIGATE of program CL_WDR_CLIENT_APPLICATION=====CP
    Method: DO_NAVIGATION of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Thanx
    Warren

  • ABAP Programming Error

    Category               ABAP Programming Error
    Runtime Errors         MESSAGE_TYPE_X
    ABAP Program           CL_RSBM_LOG_DTP_DP============CP
    Application Component  BW-WHM-DST
    Date and Time          28.04.2014 15:08:07
    Short text
         The current application triggered a termination with a short dump.
    What happened?
         The current application program detected a situation which really
         should not occur. Therefore, a termination with a short dump was
         triggered on purpose by the key word MESSAGE (type X).

    Error analysis
        Short text of error message:
        *** Data request to the OLTP ***
        Long text of error message:
        Technical information about the message:
        Message class....... "RSM"
        Number.............. 000
        Variable 1.......... " "
        Variable 2.......... " "
        Variable 3.......... " "
        Variable 4.......... " "
      You may able to find an interim solution to the problem
      in the SAP note system. If you have access to the note system yourself,
      please use the following search criteria:
          "MESSAGE_TYPE_X" " "
          "CL_RSBM_LOG_DTP_DP============CP" bzw.
       "CL_RSBM_LOG_DTP_DP============CM001"
          "ADD_MSG"
      If you cannot solve the problem yourself, please send the
      following documents to SAP:
    Information on where terminated
        Termination occurred in the ABAP program "CL_RSBM_LOG_DTP_DP============CP" -
         in "ADD_MSG".
        The main program was "RSBATCH_EXECUTE_PROZESS ".
        In the source code you have the termination point in line 111
        of the (Include) program "CL_RSBM_LOG_DTP_DP============CM001".
        The program "CL_RSBM_LOG_DTP_DP============CP" was started as a background job.
        Job Name....... "BIDTPR_1276822_1"
        Job Initiator.. "BWREMOTE"
        Job Number..... 15080600
    Source Code Extract
    Line  SourceCde
       81
       82   l_posit = l_posit + 1.
       83
       84   l_s_mess-requid    = p_requid.
       85   l_s_mess-datapakid = p_datapakid.
       86   l_s_mess-step      = l_step.
       87   l_s_mess-substep   = l_substep.
       88   l_s_mess-runid     = p_runid.
       89   l_s_mess-posit     = l_posit.
       90   MOVE-CORRESPONDING i_s_msg TO l_s_mess.
       91   if not ( l_s_mess-msgty = 'I' or
       92            l_s_mess-msgty = 'S' or
       93            l_s_mess-msgty = 'W' or
       94            l_s_mess-msgty = 'A' or
       95            l_s_mess-msgty = 'E' or
       96            l_s_mess-msgty = 'X' ).
       97     l_s_mess-msgty = 'I'.
       98   endif.
       99   CALL FUNCTION 'RSSM_GET_TIME'
      100     IMPORTING
      101       e_timestampl = l_s_mess-timestamp.
      102   APPEND l_s_mess TO p_t_mess.
      103
      104   READ TABLE p_t_header INTO l_s_header WITH KEY
      105        requid    = p_requid
      106        datapakid = p_datapakid
      107        step      = l_step
      108        substep   = l_substep
      109        runid     = p_runid.
      110   IF sy-subrc <> 0.
    >>>>>     MESSAGE x000(rsm).
      112   ENDIF.
      113   IF l_s_header-max_state  IS INITIAL OR
      114      l_s_header-max_state < cl_rsbm_log_dtp_req=>convert_msgty_to_state( l_s_mess-msgty ).
      115     l_s_upd-requid     = p_requid.
      116     l_s_upd-datapakid  = p_datapakid.
      117     l_s_upd-step       = l_step.
      118     l_s_upd-substep    = l_substep.
      119     l_s_upd-runid      = p_runid.
      120     l_s_upd-max_state = cl_rsbm_log_dtp_req=>convert_msgty_to_state( l_s_mess-msgty ).
      121     APPEND l_s_upd TO l_t_upd.
      122     l_header_changed = 'X'.
      123   ENDIF.
      124   IF l_header_changed = 'X'.
      125     IF l_s_header-substep <> '0' AND
      126        l_s_header-step    <> '0'.
      127       READ TABLE p_t_header INTO l_s_header WITH KEY
      128            requid    = p_requid
      129            datapakid = p_datapakid
      130            step      = l_step

  • How  to debug  the abap program ?

    how  to debug  the abap program ?Can anybody explain  me in details.

    Hi
    Debugger
    This section of the ABAP Workbench documentation provides information on how to use the Debugger as a test tool for finding errors in the source code of an ABAP program.
    Functional Overview
    Use
    The ABAP Debugger is an integrated test tool within the ABAP Workbench. You use it to check the program logic and to find errors in the source code of an ABAP program. In the Debugger, you can step through the source code of a program. The running program is interrupted after each step, allowing you to check its processing logic and the results of individual statements.
    As of Release 6.10, you can also run Business Server Pages (BSP) in the debugging mode. You can also display and set breakpoints here. Business Server Pages can be displayed in the Object Navigator when you select an appropriate application under BSP Application.
    Features
    The Debugger provides an efficient means of identifying errors in ABAP programs. It contains the following functions:
    Ways of starting the Debugger
    Choosing different views
    Choosing different execution options in the Debugger
    Displaying source code in the Debugger
    • Setting and deleting breakpoints
    • Setting and deleting watchpoints
    • Stopping a program at a particular statement or event
    Displaying and changing field contents at runtime
    Displaying ABAP Objects and references
    Displaying and positioning strings
    Setting and deleting database locks
    Opening the ABAP Editor, or Object Navigator
    System settings and runtime warnings
    Starting the Debugger
    There are two possible strategies for starting the Debugger in the ABAP Workbench:
    By setting breakpoints then running the program
    By running the program in debugging mode.
    Setting Breakpoints
    A breakpoint is a signal in a specific line of the program source code. This signal indicates to the ABAP runtime processor to stop the program at the relevant line and start the ABAP Debugger. A distinction is made between static and dynamic breakpoints. For further information about the different types of breakpoints and how to use them, refer to Breakpoints.
    Direct Processing
    You can start the Debugger without previously having set breakpoints. This is the best procedure to use when you want to test a program right from the beginning. It is also a useful procedure if you are not overly familiar with the program and therefore are not sure where best to set breakpoints. You can start the Debugger as follows:
    From the Object Navigator
    Select a report or transaction and choose Program ® Test ® Debugging.
    From the ABAP Editor
    Choose Program ® Execute ® Debugging (or the Debugging pushbutton).
    From any screen
    Choose System ® Utilities ® Debug ABAP.
    From any screen
    Enter /h in the command field.
    Display Modes in the Debugger
    When you are debugging a program, there are various display modes that you can use. All of the display modes have the same structure. The top part of the screen displays an extract of the program source code. The bottom part displays the information specifically available in that display mode. There are also pushbuttons on the screen allowing you to switch to the most frequently-used display modes.
    Display Modes Available Using Pushbuttons
    Fields
    The scrollable field display contains the contents of up to eight fields. The contents of the three most important system fields are always displayed. This is the default display mode in the Debugger. See also Processing Fields
    Table
    Displays the contents of an internal table. This mode allows you to display and edit the entries in an internal table. See also Processing Internal Tables
    Breakpoints
    A scrollable display containing up to 30 breakpoints. Next to each breakpoint is a counter. You can also delete breakpoints in this display. See also Managing Dynamic Breakpoints
    Watchpoints
    You can set a watchpoint for a field so that the program is interrupted whenever the value of that field changes. This display mode contains a list of watchpoints, the fields and programs to which they are assigned, the current values of the fields, and the conditions upon which the watchpoint is activated. See also Setting Watchpoints
    Calls
    This mode displays the current sequence of events, and the sequence of calls up to the current breakpoint. The last active call is displayed at the top of the list; previous calls are listed in reverse chronological order. When an event (for example, START-OF-SELECTION) concludes, it is deleted from the display.
    Overview
    This mode displays the structure of the program. It lists its events, subroutines, and modules, and shows which sections belong to which events. It also displays the section currently being processed.
    Settings
    This mode displays the current Debugger settings. You can change the settings by selecting or deselecting various options. For further information, refer to Settings and Warnings
    Other Display Modes
    You can access other display modes by choosing Goto ® Display data object.
    Single field
    Displays the contents and technical attributes of a field.
    Structured
    field
    Displays the components of a structure, along with their contents and attributes. If you double-click a component, the system displays detailed information for it.
    Strings
    Display the content and current length of the string. You can also display part of the content by means of offset and length.
    Internal table
    Displays the type, line numbers and contents of an internal table.
    Object
    Displays the structure of an ABAP Object.
    For further information on these displays, refer to Displaying Attributes and Displaying ABAP Objects
    Checking System Programs for Errors
    To check a program or program component that is part of the ABAP Workbench (for example, the Screen Painter), you must use the system Debugger. To start the system Debugger, choose System ® Utilities ® Debug System from any screen. To stop the system Debugger, choose Debugger ® Debugging off.
    Displaying Program Attributes
    You can display the attributes Fixed Point Arithmetic, System Program, and Unicode Checks of the program that has just been executed by choosing Goto ® Further Information ® Program Attributes.
    Restarting the Debugger
    If you choose Debugging ® Restart, debugging mode is stopped and the system takes you to the initial screen of the last transaction you called. If, for example, you started an ABAP program in debugging mode from transaction SE38 (ABAP Editor), choosing Debugging ® Restart will take you back to the screen titled ABAP Editor: Initial Screen. If you want to restart the program in debugging mode, choose Debugging.
    Breakpoints
    Apart from direct execution of an ABAP program in the Debugger, it is also possible to start the Debugger call by the exact setting of a breakpoint. This is achieved by setting one or more of these breakpoints in the program. A breakpoint is a signal at a particular point in the program that tells the ABAP runtime processor to interrupt processing and start the Debugger. The program runs normally until the breakpoint is reached.
    There is also a special kind of breakpoint called a watchpoint. When you use watchpoints, the Debugger is not activated until the contents of a particular field change. For further information, refer to Watchpoints.
    Breakpoint Variants
    The Debugger contains different breakpoint variants:
    Static
    The BREAK-POINT statement in an ABAP program. Static breakpoints are not normally user-specific. However, you can make them user-specific.
    Directly-set
    dynamic breakpoints
    Can be set in the ABAP Editor or the Debugger. Dynamic breakpoints are always user-specific, and are deleted when you log off from the R/3 System.
    Breakpoints
    at statement
    The Debugger stops the program directly before the specified statement is executed.
    Breakpoints
    at subroutine
    The Debugger stops the program directly before the specified subroutine is called.
    Breakpoint at function module
    The Debugger stops the program directly before the specified function module is called.
    Breakpoint at method
    The Debugger stops the program directly before the specified method is called.
    Breakpoints at system exceptions
    The Debugger stops the program directly after a system exception, that is, after a runtime error has been intercepted.
    Static Breakpoints
    Static breakpoints are not normally user-specific. Once a user has inserted the statement BREAK-POINT or BREAK name in an ABAP program, the system always interrupts the program at that point for that user or only for the user name. This procedure is only useful in the development phase of an application, when the program execution is always to be interrupted at the same place. For further information, refer to Static Breakpoints.
    In HTTP sessions, a static breakpoint is skipped if you did not set additional dynamic HTTP breakpoints in the editor of a BSP page. Instead, a corresponding system log entry is written, which can be checked using transaction SM21.
    Dynamic Breakpoints
    Dynamic breakpoints are user-specific. Therefore, you should use them if you only want the program to be interrupted when you run it yourself, not when it is being executed by other users. All dynamic breakpoints are deleted when you log off from the R/3 System.
    Dynamic breakpoints are more flexible than static breakpoints, because you can deactivate or delete them at runtime. They have the following advantages:
    You do not have to change the program code
    You can set them even when the program is locked by another programmer
    You can define a counter that only activates the breakpoint after it has been reached
    Special dynamic breakpoints are useful when you want to interrupt a program directly before a particular ABAP statement, a subroutine, or an event, but do not know exactly where to find it in the source code. Event here is used to refer to the occurrence of a particular statement, for example, or calling up a method. Special dynamic breakpoints are user-specific. You can only set them in the Debugger. For further information, refer to Dynamic Breakpoints.
    In HTTP sessions, the system stops both at static and dynamic breakpoints if a dynamic breakpoint was set in the editor of a BSP page before program execution.
    Lifetime and Transfer of Breakpoints
    A static breakpoint remains intact as long as the BREAK-POINT or BREAK-POINT name statement is not removed from the source code. Without saving, dynamic breakpoints only remain intact in the relevant internal session. However, they are effective during the entire user session, if they are saved by choosing Breakpoints ® Save in the ABAP Debugger. For more details on the subject of sessions and user sessions, refer to Modularization Techniques in the ABAP keyword documentation.
    If you call an HTTP session during a user session, only the HTTP breakpoints are loaded when the HTTP session is started. You activate HTTP debugging in the ABAP Editor by choosing Utilities ® Settings ® HTTP Debugging. Depending on the setting, the system then displays either the HTTP or standard breakpoints in the Editor.
    If you call an update session during a user session, breakpoints that were defined beforehand in the calling processing unit are copied to the new update session, where they can be displayed under Breakpoints. If, in the ABAP Debugger, you check Update Debugging under Settings and then, for example, call the update module func using CALL FUNCTION func IN UPDATE TASK, a new window is opened in which you can debug this function module in the update session. All the breakpoints that were set in the calling processing unit can also be processed here.
    Breakpoints at Statements
    You can use this special kind of dynamic breakpoint to interrupt a program directly before an ABAP statement is processed.
    Prerequisites
    You must already be running the program in the Debugger.
    Procedure
    To set a breakpoint at an ABAP statement:
    1.Choose Breakpoint ® Breakpoint at ® Statement...
    The following dialog box appears:
    2.Enter the ABAP statement.
    The system sets a breakpoint at all points in the program at which the ABAP statement occurs.
    3.Choose ENTER.
    The breakpoint applies to all lines containing the specified statement.
    Result
    The system confirms the breakpoint and adds it to the list in the display. When you finish your debugging session, the breakpoint is automatically deleted unless you have explicitly saved it.
    Breakpoints at Subroutines
    You can use this special kind of dynamic breakpoint to interrupt a program directly before a subroutine is called.
    Prerequisites
    You must already be running the program in the Debugger.
    Procedure
    To set a breakpoint for a subroutine:
    Choose Breakpoint ® Breakpoint at ® Event/Subroutine.
    The following dialog box then appears:
    Enter the name of the subroutine before which you want to interrupt the program. By default, the Program field contains the name of the program that is currently active. The system sets a breakpoint wherever the specified subroutine occurs in the program code.
    Choose ENTER.
    Result
    The system confirms the breakpoint. The breakpoint is added to the breakpoints displayed.
    Breakpoints at Function Module
    You can use this kind of dynamic breakpoint to interrupt a program directly before a function module is called.
    Prerequisites
    You must already be running the program in the Debugger.
    Procedure
    To set a breakpoint for a function module:
    Choose Breakpoint ® Breakpoint at ® Function module...
    The following dialog box appears:
    Enter the name of the function module before which you want to interrupt the program. The system sets a breakpoint wherever the specified event, module pool, or subroutine occurs in the program code.
    Choose ENTER.
    Result
    If you entered a valid function module name, the system confirms that the breakpoint has been set. If the function module exists in the system, the new breakpoint is added to the display list.
    Breakpoints at Methods
    You can use this special kind of dynamic breakpoint to interrupt a program directly before a method is called.
    Prerequisites
    You must be already running the program in the debugger.
    Procedure
    To set a breakpoint for methods:
    1. Choose Breakpoint ® Breakpoint at ® Method...
    The following dialog box then appears:
    2. Enter the name of the method and class before which you want to interrupt the program. A breakpoint is then set each time the specified processing block appears in the source code.
    3. Choose ENTER.
    Result
    The system confirms the breakpoint. The breakpoint is added to the list in the display.
    Breakpoints at System Exceptions
    You can use this special form of dynamic breakpoint to interrupt a program immediately after a runtime error has occurred.
    Prerequisites
    You must already be running the program in the Debugger.
    Procedure
    To set a breakpoint at a system exception:
    Choose Breakpoint ® Breakpoint at ® System exception.
    Result
    The system confirms the breakpoint. The breakpoint is added to the breakpoints displayed.
    When a system exception is triggered, a warning triangle appears in the line containing the statement that caused it. If you double-click the warning triangle, the internal name of the runtime error appears.
    Static Breakpoints
    You should only use static breakpoints during the development phase of an application. You must remove them from your program before you transport it.
    Setting Breakpoints
    To set a static breakpoint, use the ABAP statement BREAK-POINT . Place the breakpoint in the line at which you want to interrupt the program.
    program RSDEBUG_01.
    if SY-SUBRC 0.
    break-point.
    endif.
    When you run the program, the runtime processor interrupts it when the breakpoints occur. You can number your breakpoints to make them easier to identify ( BREAK-POINT 1, BREAK-POINT 2 …).
    Static breakpoints are not normally user-specific. The program is, therefore, always interrupted as soon as the runtime processor reaches the line containing the breakpoint. The program is interrupted regardless of the user who executes it.
    However, you can set user-specific static breakpoints using the BREAK statement followed by your user name. For example, if you use the statement BREAK SMITH , the program is only interrupted when user Smith runs it. Although user-specific breakpoints appear in the program code, they are not active when other users run the program. You should, however, be careful if an application is being used by several users with the same name.
    Deleting Breakpoints
    Since static breakpoints apply to all users, you must remove them from the program once you have finished testing it. In the ABAP Editor, you can find breakpoints quickly by choosing Utilities ® Global search. You can also use the Extended Program Check to find them.
    If you do not remove static breakpoints from your program, they will be transported to your production system. This could cause serious problems in the production system.
    Dynamic Breakpoints
    You can set up to 30 dynamic breakpoints without changing the program code. Dynamic breakpoints can be set either in the ABAP Editor or directly in the Debugger.
    Setting Dynamic Breakpoints in the ABAP Editor
    You can set dynamic breakpoints in the ABAP Editor regardless of whether you are in display or change mode. You can also set breakpoints directly from within the Debugger at runtime. To set a dynamic breakpoint in the ABAP Editor:
    Position the cursor on the line of the source code at which you want to set the breakpoint.
    Choose Utilities ® Breakpoints ® Set or the Stop icon. The system confirms that the breakpoint has been set.
    To display a list of all dynamic breakpoints in a program, choose Utilities ® Breakpoints ® Display. You can use this list to navigate to a particular breakpoint or to delete one or more breakpoints from the program.
    Setting Dynamic Breakpoints in Debugging Mode
    To set a dynamic breakpoint in the Debugger:
    Position the cursor on the line in which you want to set the breakpoint.
    Select the line by double-clicking it or choosing Breakpoint ® Set/delete.
    The system sets the breakpoint, and displays a small stop sign to the left of the relevant line. If the line already contained a breakpoint, it is deleted.
    When you finish your debugging session, the breakpoint is automatically deleted unless you have explicitly saved it.
    Saving Breakpoints
    If you want to leave the Debugger temporarily, you can save your dynamic breakpoints so that they are still active when you return to the Debugger within the same terminal session.
    To save the breakpoints that you have set in the Debugger:
    Choose Breakpoint ® Save.
    The system saves all of the breakpoints that you have set in the current program. These breakpoints will remain active until you either explicitly delete them or log off from the system.
    You can also delete breakpoints that you have saved:
    By deleting individual breakpoints from the display and then saving again. In this case, only your selected breakpoints will be deleted.
    By choosing Breakpoint ® Delete all. In this case, the system deletes all dynamic breakpoints.
    Managing Dynamic Breakpoints
    The ABAP Debugger provides a convenient user interface for managing breakpoints. To open the breakpoint display, choose Breakpoints, or, from the menu, Goto ® Control debugging ® Breakpoints.
    Example
    Functions
    This display mode contains the following functions for breakpoints:
    Breakpoint Display
    The scrollable breakpoint display contains up to 30 dynamic breakpoints. For breakpoints that you set directly, the program name and line number at which the breakpoint occurs are displayed. For special breakpoint forms, the list displays the statements, events, subroutines, and module calls at which the relevant breakpoints are set.
    Counter
    In the breakpoint display, you can specify a counter. When you use a counter, the breakpoint is not activated until it has been reached a specified number of times. For example, if you enter 5 for the counter, the breakpoint is not activated until it is reached for the fifth time. After the breakpoint has been activated, it remains so, and the counter no longer appears in the breakpoint display.
    Deleting Breakpoints
    Position the cursor on the breakpoint that you want to delete, and either double-click the line or choose Breakpoint ® Set/delete. To delete all breakpoints, choose Breakpoint ® Delete all.
    Activating and Deactivating Breakpoints
    Position the cursor on the breakpoint that you want to activate or deactivate and choose Breakpoint ® Activate/deactivate.
    Watchpoints
    Like a breakpoint, a watchpoint is an indicator in a program that tells the ABAP runtime processor to interrupt the program at a particular point. Unlike breakpoints, however, watchpoints are not activated until the contents of a specified field change. Watchpoints, like dynamic breakpoints, are user-specific, and so do not affect other users running the same program. You can only define watchpoints in the Debugger.
    Use
    You set watchpoints in the Debugger to monitor the contents of specific fields. They inform you when the value of a field changes. When the value changes, the Debugger interrupts the program.
    Features
    You can set up to five watchpoints in a program.
    See also Setting Watchpoints.
    You can also specify the conditions on which a watchpoint is to become active.
    You can specify logical conditions between up to five conditional watchpoints.
    See Specifying a Logical Expression.
    You can define watchpoints as either local or global. If you define a global watchpoint, it is active in all called programs. Local watchpoints are only active in the specified program.
    You can change and delete watchpoints.
    See Changing Watchpoints.
    You can use watchpoints to display changes to the references of strings, data and object references, and internal tables.
    See Memory Monitoring with Watchpoints
    Setting Watchpoints
    If you want to interrupt a program when the contents of a field or structure change, use a watchpoint. You can set up to five watchpoints, including watchpoints for strings.
    A watchpoint can be either local or global. Local watchpoints are only valid in the specified program. Global watchpoints are valid in the specified program, and also in all the other programs it calls.
    Procedure
    To set a watchpoint, start the Debugger and proceed as follows:
    Choose Breakpoint ® Create watchpoint or the corresponding pushbutton. The Create Watchpoint dialog box appears:
    Decide whether you want to set a local or global watchpoint.
    Enter the program and the name of the field for which you want to set the watchpoint. In the Program field, the name of the program currently running is always defaulted.
    If you want your watchpoint to be activated each time the contents of the field change, the definition is now complete, and you can return to the Debugger by pressing ENTER .
    To create a conditional watchpoint, that is only activated when a particular situation arises, choose one of the following relational operators.
    Operator
    Meaning
    <
    Less than
    <=
    Less than or equal
    =
    Equal
    <>
    Not equal
    =
    Greater than or equal
    Greater than
    You can use the Comparison field option to specify whether the comparison is to be carried out with a value that you specify or with the contents of another field. Depending on your choice from step 6, enter a value or a field for the comparison.
    Result
    The system confirms the watchpoint and adds it to the list in the display. When you finish your debugging session, the watchpoint is automatically deleted unless you have explicitly saved it.
    Specifying Logical Links
    If you have more than one conditional watchpoint, you can specify a logical link between them:
    OR
    Only one of the specified conditions must be met
    AND
    All of the conditions must be met.
    Changing Watchpoints
    Choose Goto ® Control debugging ® Watchpoints or the Watchpoints pushbutton to display the watchpoint list. The following dialog box appears:
    Choose the pencil icon in the line containing the watchpoint you want to change.
    Change the watchpoint attributes in the Create/Change Watchpoint.
    Choose ENTER .
    Deleting Watchpoints
    You cannot delete watchpoints by choosing Breakpoint ® Delete or Breakpoint ® Deactivate/activate. Instead, proceed as follows:
    Choose Goto ® Control debugging ® Watchpoints or the Watchpoints pushbutton to display the watchpoint list.
    Choose the trashcan icon in the line containing the watchpoint you want to delete.
    Memory Monitoring with Watchpoints
    You can use watchpoints to display changes to the references of strings, data and object references, and internal tables. By placing an ampersand (&) in front of the object name, you can display the reference in question in hexadecimal format. With internal tables, you can also display the table header by placing an asterisk (*) at the beginning of the name.
    &objectname
    Displays the references of strings, internal tables as well as data and object references
    *itab
    Displays the table header of the internal table itab
    Example
    If a watchpoint is set for the object in question at runtime, the program is stopped as soon as the reference is changed. A short dump can be intercepted in this way to stop the program being terminated when the memory is overwritten.
    Analyzing Source Code
    The Debugger contains an extensive range of functions that help you to analyze the source code of a program. You can step through the source code of a program in four different ways. For further information, refer to Stepping Through the Source Code
    For information about functions within the source code display, see Displaying the Source Code
    There are also different display modes that provide various information and display the contents of individual fields, tables, and so on:
    Reward if usefull

  • Error while executing program

    Hi ,In sap bods,  im using abap dataflow as my source and target is flat files ,while im executing its showing error
    "Execute ABAP program <C:/Program Files/Business Objects/BusinessObjects Data Services/zcustdim.aba> error <    Open File Error"
    how can i solve this problem,
    Moderator message: please have a look in the forums for Business Objects.
    Edited by: Thomas Zloch on Mar 8, 2012

    Prem,
    Looking at the error that you have shown, looks like its a different error. Is there a control/GRID that is being used in the program.
    If you are using a CUSTOM CONTAINER and a GRID to display the data, whenever you executing the program, you should not create the container. Something like this ..
        if cl_gui_alv_grid=>offline( ) is initial.
          create object CUSTOM_CONTAINER
                 exporting container_name = CUSTOM_CONTROL
        endif.
    Regards,
    Ravi
    note : Please reward the helpful posts.

  • DYNPRO_NOT_FOUND : ABAP program "MP058400"

    Dear Sir
    Category ABAP Programming Error
    Runtime Errors DYNPRO_NOT_FOUND
    ABAP Program MP058400
    Application Component PA-PA-IN
    Dynpro does not exist.
    The system attempted to use dynpro 0000 in program "MP058400".
    This dynpro does not exist.
    Kindly help for this
    Regards
    HARISH.B

    Whether you have enhanced the code, any new customization lately?

Maybe you are looking for

  • Opening Centered Pop-up window with Dynamic URL

    I got some code for a centered pop-up window in Flash from a Kirupa tutorial. It works well, except that you are supposed to put an actual URL for the 'address' variable. I'm using a dynamic URL (+url[p]+) for my URL. When I put address = "'+url[p]'"

  • How to get information(using APIs) about physical disks on solaris 8,9???

    i want to extract physical disk vendor name ,model and all other information. which solaris APIs can be used to get this information.

  • Roll-up and Drill-down in JOLAP

    HI!!!! I'm studing the JOLAP specification and I don't understand how to implement the drill-down and roll-up operations. Where can I find some example about it? HELP, PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • Change work center

    Hi all, Please excuse my ignorance in what is probably an easy operation. What is the transaction code for changing a work center that a production order is setup default to be completed in? For example if i have product 'A' that is usually completed

  • Add error message to application log from BADI

    Hi All, I am working on a BADI...... As the txn is already adding its messges in log thru BAL_LOG_CREATE, BAL_LOG_MSG_ADD...etc...... after that my badi comes into picture.....and it displays the message in POPUP Now i want to add my error message fo