‎2007 Feb 22 11:04 AM
hi all
i have created one classical report in which purchase order number and corresponding items are displayed
op is like this:
45001 10
45001 20
45001 30
when i double click on any PO number eg. (45001 20) then using transaction ME23N i made some changes and when i came back to the classical report screen i want that selected PO No should be deleted from screen.
for that i deleted that entry from internal table , internal table reflects the changes like
45001 10
45001 30
but the screen displays the previous values
45001 10
45001 20
45001 30
i want screen should be updated.
plz provide the solution.
Regards
Martin
‎2007 Feb 22 11:11 AM
Hello,
Make sure you are using the statement <b>CALL SCREEN 1</b><b>00</b> and not 'leave to screen 100'.
Can you please provide the code as well.
Regards,
Beejal
**Reward if this helps
‎2007 Feb 22 11:09 AM
Hello Martin,
After deleting the content from the Table.
Write the Itab again.
Vasanth
‎2007 Feb 22 11:10 AM
When you have displayed the screen when you click on the Purchase Order number and make changes to ME22N when you return delete the record as you are saying and then just call the screen again .
I mean use CALL screen screen-number .
Please reward if useful.
‎2007 Feb 22 11:11 AM
Hello,
Make sure you are using the statement <b>CALL SCREEN 1</b><b>00</b> and not 'leave to screen 100'.
Can you please provide the code as well.
Regards,
Beejal
**Reward if this helps
‎2007 Feb 22 11:30 AM
Hi,
Automatic Refresh Report
The below code demonstrates how to create a simple report which automatically updates itself every 10 seconds and displays the new results on screen. This is without any intervention from the user.
Automatic refresh report
*.......................................................................
*: Report: ZAUTO_REFRESH :
:
*: :
*: Description: Display a report which automatically updates itself :
*: every 10 seconds :
*: :
*:.....................................................................:
REPORT zauto_refresh .
DATA: g_init_once,
ok_code(20),
g_ref_from_timer.
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
IF g_init_once <> 'X'.
g_init_once = 'X'.
CALL FUNCTION 'Z_ENQUE_SLEEP'
STARTING NEW TASK 'WAIT'
PERFORMING when_finished ON END OF TASK.
ENDIF.
WRITE:/ 'wait for 10 sec....'.
AT USER-COMMAND.
CASE ok_code.
WHEN 'FCT_R'.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekko.
WRITE:/ sy-uzeit. "Time
LOOP AT it_ekko INTO wa_ekko.
WRITE:/ wa_ekko-ebeln, wa_ekko-ebelp.
ENDLOOP.
sy-lsind = 0.
IF g_ref_from_timer = 'X'.
CALL FUNCTION 'Z_ENQUE_SLEEP'
STARTING NEW TASK 'INFO'
PERFORMING when_finished ON END OF TASK.
g_ref_from_timer = ''.
ENDIF.
ENDCASE.
----
FORM WHEN_FINISHED *
----
........ *
----
--> TASKNAME *
----
FORM when_finished USING taskname.
RECEIVE RESULTS FROM FUNCTION 'Z_ENQUE_SLEEP'.
g_ref_from_timer = 'X'.
Trigger an event to run the at user-command
SET USER-COMMAND 'FCT_R'.
ok_code = 'FCT_R'.
sy-ucomm = 'FCT_R'.
ENDFORM. " WHEN_FINISHED
*Signiture for creating Function module used above
FUNCTION Z_ENQUE_SLEEP.
*"----
""Local interface:
*"----
wait up to 10 seconds.
ENDFUNCTION.
Hope this helps.
Reward if helpful.
Regards,
Sipra