Thursday, April 25, 2013

How to suppress the POST button on a FI transaction

Copy the Sample Function Module(SAMPLE_INTERFACE_00001140) to 'ZSAMPLE_INTERFACE_00001140' and put the below code:-

IF sy-tcode = 'FV50'.
t_exctab-okcod = 'BU'. " do not allow to post
APPEND t_exctab.
ENDIF.
(If you want to disable this post option for multiple transactions, just maintain them in a custom table. Instead of IF Sy-tcode = 'FV50' just read from this custom table.)


Go to transaction FIBF and then Goto Settings->Products ->of a Customer. Press Execute.
Click on New Entries and create a new product ZPOST, give a proper description , Select the check box and save.

Go back to the FIBF first screen. Go to Settings->P/S Modules->of a customer
Click on the new entries Enter the event as 00001140, Product as ZPOST and Function Module as ZSAMPLE_INTERFACE_00001140. Save.

Now when you execute FV50, you will not see POST option on the application tool bar as well as from the Menu.

2 comments:

  1. Shiva,

    How are you doing? Hit me on gmail (nsoma75). I would like to get in touch.

    Soma

    ReplyDelete
  2. Hi Guys,

    After disabling the post button, how can i show it back again in code?.

    ReplyDelete