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: 

How to identify relevant BADIs to hide a screen field from specific users

Former Member
0 Kudos

We have a business requirement to hide a document item field (BSEG-XREF3) from specific users (i.e make the field invisible if the userid does not exist in a Z table) during FI invoice entry/maintenance/display via transactions FB01, FB02, FB03, FV50, FV60, FBV0, etc.. We know that it would be possible to do this via modification to the Process Before Output sections of LF040O00, LFDCBFM0, MF05AO00_DYNPRO_MODIFIZIEREN, MF05LO00, but would prefer to avoid modification if possible.

I believe that BADIs could possibly be used for screen enhancements, but have not had any previous exposure to BADIs, so I'm really not sure whether it's possible to use BADIs for our specific requirement. For example, using the advice given in the 2nd post in thread , I've searched SAPMF05A for all 'CALL METHOD cl_exithandler=>get_instance' statements, and have found that a single BADI (FBAS_CIN_MF05AFA0 - EWT - Downpayment Clearing - Tax transfer for CIN) seems to exist for FB01. The description of this BADI sounds completely inappropriate for our requirement. However, subsequent posts in that thread suggest far more BADIs for the relevant transaction than were given when searching the ABAP for all 'CALL METHOD cl_exithandler=>get_instance' statements, so I'm not convinced that the procedure I'm following will provide me with all the relevant BADIs for the transaction.

Please can you advise me how to identify which BADIs - if any - can be used to control screens before output for FB01 screen SAPMF05A/332 (SAP R/3 4.6C)?

Many thanks in anticipation,

Jules

1 ACCEPTED SOLUTION

former_member376453
Contributor
0 Kudos

Hi - I am not sure but you can try to use transaction SHD0 to create a screen varient. You can accordingly provide authorization for the field you have mentioned.

Kuntal

10 REPLIES 10

former_member376453
Contributor
0 Kudos

Hi - I am not sure but you can try to use transaction SHD0 to create a screen varient. You can accordingly provide authorization for the field you have mentioned.

Kuntal

0 Kudos

Hi Kuntal,

Thank you very, very much for your prompt response and very useful alternative suggestion.

The screen variant solution would be invaluable under different circumstances, but would be too complex to administer for this particular issue because we're trying to hide the field from unauthorised users in over 100 invoice entry/maintenance/display transactions.

We can make a Process Before Output modification to 4 SAP standard programs (LF040O00, LFDCBFM0, MF05AO00_DYNPRO_MODIFIZIEREN, MF05LO00) to make the field invisible for unauthorised users (i.e. whose user-ids are not in a Z* table), but would prefer to avoid modification if we could use BADIs instead. You've said that you're not sure how we can identify the relevant BADIs, but I very much appreciate the suggestion you've made anyway - it might be useful to others who find themselves in a similar situation for a more limited number of transactions.

Please can someone advise me how to identify which BADIs - if any - can be used to control screens before output for FB01 screen SAPMF05A/332 (SAP R/3 4.6C)?

Many thanks,

Jules

0 Kudos

Julia, don't put too much hope on this "new" technology. BAdI's goal is not to enhance screens. It can't do better than old (but still used) user exits (CMOD, BTE, customizing, ...)

Even the powerful enhancement framework can't do anything for changing screens (it can be used, but it's worse than doing a modification of standard).

The best technology is the transaction/screen variants, and GuiXT can offer you interesting functions, see this one: http://www.synactive.com/docu_e/doc_roles.html

0 Kudos

Hi Sandra,

Many thanks for clarifying that BADIs really can't be used for screen enhancements. It's reassuring to hear this from an expert, as it was the conclusion that I'd reached myself, but I wasn't entirely confident as I've insufficient experience with BADIs.

Thanks also for your suggestions regarding Screen Variants and GuiXT. After investigating all options, the original proposal of Process Before Output modification to 4 SAP standard programs (LF040O00, LFDCBFM0, MF05AO00_DYNPRO_MODIFIZIEREN, MF05LO00) will be the most appropriate for the business.

Thanks to Kuntal's, Ravi's and your valuable contributions, my question is now fully answered.

Many thanks for your help!

Jules

0 Kudos

> BADIs really can't be used for screen enhancements

To make things clear for everybody: BAdIs allow screen enhancements (there is an explicit function to define subscreens, which is approximately the same as for user exits in CMOD), but do not bring more screen enhancement functions than older technologies

0 Kudos

Hi Sandra,

Many thanks for correcting me and for clarifying this for me and everyone else.

Kind regards,

Jules

Former Member
0 Kudos

Hi,

In general we find BADIs like this :

1.Finding the package of that particular transaction.

Enter Tcode : FB01 > system> status -->(you will get pop up window) click on program --> u will get a screen click on GOTO --> attributes Here you will get the package name.

Use this package name in se18.

2.click on f4 functionality and in search parameters enter this package name.

you will be seeing list of badi which are relevant to your application and filtering out every thing else.

0 Kudos

Hi ch_ravi_sap,

Many thanks for clarifying how to identify the relevant BADIs for a specific transaction. This revealed 2 BADIs, neither of which are appropriate for the change that we're trying to make, but it is extremely useful to know how to identify them properly, so thank you!

Kind regards,

Jules

Former Member
0 Kudos

Hi all,

Its possible to make it with BTE below : (program SAPMF05L | source : MF05LFO0)

CALL FUNCTION 'OPEN_FI_PERFORM_00001420_P'

   EXPORTING

     I_BKPF         = BKPF

     I_BSEG         = BSEG

     I_AKTYP        = T020-AKTYP

   TABLES

     T_NOINPUT      = NOINPUTTAB

     T_INVISIBLE    = INVISIBLETAB

   EXCEPTIONS

     NOTHING_ACTIVE = 4

     OTHERS         = 8.

If you want to make XREF3 to noninput, you just input in table NOINPUTTAB the value BKPF-XREF3,

according the fields values on OB32 transaction. Also if you want to make this field invisible, you input in INVISIBLETAB table..

Implement BTE  with FIBF transaction after creat the function modul like a sap sample SAMPLE_PROCESS_00001410.

Kind regards,

Le Baron Rouge.

santosh1588
Explorer
0 Kudos

Dear Experts,

Adding to the above, Could you please help me populate the fields Xref1_hd,xref2_hd in 1710 subscreen of program SAPMF05L | source : MF05LFO0 in BKPF table. I didnt find any relevant BADI for it to populate them from billing to FI accounting document posting.

Kindly help.