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

restrict the badi for particular transaction code

Former Member
0 Likes
1,417

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....

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....

6 REPLIES 6
Read only

Former Member
0 Likes
1,073

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

Read only

0 Likes
1,073

hi Vikas, 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.

Read only

0 Likes
1,073

Hi Praveen,

Since we can set filter for this badi implementation you can place a condition as follows:

If sy-tcode = 'FB60'.

write your transaction specific code here...

endif.

regards,

Azaz ali.

Read only

0 Likes
1,073

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

Read only

varma_narayana
Active Contributor
0 Likes
1,073

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>

Read only

0 Likes
1,073

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.