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_PR_CREATE

Former Member
0 Likes
1,681

Hi,

I've got some problems with this BAPI. When we execute this BAPI with an external reference we obtain this errors:

Creation indicator invalid

No instance of object type PurchaseRequisition has been created.

I have prove with all the options for this field, but I always get the same error.

Can someone help me?????

Thanks a lot!!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,200

Hi Mónica Nieto ,

when you are passing PR items (it_item table)to bapi u also pass (it_itemx). what ever the item you are passing u have pass'X' to the it_itemx table as shown.

there are two ways of number Assignment

1.internal number assignment

2.external number assignment

internal numner assignment is it will automaticall assign the PR number after creating pr(range is defined in the configuration part (functional ))

External numbering means u can pass the pr numbre then system will generate the same pr which you are passing

please check all these

hope it may help you

Regards

Manohar

REPORT ZBAPI_PR_CREATE.

tables : BAPIMEREQHEADER, BAPIMEREQITEMIMP.

data : it_header like bapimereqheader occurs 0 with header line.

data : it_headerx like bapimereqheaderx occurs 0 with header line.

data : it_item like bapimereqitemimp occurs 0 with header line.

data : it_itemx like bapimereqitemx occurs 0 with header line.

CALL FUNCTION 'BAPI_PR_CREATE'

  • EXPORTING

  • VERSIONS =

  • SKIP_ITEMS_WITH_ERROR =

  • TESTRUN =

  • IMPORTING

  • PRNUMBER =

TABLES

  • RETURN =

pritem = it_item

PRITEMX = it_itemx

  • PRITEMEXP =

  • PRITEMSOURCE =

  • PRACCOUNT =

  • PRACCOUNTPROITSEGMENT =

  • PRACCOUNTX =

  • PRADDRDELIVERY =

  • PRITEMTEXT =

  • PRHEADERTEXT =

  • PRLIMITS =

  • PRCONTRACTLIMITS =

  • PRSERVICES =

  • PRSRVACCESSVALUES =

  • PRSERVICESTEXT =

  • EXTENSIONIN =

  • EXTENSIONOUT =

  • ALLVERSIONS =

  • CHANGING

PRHEADER = it_header

PRHEADERX = it_headerx.

4 REPLIES 4
Read only

Former Member
0 Likes
1,201

Hi Mónica Nieto ,

when you are passing PR items (it_item table)to bapi u also pass (it_itemx). what ever the item you are passing u have pass'X' to the it_itemx table as shown.

there are two ways of number Assignment

1.internal number assignment

2.external number assignment

internal numner assignment is it will automaticall assign the PR number after creating pr(range is defined in the configuration part (functional ))

External numbering means u can pass the pr numbre then system will generate the same pr which you are passing

please check all these

hope it may help you

Regards

Manohar

REPORT ZBAPI_PR_CREATE.

tables : BAPIMEREQHEADER, BAPIMEREQITEMIMP.

data : it_header like bapimereqheader occurs 0 with header line.

data : it_headerx like bapimereqheaderx occurs 0 with header line.

data : it_item like bapimereqitemimp occurs 0 with header line.

data : it_itemx like bapimereqitemx occurs 0 with header line.

CALL FUNCTION 'BAPI_PR_CREATE'

  • EXPORTING

  • VERSIONS =

  • SKIP_ITEMS_WITH_ERROR =

  • TESTRUN =

  • IMPORTING

  • PRNUMBER =

TABLES

  • RETURN =

pritem = it_item

PRITEMX = it_itemx

  • PRITEMEXP =

  • PRITEMSOURCE =

  • PRACCOUNT =

  • PRACCOUNTPROITSEGMENT =

  • PRACCOUNTX =

  • PRADDRDELIVERY =

  • PRITEMTEXT =

  • PRHEADERTEXT =

  • PRLIMITS =

  • PRCONTRACTLIMITS =

  • PRSERVICES =

  • PRSRVACCESSVALUES =

  • PRSERVICESTEXT =

  • EXTENSIONIN =

  • EXTENSIONOUT =

  • ALLVERSIONS =

  • CHANGING

PRHEADER = it_header

PRHEADERX = it_headerx.

Read only

0 Likes
1,200

Hi,

In addtion to the above in changing also you have to pass

PRHEADER

PRHEADERX

If pr number you are passing in the prheader then you have pass ‘X’ the respective field of prnumber in Prheaderx Als

regards

Manohar

Read only

0 Likes
1,200

Dear Mathkunti Manohar,

about external PR number,

i try to create a PR with specific number.

i assign the number in PRHEADER-PREQ_NUM.

and 'X" in PREHEADERX-PREQ_NUM.

But i got a error: System error (error in method

if_purchase_requisition~post)

Can you give me some suggestion?

Read only

Former Member
0 Likes
1,200

Hi,

Once again check if you have filled all mandatory fields of structures you are using in the FM.

I think you are missing some of fileds that why you are getting this error.

Thanks,

Phani Diwakar.