Application Development 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: 

Hiding a button added on XD02 screen when company code is initial

Former Member
0 Kudos

Hi

I have added a button "Financial extract" in XD02 .

I added a button in SPRO ,Modification-Free Enhancement in Customer Master Record ,by adding screen group and function code.

Now my requirement is If company code is initial i need to hide my custom button in XD01/XD02??How to do that?

Any suggestions??

4 REPLIES 4

Former Member
0 Kudos

When you added a button, there should be some code written in the PAI of that screen.

Similary a PBO would exist for the screen.

In the PBO, check if your company code is initial and then check for your screen-group and code something like this:

if <g_bukrs> is initial.

loop at screen.

if screen-group = some name'

screen-invisible = '1'.

modify screen.

endif.

endloop.

endif.

hope this helps.

Thanks

Kiran

0 Kudos

Thanks for your reply.

But the problem is i added a button following these steps:

In SPRO ,Modification-Free Enhancement in Customer Master Record ,I added a screen group and function code for my button.It got added automatically in XD02 without writing a code.

Now my requirement is If company code is initial i need to hide my custom button in XD01/XD02??How to do that?

0 Kudos

you need to find out an user-exit or a badi or an enhancement spot(if you are on ecc6.0). You want to take help of an abaper for this.

Once you find this, he can place this simple pice of code for you.

Thanks

Kiran

former_member182485
Active Contributor
0 Kudos

Hi,

I have worked in the similar requirment it is very simple

based on your condition ie if company code = space

add the function code to exclueing table of the PF status table

to write this pice of code you can use implicit enhancement in the form where set pf status is written.

Hope this helps.

If you have any further querry feel free to contect me.

Regards

Biaks