2005 Jun 08 1:08 PM
Hi Friends,
I have a requirement in BDC.. Say a material is created with just Basic data 1 and Basic data 2 . Through BDC i need to fill in the details for Accounting tabs of this material. Is it possible?.
Helpful answers will be rewarded.
Thanks,
Tamilarasan.
If you want to get really slick, you can write a program using the following function module. Works good for us.
call function 'MATERIAL_MAINTAIN_DARK'
exporting
sperrmodus = ' '
kz_prf = 'W'
max_errors = ' '
p_kz_no_warn = 'X'
kz_verw = 'X'
kz_aend = 'X'
kz_dispo = 'X'
kz_test = ' '
flag_muss_pruefen = ' '
call_mode = 'ACT'
importing
number_errors_transaction = numerror
matnr_last = last_matnr
tables
amara_ueb = i_mara "Basic Data
amakt_ueb = i_makt "Descriptions
amarc_ueb = i_marc "Plant
amard_ueb = i_mard "Storage Location
* AMFHM_UEB = I_MFHM "Production Tools
amarm_ueb = i_marm "Units of Measure
* AMEA1_UEB = I_MEA1 "Internal Mangagement - EANs
ambew_ueb = i_mbew "Accounting/Costing
asteu_ueb = i_steu "Tax Data
astmm_ueb = i_steumm "Tax Data
* AMLGN_UEB = I_MLGN "Warehouse Data
* AMLGT_UEB = I_MLGT "Storage Type Data
* AMPGD_UEB = I_MPGD "Change Documents
* AMPOP_UEB = I_MPOP "Forcast Parameters
* AMVEG_UEB = I_MVEG "Total Consumption Data
* AMVEU_UEB = I_MVEU "Unplanned Consumption Data
amvke_ueb = i_mvke "Sales Data
altx1_ueb = i_ltx1 "Sales Text
* AMPRW_UEB = I_MPRW "Forcast Values
amfieldres = i_delfields
amerrdat = i_errors
exceptions
kstatus_empty = 01
tkstatus_empty = 02
t130m_error = 03
internal_error = 04
update_error = 05
too_many_errors = 06.
Regards,
Rich Heilman
2005 Jun 08 1:12 PM
Hello,
LSMW DI Prg 0020/0000/RMDATIND would help you.
Murugesh AS
2005 Jun 08 1:58 PM
Hello,
I would suggest you not to use BDC for material master because the views depend on Material Type.
If you are creating a additional views in a Material Master, Use 'MM01' as Tx. code in your DI program. Remember to check field BMM00-XEIB1.
Best Regards, Murugesh AS
2005 Jun 08 2:04 PM
If you want to get really slick, you can write a program using the following function module. Works good for us.
call function 'MATERIAL_MAINTAIN_DARK'
exporting
sperrmodus = ' '
kz_prf = 'W'
max_errors = ' '
p_kz_no_warn = 'X'
kz_verw = 'X'
kz_aend = 'X'
kz_dispo = 'X'
kz_test = ' '
flag_muss_pruefen = ' '
call_mode = 'ACT'
importing
number_errors_transaction = numerror
matnr_last = last_matnr
tables
amara_ueb = i_mara "Basic Data
amakt_ueb = i_makt "Descriptions
amarc_ueb = i_marc "Plant
amard_ueb = i_mard "Storage Location
* AMFHM_UEB = I_MFHM "Production Tools
amarm_ueb = i_marm "Units of Measure
* AMEA1_UEB = I_MEA1 "Internal Mangagement - EANs
ambew_ueb = i_mbew "Accounting/Costing
asteu_ueb = i_steu "Tax Data
astmm_ueb = i_steumm "Tax Data
* AMLGN_UEB = I_MLGN "Warehouse Data
* AMLGT_UEB = I_MLGT "Storage Type Data
* AMPGD_UEB = I_MPGD "Change Documents
* AMPOP_UEB = I_MPOP "Forcast Parameters
* AMVEG_UEB = I_MVEG "Total Consumption Data
* AMVEU_UEB = I_MVEU "Unplanned Consumption Data
amvke_ueb = i_mvke "Sales Data
altx1_ueb = i_ltx1 "Sales Text
* AMPRW_UEB = I_MPRW "Forcast Values
amfieldres = i_delfields
amerrdat = i_errors
exceptions
kstatus_empty = 01
tkstatus_empty = 02
t130m_error = 03
internal_error = 04
update_error = 05
too_many_errors = 06.
Regards,
Rich Heilman
2007 Jan 08 3:07 PM
Hi Rich Heliman,
In my report I am using ALV and displaying fields, which some of the fields user can change through MATERIAL_MAINTAIN_DARK' function module (it will call through user_command in the alv_grid_display fm).
In the above scenario, suppose once user execute the program, it will display loading group, picking area and gross weight fields in editable mode. If I modify the value and press the save button program is working fine and material is updating with updated value, however if I remove the value, FM is not changing the value and if I see in the material only old values are appearing.
Suppose initially for material 'A' loading group is '0001', if I modify it as '0002', FM is working fine and in the material also I am able to see the changed value '0002'. But if I remove the value means space, FM is returning sy-subrc '0' only but material value is not changing means value is showing only '0002'. Not only this field any field when I modify it is working fine, but if I remove the value it is not accepting only old values are appearing but FM returning sy-subrc value '0'. Please let me know the solution for this problem.
Thanks & Regards
Naveen Kumar
2007 Jan 08 5:27 PM
From the FM documentation---
<i>Fields that are to be reset to their initial value are transferred
using exception table AMFIELDRES.</i>
Also, there is BAPI_MATERIAL_SAVEDATA. Possibly the COOLEST of the BAPIs i have seen so far.
2005 Jun 08 1:16 PM
Hi,
It is possible using either call transaction or session method, you can call the tcode MM02(change material transaction) to update the accounting information for a particular material.
Get back for any further information on this.
Rgds,
2005 Jun 08 1:23 PM
Hi,
Thanks for your prompt reply. In a change material transaction (MM02) we usually get to see only the views that we have entered values. Even if you click the 'Select Views' Button u get only those views for which you keyed in datas.Right?.. Correct me if iam wrong..
I would also like to thank Murugesh for his prompt response. I will check this out..
Thanks,
Tamilarasan.
2005 Jun 08 1:43 PM
Hi,
I beleive views are displayed based on the material type assigned to that material.
Thanks,
Swagatika
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |