2013 Nov 20 8:28 AM
Dear Friends,
While creating a Purchase Requisition using the bapi BAPI_REQUISITION_CREATE I am getting the error "Not Possible to determine a consumption account".
I am passing the below parameters in BAPI.
1-PREQ_ITEM
2-DOC_TYPE
3-PUR_GROUP
4-SHORT_TEXT
5-MATERIAL - I am force to keep it blank as there is no material in the development system,if suggest if I can pass any default value .
6-PLANT
7-MAT_GROUP
8-QUANTITY
9-UNIT
10-DEL_DATCAT
11-PRICE_UNIT
12-ACCTASSCAT
Please suggest if I am missing some parameter.
Thank you very much in advance.
Regards
Jay
2013 Nov 20 10:16 AM
REQUISITION_ACCOUNT_ASSIGNMENT(in this parmeter) corresponding to your line item id-
Field-->G_L_ACCT
Hi Jay
this message is thrown because of above mentioned statement you need to pass the field value so that the if clause does not gets satisfied
Please pass this REQUISITION_ACCOUNT_ASSIGNMENT-G_L_ACCT
IF ebkn-sakto EQ space AND
( eban-kzvbr NE 'A' OR i_cobl_check EQ space ) AND
eban-pstyp NE pstyp-dien AND "322093
2013 Nov 20 8:31 AM
Hi Mrutyunjaya Tripathy,
Before using BAPI, please create PR using ME51N.
You need to pass all the values, which have you entered in ME51N.
Regards,
Arivazhagan S
2013 Nov 20 8:37 AM
Hi Mrutyunjaya Tripathy
5-MATERIAL - I am force to keep it blank as there is no material in the development system,if suggest if I can pass any default value .With out material how you can create PR....?
Try in ME51N with out material yo can create PR.
Try like this
DATA : T_REQUISITION_ITEMS LIKE BAPIEBANC OCCURS 0 WITH HEADER LINE,
T_RETURN LIKE BAPIRETURN OCCURS 0 WITH HEADER LINE .
DATA : E_NUMBER LIKE BAPIEBANC-PREQ_NO.
T_REQUISITION_ITEMS-DOC_TYPE = 'NB'.
T_REQUISITION_ITEMS-DEL_DATCAT = '1'.
T_REQUISITION_ITEMS-DELIV_DATE = '20020626'.
T_REQUISITION_ITEMS-PLANT = '1000'.
T_REQUISITION_ITEMS-STORE_LOC = '0001'.
T_REQUISITION_ITEMS-PUR_GROUP = 'P01'.
T_REQUISITION_ITEMS-MAT_GRP = '01'.
T_REQUISITION_ITEMS-PREQ_ITEM = 1.
T_REQUISITION_ITEMS-MATERIAL = '100-100'.
T_REQUISITION_ITEMS-QUANTITY = 10.
T_REQUISITION_ITEMS-PREQ_NAME = 'Ramesh.T'.
T_REQUISITION_ITEMS-PURCH_ORG = '1000'.
T_REQUISITION_ITEMS-ACCTASSCAT = 'U' .
T_REQUISITION_ITEMS-VEND_MAT = 'G'.
APPEND T_REQUISITION_ITEMS.
CALL FUNCTION 'BAPI_REQUISITION_CREATE'
* EXPORTING
* SKIP_ITEMS_WITH_ERROR =
IMPORTING
NUMBER = E_NUMBER
TABLES
REQUISITION_ITEMS = T_REQUISITION_ITEMS
*REQUISITION_ACCOUNT_ASSIGNMENT = T_REQ_ACCOUNT_ASSIGNMENT
* REQUISITION_ITEM_TEXT =
* REQUISITION_LIMITS =
* REQUISITION_CONTRACT_LIMITS =
* REQUISITION_SERVICES =
* REQUISITION_SRV_ACCASS_VALUES =
RETURN = T_RETURN
* REQUISITION_SERVICES_TEXT =
* EXTENSIONIN =
* REQUISITION_ADDRDELIVERY =
.
IF NOT E_NUMBER IS INITIAL .
WRITE:/ 'REQ NO:' , E_NUMBER , 'CREATED'.
ELSE.
LOOP AT T_RETURN.
WRITE T_RETURN-MESSAGE.
ENDLOOP.
ENDIF.
2013 Nov 20 8:46 AM
Dear Ramesh,
You are correct, the problem is there is no Material in the client development system and without Material I am getting a error "Not Possible to determine a consumption account".
I am not getting any clue about this error as i am not a functional consultant ,appreciate if you could please suggest other then material number is there something else I am missing which is throwing this error.
Regards
Jay
2013 Nov 20 8:52 AM
Hi
Can you please provide message number and message class details..
Nabheet
2013 Nov 20 8:53 AM
Hi Mrutyunjaya Tripathy
I think no... if you share your code we can check....
2013 Nov 20 9:01 AM
Dear Nabheet,
Below is the details:
CODE-06138
MESSAGE-Not Possible to determine a consumption account.
Regards
Jay
2013 Nov 20 9:03 AM
Dear Ramesh,
Apology, I can't share the code as I have not written the code yet. I was testing the BAPI using SE37 and passing the parameter to create the Purchase Requisition.
Regards
Jay
2013 Nov 20 9:11 AM
Hi Mrutyunjaya Tripathy
Ok..... then you can try with the code what i have given in before post in SCN many threads on this BAPI you can refer that threads also.
All the best.....
2013 Nov 20 9:35 AM
Hi Jay
I think in order to bypass it you need to pass the account assignement as this message is thrown based on conditions
IF ebkn-sakto EQ space AND
( eban-kzvbr NE 'A' OR i_cobl_check EQ space ) AND
eban-pstyp NE pstyp-dien AND "322093
Thanks
Nabheet
2013 Nov 20 9:40 AM
Hi,
What value you have passed for account assignment category?
If you pass as K, you need to enter the cost center value.
Arivazhagan S
2013 Nov 20 9:41 AM
2013 Nov 20 9:43 AM
Hi Siva,
Yes I have passed. Do we have to pass the GL as well? If yes against which field can I pass.
Regards
Jay
2013 Nov 20 9:46 AM
Hi Jay
this message is thrown because of above mentioned statement you need to pass the field value so that the if clause does not gets satisfied
Please pass this REQUISITION_ACCOUNT_ASSIGNMENT-G_L_ACCT
IF ebkn-sakto EQ space AND
( eban-kzvbr NE 'A' OR i_cobl_check EQ space ) AND
eban-pstyp NE pstyp-dien AND "322093
2013 Nov 20 9:55 AM
Dear Siva,
Yes I am passing K but for which field exactly you are asking to pass the Cost Center ?
Cheers
Jay
2013 Nov 20 9:57 AM
Dear Nabheet,
I am testing this BAPI BAPI_REQUISITION_CREATE se 37 and I have the GL account ,but for which field you want me to pass the GL account number for testing.
Cheers
Jay
2013 Nov 20 10:02 AM
Hi Tripathy,
Pass value in REQUISITION_ACCOUNT_ASSIGNMENT-COST_CTR.
Arivazhagan S
2013 Nov 20 10:10 AM
Dear Nabheet,
I passed but still getting the same error "Not Possible to determine a consumption account"
Kindly suggest if you have any idea.
Cheers
Jay
2013 Nov 20 10:11 AM
Dear Siva,
I passed but still getting the same error "Not Possible to determine a consumption account"
Kindly suggest if you have any idea.
Cheers
Jay
2013 Nov 20 10:17 AM
Hi Tripathy,
Please create PR using ME51N with the help of Functional Consultant.
Then you can find the solution easily.
Arivazhagan S
2013 Nov 20 10:24 AM
Hi,
Please pass Cost center as well as GL Account to corresponding lien item.
Arivazhagan S
2013 Nov 20 11:13 AM
Dear Siva,
I passed both but getting the error.
E 06138 Not possible to determine a consumption account
Let me know if you have any idea.
Cheers
Jay
2013 Nov 20 10:16 AM
REQUISITION_ACCOUNT_ASSIGNMENT(in this parmeter) corresponding to your line item id-
Field-->G_L_ACCT
2013 Nov 20 11:15 AM
Dear Nabheet,
I passed both but getting the error.
E 06138 Not possible to determine a consumption account
Let me know if you have any idea.
Cheers
Jay
2013 Nov 21 6:44 AM
Hi Jay
What i have checked is i did a where used list for message and found it to be used at 3-4 place. All of them have som condition before the message is thrown. I would suggest you to put break points at those place and then analyse what other fields you all need to pass
Nabheet
2013 Nov 21 7:58 AM
Dear Nabheet,
Thank you very much for your response.I will surely do what you suggest.
Cheers
Jay
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |