‎2005 Nov 08 7:48 PM
Hello Group,
I have I/O field for material on custom screen. And when I double click on material no, it should navigate me to MM03 screen.
I cannot set the function code since it is a I/O field.
When I double click on material, it is not going to PAI of the screen.
Can somebody tell me how can I do that?
‎2005 Nov 08 7:49 PM
‎2005 Nov 08 7:49 PM
‎2005 Nov 08 7:51 PM
‎2005 Nov 08 7:54 PM
‎2005 Nov 08 7:56 PM
Hi Rich,
I did check the 'Respond to Double Click' checkbox. But when I double click on material no , i am getting a message on display bar 'Please choose a valid function'. Any further help???
Thanks,
Chandra
‎2005 Nov 08 7:56 PM
‎2005 Nov 08 7:57 PM
‎2005 Nov 08 7:58 PM
‎2005 Nov 08 8:53 PM
Hello Rich,
Thanks for your help. This is almost working now, but I have couple of questions.
1) Below is my code for PAI screen 100, on which the ALV report is displayed. When I double click on material it is taking me to MM03 screen, but when I hit the back button on MM03 screen, it is going to report selection screen (screen 1000), but I want the ALV report ( screen 100) to be displayed.
2) I have several other fields other than material no, like MRP type, Plant, Material type. Since we set the FCODE to 'PICK', this fcode 'PICK' is assigned to all other fields on screen. LEAVE TO SCREEN 100 on ELSE condition is taking care of that, but is that a good idea? because when I say LEAVE TO SCREEN 100 , PBO of the Program is triggered and the program executing again.
I guess i am clear to you.
MODULE user_command_0100 INPUT.
DATA: cursorfield(20), "#EC NEEDED
g_cursor(18).
DATA: ok_code LIKE sy-tcode.
CASE ok_code. "sy-ucomm.
WHEN 'PICK'.
GET CURSOR FIELD cursorfield VALUE g_cursor.
IF g_cursor = p_matnr.
SET PARAMETER ID 'MAT' FIELD g_cursor.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
ELSE.
LEAVE TO SCREEN 100.
ENDIF.
WHEN 'MANO'.
CALL SCREEN 200.
WHEN 'BACK' OR 'CANC'.
IF NOT alv_container IS INITIAL.
CALL METHOD alv_container->free.
CLEAR: alv_container.
FREE : alv_container.
ENDIF.
IF sy-subrc = 0.
SET SCREEN 0.
LEAVE SCREEN.
ELSE.
LEAVE PROGRAM.
ENDIF.
WHEN 'EXIT'.
IF NOT alv_container IS INITIAL.
CALL METHOD alv_container->free.
CLEAR: alv_container.
FREE : alv_container.
ENDIF.
LEAVE PROGRAM.
WHEN 'REFR'.
CLEAR :it_mdps, it_mdez, it_mdsu, it_outtab.
REFRESH: it_mdps, it_mdez, it_mdsu, it_outtab.
CALL METHOD o_lcl_main->mpu_get_stock_req_list.
CALL METHOD o_lcl_main->mpu_get_initial_quantity.
CALL METHOD o_lcl_main->mpu_get_available_quantity.
CALL METHOD o_lcl_main->mpu_display_stock_req_list.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
‎2005 Nov 08 9:01 PM
1) Trying just leaving the screen. Although a round trip probably wouldn't hurt.
2) You can do something like this.
CASE ok_code. "sy-ucomm.
WHEN 'PICK'.
clear ok_code.
GET CURSOR FIELD cursorfield VALUE g_cursor.
IF cursorfield = 'P_MATNR'.
SET PARAMETER ID 'MAT' FIELD g_cursor.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
ENDIF.Regards,
Rich Heilman
‎2005 Nov 08 7:53 PM
In attributes of the field, Check the check box "responds to double click" on the display tab.