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

ME2xN - Hide custom header tab.

Former Member
0 Likes
2,325

Hello,

In transactions me21n, me22n and me23n two customs header are added with ME_GUI_PO_CUST implementation.

Therefore in method 'SUBSCRIBE', I add two entries corresponding to the news tabs => it works fine.

in method 'MAP_DYNPRO_FIELDS' I fill ch_mapping internal table.

=> my new tabs appears in transaction.

I create a new class implementing interface 'IF_EX_ME_GUI_PO_CUST'

In method 'FIELDSELECTION_HEADER' depending to bsart value, I update internal table ch_fieldselection to hide field for concerning tab.

I have this data into table at the end of method

METAFIELD FIELDSTATUS

90000010 -

90000011 -

90000012 -

90000013 -

90000014 -

90000015 -

90000016 -

90000017 -

90000020 +

90000021 +

90000022 +

90000023 +

lines 90000010 to 90000017 corresponds to the first tab.

I was expecting for tab will be hidden and the second tab will be displayed.

But result is

- 1st tab is displayed with no field

- 2nd tab is displayed with all fields.

If all fieldstatus are set to - ==> the two tabs are hidden.

It's possible to hide only one tab ?

Thanks.

David B.

1 ACCEPTED SOLUTION
Read only

eduardo_hinojosa
Active Contributor
0 Likes
1,652

Hi

Please, see SAP Note 496083 - FAQ: Customer enhancements (User Exits) in purchasing, last question related with the utilization of this BADI.

Tru with this coding in method FIELDSELECTION_HEADER in the BADI ME_PROCESS_PO_CUST.

  DATA: l_persistent TYPE mmpur_bool,

        l_changeable TYPE mmpur_bool,

        l_header TYPE mepoheader,

        num_idoc TYPE edi_docnum.

  FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.

* if the item is already on the database,

* we disallow to change field badi_bsgru

  l_persistent = im_header->is_persistent( ).

  l_changeable = im_header->is_changeable( ).

  l_header = im_header->get_data( ).

* Here do your checks according your requirements

  IF l_changeable = 'X'.
    <fs>-fieldstatus = '.'. " READY FOR INPUT
  ELSE.
    <fs>-fieldstatus = '*'. " view
  ENDIF.
ELSE.
  <fs>-fieldstatus = '-'."SUPRESS IT
ENDIF.

   ELSE.

<fs>-fieldstatus = '-'.   "SUPRESS IT

   ENDIF.

  ENDIF.

I hope this helps you

Regards

Eduardo

3 REPLIES 3
Read only

eduardo_hinojosa
Active Contributor
0 Likes
1,653

Hi

Please, see SAP Note 496083 - FAQ: Customer enhancements (User Exits) in purchasing, last question related with the utilization of this BADI.

Tru with this coding in method FIELDSELECTION_HEADER in the BADI ME_PROCESS_PO_CUST.

  DATA: l_persistent TYPE mmpur_bool,

        l_changeable TYPE mmpur_bool,

        l_header TYPE mepoheader,

        num_idoc TYPE edi_docnum.

  FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.

* if the item is already on the database,

* we disallow to change field badi_bsgru

  l_persistent = im_header->is_persistent( ).

  l_changeable = im_header->is_changeable( ).

  l_header = im_header->get_data( ).

* Here do your checks according your requirements

  IF l_changeable = 'X'.
    <fs>-fieldstatus = '.'. " READY FOR INPUT
  ELSE.
    <fs>-fieldstatus = '*'. " view
  ENDIF.
ELSE.
  <fs>-fieldstatus = '-'."SUPRESS IT
ENDIF.

   ELSE.

<fs>-fieldstatus = '-'.   "SUPRESS IT

   ENDIF.

  ENDIF.

I hope this helps you

Regards

Eduardo

Read only

0 Likes
1,652

Hi,

thanks for your answer.

But I have already read the SAP Note 496083.

It's written a tab without field is hidden.

But the method who check if all fields are hidden checks fields for both tabs and not for only one custom tab.

Internal table ch_fieldselection contains fields for tabs1 and tabs2.

If I try to hide tabs1, not all fields are marked has hidden, because field into tabs2 are not hidden.

When the system check if all field are hidden, form return false (because of field from tabs2).

Except this part

  l_persistent = im_header->is_persistent( ).

  l_changeable = im_header->is_changeable( ).

My code is similar from yours.

PS: I put * and not + into my internal table.

there is a method to dissociate tabs ?

Read only

0 Likes
1,652

Hi,

There is no method, but it can be done manually.

Instead of giving it a value (i.e '-' ), clear it.

Sample you have two tabs:

Tab A - field 1, field 2

Tab B - field 3, field 4

So if you want to display Tab A only, clear the fieldstatus of fields 3 and 4.

To display Tab B, clear fieldstatus of fields 1 and 2.

I've tried it and it works.

Thanks!