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: 

button for Additional data custom only to purchasing data view on XK01/02/03

0 Kudos
503

Hi guys,

I need to view my button additional data only to screen of purchasing data of the XK01/02/03. Now i see the button to all screen view. Can you help me?

6 REPLIES 6

abo
Active Contributor
0 Kudos
444

Could this answer be also useful to you?

Yes, it's XD vs XK but the BADIs are similar

0 Kudos
444

Hi Andrea,

thanks for your answer but I already try this solution and it isn't suitable because the method SUPPRESS_TAXI_TABSTRIPS is triggered after clicking on the button.

I think I have to act on the standard or on customizing but I don't know exactly where. 😞

Can you help me?

thanks

abo
Active Contributor
444

Unfortunately I don't have a readymade example for your case and my own work did so far did not have that requirement; could it be acceptable to your situation to leave the button visible but simply do nothing if conditions are not met? That should be doable.

444

yes, this could be a solution, thanks Andrea. If anyone knows the solution I kindly ask if they can help me, please.

444

This method of the BAdI will only prevent the display of some customer dynpros after the click,
AFAIK there is no standard option to hide the function in the main screen (VENDOR_ADD_DATA~CHECK_ADD_ON_ACTIVE is only called once)

METHOD if_ex_vendor_add_data_cs~suppress_taxi_tabstrips.

* If no code or not allowed at least in view - disable the general data tab.es
  AUTHORITY-CHECK OBJECT 'F_LFA1_GEN'
           ID 'ACTVT' FIELD '03'.
  IF sy-subrc NE 0.
    APPEND 'Z1-LFA1' TO e_not_used_taxi_fcodes.
  ENDIF.
* If no code or not allowed at least in view - disable company tab
  IF i_bukrs IS INITIAL.
    APPEND 'Z1-LFB1' TO e_not_used_taxi_fcodes.
  ELSE.
    AUTHORITY-CHECK OBJECT 'F_LFA1_BUK'
             ID 'BUKRS' FIELD i_bukrs
             ID 'ACTVT' FIELD '03'.
    IF sy-subrc NE 0.
      APPEND 'Z1-LFB1' TO e_not_used_taxi_fcodes.
    ENDIF.
  ENDIF.
* etc.

0 Kudos
444

Thank you very much