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: 

Mass Change in Alternate UOM

former_member590504
Discoverer
0 Kudos
590

Hello folks,

I am creating a BDC for changing alternate UOM conversion values. My problem is that my program is not changing required values in UOM tab in mm02.


perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR'
'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'RMMG1-MATNR' WA_IT_MATNR-MATNR.
* 'ABC'.
perform bdc_dynpro using 'SAPLMGMM' '0070'.
perform bdc_field using 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
'X'.
perform bdc_dynpro using 'SAPLMGMM' '4004'.
perform bdc_field using 'BDC_OKCODE'
'=ZU01'.
perform bdc_field using 'BDC_CURSOR'
'MAKT-MAKTX'.
*perform bdc_field using 'MAKT-MAKTX' WA_IT_MATNR-MAKTX.
** 'ABC'.
perform bdc_field using 'MARA-MEINS' "WA_IT_MATNR-MEINS.
'KG'.
perform bdc_field using 'MARA-MATKL' "WA_IT_MATNR-MATKL.
'SS05'.
perform bdc_dynpro using 'SAPLMGMM' '4300'.
perform bdc_field using 'BDC_OKCODE'
'=ZU02'.
perform bdc_field using 'BDC_CURSOR'
'SKTEXT-SPRAS(01)'.
perform bdc_dynpro using 'SAPLMGMM' '4300'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'MAKT-MAKTX' WA_IT_MATNR-MAKTX.

perform bdc_field using 'BDC_CURSOR'
'SMEINH-UMREZ(02)'.
perform bdc_field using 'SMEINH-UMREN(02)'
WA_IT_MATNR-UMREN.
* '111'.
perform bdc_field using 'SMEINH-UMREZ(02)'
WA_IT_MATNR-UMREZ.
* '999'.
perform bdc_dynpro using 'SAPLMGMM' '4300'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.

Not able to figure out what is wrong

1 ACCEPTED SOLUTION

former_member590504
Discoverer
0 Kudos
242

The problem was with the data that was being copied into SAP window. While copying data from file and pasting it in sap window some how alot of blank spaces were included with the data, which in turn was increasing the length of the data that can be punched inside that field removing those extra spaced resolved my problem.

6 REPLIES 6

raymond_giuseppi
Active Contributor
242

Better use a BAPI than an obsolete tech such as BDC.

(e.g. BAPI_MATERIAL_SAVEDATA or BAPI_MATERIAL_SAVEREPLICA)

In any case, check correct format of units of measure (conversion exit CUNIT)

0 Kudos
242

Hi Raymond Giuseppi,

I am not able to open link provided by you. Will appreciate your efforts for detailed information.

242

IF you search in google for these BAPIs you'll find a wealth of detail and examples.

0 Kudos
242

If you don't have access to the sap launchpad use the search included in the forum or google.

0 Kudos
242

Well thanks for your response. In the mean time i solved my problem my self. cheers !!!

former_member590504
Discoverer
0 Kudos
243

The problem was with the data that was being copied into SAP window. While copying data from file and pasting it in sap window some how alot of blank spaces were included with the data, which in turn was increasing the length of the data that can be punched inside that field removing those extra spaced resolved my problem.