Application Development 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: 

Batch Input MM02

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

13 REPLIES 13

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

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

Former Member
0 Kudos

You might be able to use the position function. Does RMCLF-PAGPOS exist on the screen? Is the screen SAPLCLFM 1101?

Rob

0 Kudos

Also, you might consider using transaction CU42 to change the class assignment.

Regards,

Rich Heilman

0 Kudos

Hi Rob,

Yes RMCLF-PAGPOS does exist, and It also is on the screen SAPLCLFM 1101, why?

Thanks again,

Gabriel

0 Kudos

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

0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

Can't you use BAPI_MATERIAL_SAVEDATA for this purpose?

Former Member
0 Kudos

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.

Former Member
0 Kudos

Do not forget to call 'BAPI_TRANSACTION_COMMIT' after calling the BAPI Function module that changes or creates data.

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos

Hi

Try with CLVF_VB_INSERT_CLASSIFICATION, that´s the function used by MM02 for maintain the classification values for Materials.

Regards

Frank