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: 

BAPI_TE_MARA with CURR, CUKY and DEC fields

Former Member
0 Kudos

Hello All,

I have a problem while updating customer fields of MARA with the BAPI BAPI_MATERIAL_SAVEDATA.

These fields are of type CURR, CUKY and DEC fields.

Please find the code below.


* Internal tables to be supplied to BAPI function module
DATA : BEGIN OF g_t_bapiparex OCCURS 0.
        INCLUDE STRUCTURE bapiparex.
DATA : END OF g_t_bapiparex.
DATA : BEGIN OF g_t_bapiparexx OCCURS 0.
        INCLUDE STRUCTURE bapiparexx.
DATA : END OF g_t_bapiparexx.

*Fill BAPI_TE_MARA structure
  bapi_te_mara-material       = g_r_mara-matnr.
  bapi_te_mara-zzgrenzwrt     = l_f_zzgrenzwrt.
  bapi_te_mara-zzgrenzwaers   = l_f_zzgrenzwaers.
  bapi_te_mara-zzgrenzprunit  = l_f_zzgrenzprunit.

*Fill BAPI_TE_MARAX structure
  bapi_te_marax-material       = g_r_mara-matnr.
  bapi_te_marax-zzgrenzwrt     = 'X'.
  bapi_te_marax-zzgrenzwaers   = 'X'.
  bapi_te_marax-zzgrenzprunit  = 'X'.

  g_t_bapiparex-structure = 'BAPI_TE_MARA'.
  g_t_bapiparex-valuepart1 = bapi_te_mara.
  APPEND g_t_bapiparex.

*Fill BAPI_TE_MARAX structure
  bapi_te_marax-material       = g_r_mara-matnr.
  bapi_te_marax-zzgrenzwrt     = 'X'.
  bapi_te_marax-zzgrenzwaers   = 'X'.
  bapi_te_marax-zzgrenzprunit  = 'X'.

  g_t_bapiparexx-structure = 'BAPI_TE_MARAX'.
  g_t_bapiparexx-valuepart1 = bapi_te_marax.
  APPEND g_t_bapiparexx.

But im getting an error message "G_T_BAPIPAREX-VALUEPART1" and "BAPI_TE_MARA" are not mutually convertible in Unicode program.

Before adding these three fields to BAPI_TE_MARA, other reports which are using this BAPI and structure BAPI_TE_MARA are working fine.

After I added these fields, Those reports are also showing the same syntax error.

Is there any special treatment to be done for CURR, CUKY and DEC fields.

Thank you.

Best Regards,

Sasidhar Reddy Matli.

3 REPLIES 3

Former Member
0 Kudos

Hi,

Have you found solution for the same?

I have followed the steps like append structure in BAPI_TE_MARA and MARAX

Created entry in T130F e.g. MARA-FIELD1 and status = 'K'

And code as mentioned by you, and i would like to understand if CUR field then 13 , 3 will be counted as 17 when passing to structure BAPI EXTENSIONIN?

Thanks in advance.

Former Member
0 Kudos

...sorry didn't see the OLD date...

Former Member
0 Kudos

how u solve? can u pl explain?