Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_ENTRYSHEET_CREATE

Former Member
0 Likes
1,805

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

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,444

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

9 REPLIES 9
Read only

Former Member
0 Likes
1,444

The function module is used to create service entry sheet

Read only

Former Member
0 Likes
1,444

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

Read only

0 Likes
1,444

Unfortunately, this function is only usefull to change release status (look at the import and export parameters !).

Read only

Former Member
0 Likes
1,444

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

Read only

Former Member
0 Likes
1,444

You can enter service line in the function module BAPI_REQUISITION_CREATE. ( Which is in sync with ME51N ).

Hope it helps

Sujay

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,445

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

Read only

0 Likes
1,444

Thanks for your help.

JG

Read only

0 Likes
1,444

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

Read only

0 Likes
1,444

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.