2014 Feb 20 6:18 AM
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.
2014 Feb 20 6:49 AM
Selecting view in MM03 (not manually) | SCN
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.
2014 Feb 20 6:30 AM
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
2014 Feb 20 6:49 AM
Selecting view in MM03 (not manually) | SCN
Regards
2014 Feb 20 6:59 AM
2014 Feb 20 10:03 AM
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'.
2014 Feb 20 10:07 AM
Hi,
Before setting the BDC information, are you clearing the bdcdata table so it only contains the entries you need?
Stuart.
2014 Feb 20 12:15 PM
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?
2014 Feb 20 3:56 PM
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!
2014 Feb 21 5:14 AM
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?
2014 Feb 21 9:01 AM
Hello,
Can you show us the code that is setting the value in wa_ekko-matnr?
Stuart.
2014 Feb 25 7:07 AM
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?
2014 Feb 25 10:54 AM
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.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |