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: 

CALL TRANSACTION 'MIR6' AND SKIP FIRST SCREEN .

Former Member
0 Kudos

Hi all,

i hope there is someone that can help me.

My problem is: in an ABAP custom report in a FORM user-command my code is

CASE ls_selfield-sel_tab_field.

WHEN 'ITAB-BELNR'.

IF NOT ls_selfield-value IS INITIAL.

SET PARAMETER ID 'RBN' FIELD ls_selfield-value.

CALL TRANSACTION 'MIR6' AND SKIP FIRST SCREEN .

ENDCASE.

When i click on output field of my report, not skip first screen but only call MIR6!!!

How can i solve this problem?

Regards.

1 ACCEPTED SOLUTION

faisal_altaf2
Active Contributor
0 Kudos

Hi,

First of all Please don't use all Caps for Subject Line

Test Following Sample Code it will solve out your problem,

DATA: it_bdcdata TYPE TABLE OF bdcdata,
      wa_it_bdcdata LIKE LINE OF it_bdcdata,
      belnr(10).

belnr = '100'. " Give Document Number here

DATA opt TYPE ctu_params.

CLEAR wa_it_bdcdata.
wa_it_bdcdata-program  = 'SAPMM08N'.
wa_it_bdcdata-dynpro   = '100'.
wa_it_bdcdata-dynbegin = 'X'.
APPEND wa_it_bdcdata TO it_bdcdata.

CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'BDC_CURSOR'.
wa_it_bdcdata-fval = 'SO_BELNR-LOW'.
APPEND wa_it_bdcdata TO it_bdcdata.

CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'SO_BELNR-LOW'.
wa_it_bdcdata-fval = BELNR.
APPEND wa_it_bdcdata TO it_bdcdata.

CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'BDC_OKCODE'.
wa_it_bdcdata-fval = '=CRET'.
APPEND wa_it_bdcdata TO it_bdcdata.

opt-dismode = 'E'.

CALL TRANSACTION 'MIR6' USING it_bdcdata OPTIONS FROM opt.

Please Reply if any Issue,

Best Regards,

Faisal

13 REPLIES 13

Former Member
0 Kudos

Try like this

CASE ls_selfield-sel_tab_field.
  WHEN 'ITAB-BELNR'.
     SET PARAMETER ID 'RBN' FIELD itab-belnr.
    CALL TRANSACTION 'MIR6' AND SKIP FIRST SCREEN .
    clear itab-belnr.
ENDCASE.

Hope this will work.

Otherwise submit program SAPMM08N using so_belnr-low = itab-belnr.

faisal_altaf2
Active Contributor
0 Kudos

Hi,

First of all Please don't use all Caps for Subject Line

Test Following Sample Code it will solve out your problem,

DATA: it_bdcdata TYPE TABLE OF bdcdata,
      wa_it_bdcdata LIKE LINE OF it_bdcdata,
      belnr(10).

belnr = '100'. " Give Document Number here

DATA opt TYPE ctu_params.

CLEAR wa_it_bdcdata.
wa_it_bdcdata-program  = 'SAPMM08N'.
wa_it_bdcdata-dynpro   = '100'.
wa_it_bdcdata-dynbegin = 'X'.
APPEND wa_it_bdcdata TO it_bdcdata.

CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'BDC_CURSOR'.
wa_it_bdcdata-fval = 'SO_BELNR-LOW'.
APPEND wa_it_bdcdata TO it_bdcdata.

CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'SO_BELNR-LOW'.
wa_it_bdcdata-fval = BELNR.
APPEND wa_it_bdcdata TO it_bdcdata.

CLEAR wa_it_bdcdata.
wa_it_bdcdata-fnam = 'BDC_OKCODE'.
wa_it_bdcdata-fval = '=CRET'.
APPEND wa_it_bdcdata TO it_bdcdata.

opt-dismode = 'E'.

CALL TRANSACTION 'MIR6' USING it_bdcdata OPTIONS FROM opt.

Please Reply if any Issue,

Best Regards,

Faisal

0 Kudos

Hi Faisal,

your solution is ok: in this way call correctly MIR6 and skip first screen but when i click back how can i return to my program?

I ask you because with your statements when i click back i return to initial screen of mir6.

Please, help me...

Regards Alex.

0 Kudos

Hi Faisal,

your solution is ok: in this way call correctly MIR6 and skip first screen but when i click back how can i return to my program?

I ask you because with your statements when i click back i return to initial screen of mir6.

Please, help me...

Regards Alex.

0 Kudos

Hi Faisal,

your solution is ok: in this way call correctly MIR6 and skip first screen but when i click back how can i return to my program?

I ask you because with your statements when i click back i return to initial screen of mir6.

Please, help me...

Regards Alex.

0 Kudos

Hi Faisal,

your solution is ok: in this way call correctly MIR6 and skip first screen but when i click back how can i return to my program?

I ask you because with your statements when i click back i return to initial screen of mir6.

Please, help me...

Regards Alex.

0 Kudos

Hi Faisal,

your solution is ok: in this way call correctly MIR6 and skip first screen but when i click back how can i return to my program?

I ask you because with your statements when i click back i return to initial screen of mir6.

Please, help me...

Regards Alex.

former_member188827
Active Contributor
0 Kudos

the intial screen wont be skipped because when you use call transaction the system skips the initial screen only if the next screen in attributes of screen is not the screen itself.incase of mir6 if you check the attributes of initial screen which is screen '100' in screen painter the next screen number is also '100' so sytem wont skip this screen.

Former Member
0 Kudos

Try this code insteead:

v_selfield TYPE slis_selfield.

l_v_fieldname TYPE slis_fieldname.

IF v_selfield-tabindex NE 0.

l_v_fieldname = v_selfield-fieldname.

READ TABLE ITAB INDEX v_selfield-tabindex INTO wa_itab.

IF sy-subrc = 0.

CASE l_v_fieldname.

WHEN 'BELNR'.

SET PARAMETER ID 'RBN' FIELD wa_ITAB-belnr.

CALL TRANSACTION 'MIR6' AND SKIP FIRST SCREEN.

ENDCASE.

endif.

endif.

hope it helps

thanks

Former Member
0 Kudos

Hi,

You can use

Leave to Transaction MIR6.

and then later if you want you can use an additional statements to the same as

Leave to Transaction MIR6 and skip first screen.

Regards

Sudhe

Former Member
0 Kudos

Use the following:


CASE ls_selfield-sel_tab_field.
WHEN 'ITAB-BELNR'.
IF NOT ls_selfield-value IS INITIAL.
SET PARAMETER ID 'RBN' FIELD ls_selfield-value.
CALL TRANSACTION 'MIR6' .
ENDCASE.

Hope it solves your problem.

Regards,

Mansi.

Former Member
0 Kudos

Hello ,

In your queary you can use LEAVE TO TRANSACTION 'MIR6' AND SKIPT FIRST SCREEN , but in case after finishing the transaction it will return to the original program.

for CALL TRANSACTION 'MIR6' AND SKIP FIRST SCREEN ,at the end of the transaction the system returns to the statementfollowing the call in the calling report, Some times its wont work properly if all mandatory fields of the initial screen of the new transaction wont filled completely or incorrectly.

Regards

Sathish

Former Member
0 Kudos

Hello,

I tried the bdcdata options and I could skip the screen and display MIR6.

Now, when I click on BACK it goes to the selection screen of MIR6 and not to the report screen through which this was inititated.

Since this is being called from a REPORT which triggers the call from the List display, I would need to return to the calling screen.

Does anyone have a solution to this ?

Regards

Anupama