Question:
Hi,
I have Purchase order and material doc number in a table control. When i double click the PO column it does not display the right po contains instead it always retrieve the last PO. I found the values are right and here is the coding :
module get_cursor input.
CLEAR: cursorfield,
cursorline,
cursorvalue.
GET CURSOR
FIELD CURSORFIELD
LINE CURSORLINE
VALUE CURSORVALUE.
endmodule. " get_cursor INPUT
MODULE user_command_0200 INPUT.
case ok_code
when 'PICK'.
IF NOT CURSORVALUE IS INITIAL.
CASE CURSORFIELD.
WHEN 'WA_ITAB-EBELN'.
CALL TRANSACTION 'ME23N'.
ENDCASE.
ENDIF.
endcase.
endmodule.
Next question is it possible to exercute MIGO in Display mode when i double click the material doc in the table control? if yes how can this be done.
Thanks for your help.
joel
Answer:
hi Joel,
you need to set the parameter value with the document no of the cursor line, as follows
set parameter id 'BES' field <doc_no>.
call transaction 'ME23N'.
Answer:
Hi Srameshbabu,
Had tried to set the parameter value like this :
SET PARAMETER ID 'POID' FIELD WA_ITAB-EBELN.
but still no difference.
Thanks for your reply.
Answer:
Hi Joel,
see the following code i had written, working fine for me with out any problem...
when 'DBLCLK'.
get cursor field fld value i_docno.
read table it_zprpo_status with key doc_no = i_docno.
set parameter id 'BES' field i_docno.
call transaction 'ME23N'.
clear i_docno.
clear sy-ucomm.
Answer:
Hi Srameshbabu,
I can get it done now. Thanks for your help.
Regards.
joel