BAPIEKPOC-PO_PRICE (BAPI_PO_CREATE), ME21n, and BAPI_PO_CREATE1 ?????
In the item table passed to BAPI_PO_CREATE, there is a column called PO_PRICE in the structure PAPIEKPOC. An "X" in this field tells the system not to step on the PR price with the PIR price.
So first question: is thre an equivalent of this field in BAPI_PO_CREATE1, either in the BAPIMEPOITEM structure or somewhere else ????
And second question, where in IMG/SPRO do you configure the online transaction ME21N so that it doesn't step on the PR price with the PIR price? (I'm assuming there's got to be a way to do this, if the BAPI can be configured.)
Okay,
David,
Just refer below two links hope it will help you enough
http://sap.ittoolbox.com/groups/technical-functional/sap-log-mm/valuation-price-in-po-1425092?cv=expanded
http://kowboyz.blogspot.com/2008/05/copy-price-from-pr-to-po.html
Edited by: Amit Gujargoud on Nov 6, 2008 8:01 PM
Similar Messages
-
Need help on BAPI_PO_CREATE and BAPI_PO_CREATE1
Hi,
Trying to create simple PO using BAPI_PO_CREATE.
Filling up all necessary details about header , item and delivery schedule.
In return message is shown as
'In case of ERS procedure, please enter terms of payment'.
I couldn't find what to do with ZTERM through bapi_po_create.
Can any one give sample code to create PO using
BAPI_PO_CREATE
and BAPI_PO_CREATE1
Madhura Nadgauda*& Report ZBAPI_CREATE_PO *
*& Program demonstrates the BAPI call to create Purchase Order *
*& Minimum required parameters are used are as per the current *
*& system configuration *
REPORT ZBAPI_CREATE_PO .
*DATA DECLARATION
CONSTANTS : C_X VALUE 'X'.
*Structures to hold PO header data
DATA : HEADER LIKE BAPIMEPOHEADER ,
HEADERX LIKE BAPIMEPOHEADERX .
*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.
data : w_header(40) value 'PO Header'.
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 '2700' ,
doctyp like HEADER-DOC_TYPE default 'NB' ,
cdate like HEADER-CREAT_DATE default sy-datum ,
vendor like HEADER-VENDOR default '0010000023',
pur_org like HEADER-PURCH_ORG default '2700' ,
pur_grp like HEADER-PUR_GROUP default '001' .
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 '00001',
material like ITEM-MATERIAL default 'CRANE' ,
plant like ITEM-PLANT default '2700' ,
quantity like ITEM-QUANTITY default 100.
selection-screen end of block b2.
START-OF-SELECTION.
*DATA POPULATION
ws_langu = sy-langu. "Language variable
*POPULATE HEADER DATA FOR PO
HEADER-COMP_CODE = company .
HEADER-DOC_TYPE = doctyp .
HEADER-CREAT_DATE = cdate .
HEADER-VENDOR = vendor .
HEADER-LANGU = ws_langu .
HEADER-PURCH_ORG = pur_org .
HEADER-PUR_GROUP = pur_grp .
*POPULATE HEADER FLAG.
HEADERX-comp_code = c_x.
HEADERX-doc_type = c_x.
HEADERX-creat_date = c_x.
HEADERX-vendor = c_x.
HEADERX-langu = c_x.
HEADERX-purch_org = c_x.
HEADERX-pur_group = c_x.
HEADERX-doc_date = c_x.
*POPULATE ITEM DATA.
ITEM-PO_ITEM = item_num.
ITEM-MATERIAL = material.
ITEM-PLANT = plant.
ITEM-QUANTITY = quantity.
APPEND ITEM.
*POPULATE ITEM FLAG TABLE
ITEMX-PO_ITEM = item_num.
ITEMX-MATERIAL = C_X.
ITEMX-PLANT = C_X .
ITEMX-STGE_LOC = C_X .
ITEMX-QUANTITY = C_X .
ITEMX-TAX_CODE = C_X .
ITEMX-ITEM_CAT = C_X .
ITEMX-ACCTASSCAT = C_X .
APPEND ITEMX.
*BAPI CALL
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
POHEADER = HEADER
POHEADERX = HEADERX
POADDRVENDOR =
TESTRUN =
IMPORTING
EXPPURCHASEORDER =
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
RETURN = RETURN
POITEM = ITEM
POITEMX = ITEMX.
*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.
<b> Create a purchase order with configuration using the BAPI</b>
This took some time to figure out how to setup. It may be useful.
call function 'BAPI_CFG_CREATE'
exporting
object_id = 'MYMATCODE'
root_type = 'MARA'
root_name = 'MYMATCODE'
plant = 'MYPLANT'
importing
cfg_handle = l_handle
root_instance = l_instance
exceptions
error = 1
others = 2.
l_characts_vals-atnam = 'WIDTH'.
l_characts_vals-atwtb = '500'.
append l_characts_vals to it_characts_vals.
call function 'BAPI_CFGINST_CHARCS_VALS_SET'
exporting
object_id = 'MYMATCODE'
instance = l_instance
tables
characts_vals = it_characts_vals
characts_vals_err = it_characts_vals_err.
call function 'CE_C_SET_CBASE'.
l_poitem-int_obj_no = l_handle.
call function 'BAPI_PO_CREATE1'
exporting
poheader = l_poheader
poheaderx = l_poheaderx
importing
expheader = l_expheader
exppurchaseorder = l_exppurchaseorder
tables
poitem = lt_poitem
poitemx = lt_poitemx
poschedule = lt_poschedule
poschedulex = lt_poschedulex
return = lt_return.
call function 'BAPI_TRANSACTION_COMMIT'.
also
<a href="http://www.erpgenie.com/phpBB2/viewtopic.php?p=15525&sid=ea0812d14d0cbffb804e18d34040d521">refer</a>
regards,
srinivas
<b>*reward for useful answers*</b> -
Make Non-editable Column in Table Control of ME21N and ME22N
Hi Experts,
I was trying to look for a solution to make the columns for field MEPO1320-SLFDT(Stat Deliv. Date), MEPO1320-EEIND (Deliv. Date) and MEPO1211-NETPR (Net Price) from transaction ME21N and ME22N to be non-editable ONLY when Qty Received (MEPO1320-WEMNG) > 0.
I'd found that the modify screen codes were located at Class CL_TABLE_VIEW_MM, Method MODIFY_SCREEN_TC_LINE but there were no enhancement spots available to add my code. Is there any other method i can use to make those fields non-editable?
Thanks in advance!
Cheers,
Cheng
Edited by: Cheng Mei Tan on Jun 4, 2009 9:31 AMHi Cheng,
I think you can use this BAdi: ME_PROCESS_PO_CUST - Enhance Processing of Enjoy Purchase Order.
Use the method PROCESS_ITEM to control the fields at the item level.
I think is not possible to make the fields non-editable, however, you can put an error message whenever your condition is verified, and the user won't be able to change the fields.
Cheers,
Pedro -
New tabs added by Badi ME_GUI_PO_CUST not seen in ME21N and ME22N
Hi All
I am implementing BADI ME_GUI_PO_CUST / ME_PROCESS_PO_CUST to add additional fields in Purchase Order Header.
The implementation of the BADI ie the Subscreen of the fields to be added appears in Header of transaction ME23N but it does not appear in the transaction ME22N and ME21N.
Can anyone help me on this.How to make the tab appear on screen in transaction ME21N and ME22N.
Thanx.Dear Friend,
Just go to the Class CL_PO_HANDLER_MM
This is the Super Class for the PO & PR.
If u debug the PO u can see that PO is calling this super class.
For this u want to create Subroutine in the Function Group calling the Screen .
The Problem which u r facing is that the Instance are not yet created for that Cusotmer Data.
Once u created this Subroutine u can see the fields..
With Regards,
Sumodh.P -
User Exit for PO creation(me21n and me22n) - A/c assgn Category is existing
Hi all,
I would like to have your guidance to find out an appropriate EXIT to meet the following req.
Requirement is such that : This EXIT should generate a G/L account automatically (or over-write the existing G/L a/c) during any PO creation(me21n and me22n tcodes - before saving) based on the fields(mandatory) :
A/c Assignment Category,
Material,
Company code and
Vendor
entered by the user(during his/her PO creation activity)
The identified EXITS as of now are EXIT_SAPLEBND_002 (But the package is not matching our PO tcodes : me21n and me22n)
and EXIT_SAPMM06E_017(Package ME- same as tcodes me21n,me22n)
and even other Exits available for PO based on <b>before saving</b> activity.
Even I tried out creating a PO in debugging mode(with break points set at the above EXITs).
Please do help me out at the earliest to identify the appropriate EXIT to meet this requirement.
With Regards,
SrividyaHi!
in SMOD give MM06E005 enhancement
FM name
EXIT_SAPMM06E_017
This will be triggered during saving.
Regards
Tamá -
Customer field Not shown in ME21n and ME22N
Hi,
While creation ME21N and change ME22N we are unable to get Customer field in Delivery address tab of the PO, We are getting Address and Vendor (Sc Vendor) fields in Delivery address tab , but customer not able to see.
The Customer field we can seen through ME23N.
We have cross check screen layout for ME21N and ME22 and NBF here in all cases Customer field is Optional.Hi,
Please check screen layout for AKTH & AKTV.
Regards
Subbu. -
PR mandatory in PO Creation ME21N and ME22N
Dear Experts,
I want to make PR mandatory for each line item in ME21N and ME22N transaction Code,how to do it in SAP ?
ThanksHi,
First Create a Function authorization in OMET named as XX.
In that tick on Ref to PR.
Hope Help U !
Regards,
pardeep malik -
Differences between AKTH and ME21-ME21N and between AKTV and ME22-ME22N??
Hi Gurus
Does anybody know the difference between AKTH and ME21-ME21N and between AKTV and ME22-ME22N??if you create a PO using ME21/ME21n following field selection groups are called (in Standard)
I_AUSWAHL0 ME21N
I_AUSWAHL1 AKTH <<<<<< means create
I_AUSWAHL2 NBF
as soon as you add any field (e.g.Vendor) the logic is changed and following groups are called:
I_AUSWAHL0 ME21N
I_AUSWAHL1 AKTV <<<<<< means change
I_AUSWAHL2 NBF
(when you fill the Item data, additional field selection keys are called as well) -
SAP Standard Field Attributes for ME21n and ME
Hi,
Can anyone suggest me where i can see all the display,Hidden,Mandatory, optional SAP Standard field attributes for ME21N and ME51N.
I looking for Configuration settings
Thanks
VenkiHi ,
All i see is Field Label Reqd.entry Opt. entry Display for ME21N and ME51N
I want to see what SAP Standard Fields are Hidden for these T-codes.
I want to use and Non Used Field ( Hidden SAP Field) for new Enhancement instead of creating a custom Tab
Thanks
Venki -
User Exit transaction ME21N and ME22N in the save moment
Hi, all. I need one user exit to transaction ME21N and ME22N for SAVE.
I need name user exit please in the save moment.
Message was edited by:
Martínez Vásquez Rubén Dario
Message was edited by:
Martínez Vásquez Rubén DarioHi,
Please check this user exits.
EXIT_SAPMM06E_012 - Check Customer-Specific Data Before Saving
EXIT_SAPMM06E_013 - Update Customer's Own Data in Purchasing Document
EXIT_SAPMM06E_016 - Export Data to Customer Subscreen for Purchasing Document Item (PBO)
EXIT_SAPMM06E_017 - Export Data to Customer Subscreen for Purchasing Document Item (PAI)
EXIT_SAPMM06E_016 and EXIT_SAPMM06E_017 are the best place to change line item. I used in both places again it depends on your requirement for PBO or PAI.
By the way, what do you mean by actualization?
Regards,
Ferry Lianto
Please reward points if helpful. -
Issue With BAPI_PO_CHANGE and BAPI_PO_CREATE1
Hi All,
I am facing a strange issue while using the bapis Bapi_po_chnage and Bapi_po_create1.
I am deleting STOs using BAPI_PO_CHANGE, calling it in a loop for each sto and commiting or rollback using bapi_transaction_commit with wait = x incase of no errors in return table or using bapi_transaction_rollback incase of errors in return.
Now the issue is after the first commit is executed when i'm next time calling the BAPI i have the messages of previous STO too accumulated in the return,
I am clearing all the tables and work areas being passed to the bapi each time.
Also i'm creating new STOs in an entirely different subroutine using BAPI_PO_CREATE1 but its return table too is accumulating all the return messages of BAPI_PO_CHANGE too.
Has anyone faced a similar kind of issue?
Please guide.
Thanks in advance.
Regrads,
KartikI tried the similar scenario with BAPI_PO_CHANGE, after refreshing the RETURN INTERNAL table before each call, which worked perfectly ( ECC 5.0).
-
Send mail with Z Message Class in me21n and me22n
Hi everyone, i'm new at the forum and this is may first post so i ask for apologies if i post it in the wrong please.
Well my question is this, i have an z class message in the NACE transaction that it's suppose to send a mail, well if i use the standard program SAPFM06P form ENTRY_NEU with a sapscript it send correctly the mail and i can display it in the SOST transaction, but i need it to display a smartform not a sapscript, so i copy the program to Z and make it call my smartform, if i go now to the me21n/me22n/me23n an make a print preview it's display my smartform correctly, to this point it's all ok, but the problem is that when i modify something in the order and save, my Z message class does not send the mail (i can't see it in the SOST transaction)
I was looking and it seems the problem is that the SOST and the SOOD table are not update but the NAST table does, so when i go to the SOST transaction it doesn't find the data to display.
I know that the update it's done in the form BUCHEN of the SAPLMEPO, but i can't find where.
Does anybody know how can i fix this problem? basically i want the me21n and me22n send the mail.
Thanks a lotThanks for your quick answer, I'll check and let you know any news
PD: what do you mean by "you need to maintain condition records as external send. then only it will send the mail automatically"?
Edited by: -tk85- on Jan 18, 2012 3:32 PM -
A custom field added in BAPI_PO_CREATE and BAPI_PO_CREATE1
Hi,
I am trying to create a Service Purchase Order Single Account Assignment.
A Custom field ZZEXPTYPE(Expense Type) is added in BAPI_PO_CREATE and passed the value '9015', The PO Is created Successfully but when I add same Custom Field ZZEXPTYPE(Expense Type) in BAPI_PO_CREATE1 whose value is '9015' ,It throws an Error Message as " Please enter a valid (SBU Specific) expense type!" .
The functional consultant says that Expense Type '9015' is correct. please Let me know what must be done.
Regards,
Deepthi.Extension to add Expense Type only
IF NOT w_src-zzexptype IS INITIAL.
w_extensionin-structure = 'BAPI_TE_MEPOHEADER'.
w_extensionin-valuepart1+10(4) = w_src-zzexptype.
APPEND w_extensionin TO i_extensionin.
CLEAR w_extensionin.
w_extensionin-structure = 'BAPI_TE_MEPOHEADERX'.
w_extensionin-valuepart1+10(4) = 'X'.
APPEND w_extensionin TO i_extensionin.
CLEAR w_extensionin.
ENDIF.
Call BAPI
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = w_poheader
poheaderx = w_poheaderx
IMPORTING
exppurchaseorder = gv_ebeln
TABLES
return = i_return
poitem = i_poitem[]
poitemx = i_poitemx[]
extensionin = i_extensionin[].
Commit the Transaction
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'. -
Best BAPIs to emulate VL02n, VA01, ME21n, and MIGO ???
I've got a multi-step batch process which requires emulation of VL02n, VA01, and ME21n as follows:
VL02n: for MT 641, 651
VA01: for return sales orders
ME21n: for inbound/outbound STO's)
MIGO: for MT 551
What BAPIs could you use for each of the four emulations?
What BAPIs should you use for each of the four emulations?
Thanks
djh
Edited by: David Halitsky on Feb 6, 2008 6:27 PMHello,
Here are they
VL02n: BAPI_DELIVERYPROCESSING_EXEC
VA01: BAPI_SALESORDER_CREATEFROMDAT1,BAPI_SALESORDER_CREATEFROMDAT2
ME21n: BAPI_PO_CREATE
MIGO: BAPI_GOODSMVT_CREATE
Cheers,
Vasanth -
Issue when uploading Purchase Order for Services (LSMW and BAPI_PO_CREATE1)
Hi,
I`m getting the error message "In case of account assignment, please enter acc. assignment data for item" when trying to updoad a Service Purchase Order via LSMW using BAPI_PO_CREATE1.
I'm using two files, one for header and item data and the other one to service lines. Even the account assignment is maintained the error persists. What am I doing wrong?
Regards,
EvertonHi
Check If you are giving the Account Assignment Number correct.
I mean....for a value...to be recognized by the BAPI, the number should be exactly same as it is stored in DATABASE.
For example: the number stored in database is 0000123...and you enter 123..in the program, then BAPI would fail to recognise the number. The value should be exactly as the field length.
Regards,
Vishwa.
Maybe you are looking for
-
Can not start up with internal HD after 10.9.4 update
After installing 10.9.4 update, can no longer startup from internal HD on late 2012 iMac, 2.9 ghz, 8 gb ram, 1 TB internal Used Disk Utility to starup from external 10.9.3 drive and that works fine. Loaded the manual 10.9.4 update onto external, and
-
Upgrade to OS X 10.9 Mavericks and CS 5.1 Droplets stop working!
Adobe website said drag older droplet to photoshop icon and it will be resaved as droplet.app but that didn't work. the website then said recreate the droplet but that is also not working. What is going on? Do i actually have recreate the action from
-
I have a pair of 3945E routers I use as redundant VPN head-ends in our data center and numerous 2901 and one 2951 used as spoke routers. Each of the spokes is connected to the 3945's over VTI tunnels three and four. We regularly see replay errors o
-
Thunderbolt Notification/ringtone issue after 2.11.605.9 Update
I know that this latest update was supposed to fix the bug where the wrong ringtones were being played when a custom ringtone had been set; however, now I am seeing a different issue with ringtones/notification sounds. After receiving the update on
-
Incorrect version of Berkeley DB: compiled against 4.0.14
After "pacman -Syu" ( db 4.1.25-2 is update) postfix not run correctly. The DB update produce this error: postmap: fatal: incorrect version of Berkeley DB: compiled against 4.0.14, run-time linked against 4.1.25 what I can make?