Skip to Content
author's profile photo Former Member
Former Member

BAPI_ALM_NOTIF_CREATE Short dump

Dear Experts,

Good day. I'm getting short dump TABLE_INVALID_INDEX when try to create notification for the same PM order inside the loop.

Im passing equipment(same equipment number as well but different operation) , reported by,short text and order id to the BAPI. Really appreciate your advise for the issue. i have cleared all the input values and use BAPI_ALM_NOTIF_SAVE and BAPI_TRANSACTION_COMMIT commit each time. Please find the dump details below.

Short Text

Error in ABAP/4 statement when processing an internal table.

What happened?

Error in the ABAP Application Program

The current ABAP program "SAPLCOBO" had to be terminated because it has

come across a statement that unfortunately cannot be executed.

Error analysis

When changing or deleting one or more lines of the internal table

"\FUNCTION-POOL=COBP\DATA=AFVG_BT[]" or when inserting in the tabl

"\FUNCTION-POOL=COBP\DATA=AFVG_BT[]", 0 was used as

the line index. An index less than or equal to zero is not

allowed.

The error can occur when using the following options:

1. "INDEX idx" for specifying the line number in the table

"\FUNCTION-POOL=COBP\DATA=AFVG_BT[]"

where you want to change, insert or delete.

2. "FROM idx" for specifying the start index when deleting a line

area from or inserting a line area into the table

"\FUNCTION-POOL=COBP\DATA=AFVG_BT[]".

3. "TO idx" for specifying the end index when deleting a line

area from or inserting a line area into the table

"\FUNCTION-POOL=COBP\DATA=AFVG_BT[]".

At the time of the termination, the table contained 1 lines.

Information on where terminated

Termination occurred in the ABAP progra

"CO_BO_UPDATE_OPR_OF_ORDER".

The main program was "RS_TESTFRAME_CALL

In the source code you have the termina

of the (Include) program "LCOBOU06".

Source Code


398

399 * Update buffer table

400 MODIFY afvg_bt INDEX ls_afvgd_new-indbt.

401 * Jetzt auch AFVGD_UPD aktualisieren

>>>>> MOVE-CORRESPONDING afvg_bt TO afvgd_upd. " note

403 IF NOT afvgd_upd-sumnr IS INITIAL. " note 4

404 READ TABLE afvg_bt INTO *afvgb INDEX afvg_bt-indexsumnr.

Thanks and Regards

Shankar



Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 23, 2016 at 07:41 AM

    issue solved.

    Thanks everyone.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 23, 2016 at 06:55 PM

    Check below statement in debugger:

    MODIFY afvg_bt INDEX ls_afvgd_new-indbt.


    'ls_afvgd_new-indbt' must not be blank which might be causing the dump.

    Add a comment
    10|10000 characters needed characters exceeded

    • If anybody can try by himself and help Shankar, here is a compiling 7.40 code where data must be replaced with your own values (but I couldn't make it work on my system because of missing customizint):

      TYPES : BEGIN OF con_temp,
                equnr    TYPE string,
                uname    TYPE string,
                txt_oper TYPE string,
                priority TYPE string,
                aufnr    TYPE aufnr,
              END OF con_temp,
              tab_con_temp TYPE STANDARD TABLE OF con_temp WITH EMPTY KEY.
      DATA: notif_type         TYPE bapi2080-notif_type,
            notifheader        TYPE bapi2080_nothdri,
            notifheader_export TYPE bapi2080_nothdre,
            lt_return          TYPE TABLE OF bapiret2.
      
      DATA(i_tab_con_temp) = VALUE tab_con_temp(
      ( equnr = '000000000000000001' uname = 'NAME' txt_oper = 'test1' priority = '1' aufnr = '00000000001' )
      ( equnr = '000000000000000001' uname = 'NAME' txt_oper = 'test2' priority = '1' aufnr = '00000000001' )
      ).
      
      LOOP AT i_tab_con_temp INTO DATA(wa_con_temp).
      
        CLEAR: notifheader,notifheader_export.
      
        notif_type  =  'M1'.
        notifheader-equipment  = wa_con_temp-equnr.
        notifheader-reportedby = wa_con_temp-uname.
        notifheader-short_text = wa_con_temp-txt_oper.
        notifheader-priority   = wa_con_temp-priority.
      
        CALL FUNCTION 'BAPI_ALM_NOTIF_CREATE'
          EXPORTING
            notif_type         = notif_type
            notifheader        = notifheader
            orderid            = wa_con_temp-aufnr
          IMPORTING
            notifheader_export = notifheader_export
          TABLES
            return             = lt_return.
        IF line_exists( lt_return[ type = 'E' ] ).
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          CONTINUE.
        ENDIF.
      
        CALL FUNCTION 'BAPI_ALM_NOTIF_SAVE'
          EXPORTING
            number      = notifheader_export-notif_no
          IMPORTING
            notifheader = notifheader_export
          TABLES
            return      = lt_return.
        IF line_exists( lt_return[ type = 'E' ] ).
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
        ENDIF.
      
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING wait = 'X'.
      
      ENDLOOP.
      

      Good luck!

  • Posted on Jun 26, 2016 at 02:32 PM

    shankar balaji wrote:

    Good day. I'm getting short dump TABLE_INVALID_INDEX when try to create notification for the same PM order inside the loop.

    I don't understand why you're talking about a "loop", which tends to say you have run a program, as the short dump you have pasted shows it occurs during a manual SE37 test (RS_TESTFRAME_CALL). So, if you did it using SE37, did you do it via a "test sequence" "object", as explained in note 604300 (which applies exactly to your case)?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sandra,

      I have created a Z function module. Inside the function module I'm using BAPI_ALM_NOTIF_SAVE. So I'm creating notification based on sub operation of an PM order. A PM order may have several operation and sub operation. So that is why I'm using this BAPI inside the loop.


      Regards

      Shankar

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.