Application Development and Automation 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: 
Read only

Call MR21 Transaction code

Former Member
0 Likes
3,331

Hi Expert,

i want to call MR21 transaction code from program with filling plant ,company code and material from the production order

my first question is

is it possible to call MR21 with filling material?

if possible then how ?

Thanks,

Mahipal

14 REPLIES 14
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,909

Yes with a small BDC ?

Regards,

Raymond

Read only

0 Likes
2,909

Sample if you were not successful :

DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE,
       opt TYPE ctu_params.
CLEAR opt.
opt-dismode = 'E'.
opt-nobinpt = 'X'.
opt-nobiend = 'X'.
REFRESH: bdcdata.
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'
                               'AA0D45'.
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'.
CALL TRANSACTION 'MM02' USING bdcdata OPTIONS FROM opt.

Regards,

Raymond

Read only

Former Member
0 Likes
2,909

Hi,

try the BAPI: BAPI_M_REVAL_CREATEPRICECHANGE

Rachid.

Read only

alejandro_bindi
Active Contributor
0 Likes
2,909

Try this one: BAPI_MATVAL_PRICE_CHANGE

Previously you have to customize view VCKML_PRICE_SEND (check note 646630)

Regards

Read only

Former Member
0 Likes
2,909

Hi Friend,

You can try like

CALL FUNCTION 'BAPI_M_REVAL_CREATEPRICECHANGE' "BAPI: Material Revaluation - Generate Price Change

  EXPORTING

  comp_code = " bapi2027_pc_hd-comp_code Company Code

  pstng_date = " bapi2027_pc_hd-pstng_date Posting Date

  IMPORTING

  ml_doc_year = " bapi2027_pc_ex-ml_doc_year Material Revaluation Document: Year Saved

  ml_doc_num = " bapi2027_pc_ex-ml_doc_num Material Revaluation Document Number

  TABLES

  material_price_list = " bapi2027_pc_list List of Materials and Prices (per C&V Type)

  return = " bapireturn1 Return Parameter

  . " BAPI_M_REVAL_CREATEPRICECHANGE

regards Ashwin kv

Read only

Former Member
0 Likes
2,909

Hi all,

My issue is how to call this transaction by programe is possible with filling header fields and item fields from production order???

Thanks.

Read only

0 Likes
2,909

Hi,

then, you have to call your transaction through BDC Technology.

Please, refer this:

Hope that help you.

Best regards.

Read only

0 Likes
2,909

i can not find PDF Docu

Read only

0 Likes
2,909
Read only

Former Member
0 Likes
2,909

Hi All,

I have done it but now my problem is it will ask me every time for enter like in image

i want to remove this popup then how can  i do this?

Thanks,

Read only

0 Likes
2,909

Hi,

Put MODE = 'N'(No screen) with Call transcation, below is the code

call transaction 'MR21' using BDCDATA Mode 'N'..

No screens are displayed with above mode.

Read only

0 Likes
2,909

Hi,

you just need to change the MODE.

N

Screens are not displayed. You must choose this mode when you run the BDC in a background job.

A

All screens are displayed. On each screen, a little popup is displayed with the next recorded function, the user has to press Enter to execute it.

E

By default, screens are not displayed, except if an error occurs, or if the end of BDC data is reached although the recorded transaction was not exited

Do not forget to click on "Correct Answer", to close the topic.

Rachid.

Read only

0 Likes
2,909

Hi Mahipalsinh,

Check the Recording, if not found add

PERFORM bdc_field  USING 'BDC_OKCODE'   '=ENTR'.


Regards,

Venkat.

Read only

Former Member
0 Likes
2,909

hi

you can use call transaction bdc

and use mode 'E'  .

Do recording in SHDB .