0

enter image description hereI am using the BAPI_CONTRACT_CREATE to upload the contract orders in ME31K.

For Testing purpose I maintained all the parameters which is relevant to above BAPI in SE37.

But system is showing the error even though material code & and all other fields are maintained in respective fields.

Please find the attached screenshot for the reference.

Suncatcher
  • 10,355
  • 10
  • 52
  • 90
Anouar Mhj
  • 33
  • 1
  • 5

1 Answers1

2

My 2 cents, as this kind of error is frequent in many BAPI functions.

BAPI functions frequently have their parameters doubled, for instance one named ITEM and another one named accordingly and suffixed with X (ITEMX). This additional parameter has the exact same fields, with the same name but with a one-character length which can take the value either ' ' or 'X'.

'X' is to indicate that the corresponding field in ITEM must be changed. The interest of these doubled parameters can be better understood in BAPI used to change an existing object, to force a field to be changed to an empty value. Fields with a empty value mean "no change".

Example code:

DATA: items   TYPE TABLE OF BAPIMEOUTITEM,
      items_x TYPE TABLE OF BAPIMEOUTITEMX.

items = VALUE #(
   ( item_no = '00010' material = 'MAT01' )
   ( item_no = '00020' material = 'MAT02' ) ).
items_x = VALUE #(
   ( item_no = '00010' material = 'X' )
   ( item_no = '00020' material = 'X' ) ).
...
CALL FUNCTION 'BAPI_CONTRACT_CREATE'
  TABLES
    item   = items
    itemx  = items_x
...
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48