METHOD to get schedule line item in ME_PROCESS_PO_CUST
Hi all,
i am using BADI: ME_PROCESS_PO_CUST. i am using method PROCESS_POST.
i am getting header data & item data using some methods.
which method i should use to get schedule line data
how to find what are the methods are there to get all the PO operations like to get heder data, to get item text, to get condition item. plz give me all methods.
Thanks
pabi
Hi Peter,
Thanks body. Ur reply is a great help.
Is there any method to change the item data?
once changed, need to commit also.
my requirement
i will change the schedule line quantity of PO item. Then i need to compare this new schedule qty with
the old scheduled qty in this BADI. if qty is not same, then i need to put a item text in that item, saying that qty
is changed.plz give me the detail coading for this.
shall i use write_text FM to put item text or is there any method??
is there any method for commit the changes?
Thanks
pabi
Similar Messages
-
Not Printing Item Schedule line items in SAP Script
Hi ,
I modified copied sap standard script(MEDRUCK) and copied my Zprogram to standard program.
But here every thing is fine but i am not getting schedule line items and item text in items data for every item
thanks,
sriramHi
Pls Check in the Line item Ur using the syntax properly or not..In SAP if it ios syntax error it won show..Pls chk the syntax properly ...POr try to debug the script and see whether item text is coming or not.
If it is not coming check me23n whether tat PO has item text or not..if it is there Problem is in ur Include text. -
ME_GUI_PO_CUST And Schedule Line Items
Hello,
I have implemented the ME_GUI_PO_CUST BAdI and in method TRANSPORT_TO_MODEL Im trying to update some custom fields at schedule line item (EKET). Beloiw is the sample code and I can see the chnage in IM_MODEL after calling the SET_DATA method for schedule but after save the changes are not reflected in DB, any ideas? Im calling the same method in ME_PROCESS_PO_CUST method PROCESS_SCHEDULE and everything works just fine (For batch mode)
mmpur_dynamic_cast lo_item im_model.
CHECK NOT lo_item IS INITIAL.
lt_meposchedule = lo_item->get_schedules( ).
LOOP AT lt_meposchedule ASSIGNING <fs_meposchedule>.
ls_meposchedule = <fs_meposchedule>-schedule->get_data( ).
CALL FUNCTION 'ZFM_PO_GUI_EX_FACT_DAT_GET_CHN'
IMPORTING
e_update = l_update
CHANGING
c_meposchedule_s = ls_meposchedule.
IF l_update IS NOT INITIAL.
<fs_meposchedule>-schedule->set_data( im_data = ls_meposchedule ).
FREE l_update.
ENDIF.
ENDLOOP.
Thanks,
ArashHello,
I have implemented the ME_GUI_PO_CUST BAdI and in method TRANSPORT_TO_MODEL Im trying to update some custom fields at schedule line item (EKET). Beloiw is the sample code and I can see the chnage in IM_MODEL after calling the SET_DATA method for schedule but after save the changes are not reflected in DB, any ideas? Im calling the same method in ME_PROCESS_PO_CUST method PROCESS_SCHEDULE and everything works just fine (For batch mode)
mmpur_dynamic_cast lo_item im_model.
CHECK NOT lo_item IS INITIAL.
lt_meposchedule = lo_item->get_schedules( ).
LOOP AT lt_meposchedule ASSIGNING <fs_meposchedule>.
ls_meposchedule = <fs_meposchedule>-schedule->get_data( ).
CALL FUNCTION 'ZFM_PO_GUI_EX_FACT_DAT_GET_CHN'
IMPORTING
e_update = l_update
CHANGING
c_meposchedule_s = ls_meposchedule.
IF l_update IS NOT INITIAL.
<fs_meposchedule>-schedule->set_data( im_data = ls_meposchedule ).
FREE l_update.
ENDIF.
ENDLOOP.
Thanks,
Arash -
BAPI_GOODSMVT_CREATE Closing scheduling line items when errors
Hello all,
I have an issue when running BAPI_GOODSMVT_CREATE. If someone for instance is in a scheduling agreement when running my code. I get a locked by user return error from the BAPI. This is fine but the problem is the line item is closed not allowing for reprocessing when the entry is no longer locked. When reprocessing I will get a PU Ordered quantity exceeded by 1 EA : MS9556-08 2 error message
Any advice? Is there a way to reopen a scheduling line item?
Here is what Im sending the BAPI Its looped so one Goods receipt per line in my custom z table.
ls_header-pstng_date = sy-datum.
ls_code-gm_code = c_01.
LOOP AT i_ztab ASSIGNING <lfs_ztab>.
IF <lfs_ztab>-zgr_status IS NOT INITIAL.
<lfs_ztab>-zgr_status = SPACE.
<lfs_ztab>-zgr_error = SPACE.
<lfs_ztab>-return_code = SPACE.
ENDIF.
lv_index = sy-tabix.
ls_header-doc_date = <lfs_ztab>-zload_dt.
lw_goods-material = <lfs_tab>-ematn.
lw_goods-plant = <lfs_ztab>-werks.
lw_goods-stge_loc = s_loc-low.
lw_goods-move_type = c_101.
lw_goods-mvt_ind = c_b.
lw_goods-vendor = <lfs_ztab>-lifnr.
lw_goods-entry_qnt = <lfs_ztab>-menge.
READ TABLE li_ekpo INTO lw_ekpo
WITH KEY ebeln = <lfs_ztab>-ebeln
ebelp = <lfs_ztab>-ebelp
BINARY SEARCH.
IF sy-subrc = 0.
lw_goods-po_number = <lfs_ztab>-ebeln.
lw_goods-po_item = <lfs_ztab>-ebelp.
lw_goods-entry_uom = lw_ekpo-meins.
ELSE.
<lfs_ztab>-zgr_status = c_f.
<lfs_ztab>-zgr_error = TEXT-003. "Contract not found error
<lfs_ztab>-return_code = c_e.
MOVE-CORRESPONDING <lfs_ztab> to w_ztab_up.
APPEND w_tab_up TO i_ztab_up.
CONTINUE.
ENDIF.
APPEND lw_goods TO li_goods.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = ls_header
GOODSMVT_CODE = ls_code
IMPORTING
MATERIALDOCUMENT = lv_matdoc
TABLES
GOODSMVT_ITEM = li_goods
RETURN = li_return.Hi Vinod,
Actually there are two line items in the PO and manually when I try to create a GR for both line items, it creates a GR but when I pass it thr' BAPI, it is generating a GR only for one Line item.
Thanks,
Prasad -
BAPI FOR Deleting a Schedule Line Item from EKES and EKET tables
Dear All,
I would like to for deleting one of the line item from EKES (Po Confirmation ) and the respective line item from the EKET(PO Schedule Line Item Table).
Assume that am allowing the user to select the lineitem from zprogram screen and collecting the PO and Its LIne Item details in an internal table.
Can i Use
<b>BAPI_PO_Change</b> , if so , can anybody tell me the steps to follow to use this bapi for deleting the PO lineItems, since i m going to try BAPI for First time.
pls help me out
Message was edited by: Raja K.PHi raja ,
loop at iekko1.
w_index = sy-tabix.
item-po_item = itemx-po_item = iekko1-ebelp.
item-quantity = iekko1-mng01.
itemx-quantity = iekko1-mng01.
if iekko1-wamng = iekko1-wemng.
itemx-no_more_gr = item-no_more_gr = 'X'.
else.
itemx-no_more_gr = item-no_more_gr = ''.
endif.
append item.
append itemx.
clear return[].
call function 'BAPI_PO_CHANGE'
exporting
purchaseorder = iekko1-ebeln
tables
return = return
poitem = item
poitemx = itemx.
if return[] is initial.
commit work and wait.
call function 'DEQUEUE_ALL'.
search for deletion fields which u have to mark 'X'.
before calling this BAPi u have to lock the PO by using ENQUEUE.
<b>
FU BAPI_PO_CHANGE
Text
Change purchase order
Functionality
Function module BAPI_PO_CHANGE enables you to change purchase orders. The Change method uses the technology behind the online transaction ME22N.
Alternatively, the IDoc type PORDCH1 is available. The data from this IDoc populates the interface parameters of the function module BAPI_PO_CHANGE.
Functionality in Detail
Authorization
When you create (activity 02) an Enjoy purchase order, the following authorization objects are checked:
M_BEST_BSA (document type in PO)
M_BEST_EKG (purchasing group in PO)
M_BEST_EKO (purchasing organization in PO)
M_BEST_WRK (plant in PO)
Controlling adoption of field values via X bar
For most tables, you can use your own parameters in the associated X bar (e.g. PoItemX) to determine whether fields are to be set initial, values inserted via the interface, or default values adopted from Customizing or master records, etc. (for example, it is not mandatory to adopt the material group from an underlying requisition - you can change it with the BAPI).
Transfer
Purchase order number
The PurchaseOrder field uniquely identifies a purchase order. This field must be populated in order to carry out the Change method.
Header data
The header data of the Enjoy purchase order is transferred in table PoHeader.
Item data
The item data of the Enjoy purchase order is stored in the tables PoItem (general item data). Changes regarding quantity and delivery date are to be made in the table PoSchedule.
Use the table PoAccount to change the account assignment information.
Services and limits
Changes to existing items cannot be carried out with the Change method. It is only possible to create new items.
Conditions
Conditions are transferred in the table PoCond; header conditions in the table PoCondHeader. A new price determination process can be initiated via the parameter CALCTYPE in the table PoItem.
Vendor and delivery address
The vendor address in the table PoAddrVendor and the delivery address in the table PoAddrDelivery can only be replaced by another address number that already exists in the system (table ADRC). Changes to address details can only be made using the method BAPI_ADDRESSORG_CHANGE.
Partner roles
You can change all partners except the partner role "vendor" via the table PoPartner.
Export/import data
Export/import data can be specified per item in the table PoExpImpItem. Foreign trade data can only be transferred as default data for new items. Changes to the export/import data of existing items are not possible.
Texts
Header and item texts can be transferred in the tables PoTextHeader and PoTextItem. Texts for services are imported in the table PoServicesText. Texts can only be replaced completely.
Version Management
You can make use of the Version Management facility via the table AllVersions.
Return
If the PO was changed successfully, the header and item tables are populated with the information from the PO.
Return messages
Messages are returned in the parameter Return. This also contains information as to whether interface data has been wrongly or probably wrongly (heuristical interface check) populated. If a PO has been successfully created, the PO number is also placed in the return table with the appropriate message.
Restrictions
With this function module, it is not possible to:
Create subcontracting components (you can only use existing ones)
Create configurations (you can only use existing ones)
Change message records (table NAST) and additional message data (this data can only be determined via the message determination facility (Customizing))
Attach documents to the purchase order
Change foreign trade data
Change service data
Change or reexplode BOMs
A firewall prevents the manipulation of data that is not changeable in Purchasing according to the business logic of the purchase order (e.g. PO number, vendor, etc.).
PO items with an invoicing plan cannot be created or changed using the BAPIs
In this connection, please refer to current information in Note 197958.
To change addresses with numbers from Business Address Services (cantral address management), please use the function module BAPI_ADDRESSORG_CHANGE.
To change variant configurations, please use the function module BAPI_UI_CHANGE. More information is available in the BAPI Explorer under the Logistics General node.
In the case of changes that are to be made via the BAPI_PO_CHANGE, a firewall first checks whether the relevant fields are changeable. This approach follows that of the online transaction. Here it is not possible to change the vendor or the document type, for example.
Example
Example of changes made to a purchase order with:
1. Change in header data
2. Change in item
3. Change in delivery schedule
4. Change in account assignment
5. Change in conditions
6. Change in partners
Parameter: PURCHASEORDER 4500049596
Parameter: POHEADER
PMNTTRMS = 0002
PUR_GROUP = 002
Parameter: POHEADERX
PMNTTRMS = X
PUR_GROUP = X
Parameter: POITEM
PO_ITEM = 00001
CONF_CTRL = 0001
Parameter: POITEMX
PO_ITEM = 00001
PO_ITEMX = X
CONF_CTRL = X
Parameter: POSCHEDULE
PO_ITEM = 00001
SCHED_LINE = 0001
QUANTITY = 10.000
PO_ITEM = 00001
SCHED_LINE = 0003
DELETE_IND = X
Parameter: POSCHEDULEX
PO_ITEM = 00001
SCHED_LINE = 0001
PO_ITEMX = X
SCHED_LINEX = X
QUANTITY = X
PO_ITEM = 00001
SCHED_LINE = 0003
PO_ITEMX = X
SCHED_LINEX = X
DELETE_IND = X
Parameter: POACCOUNT
PO_ITEM = 00001
SERIAL_NO = 01
GL_ACCOUNT = 0000400020
Parameter: POACCOUNTX
PO_ITEM = 00001
SERIAL_NO = 01
PO_ITEMX = X
SERIAL_NOX = X
GL_ACCOUNT = X
Parameter: POCOND
ITM_NUMBER = 000001
COND_TYPE = RA02
COND_VALUE = 2.110000000
CURRENCY = %
CHANGE_ID = U
Parameter: POCONDX
ITM_NUMBER = 000001
COND_ST_NO = 001
ITM_NUMBERX = X
COND_ST_NOX = X
COND_TYPE = X
COND_VALUE = X
CURRENCY = X
CHANGE_ID = X
Parameter: POPARTNER
PARTNERDESC = GS
LANGU = EN
BUSPARTNO = 0000001000
Help in the Case of Problems
1. Note 197958 lists answers to frequently asked questions (FAQs). (Note 499626 contains answers to FAQs relating to External Services Management.)
2. If you have detected an error in the function of a BAPI, kindly create a reproducible example in the test data directory in the Function Builder (transaction code SE37). Note 375886 tells you how to do this.
3. If the problem persists, please create a Customer Problem Message for the componente MM-PUR-PO-BAPI, and document the reproducible example where necessary.
Customer Enhancements
The following user exits (function modules) are available for the BAPI BAPI_PO_CREATE1:
EXIT_SAPL2012_001 (at start of BAPI)
EXIT_SAPL2012_003 (at end of BAPI)
The following user exits (function modules) are available for the BAPI BAPI BAPI_PO_CHANGE:
EXIT_SAPL2012_002 (at start of BAPI)
EXIT_SAPL2012_004 (at end of BAPI)
These exits belong to the enhancement SAPL2012 (see also transaction codes SMOD and CMOD).
There is also the option of populating customer-specific fields for header, item, or account assignment data via the parameter EXTENSIONIN.
Further Information
1. Note 197958 contains up-to-date information on the purchase order BAPIs.
2. If you test the BAPIs BAPI_PO_CREATE1 or BAPI_PO_CHANGE in the Function Builder (transaction code SE37), no database updates will be carried out. If you need this function, please take a look at Note 420646.
3. The BAPI BAPI_PO_GETDETAIL serves to read the details of a purchase order. The BAPI cannot read all details (e.g. conditions). However, you can use the BAPI BAPI_PO_CHANGE for this purpose if only the document number is populated and the initiator has change authorizations for purchase orders.
4. Frequently used BAPIs for purchase orders are BAPI_PO_CREATE, BAPI_PO_CREATE1, BAPI_PO_CHANGE, BAPI_PO_GETDETAIL, BAPI_PO_GETITEMS, BAPI_PO_GETITEMSREL, and BAPI_PO_GETRELINFO.
5. For more information on purchase orders, refer to the SAP library (under MM Purchasing -> Purchase Orders) or the Help for the Enjoy Purchase Order, or choose the path Tools -> ABAP Workbench -> Overview -> BAPI Explorer from the SAP menu.
Parameters
PURCHASEORDER
POHEADER
POHEADERX
POADDRVENDOR
TESTRUN
MEMORY_UNCOMPLETE
MEMORY_COMPLETE
POEXPIMPHEADER
POEXPIMPHEADERX
VERSIONS
NO_MESSAGING
NO_MESSAGE_REQ
NO_AUTHORITY
NO_PRICE_FROM_PO
EXPHEADER
EXPPOEXPIMPHEADER
RETURN
POITEM
POITEMX
POADDRDELIVERY
POSCHEDULE
POSCHEDULEX
POACCOUNT
POACCOUNTPROFITSEGMENT
POACCOUNTX
POCONDHEADER
POCONDHEADERX
POCOND
POCONDX
POLIMITS
POCONTRACTLIMITS
POSERVICES
POSRVACCESSVALUES
POSERVICESTEXT
EXTENSIONIN
EXTENSIONOUT
POEXPIMPITEM
POEXPIMPITEMX
POTEXTHEADER
POTEXTITEM
ALLVERSIONS
POPARTNER
Exceptions
Function Group
2012
</b>
regards
prabhu
Message was edited by: Prabhu Peram -
Prob with putting text after the Schedule line item in PO Sap script
Hi Guys,
I need to include a Text afetr the first schedule line item and that shouldn't print after next onwards, can anyone help me out.
Thanks,
Rameshtwo things
in this
activate debugger and check whether the field
&EKET-J_3ASIZE& is eq ' ' or not
only then it will come in to else condition
if its coming into else case check whether &T166P-TXNAM& is getting populated or not
if it doesnt u need to go to item_text
define a variable and move the value of &T166P-TXNAM&
define &TEXT& = &T166P-TXNAM&
and then
in item_schedule
iNCLUDE <b>&TEXT &</b> OBJECT &T166P-TDOBJECT& ID &T166P-TDID& LANGUAGE &EKKO-SPRAS& PARAGRAPH IX
i think this will resolve the issue.
Harish
reward if its useful -
Hi All,
I have to Get Each line item Create and Approval dates for a SHOPPING CART in SAP SRM. Either a table, or any Function module, Method, please let me know ASAP. Same i can use in my Program.
Thank you Very much.
Regards,
Ramesh J.Hi,
Refer the below wiki link it may help you.
Product catlog configuration for ECC - CRM - SCN Wiki -
SCHEDULE AGREEMENT-DELIVERY SCHEDULE LINE ITEM PRINTING
Scheduling agreement is created in ECC.
Delivery schedule line items are generated using APO and CIFed over to ECC.
Upon displaying in ME38 in ECC, the delivery schedule line items are appearing as required. The problem is that no output type is displayed for condition type LPET even though the settings are done & condition records are maintained.
Can someone throw some light on this?Hi Anil ,
Goto Transaction NACE , Select Application EL and then Click on O/p Types.
Select your o/p and click on Processing routines.
Make a copy of medium 1 and change it to 5. The program , Form , Form routine would remain the same.
Maintain condition records with medium 5 in MN10.
Ensure that email address exists in Vendor Master.
Check with ur Basis to make sure that the setting are done in Transaction SCOT for sending document via PDF.
Create a new Agreement and test it.
Regards
Ramesh Ch -
Schedule Line Item 100001 delivery date is missing
Hello Sirs,
After created a sales order in ECC and transferred to TM via XI, the queue remains with STOP status. Entering in transaction /SAPPO/PPO2 I’m facing the error “Schedule Line Item 100001 delivery date is missing”. The delivery date is filled in ECC side.
Is there something that I need to check in TM regarding delivery date?
Thanks.Please try to edit the PO[Change date] and process it again. This issue happens when we use a conversion program to create PO instead of creating it from UI.
-
How to identify open schedule line item?
Hi,
I have a requirement for identifying open schedule line items. I want to identify any indicator or any field in any table which will tell me that the schedule line item is complete. Can anyone tell me how can I know that?
Ex. Sales Order 1 has 3 materials (line items) in it A, B & C.
For A the quantity is 10 and for which 3 schedule line have been created.
Out of the 3 schedule lines, 1 schedule line item is complete that is the delivery has been done and the rest 2 are open.
For B and C there are 4 & 5 schedule lines created and all are open.
How can i identify that total 12 schedule line 1 is completed and 11 are open.
Please suggest tables, field names / indicators.
Regards,
VishalHi Vishal,
You can not identify the open line items directly, rather you have to calculate the delivered quantity and copmare it with the ordered qty for each line item. The ordered qty can be idenitfy from the table VBEP and the deliverd qty can be found out by calling the function RV_SCHEDULE_CHECK_DELIVERIES.
Follow the link for more details to calculate the delvierd qty.
http://scn.sap.com/thread/279862
Rgards,
Rutvik. -
Relation between movement type and Schedule Line Item Cat
I have a situation for Return Sales Order, there's two lines items with
*Item Cat Schedule Line Item Cat Stock
REN(Normal) YN (Returns 657) Blocked
RENN (Free Goods) DN (Returns) Return Stock
Question is, the user would like all the return stock to be posted to Block stock which should be using movement type 657. How can I configure this.Hello Sarvanand
Assign Sched Line category YN to item category RENN using this path:
SPRO/IMG/Sales and Distribution/Sales/Schedule Lines/Assign Schedule Line Categories
Don't change movement type of standard Item cat DN.
Thanks. -
Schedule line item data missing in Purchase order form in ECC6.0
Hi All,
We are doing ECC6.0 upgradation project . I am trying to print Purchase order in ECC6.0 , all data is coming fine in PO except schedule line item data is missing.
Same print program and form works fine in 4.7E but schedule line item data missing in ECC6.0.
Print program is a copy of standard SAP program SAPFM06P and layoutset is a copy of MEDRUCK.
If anyone knows if there is any OSS note for the standard print program or any solution please let me know.
Thanks,
Sonali.Resolved on own.
-
BAPI to get cost line items for Cost Centers
Hi,
does anybody know a BAPI to get
cost line items for Cost Centers
or other Cost Center data?
e.g. actual, plan, commitments
I'm thankful for help.hi,
check this BAPI <b>BAPI_COSTCENTER_GETDETAIL1</b>
regards
vijay -
Re : schedule line item date change
HI
How to change schedule line item date. Default 5 days inadvance its coming. i want to change that into 8 days.
thanks
maniHi,
Please go to t-code VOV8,select your s.doc type and double click it.Pl check no of days in "Requested delivery date/pricing date/PO date" -Lead time in days.
If it is 5,change it to 8.
Schedule line date is also determined after system carry out availability check.
thanks,
vrajesh -
How to delete schedule line item
Hi All,
I want to delete schedule line entry for an item in R/3.
How can i do this?
Thanks,
NabhaHi,
For some of the business documents schedule line item deletion would be partially which means mark for deletion-specially when the case of POs and so on
other in general you need to goto the change document t-code and select the line item and you find the delete row mark in the same screen and select..
Hope this helps..
assign points if useful.
cheers
Pattan.
Maybe you are looking for
-
Display error message in forms from function "verify_function"
Hi, We have a number of users with our own created profile attached to them. We have enabled the 'PASSWORD_VERIFY_FUNCTION' for our own profile. Function "verify_function" is used to validate a user's password. In "verify_function" we have used "rais
-
Hello Experts, After a Test refresh for SCM system, we restored Livecache. The database has been changed and starts using database manager, during registration (Register LCApps) it gives the following error: Logical Command: DBMRFC Parameter: exec_lc
-
How do I get a photo back it i excidently deleted it
I evidently deleted some pictures photos how do I get them back is there anyway to reset my iPad to go a few days back like on a computer ?
-
Unable to install recommended updates from System Update
Tried several times to install the below listed recommended updates for my Windows 7 Professional (64bit) OS without success. The update program progresses thru the install process and then I reboot system but the same 4 recommended updates remain. V
-
I want to monitor NWCE7.1 by using CCMS in ECC6.0 (NW7.0)
Hello all, I want to monitor NWCE7.1 by using CCMS in ECC6.0 (Netweaver version is 7.0). I made the file "ccmsconf" , copied NWCE, and tried to config NWCE. But NWCE don't have Visual administrator. I searched configtool menu, but didn't found. Pleas