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

help with badi

Is it a good idea to use function modules in badi custom code

i am trying to modify one of the infotype records (0004) using badi but the field is not getting updated , im using func mod HR_INFOTYPE_OPERATION.

Can u suggest any alternatives?? Help will be much appreciated...

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Nov 24, 2007 at 08:07 PM

    Hello Vinay

    Unfortunately you did not reveal the most important detail for answering your question:

    Which BAdI are you using?

    Assuming that you perhaps use BAdI <b>HRPAD00INFTY</b> (<i>Update / Infotype maintenance</i>) then you can see from the signature of the interface methods (IF_EX_HRPAD00INFTY; on ECC 5.0) that none of them is intended for changing current data of the transaction. On the contrary, all method parameters are IMPORTING parameters and are called BY VALUE. Thus, no changes of the parameters within the interface methods will be transmitted to the caller.

    Method IF_EX_HRPAD00INFTY~AFTER_INPUT is the only method having an exception which implies that this method can be used to perform checks (compare PBO vs. PAI data) and reject changes by raising the exception.

    Final remark:

    It is complete nonsense to commit work <b>within </b>a BAdI because the BAdI is called within a transaction which should be properly committed at the end of the transaction.

    Regards

    Uwe

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 24, 2007 at 10:21 AM

    Commit the trasaction after calling the function module HR_INFOTYPE_OPERATION.

    Regards,

    Amit

    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.