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 Transaction MM03 and display Basic Data

Former Member
0 Likes
13,338

Hey guys,

I have been asked by my client to create an ALV List Display using the EKKO and EKPO tables. In the output, the client wants to see the basic data when double clicking on the Material Number using either MM03 or MM43. I am using the following code-

SET PARAMETER ID 'MXX' FIELD 'K'.

SET PARAMETER ID 'MAT' FIELD WA_EKKO-MATNR.

CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.

The problem here is instead of showing the basic data for material, it is skipping the screen and directly heading towards MM43 which again asks me to select a view.

Usually, when going to MM03 otherwise, a pop-up comes up to select the view but when I don't use SKIP FIRST SCREEN, clicking 'Select View(s)' takes me to MM43 again. Is it some sort of a problem or is this standard functionality? Any help and inputs with this would be highly appreciated.

1 ACCEPTED SOLUTION
Read only

former_member188827
Active Contributor
0 Likes
7,300
  • Please have a look at function " MATERIAL_BTCI_SELECTION_NEW". Following link might be helpful:

Selecting view in MM03 (not manually) | SCN

  • You can also create BDC recording yourself for this.

Regards

Hey guys,

I have been asked by my client to create an ALV List Display using the EKKO and EKPO tables. In the output, the client wants to see the basic data when double clicking on the Material Number using either MM03 or MM43. I am using the following code-

SET PARAMETER ID 'MXX' FIELD 'K'.

SET PARAMETER ID 'MAT' FIELD WA_EKKO-MATNR.

CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.

The problem here is instead of showing the basic data for material, it is skipping the screen and directly heading towards MM43 which again asks me to select a view.

Usually, when going to MM03 otherwise, a pop-up comes up to select the view but when I don't use SKIP FIRST SCREEN, clicking 'Select View(s)' takes me to MM43 again. Is it some sort of a problem or is this standard functionality? Any help and inputs with this would be highly appreciated.

11 REPLIES 11
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
7,300

Hi Ankush

If you go directly to MM03 and then click on choose views does it take you to MM43...? I would suggest you to create a small DC till selection of views and let the user continue it from there

Nabheet

Read only

former_member188827
Active Contributor
0 Likes
7,301
  • Please have a look at function " MATERIAL_BTCI_SELECTION_NEW". Following link might be helpful:

Selecting view in MM03 (not manually) | SCN

  • You can also create BDC recording yourself for this.

Regards

Read only

Former Member
0 Likes
7,300

Hi , try FM   BAPI_MATERIAL_DISPLAY

Read only

Former Member
0 Likes
7,300

Thanks for the answers.

However, when I come back to the ALV report and click on a new material number, the data is shown for the old material number only and the new material number data is not shown. Do I need to run a loop here? I used the code as follows-

SET PARAMETER ID 'MAT' FIELD wa_ekko-matnr.

          PERFORM bdc_dynpro      USING 'SAPLMGMW' '0100'.

          PERFORM bdc_field       USING 'BDC_CURSOR'

                                        'RMMW1-MATNR'.

*          PERFORM bdc_field       USING 'BDC_OKCODE'

*                                        '/00'.

          PERFORM bdc_field       USING 'RMMW1-MATNR'

                                        wa_ekko-matnr.

          PERFORM bdc_field       USING 'MSICHTAUSW-KZSEL(01)'

                                        'X'.

           CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'

            EXPORTING

              material                  = wa_ekko-matnr

              selection                 = 'K'

              tcode                     = 'MM03'

            TABLES

              btci_d0070                = bdcdata1.

          IF sy-subrc <> 0.

            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

          ENDIF.

          APPEND LINES OF bdcdata1 TO bdcdata.

          CALL TRANSACTION 'MM43' USING bdcdata MODE 'E'.

Read only

0 Likes
7,300

Hi,

Before setting the BDC information, are you clearing the bdcdata table so it only contains the entries you need?

Stuart.

Read only

0 Likes
7,300

Yes, I have cleared the BDCDATA table before setting the BDC information. I do have a sneaky suspicion the value imported by the function MATERIAL_BTCI_SELECTION_NEW is staying the same as the previous value and not getting refreshed. Any ideas with that?

Read only

0 Likes
7,300

Probably the easiest way of proving your theory is to change

CALL TRANSACTION 'MM43' USING bdcdata MODE 'E'.

to

CALL TRANSACTION 'MM43' USING bdcdata MODE 'A'.

That way you will see exactly what is being sent to the screens.

Good luck!

Read only

0 Likes
7,300

Well, that's a complete derp there. The Material Number that is being taken to MM43 is always the first one rather than the one currently double clicked on. Any solutions to the same Stuart? Already cleared the bdcdata table and work area for this.

Should I insert a LOOP statement for the function module?

Read only

0 Likes
7,300

Hello,

Can you show us the code that is setting the value in wa_ekko-matnr?

Stuart.

Read only

0 Likes
7,300

The wa_ekko-matnr value is being read directly from the table but the function module is not importing the new MATNR after coming back to the report from the T-code. How do I get the function module to take in the new value?

Read only

0 Likes
7,300

Hi,

You will have to post the relevant code (from where wa_ekko-matnr is set to the call transaction.

It sounds like a simple bug, are you absolutely sure that bdcdata is being cleared?

Stuart.