2008 Apr 08 7:37 AM
Hi Experts
In ALV am using USER_COMMAND for material document number, when i click the document it needs to open the display document(MIGO).
But its not opening the document, by defualt its coming with Goods Receipt -> Purchase Order.
How can we set this defualt, can you pls explain.
Thanks in advance.
Regards
Rajaram
Hi Experts
In ALV am using USER_COMMAND for material document number, when i click the document it needs to open the display document(MIGO).
But its not opening the document, by defualt its coming with Goods Receipt -> Purchase Order.
How can we set this defualt, can you pls explain.
Thanks in advance.
Regards
Rajaram
2008 Apr 08 7:40 AM
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_user_command = 'PROCESS_USER_COMMANDS'
is_layout = w_layout
it_fieldcat = i_fieldcat[]
it_sort = gt_sort[]
i_default = 'X'
i_save = 'A'
it_events = v_events
is_print = w_print
TABLES
t_outtab = i_final1
EXCEPTIONS
program_error = 1
OTHERS = 2.
FORM process_user_commands USING syst-ucomm LIKE syst-ucomm
selfield TYPE slis_selfield.
CASE syst-ucomm.
WHEN '&IC1'.
IF selfield-sel_tab_field = 'I_FINAL1-VBELN'.
w_vbeln = selfield-value.
SET PARAMETER ID: 'VL' FIELD w_vbeln.
CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
ELSEIF selfield-sel_tab_field = 'I_FINAL1-ORDER'.
v_vbeln = selfield-value.
SET PARAMETER ID: 'AUN' FIELD v_vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ELSE.
READ TABLE i_final1 INTO w_final1 INDEX selfield-tabindex.
IF w_final1-vbeln <> ' '.
LOOP AT i_final INTO w_final WHERE vbeln = w_final1-vbeln.
READ TABLE i_makt INTO w_makt WITH KEY matnr = w_final-matnr .
IF sy-subrc = 0.
MOVE : w_final TO w_final2.
MOVE : w_makt-maktx TO w_final2-maktx.
APPEND w_final2 TO i_final2.
ELSE.
MOVE : w_final TO w_final2.
MOVE : ' ' TO w_final2-maktx.
APPEND w_final2 TO i_final2.
ENDIF.
ENDLOOP.
CLEAR w_makt.
ELSE.
LOOP AT i_final INTO w_final WHERE order = w_final1-order.
READ TABLE i_makt INTO w_makt WITH KEY matnr = w_final-matnr .
IF sy-subrc = 0.
MOVE : w_final TO w_final2.
MOVE : w_makt-maktx TO w_final2-maktx.
APPEND w_final2 TO i_final2.
ELSE.
MOVE : w_final TO w_final2.
MOVE : ' ' TO w_final2-maktx.
APPEND w_final2 TO i_final2.
ENDIF.
ENDLOOP.
CLEAR w_makt.
ENDIF.
PERFORM fieldcatalog1 USING selfield .
PERFORM event_build.
PERFORM layout_build1.
PERFORM grid_display1.
ENDIF.
ENDCASE.
ENDFORM. " PROCESS_USER_COMMANDS
2008 Apr 08 8:02 AM
Still am not getting clear idea, can you explain me with single example.
FORM user_command USING r_ucomm LIKE sy-ucomm
r_selfield TYPE slis_selfield.
DATA : MBLNR TYPE MSEG-MBLNR.
IF r_selfield-fieldname = 'MBLNR'.
MBLNR = r_selfield-value.
SET PARAMETER ID 'MBN' FIELD MBLNR.
CALL TRANSACTION 'MIGO' AND SKIP FIRST SCREEN.
ENDIF.
ENDFORM.
This is my coding part, can you tell me how to get the MIGO SCREEN with display mode.
2008 Apr 08 8:14 AM
Hi Raja,
try removing skip first screen.
I hope that should help you.
Thanks,
Arun
2008 Apr 08 7:44 AM
hi Raja,
Are you using call transaction statement to go the transaction MIGO?.
If then try setting the parameter id BES with your purchasing document value.
Similarly try setting other values by parameter before using the call transaction statement.
Thanks,
Arun
2008 Apr 08 8:15 AM
hi raja,
instead of using MIGO u can use MIGO_GR...which is used only for display material docs...
SET PARAMETER ID 'MBN' FIELD wa_data-doc_no.
CALL TRANSACTION 'MIGO_GR' AND SKIP FIRST SCREEN.
reward points if useful...
Regards,
Sachin
2008 Apr 08 8:37 AM
CALL_TRANSACTION_NOT_FOUND
when i try urs am getting error yar
TRANSACTION IS UNKNOWN.
2008 Apr 08 8:41 AM
I tried urs also yar, but still its not opening by defualt yar.
what could be the reason.
2008 Apr 08 9:55 AM
hi Raja,
The transaction MIGO_GR might not be available that might be the reason.
Try MIGO itslef. Try using parameter BES and try to take out skip first screen.
Thanks,
Arun
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |