10-18-2005 3:28 PM
Hi All,
I am trying to update material master data with transaction MM02. With MM02 I want to go into the Classification view for this material and change the value of a previously entered class.
At first I tried to record doing this in Batch Input Mode which did not succeed in doing it.
Then I tried to record without batch input mode and now everything seemed to work fine, I finished the recording and prepared to work. The problem I have now is that when I run the bdc session, it does not scrool down the screen and I haven´t been able to update all the values I need, any ideas how to scroll it down?,
Thanks
Gabriel P.
10-18-2005 5:14 PM
Hi All,
Thanks for your answers, but what doesn`t scrool down are the class`s values, and not the classes itself. I recorded with the SM35, but the recoding seems to not work in the bdc session. Any ideas?
Thanks again for your help!!
Gabriel P
10-18-2005 3:33 PM
You might consider using the function module instead of BDC.
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
10-18-2005 3:34 PM
You might be able to use the position function. Does RMCLF-PAGPOS exist on the screen? Is the screen SAPLCLFM 1101?
Rob
10-18-2005 3:38 PM
10-18-2005 3:39 PM
Hi Rob,
Yes RMCLF-PAGPOS does exist, and It also is on the screen SAPLCLFM 1101, why?
Thanks again,
Gabriel
10-18-2005 3:42 PM
You could use this field to "position to" the correct line that you want up update. This will put that line at the top of the table control, so all you need to do is update the first visible line.
Of course, you will have to know the index of the line that you need to update before calling the BDC transaction.
Regards,
Rich Heilman
Message was edited by: Rich Heilman
10-18-2005 3:44 PM
Hi,
You can use standard program RCCLBI03 also. You will have to write a file with correct format and data and pass it to this program. Check program documentation for more details.
Cheers.
10-18-2005 3:48 PM
There is a sort position for the classification. You can use that as a starting point to determine the position on the page; however, if you have run some of the upgrade conversion programs for classifications, you may find that some classifications for a single material have the same sort sequence. You'll have to debug the classification code to determine how the program sorts the classifications in that case.
Rob
10-18-2005 3:42 PM
10-18-2005 3:56 PM
Best way to update Classification assignment is to use the function module 'BAPI_OBJCL_CHANGE'.
You may first want to use the FM 'BAPI_OBJCL_GETDETAIL' so that you have all the information and then change what you have to in the Internal tables and call the CHANGE FM.
The parameters are as shown below,
objectkey = Material number or Vendor number etc..
objecttable = The check table for the above key, so it's MARA for Materials LFA1 for Vendors
classnum = Name of the class
classtype = Type of class '001' for Materials
Then you have three internal tables, one for passing Numeric values (including ranges), another for Character values, and another for Currency values.
Hope this is useful.
10-18-2005 3:58 PM
Do not forget to call 'BAPI_TRANSACTION_COMMIT' after calling the BAPI Function module that changes or creates data.
10-18-2005 5:14 PM
Hi All,
Thanks for your answers, but what doesn`t scrool down are the class`s values, and not the classes itself. I recorded with the SM35, but the recoding seems to not work in the bdc session. Any ideas?
Thanks again for your help!!
Gabriel P
10-18-2005 10:19 PM
You can add classification using the program RCCLBI03. It has good documentation associated with it.
Message was edited by: Srinivas Adavi
Sorry, Sanjay already posted it.
10-19-2005 2:27 AM
Hi
Try with CLVF_VB_INSERT_CLASSIFICATION, that´s the function used by MM02 for maintain the classification values for Materials.
Regards
Frank