ME21N Custom Field in Document Header.
Hi Guys,
Could you guys please help me with the following problem.
I have a custom field in a custom tab in the header of ME21N. But When I change that field manually the transaction does not update the pricing. But if I change any standard field, the transacction update the pricing.
Do you have any Idea why and how to solve this ?
Thank you very much.
Hi , Thanks for your answer Raymond. But now I have the answer. Let's pretend that I want to insert a new field in EKKO . the field is ZZPUERTO and i want the transaction recalculate the price if i change that field.
1-. the first thing that you need is to create a copy of this function group MEPOBADIEX. There you have to create your new screen. Comment all the code in all function modules. Use function module ZMEPOBADIEX_PUSH. Insert there your code. for example:
zmepo_badi_struct = im_dynp_data.
2-. Use ME_GUI_PO_CUST and populate method suscribe with the data from the screen that you just create in the first step. in the following way :
Method: Suscribe
CHECK im_application = 'PO'.
CHECK im_element = 'HEADER'.
* each line in re_subscribers generates a subscreen.
* We add one subscreen in this example
CLEAR re_subscribers[].
* the name is a unique identifier for the subscreen and
* defined in this class definition
ls_subscriber-name = subscreen1.
* the dynpro number to use
ls_subscriber-dynpro = '9000'.
* the program where the dynpro can be found
ls_subscriber-program = 'SAPLZMEPOBADIEX'.
* each subscreen needs his own DDIC-Structure
ls_subscriber-struct_name = 'ZMEPO_BADI_STRUCT'.
* a label can be defined
ls_subscriber-label = text-001.
* the position within the tabstrib can be defined
ls_subscriber-position = 13.
* the height of the screen can be defined here.
* Currently we suport two screen sizes:
* value <= 7 a sevel line subscreen
* value > 7 a 16 line subscreen
ls_subscriber-height = 7.
APPEND ls_subscriber TO re_subscribers.
3-. populate the following code in method MAP_DYNPRO_FIELDS
FIELD-SYMBOLS: <mapping> LIKE LINE OF ch_mapping.
CONSTANTS: mmmfd_cust_01 TYPE mmpur_metafield VALUE 90000000.
LOOP AT ch_mapping ASSIGNING <mapping>.
CASE <mapping>-fieldname.
WHEN 'ZZPUERTO'.
<mapping>-metafield = mmmfd_cust_01.
ENDCASE.
4-. The followin Code for the method TRANSPORT FROM MODEL
transport_from_model
DATA: l_header TYPE REF TO if_purchase_order_mm,
ls_mepoheader TYPE mepoheader,
ls_customer TYPE zmepo_badi_struct.
* system asks to transport data from the business
* logic into the view.
CASE im_name.
WHEN subscreen1.
* is it an item? im_model can be header or item.
mmpur_dynamic_cast l_header im_model.
CHECK NOT l_header IS INITIAL.
* transport standard fields
ls_mepoheader = l_header->get_data( ).
* ls_customer-zzpuerto = ls_mepoheader-zzpuerto.
* store info for later use
* MOVE-CORRESPONDING ls_mepoheader TO dynp_data_pbo.
MOVE ls_mepoheader-zzpuerto TO dynp_data_pbo-zzpuerto.
WHEN OTHERS.
ENDCASE.
5-. Method TRANSPORT_TO_DYNP
CASE im_name.
WHEN subscreen1.
CALL FUNCTION 'ZMEPOBADIEX_PUSH'
EXPORTING
im_dynp_data = dynp_data_pbo.
WHEN OTHERS.
ENDCASE.
6-. Method : TRANSPORT_FROM_DYNP
CASE im_name.
WHEN subscreen1.
CALL FUNCTION 'ZMEPOBADIEX_POP'
IMPORTING
ex_dynp_data = dynp_data_pai.
IF dynp_data_pai NE dynp_data_pbo.
re_changed = mmpur_yes.
ENDIF.
WHEN OTHERS.
ENDCASE.
7-. METHOD TRANSPORT_TO_MODEL
DATA: l_header TYPE REF TO if_purchase_order_mm,
ls_mepoheader TYPE mepoheader.
* data have to be transported to business logic
CASE im_name.
WHEN subscreen1.
* is it an item? im_model can be header or item.
mmpur_dynamic_cast l_header im_model.
CHECK NOT l_header IS INITIAL.
ls_mepoheader = l_header->get_data( ).
* customer fields changed?
IF dynp_data_pbo-zzpuerto NE dynp_data_pai-zzpuerto.
* update customerfields
ls_mepoheader-zzpuerto = dynp_data_pai-zzpuerto.
CALL METHOD l_header->set_data( ls_mepoheader ).
ENDIF.
WHEN OTHERS.
ENDCASE.
8-. Now we go to BADI ME_PROCESS_PO_CUST and we insert the next code in method FIELDSELECTION_HEADER. This is to show the screen in transactions.
DATA: l_persistent TYPE mmpur_bool.
FIELD-SYMBOLS: <fs> LIKE LINE OF ch_fieldselection.
READ TABLE ch_fieldselection ASSIGNING <fs>
WITH TABLE KEY metafield = mmmfd_cust_01.
IF sy-subrc IS INITIAL.
CASE sy-tcode.
WHEN 'ME21N' OR 'ME22N' OR 'ME29N'.
<fs>-fieldstatus = '.'. " Modify
WHEN OTHERS.
<fs>-fieldstatus = '*'. " Display
ENDCASE.
ENDIF.
9-. Finally we go to Method PROCESS_HEADER and there we put the logic that we want for our new screen. For example I put the following code because if the user don't populate the new field I want to use some querys to populate it .
DATA: ls_mepoheader TYPE mepoheader,
lv_adrnr TYPE adrnr,
lv_adrc TYPE ad_addrnum,
lv_transpzone TYPE lzone.
ls_mepoheader = im_header->get_data( ).
IF im_header->is_persistent( ) EQ mmpur_no.
IF ls_mepoheader-zzpuerto IS INITIAL.
mmpur_metafield mmmfd_cust_01.
SELECT SINGLE adrnr
INTO lv_adrnr
FROM lfa1
WHERE lifnr = ls_mepoheader-lifnr.
IF sy-subrc EQ 0.
lv_adrc = lv_adrnr.
SELECT SINGLE transpzone
INTO lv_transpzone
FROM adrc
WHERE addrnumber = lv_adrc.
IF sy-subrc EQ 0.
ls_mepoheader-zzpuerto = lv_transpzone.
CALL METHOD im_header->set_data( ls_mepoheader ).
CLEAR ls_mepoheader.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
10. Any questions please let me know. I know it is difficult but it works.
Thanks .
Similar Messages
-
Custom Field in the header of Shopping Cart
Dear all,
We have to add a Custom field on the header of the Shopping Cart which will have three values.
This field has to flow thru the Bid invitation, Contract and the PO ...
Can anybody provide the technical details of the same ?? Which all are the structures to be changed ?
Thanks in Advance ...
Regards,
Vivek KHi
To add custom fields to the shopping cart, please try this process ->
Please refer to these SAP OSS notes ->
<u>Note 458591 - User-defined fields: Preparation and use
Note 672960 - User-defined fields 2
Note 822424 - CUF. Customer fields cannot be changed in the bid
Note 809630 - Customer field in bid invitation and bid - How does it work?
Note 809628 - Table like customer fields from bid invitation in bid
Note 798731 - Bid: Bid Inv. Customer fields not visible
Note 762984 - SRM40-SUS: Implementation of customer enhancement fields</u>
Please go through the documentation of following 3 Business Add-Ins using SE18 transaction.
BBP_BUPA_GET_CUF Customer Fields for Vendor Master Data
BBP_CUF_BADI-Customer Fields. Call-up of User-Defined Screen
BBP_CUF_BADI_2-Customer Fields. Use of Standard Table Control
Please refer to these links for details ->
<b>Re: MAP USer SRM defined fields in backend for PO
Re: HI SRM experts...
Custom fields to a Bid Invitation
Addition of custom fields in Contract and mapping it with the fields in SRM
urgent help request - How to add custom fields to header BID.
Re: Add custom fields to Contract Transaction in SRM 4.0
Custom Fields
custom fields in Carry out sourcing screen..
Custom Fields Not Display In Basic Data In SRM 5.5 Server..
Regards
- Atul -
How to include field in document header
Dear All,
Any one please give me some input on how to include a field in document header of f-02 .
Thanks,
Srini.Hi,
You will have to modify the screen via SE51 (program SAPMF05A, screen 100). Ask to your ABAP team to help you, though such a modification should be carefully considered.
By the way, is it a user-defined field or field that should be there and is just missing? If the last is true, it could be a bug and solved by relevant OSS correction.
Regards,
Eli -
Purchase Contract Overview Tab Custom fields showing in Header Tab
Hi Team,
I have added Custom Fields in Contract Overview Tab using Structure called /SAPSARM/S_CLL_STR_HEADER in veiw level.
In SPRO Metadata level i have added append structure in INCL_EEW_PD_HEADER_CSF_CTR.
Path is--> Extensions and Field Controls --->Define Customer Fields on Header Level --> append for Customer Fields on Contract Header.
But custom fields are showing in Overview Tab as well as Header Tab. Here in Webdynpro View level--> Contract Overview Tab & Header Tab both are using same structure called /SAPSARM/S_CLL_STR_HEADER .
Can some one suggest, how can i restrict custom fields in Header Tab, which are not required.
Thanks & regards
Sandeep.Dear Soumyaprakash,
Thanks for your reply.
If i follow the process described by you, i am losing fields in Overview tab as well as Header Tab.
but i have to hide fields only in Header tab, but should be visible in Overview.
Please share some ideas.
Thanks & Regards
Sandeep. -
How to add custom field in Documents Tab of PO Header ?
Dear SRM Friends,
This is a challenging task as an ABAPer to confront to..
We are in the midst of a requirement where we have to add a custom field in the PO Header. But the requirement is to add the field in Documents Tab in PO Header Data as found in the following path of SRM Webpage :
Operational Purchaser > Purchase Orders > Process Purchase Order > Select a PO > Header Data > Documents.
As guided by "Note 672960 - User-defined fields 2" , on executing all the steps of the note the field is getting added, but in the Basic Data Tab of the PO. But this doesnt meet the client requirement.
Anybody having some solution to this, shall be greatly awarded.
Thanks in advance,
Vikas.Hi Vikas,
You can define a Text ID in Header data with F4 help. But the list of values will be fixed, but configurable. This will exactly solve your problem. This will be quite simple and straight forward solution with no custom developments.
Please Navigate to
SAP Implementation Guide -> Supplier Relationship Management -> SRM Server
-> Cross-Application Basic Settings -> Text Schema
1. Define Text Types
Select BBP_PD and double click text id. Add a new text id here.
2. Define Text Schema
Select PO and add the newly created text id and set required parameters.
3. Define Fixed Values for Texts
Select your PO transaction type and maintain the required values for F4 help / drop down.
Hope this would solve your problem.
Regards
Kathirvel -
Custom field in PO header tab and its editable status
Hi All,
I have added an input field in the PO header (Customer Data) tab.
The same field has been appended in the EKKO table.
The update as per user's entry in PO is getting done in database table.
The field will get grayed out for ME23N tcode and will be editable for ME21N and ME22N.
The logic has been written in the PBO section.
Now, within the tcode ME23N, user has option to get into change mode by pressing F7.
Once user clicks F7, the PO gets into change mode, but the custom field will be still in uneditable mode itself.
There are couple of other custom fields are in the same tab. They get into change mode with F7, but this alone remains un editable.
How to make it editable in this scenario???
Regards
Pavan
Edited by: Pavan Sanganal on Dec 26, 2011 6:56 PMHI Pavan,
so only one custom field will not update in update mode after clicking f7 , so what happend exactally when user clciks on f7 the field properties are changed in to editable mode, in module pool program we can change field properties using internal table SCREEN , so loop the screen check this input field properties , like
loop at screen .
if screen-name = 'custom_field'.
input = 'x'.
endif.
endloop.
Regards
Siva -
Adding custom fields in QA32 header
Need to add custom fields in QA32. So I have implemented exit 'QPL10004' which is having function module exits for screen data processing and custom inclueds to add custom fields in table QALS. I have had added fields in header data, so the calling screen will be SAPLQPL1- 0300 . The problem is , in screen 300, there no provison for transfering of Inspection Lot Data from User Screen, where as in all other ecreen exits , the option is there.
i.e MODULE GET_CI_QALS is not there in 300 screen flowlogic.
Is there any other option to transfer userdata from screen 300 to inspection lot data ?
Is BADI 'QPL1_SUBSCREEN_ADDON' can be an option? If so is there any custom include provided to add the fields?
Thanks
Neelima
Edited by: neelima dumpa on Feb 16, 2012 1:33 PMHi Neelima,
I have few doubts here.
1) QA32 is a report....so which header you are talking about.
2) Tell me what are the fields you need to add ( either in selection screen of tcode QA32 or report output)
BR,
Vijay -
Adding a custom field in Delivery header
HI all,
I want to add a custom field in Delivery order creation header section.
Is there any user exit to add the field in LAyout? which is the program i need to add the new field?
thanks in advance
Rakesh
points will be awardedHI chandra,
Thanks for the reply.
But I need to add a custom field 'Internal order number' to Delivery order header.
Then is there any other alternative to add the field in Screen layout?
thanks
Rakesh -
PLMD_AUDIT add custom fields to audit header or to question detail
Dear Sirs, how is possible to add some custom fields (for data entry) to Audit header, is there some ddic strucure to extend and enhancement to activate ?
Regards,
Riccardo GalliHi,
check this link.
[http://wiki.sdn.sap.com/wiki/display/Snippets/Tutorial-AddingNewGUIStatustoStandardSAPTransaction]
i hope this might help
Regards,
Shraddha -
PP Tasklist - Custom fields in Routing HEADER
Hi,
I have activated the User Exit enhancement IAIH0001. I have included the custom fields to the User exit Screen 3011. I have also activated function exits to transfer to & from the SAP screen.
But I am not able to access the Custom Screen from CA01 or CA02. There is no function code or PF Status menu path to access Custom screen fields.
Should I use someother user exit? I appreciate any suggestions.
Thanks,
SG
Edited by: Sakthi Ganesan on Feb 11, 2011 9:10 PMPlease see:
Adding Custom Fileds in /SAPAPO/MAT1
Rob -
ME21n: Customer fields in item overview
Hello,
is it possible to add customer fields on the item overview in ME2xn?
We have some customer fields on the article master (Retail) which should be added to EKPO when generating an PO and be visible on the screen on item overview also (view only).
I know that it is possible to add customer screen with customer fields on item detail level using BAdI's ME_PROCESS_PO_CUST and ME_GUI_PO_CUST, but I would need the fields to be display in the table control.
Any ideas?
Thanks for your help!
Regards,
AlexHello Chen Jun,
No we could not solve in ecc5. So I gave the name fix for the dynpro.
After upgrade to ecc6 I saw that the name was changed to the given in the exit.
best regards Peter -
Custom field in PR header to flow to RFx through CPPR
Hi SRM Experts,
SRM 7 EHP1
ECC 6 EHP5
PPS scenario using CPPR
We have custom text fields in PR at a header level which need to flow to RFx during CPPR. Please provide pointers on which BADIs can be used on SRM/ECC side to enable this.
Thanks & Regards,
AmishHi Experts,
Any pointers please.
Thanks & Regards,
Amish -
Field on Document Header using BAPI for posting
Hi there.
I need to fill the BKPF-BRNCH field (the Branch Number header field in transaction FB01) to post a document by means of the BAPI_ACC_DOCUMENT_POST function module, but I haven't find the field in the DOCUMENTHEADER table, and I can't figure out how to fill it.
Can anyone help me...?
Thanks in advance.Hi
U can use the extension structure in order to transfer fields not managed by BAPI structure.
The BAPI BAPI_ACC_DOCUMENT_POST manages the extensions by 2 different way:
- BTE RWBAPI01
- BADI acc_document
In both methods u need to fill the BAPI structure for extension: parameter EXTENSION1 (BTE) like BAPIACEXTC and EXTENSION2 (BADI) like BAPIPAREX and then read the data of the extension and transfered them to ACCIT structure in the method above.
This is an example from my old program using BTE:
Fill extension paramenter:
ZSDFI_BAPI_EXTENSION-ITEMNO_ACC = ITEMNO_ACC.
ZSDFI_BAPI_EXTENSION-ESENZIONE = W_VENDOR-KIDNO.
MOVE ZSDFI_BAPI_EXTENSION TO EXTENSIONS.
APPEND EXTENSIONS.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
DOCUMENTHEADER = BAPIACHE09
TABLES
ACCOUNTGL = ACCOUNTGL
ACCOUNTPAYABLE = ACCOUNTPAYABLE
ACCOUNTTAX = ACCOUNTTAX
CURRENCYAMOUNT = CURRENCYAMOUNT
EXTENSION1 = EXTENSIONS
RETURN = RETURN.
Where ZSDFI_BAPI_EXTENSION is dictionary structure with the new fields.
In the BTE function module I transfer the data to ACCIT:
TABLES: ZSDFI_BAPI_EXTENSION.
DATA: _REPRF TYPE LFB1-REPRF.
LOOP AT EXTENSION.
MOVE EXTENSION TO ZSDFI_BAPI_EXTENSION.
LOOP AT IT_ACCIT WHERE POSNR = ZSDFI_BAPI_EXTENSION-ITEMNO_ACC.
IT_ACCIT-KIDNO = ZSDFI_BAPI_EXTENSION-ESENZIONE.
IT_ACCIT-ZLIFNR = ZSDFI_BAPI_EXTENSION-ZLIFNR.
IT_ACCIT-ZJ_3AKVGR6 = ZSDFI_BAPI_EXTENSION-CANALE.
IT_ACCIT-J_3AKVGR8 = ZSDFI_BAPI_EXTENSION-NEGOZIO.
IT_ACCIT-ZZAREAG = ZSDFI_BAPI_EXTENSION-AREA_GEOGRAFICA.
MODIFY IT_ACCIT.
ENDLOOP.
ENDLOOP.
Max -
Customer field in FBL3N header
Hi all,
we have a special customer table in which we have account text.
Now we want to replace the standard account text of the SKAT in the header line with our own text from table ZSKAT.
Is it possible to modify that header ?
Where can I do that - I think, I debugged the whole code - but didn´t find the right place yet.
Thanks for every hint !
JuanaHi,
IN FI there are Business Transaction Events.
Using BTE's you can use your custom Function module to break the flow of program FBL3N.
Replace existing FM with Custom FM
Within Custom FM you will get all values which are displayed in the report.
Now you can apply your logic and change the values.
Regards
Sajimon Chandran -
Can someone post details (or better..an example) on how this BADI can be invoked?
I have used exits PCSD0003 and PCSD0002, but this BADI and it's partner for the BOM Item may be a better approach. I don't have a great deal of BADI implementation experience, but can learn fast. I create my own Implemenmtation and added code to the TAB Description method (below), activated it and went to CS01 to see if the new TAB had shown up... it did not. I thnk I'm missing the call to the method somewhere, but I can't locate where this might be..????
method IF_EX_CEWB_BOM_CUS_FIELDS~BOM_CUS_TAB_DESCRIPTION.
e_tab_description = 'MY BOM Header Data'.
endmethod.Hi!
Would be greatful to you if you could let me know the answer for your question as iam even looking out for the one,
Best Regards,
Parwez.
Maybe you are looking for
-
Hello my name is Icurez, My Console has been busy full time doing everything repeatedly over everyday for almost two weeks now.installing and deinstalling < detailing every let item in this Mac Book and I'm reading descriptions like "CRITICAL", 'WARN
-
How to install / use fonts in OS X?
I've downloaded a bunch of .pcf fonts, two .NFNT fonts, and some .bdf fonts. I read a bit online, saw that fonts go in ~/Libary/Fonts, so I dumped 'em into ~/Library/Fonts, and OS X doesn't recognize or allow me to select any of them from within Term
-
How Do I Fade Out In The Middle Of A Song?
I cant find out how to do it on certain parts in the middle of a song I am mixing. Can anyone help?
-
Cursor-pasing multiple values as a cursor parameter
declare credit_amount number:=0; debit_amount number:=0; v1 number:=0; v2 number:=0; v3 varchar2(500); v4 varchar2(500); v5 varchar2(240); v6 varchar2(240); v7 number; v8 varchar2(240); v9 varchar2(240); v10 number; v11 number; v12 varchar2(240); v13
-
Oracle Content DB 10.2 certified on mainframe IBM?
Hi Guru, Could please tell me if Oracle Content DB 10.2 is certified on mainframe IBM running Linux? Thanks a lot for your help. Best regards.