Application Development 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: 

'Not possible to determine a consumption account' Error in BAPI_REQUISITION_CREATE?

Former Member
0 Kudos
179

Hi,

I am using BAPI_REQUISITION_CREATE to create PRs, but in its return table i am getting error as

"Not possible to determine a consumption account".

Please find below the code used -

CALL FUNCTION 'BAPI_REQUISITION_CREATE'

*     EXPORTING

*       SKIP_ITEMS_WITH_ERROR                =

*       AUTOMATIC_SOURCE                     = 'X'

    
IMPORTING

      
NUMBER                                = l_pr_no

     
TABLES

        REQUISITION_ITEMS                   
= l_i_req

*       REQUISITION_ACCOUNT_ASSIGNMENT       =

*         REQUISITION_ITEM_TEXT             =

*       REQUISITION_LIMITS                   =

*       REQUISITION_CONTRACT_LIMITS          =

*       REQUISITION_SERVICES                 =

*       REQUISITION_SRV_ACCASS_VALUES        =

       
RETURN                               = l_i_return

*       REQUISITION_SERVICES_TEXT            =

*       REQUISITION_ADDRDELIVERY             =

*       EXTENSIONIN                          =
   
.

I am passing the below values in items table -

      l_i_req-plant = <grid_aux>-werks.


      l_i_req
-material = <grid_aux>-comp_no.

      l_i_req
-preq_item = l_v_int.

      l_i_req
-deliv_date = <grid_aux>-dat01.

      l_i_req
-unit = <grid_aux>-meins.

      l_i_req
-doc_type = l_c_nb.

      l_i_req
-quantity = <grid_aux>-KIT_QTY.

      l_i_req
-purch_org = p_ekorg.

Also I have checked that fields are being converted to proper leading zeros with CONVERSION_EXIT_ALPHA_INPUT before passing in BAPI.

Also,the same error comes when executing BAPI manually in SE37,

Please provide your assistance.

1 ACCEPTED SOLUTION

ŁukaszPęgiel
Contributor
0 Kudos
86

Fill also REQUISITION_ACCOUNT_ASSIGNMENT table as system does not know what kind of account assignment category you'd like to use.

Regards

Łukasz

1 REPLY 1

ŁukaszPęgiel
Contributor
0 Kudos
87

Fill also REQUISITION_ACCOUNT_ASSIGNMENT table as system does not know what kind of account assignment category you'd like to use.

Regards

Łukasz