Skip to Content
author's profile photo
Former Member

restrict the badi for particular transaction code

hi, i have implemented BADI_FDCB_SUBBAS01 and in the subscreen area 10 i attatched my own module pool program and screen number. my requirement is for FB60 only. and it is working for FB60 fine. the problem is also working for FV60.

Is there any possibility to restrict for particular transaction code say for FB60.

Please reply me soon....

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • author's profile photo
    Former Member
    Posted on Aug 23, 2007 at 09:52 AM

    Hi Praveen,

    Since this is a single use badi you have the option to create a new filetr of your own. You can create a filter of type sy-tcode and in your implementation assign it a value of your transaction. Thus if someone else also wants to use it for some other transaction can have a implementation of his own for some other transaction.

    The other way which is though not the recommended way buy easy to use is to put a check before your code on SY_TCODE = your transaction.

    revert for more clarifications if required.

    <b>Always reward points to useful suggestions.</b>

    regards,

    Vikas

    Message was edited by:

    Vikas Taneja

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Praveen,

      I have checked both transaction and both have the same main program as well as the same screen number, thus resulting the subscreen being called from both.

      In this case I guess we will have to try the first approach i mentioned.

      However if you will put a filter by creating it in the definition and then using it in the implementation then the implementation might not get called and the screen might not show up when running the transaction which has not been defined as filter value in implementation.

      try this approach and revert for more clarifications if required.

      <b>Always reward points to useful suggestions.</b>

      regards,

      Vikas

  • Posted on Aug 23, 2007 at 10:26 AM

    Hi

    In your Badi logic put this condition in the beginning.

    CHECK SY-TCODE = 'FB60'.

    Now it will not be executed for any other Tcodes.

    <b>Reward if Helpful</b>

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi, actually in the implemented BADI method i have given the condition like sy-tcode eq fb60. but what happening is which i have created subscreen for FB60 is also visible for FV60. can we make it is not visible for FV60.