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

Unable to create Service PR using BAPI_PR_CREATE

Former Member
0 Likes
2,979

Hi Guys,

I am creating PRs using BAPI_PR_CREATE. I am able to create all type of PRs except Service.

I have tried passing additional data to structures servicelines, servicelinesx, serviceaccount, serviceaccountx, but still i could not able to create service PR successfully. Getting error message like 'In case of account assignmernt, please enter acc. assignment data for item'.

Please let me know what data I need to pass to get service PR created.

Thx in advance.

6 REPLIES 6
Read only

Former Member
0 Likes
1,610

Hi,

Please check below thread will be useful:

http://wiki.sdn.sap.com/wiki/display/ABAP/BAPI_REQUISITION_CREATE

Also check Note:420331

Thanks and Regards,

Chandra

Read only

0 Likes
1,610

Hi Chandra,

Thx for quick reply...

Infact, in the given thread, BAPI_REQUISITION_CREATE has been used. But in my case its BAPI_PR_CREATE in which few field s(packing no etc..) are missing. I do not want to use another BAPI just for service PR.

It would be great if you provide logic for BAPI that I used.

Read only

0 Likes
1,610

Hi All,

Could someone please look into this issue?

I am creating PRs in enjoy transaction(ME51N) so I have to use BAPI_PR_CREATE. As I mentioned earlier, I am able to create all types of PRs except Service PR.

Awaiting you replies. You would be rewarded.

Edited by: sanjeeva Rao on May 19, 2011 11:48 AM

Read only

0 Likes
1,610

Hi,

Have you gone through the note wat I was mentioned? We are also faced the same problem, not able to create PR using BAPI_PR_CREATE. Finally we have created Service PR using BAPI_REQUISITION_CREATE as per the note 420331

Thanks and Regards,

Chandra

Read only

Former Member
0 Likes
1,610

Hi,

In order to create the Service PR you need to pass the list of services in a way similar to that in which they appear in the ESLL table i.e with the combination of the package number and the subpackage number and that option is not there in this bapi so either you need to activate the properties of the business function LOG_MM_CI_2 using the T-Code SFW5 or you need to use the

BAPI:-       'BAPI_REQUISITION_CREATE'

In which need to pass the following tables:-

REQUISITION_ITEMS

REQUISITION_SERVICES

REQUISITION_SRV_ACCASS_VALUES

The First table will contain the data relevant to the items that will be created in the PR.

The Second table will contain the Header and Item level data for each item defined in the previous table

Say for Example:-

Header Data You need to pass a Pack Number that could be any number I passed 1234 and then the sub package number will be the pack number + 1. Other fields that we need to pass are ext_line line_no and short_text.

ITEM DATA   Here we need to pass the subpackNumber from the header data as the pack number

and the sub pack number will be left blank here at the item level and the other details like the qty and gross price and the activity number and others will be passed here.

So if there are multiple services( Say 5 ) in the single line item of a PR you should create a single header data and append that to the table REQUISITION_SERVICES and then you must create or get the item data 5 times one for each service and append all those to the same table   REQUISITION_SERVICES.

Third Table  This table will contain the account assignment data for the line items of the PR.

In Case of any issue do revert back and i will give you the test data.

<removed by moderator>

Regards,

Dev

Message was edited by: Thomas Zloch

Read only

0 Likes
1,610

Dear Devender Dhull,

I need Test data for the creation of Service PR, and is it possible to create more than one line item PR