‎2007 Feb 19 4:46 AM
Hi all,
I am trying to test BAPI_PR_CREATE manually. The only mandatory table is PRITEM and I had filled it. But DOC TYPE is also mandatory for ME51N, hence I filled this field in table PRITEMEXP as well even though this is not mandatory.
But while checking the T163 table, the PSTYP (Item Category) is not being picked up from the program and it is raising an exception NOT_FOUND hence a Short Dump is displayed.
Kindly help me out in rectifying the error/ Letting me know the inputs to this BAPI.
Warm Regards,
Vijay
‎2007 Feb 19 4:51 AM
Hi Vijay,
Try using this Function Module "BAPI_REQUISITION_CREATE". In the FM you have specified it is not required to provide the PRITEMEXP but set value 'X' in PRITEMX to fields you have passed in PRITEM. Then it should work and also don't forget to put 'BAPI_TRANSACTION_COMMIT'.
Hope this would have helped you.
Thanks,
Prashanth
‎2007 Feb 19 5:17 AM
Hi Prashant,
Thanks for the inputs.
I tried doing it the way you suggested, but it returns an error asking for Document Type.
I am not in a position to use BAPI_REQUISITION_CREATE because we cannot maintain the header texts through this BAPI. Any inputs for maintaining the Header texts using the same?
Warm regards,
Vijay.
‎2007 Feb 19 5:29 AM
Hi,
Can you send me the corresponding Header and Item Details you have paseed before calling this FM so i can check if you have left any thing in it.
Thanks,
Prashanth
‎2007 Feb 19 5:36 AM
Hi Prashant,
Please find below the parameters that I am passing:
PRITEM:
PREQ_ITEM = 00010
SHORT_TEXT = Test
MATERIAL = ss10
PLANT = M251
Quantity = 25
UNIT = EA
DELIV_DATE = 05/31/2007
ITEM_CAT = 0
ACCTASSCAT = F
I have marked the corresponding flags for these fields in PRITEMX.
I had run the program without filling DOC_TYPE in PRITEMEXP, and it threw an error "Enter a Document Type".
Even after filling in DOC_TYPE = NB, it throws the same error.
Kindly advise.
Warm Regards,
Vijay
‎2007 Feb 19 6:20 AM
Hi Vijay,
Sorry for the late response. If you have not finished it then,
Remove the values from PRITEMEXP.
Fill PRITEMX as Follws
PREQ_ITEM = 00010
SHORT_TEXT = 'X'
MATERIAL = 'X'
PLANT = 'X'
Quantity = 'X'
UNIT = 'X'
DELIV_DATE = 'X'
ITEM_CAT = 'X'
ACCTASSCAT = 'X'.
now you try. I should work.
Thanks,
Prashanth
‎2007 Feb 19 6:24 AM
HI Prashant,
I had done this testing before!
But the result remains the same. I filled in PRITEM and PRITEMX with the values as below. And left PRITEMEXP blank. It shows the error "Enter Document Type".
Please advise.
Warm Regards,
Vijay
‎2007 Feb 19 6:39 AM
Hi,
Remove Header Details also and hope this is not required. Aslo try the FM i have given you coz it worked for me. Mean while i'll also try out and let you know once fixed.
Thanks,
Prashanth
‎2007 Feb 19 6:49 AM
Hi Vijay,
Fill in these values alone it works,
PREQ_ITEM = 00010
*SHORT_TEXT = Test
MATERIAL = ss10
PLANT = M251
Storage_location =
Quantity = 25
UNIT = EA
DELIV_DATE = 05/31/2007
*ITEM_CAT = 0
*ACCTASSCAT = F
Other things get determined it self.
Thanks,
Prashanth
‎2007 Feb 19 8:18 AM
Hi Prashanth,
Tough luck again! It gives an error NOT_FOUND as it cannot find an Item Category.
Has it worked for you ??
Warm Regards,
Vijay
‎2010 Mar 01 5:04 PM
Hi Vijay
Did you get this to work eventually?
I have the same issue:
E ME 083 Enter Document Type
E BAPI 001 No instance of object type PurchaseRequisition has been created. External reference: # 5
E ME 083 Enter Plant
Thanks!
DH