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

Using FM RH_INSERT_INFTY

Hi,

I want to use FM RH_INSERT_INFTY in background job. If there is no error this FM works as expected, but if an error comes, this FM terminates the background job without any error.

How can i catch errors from this FM in background job?

Regards,

Ashish Gupta

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 14, 2011 at 07:59 PM

    What Infotypes are you trying to Insert? if it is one of the PA ones you would be better off using HR_INFOTYPE_OPERATION. You say "When there is an error the FM terminates". What kind of errors cause this because I see that the FM has EXCEPTIONS so you can query SY-SUBRC.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Richard,

      Thanks a lot for your reply.

      I am inserting a record in IT1001 (cost centre relationship 1001).

      I have used this FM in method FLUSH of HCM Process and Forms Advanced Generic service. If i create a normal program inse38, this FM gives error in exception as sy-subrc = 2, which is correct. But FLUSH method is run in background with user WF-BATCH.

      Now what happens is, there is a FM HRCA_COBL_CHECK in this FM RGH_INSERT_INFTY. Now what happens is HRCA_COBL_CHECK give an error message KI 260. To display this error message it is looking for screen which is not available in background and hence just terminates the processing of program without returning any error message or short dump.In HR_INFITYPE_OPERATION we have option to supress dialog but no similar option in this FM.

      regards,

      Ashish Gupta

  • author's profile photo Former Member
    Former Member
    Posted on Jul 15, 2011 at 07:40 AM

    Hello Ashish,

    Please try to do this.

    As soon as the Sy-Subrc fails for your FM(RH_INSERT_INFTY), Instead of passing an error message. Append the error message to a separate Internal Table (lets say some error table).

    This would not stop the process while background execution.

    I hope this helps.

    Thanks & Regards,

    Rohit Sharma

    Add a comment
    10|10000 characters needed characters exceeded

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.