Add Custom Field To Purchase Requisition - MEREQ001 - SAP
Add Custom Field To Purchase Requisition - MEREQ001 - SAP
Add Custom Field To Purchase Requisition - MEREQ001 - SAP
Products
Products Industries
Industries Support
Support Training
Training Community
Community Developer
Developer Partner
Partner About
About
Home / Community / Blogs + Actions
ABAP Development
MM (Materials Management) | CI_EBANDB | ME51N add custom field | ME51N SCREEN-EXIT | MEREQ001
share
0 share
11 tweet share
90
Follow
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 1/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
I looked for a detailed document about ME51N-ME52N-ME53N add custom field in SCN but i have not
found fully described. That’s why i decided create this blog.
Symptom :
Some customers need to add custom fields for their purchasing request documents then try to copy this
field other subsequent purchasing documents such a purchase order. You can benefit from this blog for
these requirements.
https://archive.sap.com/discussions/thread/3257475
https://archive.sap.com/discussions/thread/1665217
https://archive.sap.com/discussions/thread/390068
I suggest that please read MEREQ001 enhancement document ! Because, SAP inform you how to
design your developments step by step.
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 2/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
When you finish explainations of SAP , you will get information about this user-exit.
Sum up ;
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 3/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
Purchase Requisition(PBO).
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 4/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
Purchase Requisition.
I created a project for implementation in CMOD named ZMM and MEREQ001 is added such a
component. Then you can work on it.
SOLUTION :
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 5/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
Attributes :
Layout :
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 6/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
Flow Logic :
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 7/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
ABAP Codes :
*----------------------------------------------------------------------*
*& Module STATUS_0111 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0111 OUTPUT.
*/ M.Ozgur Unal - 26.10.2017 - SP IT
LOOP AT SCREEN.
IF screen-group1 = 'ZPR'.
IF flag_input = 'X'.
screen-input = 1.
ELSE.
screen-input = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDMODULE.
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 8/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
*----------------------------------------------------------------------*
*& Module CHECK_ZZUSER INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE check_zzuser INPUT.
*/ M.Ozgur Unal - 26102017 - SP IT
DATA : ls_zfi_tek_ony TYPE zfi_tek_ony.
ENDMODULE.
*&---------------------------------------------------------------------*
*& Include ZXM02U01
*&---------------------------------------------------------------------*
ENDIF.
CASE cur_activity.
WHEN 'A'.
flag_input = space.
WHEN 'V'.
flag_input = 'X'. "Modify
ENDCASE.
*&---------------------------------------------------------------------*
*& Include ZXM02U03
*&---------------------------------------------------------------------*
l_aktvt = im_req_item->get_activity( ).
IF l_aktvt EQ 'A'.
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 10/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
IF ex_changed = 'X'.
CALL METHOD im_req_item->set_data( l_mereq_item ).
ENDIF.
ENDIF.
ENDIF.
RESULTS :
Purchase Requisition
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 11/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
I hope that you will need to copy custom fields to subsequent documents such a purchase order. You
have to add same field to subsequent purchasing document and fill out fields in subscreen referance to
purchase requisition.
If you want to copy PR custom field to PO custom field with a referance, you can benefit from PBO of
customer screen in SAPMM06E 0111 CUSTSCR1 SAPLXM06 0111 ! (Screen exit PO)
IF sy-subrc IS INITIAL.
gs_ci_ekpo-zzuser = wa_eban-zzuser.
ENDIF.
ENDIF.
M.Ozgur Unal
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 12/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
Alert Moderator
3 Comments
You must be Logged on to comment or reply to a post.
Really very nice document. every time when you are presenting a blog. I am really eager to go through. Requesting to Present
more blog like this. Awesome.
Thanking you.
Regards,
Shivakkumar. GV
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 13/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
Mohsin Abbasi
Nice document, As some of the only consultant have ABAP knowledge with functional module, Otherwise Functional will never
have any idea about ABAP normally. You are blessed with both. So that’s why document cover functional and technical aspect
as well.
Best Regards
Mohsin Abbasi
venu gopal
Thanks a lot
Venugopal
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 14/15
11/20/2017 Add Custom Field to Purchase Requisition – MEREQ001 | SAP Blogs
Share & Follow Privacy Terms of Use Legal Disclosure Copyright Trademark Sitemap Newsletter
https://blogs.sap.com/2017/10/27/add-custom-field-to-purchase-requisition-mereq001/ 15/15