‎2008 Aug 29 5:45 AM
Hi,
I am trying to call Bapi_PR_Create in a report.
But it gives me an error saying "Plant I001 not defined.Please check your input."
The Bapi creates a PR successfully with the same data when called executed separately.
What could be wrong?
Please help.
‎2008 Aug 29 5:54 AM
‎2008 Aug 29 6:07 AM
LOOP AT gt_line INTO wa_line.
gt_item_bapi-PLANT = wa_line-werks.
APPEND gt_item_bapi.
CALL FUNCTION 'BAPI_PR_CREATE'
EXPORTING
PRHEADER = gt_header_bapi
PRHEADERX = gt_headerx_bapi
IMPORTING
NUMBER = PREQ_NO
TABLES
RETURN = gt_return
PRITEM = gt_item_bapi
PRITEMX = gt_itemx_bapi
PRITEMEXP = gt_item_exp_bapi
PRACCOUNT = GT_ITEM_ACC_BAPI
PRACCOUNTX = gt_item_accx_bapi
EXTENSIONIN = gt_extensionin
.
The value passed is I001.
‎2008 Aug 29 6:09 AM
check the Plant "I001" in the table T001W once.
I am still not convinced.
‎2008 Aug 29 6:17 AM
I have checked the value in the table T001W.
The value I001 exists .
‎2008 Aug 29 6:33 AM
I have checked the value in the table T001W.
The value I001 exists .It may be in T001W but can you confirm one more thing also?
are Purchase Org is assgin to that plant, which you are using is assign to your "I001" plant.
Check this path:
Spro>enter price structure>assignment>materials management>assign standard purchase org to plant..
Amit.
Edited by: Amit Gujargoud on Aug 29, 2008 7:57 AM
‎2008 Aug 29 6:42 AM
can you provide the message id and message number for the error.
i can tell you exactly what is the error.
‎2008 Aug 29 6:46 AM
‎2008 Aug 29 6:57 AM
I just checked all the Places , It is coming from a select on T001W , where the select fails to find the Plant in T001W.
I am 100% sure the plant is not there in T001W. You are using some wrong plant. This is my conclusion.
Check with 1001.
‎2008 Aug 29 5:56 AM
"Plant I001 not defined.Please check your input."
is it Plant 1001 or I001. check it once.
I feel you entered I001 instead of 1001. so change it to 1001 and see.
‎2008 Aug 29 6:05 AM
I have entered i001 and I want this value only.
The field is defined as Char(4)..
‎2008 Sep 05 11:27 AM