‎2010 Apr 19 11:50 AM
Hi experts.
I am trying to change some material parameters. It's MARC-MINBE and MARC-MABST.
For this I am using BAPI_MATERIAL_MAINTAINDATA_RT with appropriate parameters.
Unfortunatelly there is an error message: 537.
In SLG1 I have some messages:
- The field MARA-BRAND_ID/BAPIE1MARART-BRAND_ID is defined as a required field; it does not contain an entry
- The field MARA-BSTAT/BAPIE1MARART-CREATION_STATUS is defined as a required field; it does not contain an entry
- The field MARA-FASHGRD/BAPIE1MARART-FASHION_GRADE is defined as a required field; it does not contain an entry
I've got 15 of messages like that.
Code is as follow:
REPORT ztest.
PARAMETER: p_matnr LIKE mara-matnr DEFAULT '116'.
DATA: wa_head LIKE bapie1mathead,
wa_return LIKE bapireturn1.
TYPES: BEGIN OF t_plantdata.
INCLUDE STRUCTURE bapie1marcrt.
TYPES: END OF t_plantdata.
DATA: wa_plantdata TYPE t_plantdata,
it_plantdata TYPE TABLE OF t_plantdata.
TYPES: BEGIN OF t_plantdatax.
INCLUDE STRUCTURE bapie1marcrtx.
TYPES: END OF t_plantdatax.
DATA: wa_plantdatax TYPE t_plantdatax,
it_plantdatax TYPE TABLE OF t_plantdatax.
MOVE: p_matnr TO wa_head-material,
'X' TO wa_head-basic_view.
MOVE: p_matnr TO wa_plantdata-material.
MOVE '1204' TO wa_plantdata-plant.
MOVE '1.0' TO wa_plantdata-reorder_pt.
*MOVE '2' TO wa_plantdata-max_stock.
APPEND wa_plantdata TO it_plantdata.
CLEAR wa_plantdata.
MOVE: p_matnr TO wa_plantdatax-material.
MOVE: '1204' TO wa_plantdatax-plant.
MOVE: 'X' TO wa_plantdatax-reorder_pt.
*MOVE: 'X' TO wa_plantdatax-max_stock .
APPEND wa_plantdatax TO it_plantdatax.
CLEAR wa_plantdatax.
CALL FUNCTION 'BAPI_MATERIAL_MAINTAINDATA_RT'
EXPORTING
headdata = wa_head
IMPORTING
return = wa_return
TABLES
plantdata = it_plantdata
plantdatax = it_plantdatax.
IF wa_return-type EQ 'E'.
WRITE:/ 'Error in updating the Material'.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
WRITE:/ 'Updating the Material is Successful'.
ENDIF.
BTW: Problem is only on ECC 6.0. On 4.6C there is no problem like that, data are being updated...
Really gratefull for help.
Daniel.
‎2010 Apr 19 12:01 PM
Hi,
These are all the Mandatory values which you need to pass the BAPI structure to change material parameters.
‎2010 Apr 19 12:01 PM
Hi,
These are all the Mandatory values which you need to pass the BAPI structure to change material parameters.
‎2010 Apr 19 12:21 PM
This is a list of those parameters:
bapie1marart-brand_id
bapie1marart-creation_status
bapie1marart-fashion_grade
bapie1marart-fiber_code_1
bapie1marart-fiber_code_2,
bapie1marart-fiber_code_3,
bapie1marart-fiber_code_4,
bapie1marart-fiber_code_5,
bapie1marart-fiber_part_1,
bapie1marart-fiber_part_2,
bapie1marart-fiber_part_3,
bapie1marart-fiber_part_4,
bapie1marart-fiber_part_5,
bapie1marart-free_char_value
Question whether all of them are necessary ? Where can I take a look for them ?
Thanks.
‎2010 Apr 19 12:36 PM
No, It is not mandatory to pass all the values during any change in material no.
Just check that MC Reference article should maintained all mandatory values. You don't need to put all values in program
‎2010 Apr 19 12:43 PM
Could you please describe me when can I check it ? (t.code OMSR ? I am not sure)
thanks
‎2010 Apr 19 12:51 PM
Hi,
It is not Transaction code. Go to SE37 Transaction -
> Give the FM name----> Say display.
There you can have the Function Module documentation. It will show you what are all the mandatory parameters to pass the BAPI
Structures
‎2010 Apr 19 1:06 PM
Hi Daniel,
First you check the merchandise categaory of the given article no. in MARA table.
Go to t-code WG22
Enter MC No. Then Click on MC Ref. Article
In this article no. you have to maintain all mandatory fields. It may be possible that on devlopment server all variables are not maintained in MC Ref. Article. But on production server you will not face such type of issue.
I hope, this will help you a lot.
‎2010 Apr 19 1:29 PM
Thanks for fast reply.
In WG22 I saw, that I have got reference article for all of the merchandise categories. Furthemore we've got two developing systems (4.6C and 6.0) and WG22 shows that they are same configuration data. On productive system WG22 seems to have the same config data.
Problem is only on 6.0.
EDIT. I've also have a look in "Propose Field Content from the Reference' in OMSR. They are checked.
Edited by: Daniel Duras on Apr 19, 2010 2:30 PM
‎2010 Apr 19 1:44 PM
Hi Daniel,
Now you just maintain all required fields of MC Ref. Article using tcode MM42
Then run your code.
‎2010 Apr 19 3:10 PM
Hi Daniel,
If your issue has been resolved. Kindly close the thread.
Regards,
Narendra
‎2010 Apr 19 3:37 PM
Of course, when I solv this problem I give the points.
Unfortunatelly I can't find those fields in MM42. Still working on it.
‎2010 Apr 20 5:51 AM
Hi Daniel,
Ask the mandatory fields from the functional consultant.
These mandatory fields will copy automatically, when you change any article no. or creating new article no. of that particular MC.
‎2010 Apr 26 8:51 AM
‎2010 Jun 18 8:17 AM
Hi Daniel,
I am facing the same problem can you elaborate how did u resolved this issue.
Regards
Dhirendra
‎2010 Dec 09 1:43 AM
Hi Daniel,
I am also facing the same problem while upgrading to ECC6.0.
It seems that this is a common issue.
Would you like to share on how did you overcome this issues?
Thanks