Skip to Content

MDG-M: how to create several material description?

Nov 09, 2016 at 12:26 AM


avatar image

Hi folks!

I am new in this MDG stuf and I am creating a CR to create material using Governance API.

I could sucesfull create a CR with a lot of entities, like:



But I need to create this material with at least 3 diferent langues, English, Portuguese and Spanish, but this is a entity? I found this link and it's looks like an attribute of MATERIAL, but I do not undestand how this works.

Could somebody please help me?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Kavita S. Nov 14, 2016 at 07:07 AM

Hello Ronaldo,

I am not quite sure what your query is.

Are you able to enter description in 1 language e.g. English?

If yes, then just in the same place enter the different language code like ES etc & then add the Material Description against it- just like you would in ECC transaction MM01.

Is your query something different?

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hello Kavita, thanks for the answer.

Yes my query is something like the query of this thread ( )

Let me try to explain this in other way, English is my third language so there some things I can't explain.

I'm able to enter the description in one language (spanish in my case) but how I said, I have at least add PT and EN description. So, the description I've been entered I did in the entity MATERIAL and the field TXTMI but in this case, there is no KEY for the language as the BSCDATTXT entity have, so, if I create 3 lines for this entity MATERIAL, I'm not sure if it's works.

In the other hand, if you check the guy which answers the question did something I need to do, but he used the convenience API and I cannot do the same with the governace API.

I still looking for the answer of this question.



Kavita S. Nov 29, 2016 at 11:52 AM

Hello Ronaldo,

The Language field does exist for Material Description also.

Have you chceked SMT Mapping MDG_BS_MAT_MAP_2PP for Mapping Step MDG_BS_MAT_DESCRIPTION

The field SPRAS is mapped against LANGU.

Also while creating a material I am thus able to add descriptions in more than 1 language just like we can in MM01.

So I am not sure what the issue is.



field-trans.png (9.7 kB)
mapping.png (27.4 kB)
mat-descr.png (14.5 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hello Kavita, thank you again for the answer.

Let me try another approach here.

I will put the part of code where I'm put the values in the MATERIAL entity.

  move-corresponding <ls_mat_key> to <ls_mat_data>.
  assign component 'MBRSH' of structure <ls_mat_data> to <value>.
  <value> = t137-mbrsh.
  assign component 'MTART' of structure <ls_mat_data> to <value>.
  if sy-tcode = 'ZMDG001'.
    <value> = t134-mtart.
  elseif sy-tcode = 'ZMDG002'.
    <value> = zmdg_solalt-tpmat.
  assign component 'MEINS' of structure <ls_mat_data> to <value>.
  <value> = t006a-msehi.
  assign component 'MATKL' of structure <ls_mat_data> to <value>.
  <value> = t023-matkl.
  assign component 'TXTMI' of structure <ls_mat_data> to <value>.
  read table gti_idoma_act with key sprsl = 'S' into wa_idiomas.
  if sy-subrc is initial.
    <value> = wa_idiomas-maktg.
    clear wa_idiomas.
  insert <ls_mat_data> into table <lt_mat_data>.

You can see in the code where I put the value into a TXTMI field, but, I need to put at least 3 descriptions like I said before.

I found an structure that contains MATERIAL, LANGU, TXTMI and it's in cl_usmd_conv_som_gov_api=>gc_struct_key_txt_langu but since it is not an entity but it's part of a MATERIAL entity I believe, I cannot find a way to attach this into my entity. I'm doing everything via a Z module pool, I'm not using any standard tx.

I hope I have explained myself in a better way.

best regards

Ronaldo S. Vieira