Create Purchase Order : User Exit
Hi,
When creating a Purchase Order, before saving it, I want to check the line items for certain conditions and want to check or uncheck the Goods Receipt indicator based on the condition.
Could someone please let me know the user exit for this. I would really appreciate your help.
Thank You,
Rekha
Here is a program which shows you user exits by transaction code. Implement the program, run it, and enter the transaction code, hit F8. This will give you a listing of exits. Look thru them, look at the function modules tied to them and look at the FM signature to see if your data is available. I don't know for sure if any will actually update a value.
report z_find_user_exit no standard page heading.
tables: tstc, tadir, modsapt, modact,
trdir, tfdir, enlfdir, tstct.
data : jtab like tadir occurs 0 with header line.
data : hotspot(30).
parameters : p_tcode like tstc-tcode obligatory.
at line-selection.
get cursor field hotspot.
check hotspot(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
start-of-selection.
perform get_data.
perform write_list.
* FORM get_data *
form get_data.
select single * from tstc
where tcode eq p_tcode.
check sy-subrc eq 0.
select single * from tadir
where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
if sy-subrc ne 0.
select single * from trdir
where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir
where pname = tstc-pgmna.
select single * from enlfdir
where funcname = tfdir-funcname.
select single * from tadir
where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name eq enlfdir-area.
endif.
endif.
select * from tadir into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = tadir-devclass.
select single * from tstct
where sprsl eq sy-langu
and tcode eq p_tcode.
endform.
* FORM write_list *
form write_list.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
endform.
Regards,
Rich Heilman
Similar Messages
-
Regarding Purchase order User-exit
Hello friends,
Here is the situation.
when we create purchase order ... I need to modify the planned delivery field value under delivery tab at item level.
For this I found user exit. 'EXIT_SAPMM06E_016' and I have written the logic in the include program.
when I tested in debbugmode... the cursor is not at all comming to that point. It was failing always at the function module 'MODX_FUNCTION_ACTIVE_CHECK'.
I don't know alwys active field showing blank. I think we need to activate the user exit some where. how to do and where to do?
plese help me ..
extract the code --from include program MM06EF0C_CUSTSCR1_ITEM_SET_D03
User-Exit für Positionsfelder versorgen (PBO)
FORM custscr1_item_set_data_pbo USING im_no_screen LIKE fc_call.
DATA: l_enj_call TYPE c.
STATICS: first_call(1) TYPE c VALUE 'X',
active LIKE sy-calld.
IF NOT first_call IS INITIAL.
CLEAR first_call.
CALL FUNCTION 'MODX_FUNCTION_ACTIVE_CHECK'
EXPORTING
cprogname = 'SAPMM06E'
funcnumber = '016'
IMPORTING
active = active
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF NOT sy-subrc IS INITIAL.
CLEAR active.
ENDIF.
ENDIF.
CHECK NOT active IS INITIAL. ==========================> always active sowing blank
IF fc_vorga EQ cva_en.
l_enj_call = 'X'.
ELSE.
l_enj_call = space.
ENDIF.
*-Define Fields:
DATA: l_ci_ekpo LIKE ekpo_ci,
lt_usr_tekpo LIKE bekpo OCCURS 0,
lt_usr_teket LIKE beket OCCURS 0,
lt_usr_tekkn LIKE ekknu OCCURS 0,
lt_usr_tkomv LIKE tkomv OCCURS 0.
*-Copy Tables:
MOVE-CORRESPONDING ekpo TO l_ci_ekpo.
lt_usr_tekpo[] = pot[].
lt_usr_teket[] = ett[].
lt_usr_tekkn[] = knt[].
lt_usr_tkomv[] = tkomv[].
*-User Exit
CALL FUNCTION 'EXIT_SAPMM06E_016'
EXPORTING
i_ekpo = ekpo
===============
thanks in advance
Regards
RaghuHi Raghunath
I hope you have included your enhancement in a project and activated the project.
1-Needed help
2-SMOD and CMOD
Hope it is helpful.
Regards
Neha -
Purchase Order User Exit (ME21N)
Hello experts,
I have a request to enhance SAP for authorization when a user creates a PO (ME21N)that all of the line items have the same purchasing group as the what is in the header, or it cannot be created.
Anybody have any idea what exit this would be in?
Thanks.Hi Tom,
Here are the user exits available for ME21N.
AMPL0001 User subscreen for additional data on AMPL
LMEDR001 Enhancements to print program
LMELA002 Adopt batch no. from shipping notification when posting a GR
LMELA010 Inbound shipping notification: Transfer item data from IDOC
LMEQR001 User exit for source determination
LMEXF001 Conditions in Purchasing Documents Without Invoice Receipt
LWSUS001 Customer-Specific Source Determination in Retail
M06B0001 Role determination for purchase requisition release
M06B0002 Changes to comm. structure for purchase requisition release
M06B0003 Number range and document number
M06B0004 Number range and document number
M06B0005 Changes to comm. structure for overall release of requisn.
M06E0004 Changes to communication structure for release purch. doc.
M06E0005 Role determination for release of purchasing documents
ME590001 Grouping of requsitions for PO split in ME59
MEETA001 Define schedule line type (backlog, immed. req., preview)
MEFLD004 Determine earliest delivery date f. check w. GR (only PO)
MELAB001 Gen. forecast delivery schedules: Transfer schedule implem.
MEQUERY1 Enhancement to Document Overview ME21N/ME51N
MEVME001 WE default quantity calc. and over/ underdelivery tolerance
MM06E001 User exits for EDI inbound and outbound purchasing documents
MM06E003 Number range and document number
MM06E004 Control import data screens in purchase order
MM06E005 Customer fields in purchasing document
MM06E007 Change document for requisitions upon conversion into PO
MM06E008 Monitoring of contr. target value in case of release orders
MM06E009 Relevant texts for "Texts exist" indicator
MM06E010 Field selection for vendor address
MMAL0001 ALE source list distribution: Outbound processing
MMAL0002 ALE source list distribution: Inbound processing
MMAL0003 ALE purcasing info record distribution: Outbound processing
MMAL0004 ALE purchasing info record distribution: Inbound processing
MMDA0001 Default delivery addresses
MMFAB001 User exit for generation of release order
MRFLB001 Control Items for Contract Release Order
For your case, please check <b>MM06E005</b> or you can try BADI <b>ME_PROCESS_PO_CUST</b>.
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful. -
Outbound Purchase order user exit EXIT_SAPLEINM_002 help
Hi,
Can somebody tell me how to stop the IDOC processing if the conditions are not met? My detail question is
I am modifying the data in the outbound IDOC (IDOC_OUTPUT_ORDERS) for purchase order. I am using the user exit EXIT_SAPLEINM_002 to modify the segment data.
But I would like to know how to stop for creating the IDOC if one of the condition will not met (for example if there is no data in Ztable while fetching then IDOC should not be created )?
If the condition will fail I don't want to create the IDOC but Purchase order has to create in R/3.
Any suggestions on my above query is highly appreciable.
Regards,
NoorulHi
The purchase order should always be created because it's created before creating the IDOC, I suppose it will be created by a particular message.
Have you tried to raise the exception DATA_NOT_RELEVANT_FOR_SENDING?
Max -
Purchase order : user-exit to fill new field in table EBAN
Hi,
in EBAN table i created a new field named ZTYPE_SITE. Now i would like to fill this field when i save my purchase requisition. I don't found the user-exit or BADI to do that.
Thanks for help.
Cheers.up
-
Hello Firends,
I am unable to find suitable user exit. My requirement is whenever a new PO is created from Preq,the system should check a Z table where certain material/Sloc combinations are allowed. If combination is not maintained in z table, error message should be diaplayed and PO should not be created.
Please advise.
SanjayDear Sanjay,
You want to find User Exits its very simple, please do this way
Go to 'SMOD' and give here enhancement name and click Test or F8
if you dont know Enhancement name press F4 and give package "ME" press enter and here so many exit names displays select relavent and press test or F8 inside of that exit your user exit will appear
Hope this may helps you
Prem. -
Purchase order user exit / BADI / Enhancement points
Hello experts,
Please Help me to get the user exit or any way to enhance the PO functionality. I am trying to set the PO line item status to "Blocked" or "Unblocked" whenever a change is triggered in PO line item for transactions Me21N / Me22N. The blocked status will be triggered by the custom enhancement, this is the requirement.
Thanks in advance for your help.
I tried the user exit MM06E005, but not working.
- NagarajanHello Nagarajan Ramudu,
inside of MM06E005 you should try the function module EXIT_SAPMM06E_012,
i'm using this user-exit from all things in my company.
Regards,
Welinton Rocha -
[Request] Special user-exit we need during creating purchase order
Hi, Gurus!
We need to make specific User-Exit during creating Purchase order.
When user creates/change a PO document (ME21N/22N), SAP has to check the u2018CUSTOMERu2019 filed whether it is BLANK or NOT in Delivery Address tab at ITEM LEVEL.
If there is no value in that field, system will automatically input right value with useru2019s business logic.
Thatu2019s what we want to implement in the future.
If you have any solution or recommendation for this, Please help us.
I really appreciate your help in advance.
Best Rgds;
IanFor checking user exit - SMOD, you need to activate this exit via CMOD
For Badi - SE18 to check & SE19 to implement
Take the help of your abaper, give him / her your logic.
Hope the above answers your query.
Regards,
Vivek -
Search user-exit for create purchase order
Hi all,
i'm searching the user-exit (or BADI) for create purchase order.
Thanks for help.Hi CECG,
GOTO SMOD and press F4
then Click on Information system
and in the Package name give as ME
and press enter.
you will get all user exits for Purchase Orders
Hope this solves your problem.
Please reward points if found helpful.
Thanks and regards,
Rajeshwar. -
User based authorization to create Purchase Orders out of Purchase Req.?
Hello,
I have the following requiment for my client:
User based authorization to create Purchase Orders out of Purchase Req.?
I am told the same can be achieved using same standard menu path in IMG/Customizing.
Please advise with the menu path and detials, Usefull answers will be rewarded.
ThanksUsing OMET Function Authorization, you can restrict users to create Purchase orders without Purchase Reqn.
Using OMET trxn code Create one Function Authorixation Called pr and in General Parameters tab Select the Field Selection and in Possible reference Objects Tab Mark the With ref to Prs check box and save.
Next, you've got to associate via SU01
Click Parameters, insert a new parameter id EFB to the authorization code.
Type in Parameters value you want e.g. XX
You have to assign the control for ALL the SAP buyers via thier SAP users id.
Logoff and login again. Then try to create a Purchase Order without a reference.
From Next time whenever you try to create with out referring PR it will not allow you to Save PO.
Regards,
Ashok -
Change/Create purchase order with customer BSART via CIF
Hi,
we create Purchase Orders in SCM SNP. Those POs are passed via CIF to R/3, but the Purchase orders should be created with a customer BSART.
In SCM the POs currently use the standard ATPCategories. I found an exit in CIF_PO_INBOUND where you can change BSART, but at this point there is no access to the data from APO.
Has anybody already implemented such a scenario?Hi Michael,
I used CIF outbound user exit from APO , for filtering purchase requisions going to SAP R/3.
You are creating purchase oders in SCM APO and transferring the same to SAP R/3 / ECC through CIF.
We may have two options : Change the data before publishing to SAP R/3 from APO. This happens in APO , outbound .
Otherwise we can change the data in the PO before it is created in SAP R/3 , for this we use user exit inbound SAP R/3.
You have option of changing or enahancing purchase order data inbound in SAP R/3, before the PO is created in SAP R/3.
The enhancement is CIFPUR02.
With this enhancement, you can change purchase order data from your APO system before a purchase requisition or purchase order is created in the ERP system
The enhancement contains the following components:
EXIT_SAPLCPUR_001
You can use this enhancement to change purchasing data (purchase requisitions, purchase orders) in ERP inbound. To do this, you can change the existing transfer data or include additional customer-specific data in your own tables.
Other enhancements in the same
EXIT_SAPLMEPI_004
With this enhancement, you can change the header data of a purchase order before it is created in the ERP system.
The following data can be changed:
Document type (parameter CP_BSART)
EXIT_SAPLMEPI_007
You can use this enhancement to specify the document type of a purchase requisition or purchase order when they are created in the ERP system (parameter CP_BSART).
There are other ehancements which I have not listed.
I assume you can create an enhancemnet projects for incorporating the above enhancements in CMOD / SMOD transactions.
I hope this helps you.
Please confirm.
Regards
Datta -
During creating Purchase order
Hi alll ,
My Problem is while creating purchase order through purchase requisition
How to remove the tick mark against invoice reciept i.e (repos) and gr based i.e ( weber )
programatically .
Regards
Deepakhi,
if you are working in ECC version you can easily resolve your porblem by implementing implecit enhancement.
the above specifed user exit is not called exactely.
implement two implecit enhancement in the following include program for resolving your problem
1.Go to inlcude program LMEGUICI5. in that we have one method implementaion. Here implement implecit enhancement at the beginning of the method like below.
METHOD transport_to_dynp.
ENHANCEMENT 50 ZREMOVE_FLAG. "active version
clear: mepo1317_pbo-repos,
mepo1317_pbo-webre,
mepo1317_pbo-erekz.
ENDENHANCEMENT.
mepo1317 = mepo1317_pbo.
ENDMETHOD.
2. Go to include program: MM06EFPO_POT_ETDRK and implement another implecit enhancement at the beginning of the following subroutine.
FORM pot_etdrk.
ENHANCEMENT 100 ZREMOVE_POT. "active version
loop at pot.
CLEAR: pot-repos,
pot-webre,
pot-erekz.
MODIFY pot.
ENDLOOP.
ENDENHANCEMENT.
endform.
If you need any information please let me know.
Regards,
Peranandam -
Sales Area Determination in Stock Transfer Order - user exit
Dear SD gurus,
We have different distribution channels for inter company and intra company stock transfers; since only one sales area can be set in the configuration (setup STO -> shipping data for plants), we want to use a user exit to determine the sales area dynamically.
We have created an enhancement of function exit V02V0001 (Sales area determination for stock transport order); but the program flow doesn't seem to stop in this exit despite setting break-points.
Can someone suggest why this exit is not fired during runtime or if this can be used at all for our purpose.
Regards,
KCIs user exit required, as the sales area will be different. Incase of Intra company stock transfer the process will be as under:
Create Purchase Order (ME21N)
Create Delivery in background (VL04, VL10a, VL10C, etc)
Change Delivery for picking / packing & PGI (VL02n)
Create Billing Document (VF01)
Assumption: Stock Transfer configuration is in place. Assistance can be taken from SAP Best Practices in help.sap.com
Incase of Inter-company, the process will be as under:
Create Sales Order (VA01)
Create Delivery (VL01N, etc)
Change Delivery (VL02N)
Create Billing Document (VF01)
Assumption: Configuration is in place. Assistance can be taken from SAP Best Practices in help.sap.com
Regards,
Rajesh Banka -
PO Creation from Sales Order User Exit
Hi,
I have a business requirement where I need to create a Stock Transport Order (STO) for a particular kind of sales order. I outlined different options for achieving this functionality.
1. Trigger a workflow for creating STO.
2. Configure it an EDI output for sales orders. Using the EDI document, create STO in the same system.
3. Create STO using BAPI from the sales order exit 'USEREXIT_SAVE_DOCUMENT'.
I am trying to understand the issues if I go with option of creating STO from sales order user-exit. I tested it and it is working fine. But what concerns is me transaction integrity. In other words I am trying to execute another transaction within a transaction. Both Transactions (VA01 and ME21N/BAPI) may be trying to access same tables. Anyways I havent see any potential overlap.
I would like to know anybody implemented such a solution?
What could be the potential issues? Does it really affect transaction integrity?
Thanks A Lot
AnilI would also be concerned with the possibility of the order failing to update AFTER you call the BAPI. You could create a custom output type that processes on order create for that order type. You could add your BAPI call to the processing routine of the output type.
-
Procure-to-Pay Scenario. Create Purchase Order
Hello Experts: I have a question regarding the Procure-to-Pay scenario and the Create PO functionality.
we are in SRM 7.0, Classic Scenario and we try to implement the Procure-to-Pay functionality as it is described in OSS note 1263876 "SAP SRM: Configuration of Procure-to-Pay Scenario".
Our idea is to transfer Purchase Requisitions from ECC6 to SRM using the CPPR application. But we will also take advantage of the integration with MM provided with this scenario.
If you are familiar with this, you will already know that, using the harmonized role for operational purchaser (ERP/SRM) an end user can create Purchase Orders in the backend. Our question is related to this functionality.
Using this role, the buyer can select Purchasing Documents under the detailed navigation area and, from there, he will have access to create Shopping carts, Purchase requisitions, Purchase Orders and Purchase order responses.
If we select Create Purchase Order, the application "Purchase Order: New" gets opened. Here we have to select the system where we want to create the new PO: either SRM or ECC6. Our first question is: As we are running a Classic scenario, why are we asked to select between SRM and ECC6?. It should be only ECC6, shouldn't be?
In any case, the SRM systems gets selected by default when we open "Purchase Order: New" appl. and bellow this field, you can see the PO types customized in SRM. If we change the system to ECC6 we see the following: "Number of purchase order types: 0" . So, no PO types are available. this is the second question: why do we have 0 PO types to be created when we select the ECC6 system? is there a missing customizing where we have to define which document types are vaialable to create POs in ECC6 from SRM Portal?.
To summarize: only ECC6 should be proposed as system to create POs (as we are running a Classic Scenario) and there should be ECC6 PO types available to create such POs in the ECC6.
Can you please tell us what is still missing in our configuration? Any help will be more than welcome
Many thanks in advance for your valuable help
Best regards
ValentíThe purpose of MRP run is to make sure that you always have enough stock.
An order to cost center will not increase stock.
Means: MRP is not able to create requisitions for cost center consumption. If you change a requisition created by MRP to be ordered to a cost center, then the next MRP run will create a new requisition to stock.
Maybe you are looking for
-
i Purchased Aaliyah -rock the boat a while back and now I can no longer find that album in iTunes along with some other good songs by her. The name of the album is Aaliyah
-
I have problem with connect me to the internet
Hi, I have my apple TV and always I had problem to connect me to the internet I don't know why because I have my Mac, and Iphone that don't have any problem with internet and is the same server.
-
Unable to map the portal user with back end user through web dynpro coding
Hi All, I 've a portal user which is mapped to back end user by system in the portal. i 'm able to get the portal user from web dynpro application. But unable to get the mapped back end user this is my code String systemalias = "SAP_CRM_PROD"; Map m
-
Field Defaults by Layout (or User Role) ?
Hi My company has finally moved to the R14 platform and I am in the process of setting up default values for some fields. I've noticed that a default value cna be set at the object level, but I'm wondering if a field default can differ by role or lay
-
Hi, I want to know if there's a utility to convert a FORM (10g) into a TEXT file. I want to SEARCH for a string in all the form. I have to find search_criteria.template, I make a wrong reference to it. But I don't know in which piece of code that I p