‎2006 Sep 21 10:05 AM
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!!
‎2006 Sep 21 10:29 AM
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.
‎2006 Sep 21 10:29 AM
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.
‎2006 Sep 21 11:12 AM
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
‎2008 Oct 20 6:59 AM
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?
‎2008 Oct 20 7:17 AM
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.