04-23-2007 8:30 AM
Hi,
<u>Scenario</u>
I have an alv list which has fields Purchase document no. (EBELN) and Item delivery date (EINDT). EBELN field is hot spot enabled. when i click on that transaction 'ME22' is called. I have done this using USER_COMMAND subroutine.the code is given.
----
FORM USER_COMMAND *
----
........ *
----
Call transaction ME22N on clicking Document number *
----
FORM USER_COMMAND USING F_UCOMM LIKE SY-UCOMM
I_SELFIELD TYPE SLIS_SELFIELD.
DATA: F_SUBRC LIKE SY-SUBRC,
s_arseg like G_T_PORD. "the internal table used is G_T_PORD
CASE F_UCOMM.
WHEN '&IC1'.
IF i_selfield-fieldname = 'EBELN'.
READ TABLE G_T_PORD INDEX i_selfield-tabindex INTO s_arseg.
SET PARAMETER ID 'BES' FIELD s_arseg-ebeln.
CALL TRANSACTION 'ME22N' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
endform.
<u>Requirement</u>
After calling the transaction, If the user changes the Item delivery date (EINDT) at the ME22 transaction screen, the new date needs to be reflected in the ALV grid.
Plz help it is very urgent.
04-23-2007 8:36 AM
Hi,
<b>use selfield-refresh = 'X'.</b> after
WHEN '&IC1'.
IF i_selfield-fieldname = 'EBELN'.
READ TABLE G_T_PORD INDEX i_selfield-tabindex INTO s_arseg.
SET PARAMETER ID 'BES' FIELD s_arseg-ebeln.
CALL TRANSACTION 'ME22N' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
<b>Also chech the method REFRESH_TABLE_DISPLAY</b>
Example:
CALL METHOD go_grid->refresh_table_display.
check the link,
http://www.sap-img.com/abap/how-to-refresh-alv-list-grid-once-it-is-displayed.htm
Regards,
Sonika
04-23-2007 9:35 AM
The first method (using selfield-refresh = 'X'.) didn't work as the internal table doesnt get modified when the user make changes in Item delivery date(EINDT) at ME22 transaction screen. The 2nd method is OO,which can't be used in my case.
I tried calling the subroutine for populating the itab (G_T_PORD) and the subroutine for displaying the alv grid immediately after calling ME22N transaction. Still it is not reflecting the new date in the output alv. The code is given below.
----
FORM USER_COMMAND *
----
........ *
----
Call transaction ME22N on clicking Document number *
----
FORM USER_COMMAND USING F_UCOMM LIKE SY-UCOMM
I_SELFIELD TYPE SLIS_SELFIELD.
DATA: F_SUBRC LIKE SY-SUBRC,
s_arseg like G_T_PORD.
CASE F_UCOMM.
WHEN '&IC1'.
IF i_selfield-fieldname = 'EBELN'.
READ TABLE G_T_PORD INDEX i_selfield-tabindex INTO s_arseg.
SET PARAMETER ID 'BES' FIELD s_arseg-ebeln.
CALL TRANSACTION 'ME22N' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
refresh G_T_PORD.
perform F1000_POPULATE_PO.
perform F2000_DISPLAY_PO .
endform.
04-23-2007 10:15 AM
04-23-2007 10:53 AM
Hi,
It is working fine. But now it is consuming a lot of time to display the list.
Is there any way to modify the internal table (G_T_PORD) with the new date other than calling perform F1000_POPULATE_PO again.
thanks,
nobin.
04-23-2007 11:14 AM