‎2010 Aug 20 4:19 PM
Hi,
Can we use the 'BAPI_ENTRYSHEET_CREATE' for purchase requisition ?
When it is possible, do you have some examples ?
When it is not possible, do you know another function to create automatically line services in ME54N transaction ?
Thanks,
Jocelyne
‎2010 Aug 23 8:33 AM
First read [Note 499627 - FAQ: BAPIs for purchase requisitions|https://service.sap.com/sap/support/notes/499627]
BAPI_REQUISITION_CREATE or BAPI_REQUISITION_CHANGE (BAPI for the non-enjoy PR transaction, e.g. ME51) wont create service item, when BAPI_PR_CREATE or BAPI_PR_CHANGE (BAPI for the enjoy PR transaction, e.g. ME51N) will, you have to perform some check in [Note 1312947 - Wrong business function assigned for service processing|https://service.sap.com/sap/support/notes/1312947]
Regards,
Raymond
‎2010 Aug 20 4:26 PM
‎2010 Aug 23 7:28 AM
Please, look at the code source , line 46 :
Read purchase order
select single * from ekko where ebeln eq entrysheetheader-po_number.
if sy-subrc ne 0.
perform fill_bapireturn2 tables return
using 'E'
'SE'
'505'
entrysheetheader-po_number
space
space
space.
This function can be only used for purchase order.
Is there any way to create service entry sheet for purchase requisition ?
Thanks for your answer.
JG
‎2010 Aug 23 7:54 AM
Unfortunately, this function is only usefull to change release status (look at the import and export parameters !).
‎2010 Aug 23 7:43 AM
BAPI_ENTRYSHEET_CREATE is used for entry sheet for purchase order ( Transaction ML81N)
Check the function module BAPI_REQUISITION_RELEASE - This is used for releasing purchase requisition ( which is similar to what ME54N does ).
Hope it helps.
Sujay
‎2010 Aug 23 8:00 AM
You can enter service line in the function module BAPI_REQUISITION_CREATE. ( Which is in sync with ME51N ).
Hope it helps
Sujay
‎2010 Aug 23 8:33 AM
First read [Note 499627 - FAQ: BAPIs for purchase requisitions|https://service.sap.com/sap/support/notes/499627]
BAPI_REQUISITION_CREATE or BAPI_REQUISITION_CHANGE (BAPI for the non-enjoy PR transaction, e.g. ME51) wont create service item, when BAPI_PR_CREATE or BAPI_PR_CHANGE (BAPI for the enjoy PR transaction, e.g. ME51N) will, you have to perform some check in [Note 1312947 - Wrong business function assigned for service processing|https://service.sap.com/sap/support/notes/1312947]
Regards,
Raymond
‎2010 Aug 23 3:27 PM
‎2010 Sep 03 11:27 AM
Experts,
I am trying to create a service entry in BAPI_PR_CREATE in release 604 with Enhancement package 4 according to SAP Note 499627 - FAQ: BAPIs for purchase requisitions. So for item category "D" (service type) I have provided account assignment category "B" ( Non Billable) . In the "PRACCOUNT" I have passed the cost center for the item and have made entry in SERVICELINES and SERVICELINESX parameter. In parameter SERVICEACCOUNT , there is no provision to pass account assignment data for line items. Getting error as "In case of account assignment, please enter acc. assignment data for item"
SO for item 10, two line service entry I have made in table PRACCOUNT as below
PRitem date Quanity Net price Cost center item number
00010 01 08.09.2010 1,000 0,0 10,000000000 1110110200 000020
00010 01 08.09.2010 1,000 0,0 10,000000000 1110110200 000010
and in table SERVICELINES as below
00010 0000000000 0000000020 LENOVO 0000 3,000 EA EA
00010 0000000000 0000000010 DELL LAPTOP 0000 2,000 EA EA
Quick help is appreciated. Thanks in advance.
Regards
Deep
‎2010 Sep 03 12:58 PM
Hi,
I can't use BAPI_ENTRYSHEET_CREATE with the release 6.00.
I have used the following solution to create automatically ligne services in ME54N - release 6.00 :
In our case esll-srvpos = eban-matkl :
1) => BADI ME_PROCESS_REQ_CUST : process~item :
To read purchase requisition info
call method im_item->get_data
receiving
re_data = t_item.
To read strategy info
call method im_item->if_releasable_mm~get_data
importing
ex_strategy = t_rel_strategy_mm
ex_state = t_rel_state_mm.
check t_rel_strategy_mm is not initial.
call method t_rel_strategy_mm->get_info
importing
ex_codes = t_code_strat.
+ check strategy code
.......
On a specific strategy code
t_item-pstyp = '9'.
call method im_item->set_data
exporting
im_data = t_item.
+ Export usefull infos : EXKN for example.
call method im_item->if_acct_container_mm~get_items
receiving
re_items = l_account_list.
loop at l_account_list into l_account_line.
call method l_account_line-model->get_exkn
receiving
re_exkn = ls_exkn.
endloop.
2) Implement the following user_exits :
EXIT_SAPLMLSK_001 and EXIT_SAPLMLSP_030.
Result for the users :
ME54N : on a specific strategy code checked in process~item, the user must only push on service n°, short text, qty wih EXIT_SAPLMSK_001
and account assignment with EXIT_SAPLMLSP_030 .
JG.