SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Метод ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS при создании вкладки



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
Bergamot
Участник
Участник



Joined: 15 Aug 2011
Posts: 1

PostPosted: Mon Aug 15, 2011 3:00 pm    Post subject: Метод ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS при создании вкладки Reply with quote

Кто знает, помогите понять, зачем мы необходимо выполнять этот код, когда мы пытаемся создать вкладку в me21n-me23n.
Без него вкладка не добавляется, но его смысла я понять не могу.

Каким образом назначаются значения метаполей типа mmmfd_cust_01?
можно ли добавлять свои определения в группу типов MMMFD и надо ли это делать?

Code:
1   METHOD IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS .
2
8     FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
9
10     LOOP AT ch_mapping ASSIGNING <mapping>.
11
12       CASE <mapping>-fieldname.
13
14         WHEN 'MATKL'.      <mapping>-metafield = mmmfd_mat_grp.
15         WHEN 'PLIFZ'.      <mapping>-metafield = mmmfd_plan_del.
16         WHEN 'WEBAZ'.      <mapping>-metafield = mmmfd_gr_pr_time.
17         WHEN 'BADI_BSGRU'. <mapping>-metafield = mmmfd_cust_01.
18         WHEN 'BADI_AFNAM'. <mapping>-metafield = mmmfd_cust_02.
19
20       ENDCASE.
21
22     ENDLOOP.
23
24   ENDMETHOD.                    "IF_EX_ME_GUI_PO_CUST~MAP_DYNPRO_FIELDS
Back to top
View user's profile Send private message
Удав
Гуру
Гуру


Age: 48
Joined: 25 Jan 2008
Posts: 580
Location: Москва

PostPosted: Mon Aug 15, 2011 3:18 pm    Post subject: Reply with quote

см.документацию к определению BAdI ME_GUI_PO_CUST:
Quote:
Metafields
Metafields are used in the Enjoy transactions of Purchasing to characterize business content and detach it from concrete data holding. Using metafields in the system, you can thus reference a business variable on a uniform basis.

Example
The business variable 'purchase order unit' is represented in the user interface by the technical field MEPO1211-MEINS and in data holding by the field EKPO-MEINS.
Technically, metafields are integer constants, whose definitions you can find in the type group MMMFD.

Note
A name range starting from 90000000 is available for customer applications (mmmfd_cust_01).
Metafield and field selection
The field selection is determined on the basis of the metafields. For this purpose, the customer's own subscreen must know the list of the fields represented and their assignment to the metafields.

This relationship is created in the BAdI ME_GUI_PO_CUST.

There on the one hand a DDIC structure is specified in the method SUBSCRIBE, from the components of which the field catalog is created. In addition, the link to the relevant metafield in each case is established in the method MAP_DYNPRO_FIELDS.

In method FIELDSELECTION_ITEM of the BAdI ME_PROCESS_PO_CUST, which is a prerequisite for BAdI ME_GUI_PO_CUST, these metafields are then used to influence the selection of the customer's own fields.

Metafield and error handling
Metafields also have an important function in error handling. They establish the connection between a message and the business content.

Example
You can control the positioning of the cursor during the processing of messages.
If you wish to do this when implementing your own checks, use the following macros:

mmpur_metafield
This macro links the metafield with the message generated with the subsequent macro mmpur_message_forced (see below). A list of the known metafields can be found in the type group MMMFD. This also contains some definitions for customer enhancements (MMMFD_CUST_01 to MMMFD_CUST_10).
mmpur_message_forced
You use this macro to generate the actual message. The message is linked to the known business object (e.g. document header, document item) and the previously specified metafield. The macro requires exactly sevem parameters: message category (I,W,E), message class, message number and the four message parameters. (See also the ABAP message statement).
Further notes
The above-mentioned macros are defined in the program MM_MESSAGES_MAC. Please include this program in your own application.
Never issue messages in BAdI ME_GUI_PO_CUST! This is the task of the business logic and must therefore be done via the BAdI ME_PROCESS_PO_CUST.
Never use the ABAP statement MESSAGE in the BAdI ME_PROCESS_PO_CUST. Please use the macro mmpur_message_forced only. This macro only writes a message in the message collector.
If you wish to mark the business object as invalid in order to prevent posting, you must additionally use the INVALIDATE ( ) method of the relevant interface. In this connection, see also the code example in the PROCESS_ITEM method of the BAdI ME_PROCESS_PO_CUST.

_________________
С уважением,
Удав.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.