Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function RH_INSERT_INFTY dumping and not returning to main program

former_member201275
Active Contributor
0 Likes
1,823

Hi,

I am calling function RH_INSERT_INFTY but when I run the program it is dumping within the Function. I would like to handle the error within my program so I can determine exactly which record it is failing on, but it doesn't return control to my calling program, it simply dumps in the Function so it is difficult to see for exactly which record in my internal table is causing this.

Anybody had this problem, and know how to solve this?

My code below:

    CALL FUNCTION 'RH_INSERT_INFTY'
    EXPORTING
      vtask               = 'D'
      commit_flg          = ' '
    TABLES
      innnn               = lt_p1001
    EXCEPTIONS
      no_authorization    = 1
      error_during_insert = 2
      repid_form_initial  = 3
      corr_exit           = 4
      begda_greater_endda = 5
      OTHERS              = 6.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,408

Hi,

Analyze the dump in ST22 or attach the ST22 error file generated in your next mail on this thread.

Regards,

DPM

8 REPLIES 8
Read only

Former Member
0 Likes
1,409

Hi,

Analyze the dump in ST22 or attach the ST22 error file generated in your next mail on this thread.

Regards,

DPM

Read only

Former Member
0 Likes
1,408

Hi Glen,

             Can you put here what dump error is it showing, usually function module dumps if there is a type mismatch between the parameters to be passed to them, so Please check the data types of the vtask type HRRHAP-VTASK and the value D is also typed HRRHAP-VTASK.

If not solved. Pls put the dump message here.

Happy Coding,

Santhosh Yadav

Read only

former_member201275
Active Contributor
0 Likes
1,408

Hi,

Thank you for your replies.

There is no ST22 dump, only SM21. The error on SM21 is:

Transaction Canceled 5A 164 ( )

Documentation for system log message D0 1 :

The transaction has been terminated.  This may be caused by a
termination message from the application (MESSAGE Axxx) or by an
error detected by the SAP System due to which it makes no sense to
proceed with the transaction.  The actual reason for the termination
is indicated by the T100 message and the parameters.

Additional documentation for message 5A                  164

Creation of object ID 00000000 is not allowed

No documentation exists for message 5A164

I have debugged the Function and I know where it dumps i.e. here in the include LRHAPF30:

          if ( buffer-objid is initial or
             ( buffer-infty eq '1001' and
               ub_turn_subrc = 0 and                        "VWMA303406
*              nur bei Verknüpfung mit Umkehrung schlimm    "VWMA303406
               buffer-varyf+2(8) eq '00000000' ) ).
          message a164.                "Objekt-ID 00000000 n.e.

The problem is that I cannot run in debug mode on Production, therefore I would like to have the control in my program.

Read only

0 Likes
1,408

Are you passing OBJID to the call in lt_p1001

Read only

0 Likes
1,408

Hi Glen,

               For this FM you need to pass OBJECTID as a field in the table lt_p1001. Please check that.

I think that's why it dumps.

Happy Coding,

Santhosh Yadav

Read only

0 Likes
1,408

Yes, I am passing the OBJID.

Unfortunately I don't have debug access in Production so I cannot get to the exact issue. I have recreated this on Dev, to force the dump.

I think I will build in the same check now before I call the FM, i.e. that OBJID is filled, and that my internal table is not empty.

Thank you all for your help.

Read only

kamesh_g
Contributor
0 Likes
1,408


Hi

Use the FM  'RH_PNNNN_MAINTAIN'   . In this FM you will have exceptions .

And for your FM .Please check whether both the object ids exists in the system .

                          Check all mandatory fields you are passing objid,otype,sobid,rleat,rsign,sclas etc

                         and check the valid relation you are passing  or not .

Thanks

Kamesh

Read only

former_member187748
Active Contributor
0 Likes
1,408

Hi Glen,

along with CALL FUNCTION 'RH_INSERT_INFTY' , please also use

RH_UPDATE_DATABASE

this will surely sort out your problem.