Skip to Content
0
Former Member
Jul 23, 2010 at 03:21 PM

Bapi problem

44 Views

Hello all,

I getting some errors when I trying to use this BAPI.

The fields will be filled by an excel file:

OBJEK / OBJTYPE / KLART / CLASS / DESIGNATION_COURT / GPE_MARCHANDISES

1754490 / Mat / 001 / M001 / DLE10 - Chargement Txt Cde / 0102

DIVISION_ARTICLE / MATIERE / CONSTRUCTEUR / CDF_ATELIER / DCF

0273 / TEST / XYZ / 02 / DCF

into the program, I am coding:

DATA: t_char LIKE bapi1003_alloc_values_char OCCURS 0 WITH HEADER LINE,
      t_num  like BAPI1003_ALLOC_VALUES_NUM OCCURS 0 WITH HEADER LINE,
      t_curr like BAPI1003_ALLOC_VALUES_CURR OCCURS 0 WITH HEADER LINE,
      t_retur LIKE bapiret2 OCCURS 0 WITH HEADER LINE.

DATA: status TYPE bapi1003_key-status.


t_char-charact = 'DESIGNATION_COURTE'.
t_char-value_char = 'DLE10 - Chargement Txt Cde'.

t_char-charact = 'GPE_MARCHANDISES'.
t_char-value_char = '0102'.

t_char-charact = 'DIVISION_ARTICLE'.
t_char-value_char = '0273'.

t_char-charact = 'MATIERE	CONSTRUCTEUR'.
t_char-value_char = 'TEST'.

t_char-charact = 'REF_CONSTRUCTEUR'.
t_char-value_char = 'XYZ'.

t_char-charact = 'CDF_ATELIER'.
t_char-value_char = '02'.

t_char-charact = 'DCF'.
t_char-value_char = 'DCF'.

t_char-charact = 'DIVISION_ARTICLE'.
t_char-value_char = '7852'.

APPEND t_char.

CALL FUNCTION 'BAPI_OBJCL_CREATE'
  EXPORTING
    objectkeynew            = 'TEST'
    objecttablenew          = 'MARA'
    classnumnew             = 'M001'
    classtypenew            = '001'
   status                  = '1'
*   STANDARDCLASS           =
*   CHANGENUMBER            =
   KEYDATE                 = SY-DATUM
*   NO_DEFAULT_VALUES       = ' '
 IMPORTING
   classif_status          = status
  TABLES
*   ALLOCVALUESNUM          =
   allocvalueschar         = t_char
*   ALLOCVALUESCURR         =
    return                  = t_retur.

After executing this BAPI, I got this message at table t_retur:

Assignment does not exist or is not valid on