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

Problem using BAPI_PR_CHANGE - Error: Creation Indicador B invalid

Former Member
0 Likes
1,328

Hi Experts:

I'm trying to execute BAPI_PR_CHANGE to modify a PurRqs.

My code is (from a test program):

* Step 1
s_number = '0010028817'.

  CALL FUNCTION 'BAPI_PR_GETDETAIL'
    EXPORTING
      NUMBER = s_number
    TABLES
      RETURN = ERRMSG
      PRITEM = S_ITEMEXP.


* Step 2

READ TABLE S_ITEMEXP INTO WA_ITEMEXP
       WITH KEY MATERIAL = '000000000000216255'.


  S_ITEM-PREQ_ITEM  = WA_ITEMEXP-PREQ_ITEM .
  S_ITEM-MATERIAL   = WA_ITEMEXP-MATERIAL  .
  S_ITEM-QUANTITY   = 48  .
  S_ITEM-PLANT      = WA_ITEMEXP-PLANT     .
  S_ITEM-PUR_GROUP  = WA_ITEMEXP-PUR_GROUP .
  S_ITEM-PREQ_NAME  = WA_ITEMEXP-PREQ_NAME .
  S_ITEM-SHORT_TEXT = WA_ITEMEXP-SHORT_TEXT.
  S_ITEM-SUPPL_PLNT = WA_ITEMEXP-SUPPL_PLNT.
  S_ITEM-item_cat   = '0'.

  APPEND S_ITEM.

  S_ITEMX-PREQ_ITEM  = WA_ITEMEXP-PREQ_ITEM .
  S_ITEMX-MATERIAL   = 'X'.
  S_ITEMX-QUANTITY   = 'X'.
  S_ITEMX-PLANT       = 'X'.
  S_ITEMX-PUR_GROUP   = 'X'.
  S_ITEMX-PREQ_NAME   = 'X'.
  S_ITEMX-SHORT_TEXT  = 'X'.
  S_ITEMX-SUPPL_PLNT  = 'X'.
  s_itemx-ITEM_CAT  = 'X'.

  APPEND S_ITEMX.

* Step 3:
  s_number = '0010028817'.

  CALL FUNCTION 'BAPI_PR_CHANGE'
    EXPORTING
      NUMBER    = s_number
      TESTRUN   = S_TEST
    TABLES
      RETURN    = ERRMSG
      PRITEM    = S_ITEM
      PRITEMX   = S_ITEMX
      PRITEMEXP = S_ITEMEXP.

The message is:

E MEPO 081 Creation indicator B invalid

E BAPI 003 Instance 10028817 of object type PurchaseRequisition could not be changed

Anybody can help me with this issue.

Thanks

Diego

4 REPLIES 4
Read only

former_member194669
Active Contributor
0 Likes
858

The error message E MEPO 081 get generated from these programs

LMEREQF32

LMEREQF56

and also you may need to check EBAN-ESTKZ

a®

Read only

0 Likes
858

Hi a®s:

I'm using on first step BAPI_PR_GETDETAIL to capture the PurRqs information.

On BAPI_PR_CHANGE, I'm filled structure PRITEMEXP using the values from structure PRITEM (BAPI_PR_GETDETAIL) on structure PRITEMEXP (BAPI_PR_CHANGE)

These are the values from the first fields.

PREQ_ITEM                      00010
DOC_TYPE                       NB
DOC_CAT                        B
CTRL_IND
DELETE_IND
PROC_STAT                      N
CREATE_IND                     B

What I need to change?

Read only

0 Likes
858

use one of the below for creation indicator: CREATE_IND

D	Direct procurement
F	Production order  "this should work
G	Store order
R	Realtime (manual)
U	Converted planned order
V	Sales and distribution document
M	Compression (monthly basis)
Y	Compression (annual basis)

Read only

Former Member
0 Likes
858

implement OSS note 1054002 and 1175640