Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Call Transaction with MIGO

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

craig_scott2
Explorer
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

hi,

check if the table has the values or check sy-subrc for read statement.

Regards,

sirisha

Former Member
0 Kudos

Hi Shruti,

You are skipping the FIRST SCREEN, I think the issue is because of that. Try removing that and check it out.

craig_scott2
Explorer
0 Kudos

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

Former Member
0 Kudos

Hi,

I will suggest you , use MB03 instead of MIGO. Pass material docu# and material fiscal year.

Thanks,

Paras

kesavadas_thekkillath
Active Contributor
0 Kudos

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

0 Kudos

that function is very good!!!!

Thanks!!!!

former_member186741
Active Contributor
0 Kudos

I would use the following bapi instead of doing a call transaction: BAPI_GOODSMVT_CREATE.