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_REQUISITION_CREATE issue

Former Member
0 Likes
4,533

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

1 ACCEPTED SOLUTION
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
3,682

REQUISITION_ACCOUNT_ASSIGNMENT(in this parmeter) corresponding to your line item id-

Field-->G_L_ACCT

25 REPLIES 25
Read only

arivazhagan_sivasamy
Active Contributor
0 Likes
3,682

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

Read only

former_member209120
Active Contributor
0 Likes
3,682

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.

Read only

0 Likes
3,682

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

Read only

0 Likes
3,682

Hi

Can you please provide message number and message class details..

Nabheet

Read only

0 Likes
3,682

Hi Mrutyunjaya Tripathy

I think no... if you share your code we can check....

Read only

0 Likes
3,682

Dear Nabheet,

Below is the details:

CODE-06138

MESSAGE-Not Possible to determine a consumption account.

Regards

Jay

Read only

0 Likes
3,682

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

Read only

0 Likes
3,682

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.....

Read only

0 Likes
3,682

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

Read only

0 Likes
3,682

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

Read only

0 Likes
3,682

Appreciate for your effort ramesh.

Read only

0 Likes
3,682

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

Read only

0 Likes
3,682

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

Read only

0 Likes
3,682

Dear Siva,

Yes I am passing K but for which field exactly  you are asking to pass the Cost Center ?

Cheers

Jay

Read only

0 Likes
3,682

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

Read only

0 Likes
3,682

Hi Tripathy,

Pass value in REQUISITION_ACCOUNT_ASSIGNMENT-COST_CTR.

Arivazhagan S

Read only

0 Likes
3,682

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

Read only

0 Likes
3,682

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

Read only

0 Likes
3,682

Hi Tripathy,

Please create PR using ME51N with the help of Functional Consultant.

Then you can find the solution easily.

Arivazhagan S

Read only

0 Likes
3,682

Hi,

Please pass Cost center as well as GL Account to corresponding lien item.

Arivazhagan S

Read only

0 Likes
3,682

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

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
3,683

REQUISITION_ACCOUNT_ASSIGNMENT(in this parmeter) corresponding to your line item id-

Field-->G_L_ACCT

Read only

0 Likes
3,682

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

Read only

0 Likes
3,682

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

Read only

0 Likes
3,682

Dear Nabheet,

Thank you very much for your response.I will surely do what you suggest.

Cheers

Jay