‎2014 Jan 24 7:35 AM
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.
‎2014 Jan 24 8:06 AM
Hi,
Analyze the dump in ST22 or attach the ST22 error file generated in your next mail on this thread.
Regards,
DPM
‎2014 Jan 24 8:06 AM
Hi,
Analyze the dump in ST22 or attach the ST22 error file generated in your next mail on this thread.
Regards,
DPM
‎2014 Jan 24 8:12 AM
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
‎2014 Jan 24 8:24 AM
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.
‎2014 Jan 24 8:34 AM
‎2014 Jan 24 8:36 AM
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
‎2014 Jan 24 8:41 AM
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.
‎2014 Jan 24 8:30 AM
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
‎2014 Jan 24 9:05 AM
Hi Glen,
along with CALL FUNCTION 'RH_INSERT_INFTY' , please also use
RH_UPDATE_DATABASE
this will surely sort out your problem.