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

BAPI_MATERIAL_MAINTAINDATA_RT

Former Member
0 Likes
5,680

Hi Gurus,

I'm n't able to update the UOM and EAN thru the above function module. Pelase let me know in detail how can I achieve this. I tried with the parameters UNITSOFMEASURE and INTERNATIONALARTNOS.

Please let me know in detail as I dont see the detail explanation in this forum though there were couple of posts on this issue. Please help me.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
4,121

Hi,

I have used this bapi....The following structures need to be filled up...

Unit of Measure mapp to : BAPIE1MARMRT-ALT_UNIT

EAN mapp to : BAPIE1MARMRT-EAN_UPC

Below is mapping for the screen views in the article/material master: Hope this will help you while filling other structres:

&----


*& Form FILL_HEADER

&----


  • Filling the Head data of the BAPI structure

----


FORM fill_header .

  • Article/Material No

gs_headdata-material = gs_output-c_material.

  • Article Type

gs_headdata-matl_type = gs_output-material_type.

  • Merchandise Category

gs_headdata-matl_group = gs_output-merch_category .

  • Article Category

gs_headdata-matl_cat = gs_output-article_category.

  • Basic data view set to 'X'

gs_headdata-basic_view = gc_x. " Basic View

  • Listing view set to 'X' only if the input is available

  • in both the fields listing procedures for store and DC

IF NOT gs_output-listng_proc_store IS INITIAL

AND NOT gs_output-list_proc_dstctr IS INITIAL.

gs_headdata-list_view = gc_x. " listing view

flg_list_view = gc_x.

ENDIF.

  • Logistics DC view set to 'X'

gs_headdata-logdc_view = gc_x. " Logistics DC view

  • Logistics store view set to 'X'

gs_headdata-logst_view = gc_x. " Logistics Store view

ENDFORM. " FILL_HEADER

&----


*& Form FILL_UOM

&----


  • Fill the Units of Measure data

----


FORM fill_uom .

+ Alternative unit of measure+*

IF gs_output-c_alternative_uom IS NOT INITIAL.

gs_uom-alt_unit = gs_output-c_alternative_uom.

+ Mark the field to change(set to 'X')+*

gs_uomx-alt_unit = gc_x.

ENDIF.

  • Lower-Level Unit of Measure in a Packing Hierarchy

IF gs_output-c_pack_hierar_uom IS NOT INITIAL.

gs_uom-sub_uom = gs_output-c_pack_hierar_uom.

  • Mark the field to change(set to 'X')

gs_uomx-sub_uom = gc_x.

ENDIF.

** International Article Number (EAN/UPC)*

IF gs_output-int_article_num IS NOT INITIAL.

gs_uom-ean_upc = gs_output-int_article_num.

** Mark the field to change(set to 'X')*

gs_uomx-ean_upc = gc_x.

ENDIF.

  • Category of International Article Number (EAN)

IF gs_output-categ_int_artnum IS NOT INITIAL.

gs_uom-ean_cat = gs_output-categ_int_artnum.

  • Mark the field to change(set to 'X')

gs_uomx-ean_cat = gc_x.

ENDIF.

  • Weight Unit

IF gs_output-c_weight_unit IS NOT INITIAL.

gs_uom-unit_of_wt = gs_output-c_weight_unit.

  • Mark the field to change(set to 'X')

gs_uomx-unit_of_wt = gc_x.

ENDIF.

  • Length

IF gs_output-length IS NOT INITIAL.

gs_uom-length = gs_output-length.

  • Mark the field to change(set to 'X')

gs_uomx-length = gc_x.

ENDIF.

  • Width

IF gs_output-width IS NOT INITIAL.

gs_uom-width = gs_output-width.

  • Mark the field to change(set to 'X')

gs_uomx-width = gc_x.

ENDIF.

  • Height

IF gs_output-height IS NOT INITIAL.

gs_uom-height = gs_output-height.

  • Mark the field to change(set to 'X')

gs_uomx-height = gc_x.

ENDIF.

  • Unit of Dimension for Length/Width/Height

IF gs_output-c_unit_dimens_lwh IS NOT INITIAL.

gs_uom-unit_dim = gs_output-c_unit_dimens_lwh.

  • Mark the field to change(set to 'X')

gs_uomx-unit_dim = gc_x.

ENDIF.

  • Volume

IF gs_output-volume IS NOT INITIAL.

gs_uom-volume = gs_output-volume.

  • Mark the field to change(set to 'X')

gs_uomx-volume = gc_x.

ENDIF.

  • Volume unit

IF gs_output-c_volume_unit IS NOT INITIAL.

gs_uom-volumeunit = gs_output-c_volume_unit.

  • Mark the field to change(set to 'X')

gs_uom-volumeunit = gc_x.

ENDIF.

  • Denominator for conversion to base units of measure

IF gs_output-den_conv_uom IS NOT INITIAL.

gs_uom-denominatr = gs_output-den_conv_uom.

  • Mark the field to change(set to 'X')

gs_uomx-denominatr = gc_x.

ENDIF.

  • Numerator for Conversion to Base Units of Measure

IF gs_output-num_conv_uom IS NOT INITIAL.

gs_uom-numerator = gs_output-num_conv_uom.

  • Mark the field to change(set to 'X')

gs_uomx-numerator = gc_x.

ENDIF.

IF NOT gs_uom IS INITIAL.

  • Fill the Article No

gs_uom-material = gs_output-c_material.

gs_uomx-material = gs_output-c_material.

  • Appending the records

APPEND gs_uom TO gt_uom.

CLEAR gs_uom.

APPEND gs_uomx TO gt_uomx.

CLEAR gs_uomx.

ENDIF.

ENDFORM. " FILL_UOM

Do let me know if you still facce problem with any other fields while mapping to the Bapi structure...

Regards

Shiva

4 REPLIES 4
Read only

Former Member
0 Likes
4,122

Hi,

I have used this bapi....The following structures need to be filled up...

Unit of Measure mapp to : BAPIE1MARMRT-ALT_UNIT

EAN mapp to : BAPIE1MARMRT-EAN_UPC

Below is mapping for the screen views in the article/material master: Hope this will help you while filling other structres:

&----


*& Form FILL_HEADER

&----


  • Filling the Head data of the BAPI structure

----


FORM fill_header .

  • Article/Material No

gs_headdata-material = gs_output-c_material.

  • Article Type

gs_headdata-matl_type = gs_output-material_type.

  • Merchandise Category

gs_headdata-matl_group = gs_output-merch_category .

  • Article Category

gs_headdata-matl_cat = gs_output-article_category.

  • Basic data view set to 'X'

gs_headdata-basic_view = gc_x. " Basic View

  • Listing view set to 'X' only if the input is available

  • in both the fields listing procedures for store and DC

IF NOT gs_output-listng_proc_store IS INITIAL

AND NOT gs_output-list_proc_dstctr IS INITIAL.

gs_headdata-list_view = gc_x. " listing view

flg_list_view = gc_x.

ENDIF.

  • Logistics DC view set to 'X'

gs_headdata-logdc_view = gc_x. " Logistics DC view

  • Logistics store view set to 'X'

gs_headdata-logst_view = gc_x. " Logistics Store view

ENDFORM. " FILL_HEADER

&----


*& Form FILL_UOM

&----


  • Fill the Units of Measure data

----


FORM fill_uom .

+ Alternative unit of measure+*

IF gs_output-c_alternative_uom IS NOT INITIAL.

gs_uom-alt_unit = gs_output-c_alternative_uom.

+ Mark the field to change(set to 'X')+*

gs_uomx-alt_unit = gc_x.

ENDIF.

  • Lower-Level Unit of Measure in a Packing Hierarchy

IF gs_output-c_pack_hierar_uom IS NOT INITIAL.

gs_uom-sub_uom = gs_output-c_pack_hierar_uom.

  • Mark the field to change(set to 'X')

gs_uomx-sub_uom = gc_x.

ENDIF.

** International Article Number (EAN/UPC)*

IF gs_output-int_article_num IS NOT INITIAL.

gs_uom-ean_upc = gs_output-int_article_num.

** Mark the field to change(set to 'X')*

gs_uomx-ean_upc = gc_x.

ENDIF.

  • Category of International Article Number (EAN)

IF gs_output-categ_int_artnum IS NOT INITIAL.

gs_uom-ean_cat = gs_output-categ_int_artnum.

  • Mark the field to change(set to 'X')

gs_uomx-ean_cat = gc_x.

ENDIF.

  • Weight Unit

IF gs_output-c_weight_unit IS NOT INITIAL.

gs_uom-unit_of_wt = gs_output-c_weight_unit.

  • Mark the field to change(set to 'X')

gs_uomx-unit_of_wt = gc_x.

ENDIF.

  • Length

IF gs_output-length IS NOT INITIAL.

gs_uom-length = gs_output-length.

  • Mark the field to change(set to 'X')

gs_uomx-length = gc_x.

ENDIF.

  • Width

IF gs_output-width IS NOT INITIAL.

gs_uom-width = gs_output-width.

  • Mark the field to change(set to 'X')

gs_uomx-width = gc_x.

ENDIF.

  • Height

IF gs_output-height IS NOT INITIAL.

gs_uom-height = gs_output-height.

  • Mark the field to change(set to 'X')

gs_uomx-height = gc_x.

ENDIF.

  • Unit of Dimension for Length/Width/Height

IF gs_output-c_unit_dimens_lwh IS NOT INITIAL.

gs_uom-unit_dim = gs_output-c_unit_dimens_lwh.

  • Mark the field to change(set to 'X')

gs_uomx-unit_dim = gc_x.

ENDIF.

  • Volume

IF gs_output-volume IS NOT INITIAL.

gs_uom-volume = gs_output-volume.

  • Mark the field to change(set to 'X')

gs_uomx-volume = gc_x.

ENDIF.

  • Volume unit

IF gs_output-c_volume_unit IS NOT INITIAL.

gs_uom-volumeunit = gs_output-c_volume_unit.

  • Mark the field to change(set to 'X')

gs_uom-volumeunit = gc_x.

ENDIF.

  • Denominator for conversion to base units of measure

IF gs_output-den_conv_uom IS NOT INITIAL.

gs_uom-denominatr = gs_output-den_conv_uom.

  • Mark the field to change(set to 'X')

gs_uomx-denominatr = gc_x.

ENDIF.

  • Numerator for Conversion to Base Units of Measure

IF gs_output-num_conv_uom IS NOT INITIAL.

gs_uom-numerator = gs_output-num_conv_uom.

  • Mark the field to change(set to 'X')

gs_uomx-numerator = gc_x.

ENDIF.

IF NOT gs_uom IS INITIAL.

  • Fill the Article No

gs_uom-material = gs_output-c_material.

gs_uomx-material = gs_output-c_material.

  • Appending the records

APPEND gs_uom TO gt_uom.

CLEAR gs_uom.

APPEND gs_uomx TO gt_uomx.

CLEAR gs_uomx.

ENDIF.

ENDFORM. " FILL_UOM

Do let me know if you still facce problem with any other fields while mapping to the Bapi structure...

Regards

Shiva

Read only

0 Likes
4,121

Thanks dude. Its working

Read only

0 Likes
4,121

Hi Shiva,

I have created an article with header data only, and checked in MM43, its saying that the article does not exists or is not activated. But the entry has been created in MARA table and log also created successfully. (If I use this BAPI in SE37, it works fine and I see article in MM43, but If I use this FM in a program, the article is not being created). I also tried with COMMIT WORK.

CALL FUNCTION 'DEQUEUE_ALL'. after calling the BAPI. Please let me know how I can fix it.

Regds,

Dav.

Read only

0 Likes
4,121

Hi,

Try this FM-WRF_MATERIAL_MAINTAINDATA_RT, which will internally call the BAPI: BAPI_MATERIAL_MAINTAINDATA_RT and BAPI_TRANSACTION_COMMIT

I have posted using this from the report program and able to create many articles..

Regarrds

Shiva