Determine Plant and Sloc for Purchase Order Creation
Hi Gurus,
I want to determine while create a Purchase Order (ME21N), I can restrict the Purchase Order only for specific Order Type , specific Plant and specific Storage Location.
The business needs is to prevent human error while create Purchase Order with wrong Order Type, Plant and SLoc combination.
Is there any Exit related ?
Thx in advance.
Tri W
Hi ,
This is MM question
In MM , you could use authorzation in PFCG to limit the plant selection and document typefor a specific user .
This would also have effection to the ME21N .
For the storage location ,then please to set the field as display only and then add a default value to the user in
the personal setting.
I hope this will help you a little bit apart from the BADI.
Regards
Summer Wang
Similar Messages
-
Getting errors when iam using BAPI_PO_CREATE1 for Purchase Order creation
Hi sap Gurus,
I am getting Errors when iam using BAPI_PO_CREATE1 for Purchase Order creation that Material (144) does not exist but it is alreardy maintained in MM01.
I dont get how it is coming.and what are the mandatory fields in bapi BAPI_PO_CREATE1 in item level .that is too material only.
pls let me know .
thanks in advance.Hi,
Check the sample code..
report zpo_test .
*DATA DECLARATION
constants : c_x value 'X'.
*Structures to hold PO header data
data : header like bapimepoheader ,
headerx like bapimepoheaderx .
*Structures to hold PO account data
data : account like bapimepoaccount occurs 0 with header line ,
accountx like bapimepoaccountx occurs 0 with header line .
*Internal Tables to hold PO ITEM DATA
data : item like bapimepoitem occurs 0 with header line,
itemx like bapimepoitemx occurs 0 with header line,
*Internal table to hold messages from BAPI call
return like bapiret2 occurs 0 with header line,
*Internal table to hold messages from BAPI call
pocontractlimits like bapiesucc occurs 0 with header line.
data : w_header(40) value 'PO Header',
purchaseorder like bapimepoheader-po_number,
delivery_date like bapimeposchedule-delivery_date.
data : ws_langu like sy-langu.
*text-001 = 'PO Header' - define as text element
selection-screen begin of block b1 with frame title text-001.
parameters : company like header-comp_code default '122' ,
doctyp like header-doc_type default 'NB' ,
cdate like header-creat_date default sy-datum ,
vendor like header-vendor default '2000000012' ,
pur_org like header-purch_org default 'PU01' ,
pur_grp like header-pur_group default '005' .
*sociedad like HEADER-COMP_CODE default '122' ,
*vendedor like HEADER-SALES_PERS default 'sale person'.
selection-screen end of block b1.
selection-screen begin of block b2 with frame title text-002.
parameters : item_num like item-po_item default '00010',
material like item-material default '12000000' ,
tipo_imp like item-acctasscat default 'K' ,
*pos_doc like ITEM-ITEM_CAT default 'F' ,
shorttxt like item-short_text default 'PRUEBA BAPI' ,
grup_art like item-matl_group default '817230000' ,
plant like item-plant default '3001' ,
mpe like item-trackingno default '9999' ,
*contrato like ITEM-AGREEMENT default '4904000003' ,
*quantity like ITEM-QUANTITY default 1 .
po_unit like item-po_unit default 'EA'.
selection-screen end of block b2.
Par?mnetros de imputaci?n
selection-screen begin of block b3 with frame title text-004.
parameters : centro like account-costcenter default '1220813150',
cuenta like account-gl_account default '6631400' ,
num_pos like account-po_item default '10' ,
serial like account-serial_no default '01' ,
ind_imp like account-tax_code default 'I2' .
selection-screen end of block b3.
start-of-selection.
*DATA POPULATION
ws_langu = sy-langu. "Language variable
*POPULATE HEADER DATA FOR PO
*HEADER-COMP_CODE = sociedad .
header-doc_type = doctyp .
header-vendor = vendor .
header-creat_date = cdate .
header-created_by = 'TD17191' .
header-purch_org = pur_org .
header-pur_group = pur_grp .
header-comp_code = company .
header-langu = ws_langu .
*HEADER-SALES_PERS = vendedor .
*HEADER-CURRENCY = 'DOP' .
*HEADER-ITEM_INTVL = 10 .
*HEADER-PMNTTRMS = 'N30' .
*HEADER-EXCH_RATE = 1 .
*POPULATE HEADER FLAG.
headerx-comp_code = c_x.
headerx-doc_type = c_x.
headerx-vendor = c_x.
headerx-creat_date = c_x.
headerx-created_by = c_x.
headerx-purch_org = c_x.
headerx-pur_group = c_x.
headerx-langu = c_x.
*HEADERX-sales_pers = c_x.
*HEADERX-CURRENCY = c_x.
*HEADER-ITEM_INTVL = c_x.
*HEADER-PMNTTRMS = c_x.
*HEADER-EXCH_RATE = c_x.
*HEADER-EXCH_RATE = c_x.
*POPULATE ITEM DATA.
item-po_item = item_num.
item-quantity = '1'.
*ITEM-MATERIAL = material .
item-short_text = 'prueba bapi_po_create1'.
*ITEM-TAX_CODE = ''.
item-acctasscat = 'K' .
*ITEM-ITEM_CAT = 'D' .
item-matl_group = '817230000' .
item-plant = '3001' .
item-trackingno = '99999'.
item-preq_name = 'test'.
*ITEM-AGREEMENT = '' .
*ITEM-AGMT_ITEM = ''.
item-quantity = '1' .
item-po_unit = 'EA'.
*ITEM-ORDERPR_UN = 'EA'.
item-conv_num1 = '1'.
item-conv_den1 = '1'.
item-net_price = '1000000' .
item-price_unit = '1'.
item-gr_pr_time = '0'.
item-prnt_price = 'X'.
item-unlimited_dlv = 'X'.
item-gr_ind = 'X' .
item-ir_ind = 'X' .
item-gr_basediv = 'X'.
*ITEM-PCKG_NO = '' .
append item. clear item.
*POPULATE ITEM FLAG TABLE
itemx-po_item = item_num.
itemx-po_itemx = c_x.
*ITEMX-MATERIAL = C_X.
itemx-short_text = c_x.
itemx-quantity = c_x.
*ITEMX-TAX_CODE = C_X.
itemx-acctasscat = c_x.
*ITEMX-ITEM_CAT = c_x.
itemx-matl_group = c_x.
itemx-plant = c_x.
itemx-trackingno = c_x.
itemx-preq_name = c_x.
*ITEMX-AGREEMENT = C_X.
*ITEMX-AGMT_ITEM = c_x.
itemx-stge_loc = c_x.
itemx-quantity = c_x.
itemx-po_unit = c_x.
*ITEMX-ORDERPR_UN = C_X.
itemx-conv_num1 = c_x.
itemx-conv_den1 = c_x.
itemx-net_price = c_x.
itemx-price_unit = c_x.
itemx-gr_pr_time = c_x.
itemx-prnt_price = c_x.
itemx-unlimited_dlv = c_x.
itemx-gr_ind = c_x .
itemx-ir_ind = c_x .
itemx-gr_basediv = c_x .
append itemx. clear itemx.
*POPULATE ACCOUNT DATA.
account-po_item = item_num.
account-serial_no = serial .
account-creat_date = sy-datum .
account-costcenter = centro .
account-gl_account = cuenta .
account-gr_rcpt = 'tester'.
append account. clear account.
*POPULATE ACCOUNT FLAG TABLE.
accountx-po_item = item_num .
accountx-po_itemx = c_x .
accountx-serial_no = serial .
accountx-serial_nox = c_x .
accountx-creat_date = c_x .
accountx-costcenter = c_x .
accountx-gl_account = c_x .
account-gr_rcpt = c_x.
append accountx. clear accountx.
*BAPI CALL
call function 'DIALOG_SET_NO_DIALOG'.
call function 'BAPI_PO_CREATE1'
exporting
poheader = header
poheaderx = headerx
importing
exppurchaseorder = purchaseorder
tables
return = return
poitem = item
poitemx = itemx
poaccount = account
poaccountx = accountx.
*Confirm the document creation by calling database COMMIT
call function 'BAPI_TRANSACTION_COMMIT'
exporting
wait = 'X'
IMPORTING
RETURN =
end-of-selection.
*Output the messages returned from BAPI call
loop at return.
write / return-message.
endloop.
Regards
Sudheer -
Document is in transfer for purchase order.Creation not possible
Dear All,
We did partial confirmation in EBP and later when trying to do confiramtion for the remaining quantiy getting the message"document is in transfer for purchase order.Creation not possible"
We are taking this problem in production as well as in quality systems also.
What are possible reason and how to solve it.
kindly share your views.
Thank you.Hi yshu,
use tcode bd87 in SRM to check for failed confirmation IDOC (type MBGMCR).
The double click the status record to see the exact cause of the failure.
Rectify the error. Then try to execute the IDOC from BD87 tcode.
For a few errors you may not be able to execute the IDOC but to create a new confirmation in SRM. In such cases, follow the below procedure..
There should be an entry for the confirmation in the transfer table BBP_DOCUMENT_TAB in SRM. Display the details.
Then run FM "BBP_DELETE_FROM_DOCUMENT_TAB" to delete the entry from the doc tab table.
Then post a new confirmation in SRM.
There is also a FM in SRM using which you can change the status of thefailed IDOC from 51 to 68 or 31.
Rgds,
MJ -
Document in transfer for purchase order - creation not possible
Hi Experts,
we get this error when we do confirmation"'document in transfer for purchase order - creation not possible'"
any inputs are appreciated
Rg
samHi All,
We have resolved the above problem.
When user does confirmation ,if it sucessfully created then there will be no entry in BBP_Document_tab table.If it's in error in process and next time when user tries to do GR then he will encounter a pop up message "Document in transfer for PO, creation not possible".
So we need to delete the entries from table BBP_DOCUMENT_TAB using FM BBP_DELETE_FROM_DOCUMENT_TAB.
Then check again in BBP_DOCUMENT_TAB now there will be noentry there...so now user can do the confirmation from SRM,he will not encounter this error now.
Thanks to all the ppl who has replied
sameer -
Profitability segment for purchase order creation - how to read it
Hello,
how to read it profitability segment for purchase order creation at item level ??
There's a method on ME_PROCESS_PO_CUST ?
TksHi,
Use the below FM from the function group KEAK
To read: COPA_CALL_PROF_SEGMENT or COPA_INPUT_PSEGMENT_RETURN
To create: COPA_PROFITABILITY_SEGMENT
Hope this helps
Regards
Shiva -
BAPI for Purchase Order Creation
Hi All,
Purchase Order creation through BAPI, Auto Po creation. Please advise program.
The requirement is: when we delivery the goods from one plant to another plant,PO should create in second plant with goods what delivered from first plant.
Pranitha
Moderator message : Spec/requirements dumping is not allowed. Thread locked.
Edited by: Vinod Kumar on Sep 30, 2011 3:37 PMHi,
As per u r requirement
you can use : BAPI => BAPI_PO_CREATE with suitable Document Type ( Stock trasnfert : STO )
IF u want to auto po must be created after each delivry in this case you need to use BADI
'MB_MIGO_BADI; In This BAPI There is method : POST_DOCUMENT
In this method u can write code for Auto PO Creation by using BAPI .
Hope This will Resolve u r query.
Thanks and Regads
Santosh -
Release date and time for Purchase order
Hi Masters,
Could you please let me know that in which table the release date ane time will get stored for purchase order.
Regards,
PanneerHi,
You can find out from CDHDR & CDPOS table.
Select Date Time from CDHDR table & Join with CDPOS table where CDHDR-OBJECTCLAS = EINKBELEG and CDHDR-OBJECTID = PO number and CDPOS-TABNAME = 'EKKO' and CDPOS-FNAME = FRGZU and CDPOS-VALUE_NEW = 'X'.
You will get the date time from CDHDR table.
Regards,
Udayasankar Rajagopalan -
Enhacement for Purchase order creation (Service Item)
Dear All,
While creating the purchase order for service items , the base value for calculating the tax must be a value of a pricing condition type.
Can anyone advice how to link the pricing and tax details of a service item.
Thanks
Ravindra SuvarnaHi,
It is a coding error.
Could you please check if you have applied the note 1049031 with the latest version 13?
Regards,
Edit -
FM or BAPI for Purchase Order Creation.
can ne1 help me to
create purchase order reference to PReq(Requisition) thru ne FM or BAPI.Hi,
We can create the PO Using the BAPI_PO_CREATE1 function module.
in this function module fill up the all necessary Details.
With details in Item Table we haveto give the Fields PREQ_NO and PREQ_ITEM for each item .
then it will creates the PO with PREQ.
Reward Points If useful.
Thanks&Regards,
Srinivas. -
Replacing the bapi with the new bapi for purchase order creation
Hi,
In the customised code call is there for the bapi function module 'BAPII_PO_CREATE'.
Iam trying to replace the call with the code that calls function module 'BAPI_PO_CREATE1'.
Please help me about what changes I needed to do in the code . As there is much mismatch in the import and export parameters
and tables in both the function modules.
Thanks in advance.
Edited by: anwar.indya on Mar 25, 2011 2:18 PM
Edited by: anwar.indya on Mar 25, 2011 2:19 PMHi,
As per u r requirement
you can use : BAPI => BAPI_PO_CREATE with suitable Document Type ( Stock trasnfert : STO )
IF u want to auto po must be created after each delivry in this case you need to use BADI
'MB_MIGO_BADI; In This BAPI There is method : POST_DOCUMENT
In this method u can write code for Auto PO Creation by using BAPI .
Hope This will Resolve u r query.
Thanks and Regads
Santosh -
Basket icon is not displaying for purchase order creation transaction iview
Hi SDNs,
I have created a set of purchase related transaction iviews like for example purchase order display.
there i couldn't find the basket icon to drop the other purchase order number, which we generally choose by using docuement overview on to change the number.
in WebGUI how do we drop the exisiting documnet into the screen.
I have activated all icon services in sicf, is there any specific services to be activated to have such kind of icons in webgui.
Please suggest me to resolve this.
Your inputs are appreciated.
Thanks,
Sireesha.BHi SDN's,
Can anyone suggest me for the above problem.
Your inputs will be highly appreciated.
Regards,
Sireesha.B -
Please Tell me the Standard Bapi for Purchase Order Creation
Hi,
Please tell me the standard BApi for the PO creation. How to excute the standard Bapi. Please help me.
Regrads
MohanHi Mohan,
Use this BAPI BAPI_PO_CREATE1.
Check this post, you have program aswell
https://forums.sdn.sap.com/click.jspa?searchID=7294168&messageID=1172796
Regards,
Satish -
Extracting Down Payment and Payment for Purchasing Order to BW
Hi Gurus,
2LIS_02_ITM purchasing datasource brings GR, IR value, quantity and amount only base on Process Key.
Anyone know how to extract Downpayment (Prepayment) and Payment documents to the BW of the data?
Thanks and regards,
RaymondHi Sachin,
Does downpayment includes on AP datasources?
Do you know the name of the datasource for those Downpayment and payment?
Also how can I check for the EKBE-VGABE (Transaction Type/Event) from R/3 on BW? The value of Transaction Type/Event will say if the VGABE if the amount is IR, GR, Downpayment and payment.
Thanks and regards,
Raymond -
Problem with User exit for Purchase Order creation/change
Hi Everyone,
I have a requirement where I have to implement an enhancement for the standard transaction(ME21N/ME22N). I need to modify a particular field of the item table (EKPO) based on a few comparisons from the header values (After save of PO). I am using the enhancement MM06E005 and its corresponding exit EXIT_SAPMM06E_013. While debugging I notice that the value is getting changed; but as soon as the control comes out of the FM, the change is not being reflected. Hoping to find a solution for this.
Thanks & Regards,
Indudhar P.GHi Guys,
Now I am using the BADI "ME_PROCESS_PO_CUST". But the control is not stopping at the method even though I set a breakpoint. It just saves the PO after I click save. Is this because my document type of PO is Stock Transfer Order. Can I use this BADI for STO's? and moreover how do I process each item line in this method. Does "ls_mepoitem = im_item->get_data( ).
" fetch all the item lines?
Thanks and Regards,
Indudhar P.G -
Workflow for Purchase order creation!!!
Hi,
I am new for SAP Workflow. I have a requirement to create workflow for PO creation. Once the approval of 2 levels, then PO should be released. Could you please help me to do this. Please provice me the step by step procedure or relevent materials links.
Thanks in Advance!!Hi,
Get yourself familiar with terms like PO release strategy, etc. This has lots of material in SAP help. You might also take a look to SAP MM workflow scenarions document - it has documentation of PR release, but the idea is quite similar with POs.
You can also google "PO release strategy in SAP", and you should find some step by step instructions.
In general, lots of things can be done purely by configuring in SPRO and not that much WF development (if any) is required unless you have some specific requiremenets.
Regards,
Karri
Maybe you are looking for
-
My ipod 4th gen wont let me download any apps on my ipod.. what do i do?
my ipod wont let me download any apps what do i do??
-
Problem while sending FuncationalACK(997)
Hi All, My scenario A--->PI->B A is sending the 856 document and the PI processed the file to B. Sender adapter AS2 and receiver adapter File. I configured the split 997 adapter .i have problem sending the Functional Ack back to partner.The message p
-
I want to go back to the old versions of Firefox where everything worked. I fill in a lot of online forms and need my LastPass form filler to work. I regret that I downloaded the new version today.
-
Hi all, I am creating a pdf form but i have getting a error message when i am saving the changes in layout with message id no. FPUIFB051(Changes to layout cannot be saved in display mode). what will i do to save the changes. Thanks in advance. Sanket
-
Error Code = -1: What is this and whats wrong?
Does or has anyone encountered a problem with iMovie '08 where I try to export a movie, be it thru youtube or as a standard .mov, and it crash with error code 1? Any help would be appreciated! Justin Holt