07-27-2010 12:59 PM
Hi All,
I am facing the problem while calling the MIGO Transaction for Transfer Posting from the ALV Grid.
Below is the Code.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_GRID_TITLE = G_TITLE
I_CALLBACK_USER_COMMAND = 'UCOMM'
IS_LAYOUT = G_LAYOUT
IT_FIELDCAT = GIT_FIELDCAT
I_SAVE = 'A'
TABLES
T_OUTTAB = GIT_ALV[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
FORM UCOMM USING P_R_UCOMM LIKE SY-UCOMM
P_RS_SELFIELD TYPE SLIS_SELFIELD.
CASE P_R_UCOMM.
WHEN '&IC1'.
IF P_RS_SELFIELD-FIELDNAME EQ 'STRNUM'.
CLEAR : GWA_ALV.
READ TABLE GIT_ALV INTO GWA_ALV WITH KEY STRNUM = P_RS_SELFIELD-VALUE.
SET PARAMETER ID 'BWA' FIELD GWA_ALV-BWART.
SET PARAMETER ID 'MAT' FIELD GWA_ALV-MATNR.
SET PARAMETER ID 'WRK' FIELD GWA_ALV-WERKS.
SET PARAMETER ID 'LAG' FIELD GWA_ALV-LGORT.
CALL TRANSACTION 'MIGO' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM. "ucomm
MIGO is opened up but without the following parametes being set.
Please suggest.
Regards
Shruti
07-27-2010 1:46 PM
This would suggest that MIGO is not reading the parameters that you have set. Launch MIGO in a separate and go to the screen that you think should use the parameters. On the menu bar, Click System --> Status and double click on the screen number. Click on the Element List tab and then click on the Special Attributes tab. On that screen you'll see a flag for Get Parameter and a field called Parameter ID. If Get Parameter is not set or if the Parameter ID doesn't match the value you specify before you do the Call Transaction, SAP likely won't use your parameter to populate the field. You might need to make an enhancement to populate the fields in some user exit.
.. Craig
07-27-2010 1:05 PM
hi,
check if the table has the values or check sy-subrc for read statement.
Regards,
sirisha
07-27-2010 1:20 PM
Hi Shruti,
You are skipping the FIRST SCREEN, I think the issue is because of that. Try removing that and check it out.
07-27-2010 1:46 PM
This would suggest that MIGO is not reading the parameters that you have set. Launch MIGO in a separate and go to the screen that you think should use the parameters. On the menu bar, Click System --> Status and double click on the screen number. Click on the Element List tab and then click on the Special Attributes tab. On that screen you'll see a flag for Get Parameter and a field called Parameter ID. If Get Parameter is not set or if the Parameter ID doesn't match the value you specify before you do the Call Transaction, SAP likely won't use your parameter to populate the field. You might need to make an enhancement to populate the fields in some user exit.
.. Craig
07-27-2010 2:58 PM
Hi,
I will suggest you , use MB03 instead of MIGO. Pass material docu# and material fiscal year.
Thanks,
Paras
07-27-2010 7:39 PM
Hi sruthi,
Migo cannot be called that way instead use the fm as below, check whether it has parameter as you require.
Refer
CALL FUNCTION 'MIGO_DIALOG'
EXPORTING
I_ACTION = 'A04'
I_REFDOC = 'R02'
I_NOTREE = 'X'
I_NO_AUTH_CHECK = ' '
I_DEADEND = 'X'
I_SKIP_FIRST_SCREEN = 'X'
I_OKCODE = 'OK_GO'
I_MBLNR = I_FINAL-MBLNR
I_MJAHR = I_FINAL-MJAHR
I_ZEILE = I_FINAL-ZEILE
06-06-2013 5:26 AM
07-28-2010 2:56 AM
I would use the following bapi instead of doing a call transaction: BAPI_GOODSMVT_CREATE.