cancel
Showing results for 
Search instead for 
Did you mean: 

Call transaction for MIR7/MIRO using set parameter Id not working

Former Member
0 Kudos

Hi,

I am not able to do Call Transaction for MIRO/MIR7 though I am doing as below:

For MIR7  - >

SET PARAMETER ID 'BUK' FIELD p_comp.

     SET PARAMETER ID 'RBN' FIELD p_inv.

      CALL TRANSACTION 'MIR7'.

For MIRO -

SET PARAMETER ID 'BUK' FIELD p_comp.

SET PARAMETER ID : 'RBN' FIELD p_inv ,

    CALL TRANSACTION 'MIRO'.

but the transaction is not called with the field value p_inv.

Checked SAP note 381593.   ...and do not want to use Bapi....

This I am doing from Workflow and calling the transaction. I am also checking for any enhancment if possible.

tell me how to achieve this....

Thanks,

Accepted Solutions (0)

Answers (3)

Answers (3)

raymond_giuseppi
Active Contributor

For update of invoice, try to call MIR4 "Call MIRO - Change Status" using

SET PARAMETER ID 'RBN' FIELD rbkp-belnr.

SET PARAMETER ID 'GJR' FIELD rbkp-gjahr.

CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.

For creation of invoice, try to call MIRO, MIR7 using

SET PARAMETER ID 'BUK' FIELD rbkp-bukrs.

EXPORT ekpo-ebeln ekpo-ebelp TO MEMORY ID 'SAPMM06E_ZTERM'.

CALL TRANSACTION 'MIRO'. " or MIR7

(Did you try to use an external range number for MM invoice, I only knows a customer-exit to change number range but none that allow this ?)

Regards,

Raymond

Former Member
0 Kudos

Hi Raymond

Thanks for the reply.

I can see for the MIR4 call in display mode.

but for the second part to call for MIRO is  just going to the transaction and not with the invoice/Po detail.....

I also do not have idea about external range no...

Former Member
0 Kudos

Try coding as shown in BOR-Object BUS2081 method "EDIT".


DATA: xwfla1 LIKE boole-boole VALUE 'X'.                  "Note916729
   SET PARAMETER ID 'RBN' FIELD object-key-invoicedocnumber.
   SET PARAMETER ID 'GJR' FIELD object-key-fiscalyear.
   SET PARAMETER ID 'CHG' FIELD 'X'.
   EXPORT xwfla1 TO MEMORY ID 'FIENJOYWF'.                   "Note916729
   CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.

Former Member
0 Kudos

This works for me. I have an ALV GRID and I can call directly the document.

Thansl Stefan Hubner.

Former Member
0 Kudos

Hi Mohan,

Write a small BDC which calls the transaction MIR7 / MIRO and then use the CALL TRANSACTION 'MIRO' USING 'pass the invoice no & comp code and the transaction will be called.

Let me know if additional info. is required.

Thanks,

Tooshar Bendale

Former Member
0 Kudos

Hello Tooshar,

I  tried with  recording also.but there I am not able to pass the invoice no. after the pop-up of Company code. It is in disabled mode(SHDB recording)

Former Member
0 Kudos

Hi Mohan,

Click on Other invoice document ( Ctrl + F10 ) button.  After clicking this you will be able to enter invoice no after the pop-up for the company code.

Thanks,

Tooshar Bendale

Former Member
0 Kudos

See the below screen shot...it does not allow to pass the inv. no.. for both MIR7 and MIRO

Former Member
0 Kudos

Hi Mohan,

As an alternative to Ctrl F10 so that the pop up screen to enter the another invoice number should appear....

we should write the below code i.e.

CLEAR w_bdc.
   w_bdc-program = 'SAPLMR1M'.
   w_bdc-dynpro = '6000'.
   w_bdc-dynbegin = 'X'.
   APPEND w_bdc TO t_bdc.

   CLEAR w_bdc.
   w_bdc-fnam = 'BDC_OKCODE'.
   w_bdc-fval = 'DOC'.
   APPEND w_bdc TO t_bdc.

   CLEAR w_bdc.
   w_bdc-program = 'SAPLMR1M'.
   w_bdc-dynpro = '6100'.
   w_bdc-dynbegin = 'X'.
   APPEND w_bdc TO t_bdc.

   CLEAR w_bdc.
   w_bdc-fnam = 'BDC_OKCODE'.
   w_bdc-fval = 'OK'.
   APPEND w_bdc TO t_bdc.

   CLEAR w_bdc.
   w_bdc-fnam = 'RBKPV-BELNR'.
*  w_bdc-fval = bkpf-bukrs.
   w_bdc-fval = rbkp-belnr.
*  w_bdc-fval = docno.
   APPEND w_bdc TO t_bdc.

   CLEAR w_bdc.
   w_bdc-fnam = 'RBKPV-GJAHR'.
*  w_bdc-fval = bkpf-bukrs.
   w_bdc-fval = rbkp-gjahr.
*  w_bdc-fval = fyr.
   APPEND w_bdc TO t_bdc.

Refer to the link which had the same issue

http://scn.sap.com/thread/3161636

Hope this helps.

Thanks,

Tooshar Bendale

Former Member
0 Kudos

HI,

I saw the above code and tried but not sure wher am I missing.

I have written the below code after recording the MIRO for company code and then we have to pass invoice details using Cntrl+ F10.

perform open_group.

perform bdc_dynpro      using 'SAPLACHD' '1000'.

perform bdc_field       using 'BDC_CURSOR'
                              'BKPF-BUKRS'.

perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.

perform bdc_field       using 'BKPF-BUKRS'
                                p_comp.  " company code

** as per the link for cntrl + F10

perform bdc_dynpro      using 'SAPLMR1M' '6000'.

perform bdc_field       using 'BDC_OKCODE'
                              '=DOC'.

perform bdc_dynpro      using 'SAPLMR1M' '6100'.

perform bdc_field       using 'BDC_OKCODE'
                              '=OK'.

perform bdc_field       using  'RBKPV-BELNR'
                              p_inv."'=OK'.


perform bdc_field       using  'RBKPV-GJAHR'
                              p_yr."'=OK'.


*********************************


*perform bdc_transaction using 'MIRO'.


  CALL TRANSACTION 'MIRO'  USING bdcdata MODE 'N' UPDATE 'S'
         MESSAGES INTO messtab.

.
perform close_group.

The MIRO with invoice detail not coming..Correct me if I am wrong somewhere ..

Former Member
0 Kudos

Hi Mohan,

When you execute transaction MIRO / MIR7 for the first time then it pop-ups for the company code. But next time or later when you execute the  transaction MIRO / MIR7 it directly goes to main screen without giving the popup this is reason why your BDC is failing.

Even in the link that i had provided there too the code for popup is not given. If you want to display documents for one company code you can just remove that piece of code, however if your want to display documents for different company code then you can go to Edit ->  Switch company code ( F7).

You actually can debug giving mode 'A' you will a clarity on that.

Let me know if any additional information is required.

Thanks,

Tooshar Bendale

Former Member
0 Kudos

Hi,

Thanks for your quick response..:)

Yes there will be canhge in Comp. code. So i again did recording by using the switch comp. code process and by passing the date and able to go thru the screen of cntrl+F10 but there I find 'Fun. code can not be selected.. See the below screen

now ...??

suchomel
Newcomer
0 Kudos

Hi,

try to call MIR4 and then menu "Edit->Display/Change" (F7). Code is:

set parameter id 'RBN' field '1234'.set parameter id 'GJR' field '2024'.

bdcdata-program = 'SAPLMR1M'.
bdcdata-dynpro = '6150'.
bdcdata-dynbegin = 'X'.
append bdcdata.

clear bdcdata.
bdcdata-fnam = 'BDC_OKCODE'.
bdcdata-fval = '/00'.
append bdcdata.

bdcdata-program = 'SAPLMR1M'.
bdcdata-dynpro = '6000'.
bdcdata-dynbegin = 'X'.
append bdcdata.

clear bdcdata.
bdcdata-fnam = 'BDC_OKCODE'.
bdcdata-fval = '/EPPCH'.
append bdcdata.

call transaction 'MIR4'
using bdcdata mode 'E' update 'S'.

Tomas