2009 Jan 27 6:36 PM
Hello,
I have created a customer subscreen to be included in a Quality notification. The field that I have added is a Purchase Order number.
I want to code the double click event for this field, such that when I double click the PO number it navigates to the Display PO transaction.
As it is a subsreen, I cannot use the user command 'PICK'.
I tried capturing the sy-ucomm and entering the following commands:
IF sy-ucomm = 'AZOB'.
SET PARAMETER ID 'BES' FIELD viqmel-zzponumber.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
However, this gives a problem because there is already a Purchasing Doc field in the notification and it navigates to the wrong PO.
Can anyone give me alternate suggestions to navigate to the customer PO field?
Thanks,
Rugmani
2009 Jan 27 6:44 PM
Try like this
IF sy-ucomm = '&IC1'.
SET PARAMETER ID 'BES' FIELD viqmel-zzponumber.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
2009 Jan 27 6:45 PM
Are you saying that the PO in viqmel-zzponumber is the wrong number?
Rob
2009 Jan 27 6:54 PM
Hello,
The quality notification standard SAP screen already has a PO number (VIQMEL-EBELN) and it has the double click event associated with it.
Now I have added another PO field (referring to a return PO number) using VIQMEL-ZZPONUMBER. I need to be able to navigate to the return PO on double clicking on the VIQMEL-ZZPONUMBER screen field.
Please advise.
Thanks,
Rugmani
2009 Jan 27 6:57 PM
If there is a PID associated with the other field, you could:
Save it
clear it
call your transaction
refresh the pid
Rob
2009 Jan 27 7:06 PM
2009 Jan 27 7:07 PM
2009 Jan 27 7:17 PM
It works for VIQMEL-ZZPONUMBER. However, when I double click on the screen field VIQMEL-EBELN it first goes to display PO with return PO number VIQMEL-ZZPONUMBER and then when I click 'back' it goes to the original PO VIQMEL-EBELN.
This is because both have the same sy-ucomm.
Below mentioned is my code in the PAI of the user subscreen:
DATA: lv_ponumber LIKE viqmel-zzponumber.
CLEAR lv_ponumber.
IF sy-ucomm = 'AZOB'.
SET PARAMETER ID 'BES' FIELD viqmel-zzponumber.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
SET PARAMETER ID 'BES' FIELD lv_ponumber.
ENDIF.
How can I avoid this?
Thanks,
Rugmani
2009 Jan 28 12:15 AM
Solved the problem.
Code:
DATA: cursorfield(20),
g_cursor LIKE viqmel-ebeln,
lv_length TYPE i,
lv_ponumber LIKE viqmel-zzponumber.
GET CURSOR FIELD cursorfield VALUE g_cursor.
IF g_cursor IS NOT INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = g_cursor
IMPORTING
output = lv_ponumber.
ENDIF.
IF sy-ucomm = 'AZOB' AND lv_ponumber = viqmel-zzponumber.
SET PARAMETER ID 'BES' FIELD viqmel-zzponumber.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.