‎2009 May 19 11:54 AM
Hi,
i would like to output some log within the form defined by i_callback_user_command . Therefor i used some simple write statements, i expected the output after going back. But - nothing is shown. Where it is going?
FORM alv_user_command
USING ucomm TYPE syucomm
selfield TYPE slis_selfield. "#EC_CALLED
FIELD-SYMBOLS:
<p> type t_out.
IF ucomm = '&DATA_SAVE'.
loop at it_out ASSIGNING <p_out> where sel = 'X'.
write:/ <p_out>-region, <p_out>-area.
endloop.
selfield-refresh = 'X'.
selfield-row_stable = 'X'.
selfield-col_stable = 'X'.
ENDIF.
ENDFORM. "alv_user_command
‎2009 May 19 12:00 PM
When you are going "BACK" then user command is set to "BACK" and in this case your code for writing the output is not fired since it is writing for "SAVE" command.
‎2009 May 19 12:04 PM
Hi,
FORM alv_user_command
USING ucomm TYPE syucomm
selfield TYPE slis_selfield. "#EC_CALLED
FIELD-SYMBOLS:
<p> type t_out.
IF ucomm = '&DATA_SAVE'.
LEAVE TO LIST-PROCESSING AND RETURN. " Add this and check
loop at it_out ASSIGNING <p_out> where sel = 'X'.
write:/ <p_out>-region, <p_out>-area.
endloop.
selfield-refresh = 'X'.
selfield-row_stable = 'X'.
selfield-col_stable = 'X'.
ENDIF.
ENDFORM.
‎2009 May 19 12:37 PM
Thanks, that was helpful to switch to the list display, but after that the green, yellow and red "ball" are no longer working, neither back, cancel or end list processing.
A LEAVE LIST-PROCESSING after the endloop wasnt helpful, too. Any idea?
(theres no difference between leave to list-processing and return to screen 1000 and without return.)
‎2009 May 19 12:59 PM
hi,
prepare your status gui ZSTATS for list with ok_code BACK/ENDE/CANC..
and change code:
loop at it_out ASSIGNING <p_out> where sel = 'X'.
write:/ <p_out>-region, <p_out>-area.
endloop.
set pf-status ZSTATS'.
leave to list-processing.
regards,darek
‎2009 May 19 1:00 PM
hi,
prepare your status gui ZSTATS for list with ok_code: BACK/ENDE/CANC..
and change code:
loop at it_out ASSIGNING <p_out> where sel = 'X'.
write:/ <p_out>-region, <p_out>-area.
endloop.
set pf-status 'ZSTATS'.
leave to list-processing.
regards,darek
‎2009 May 19 1:00 PM
hi,
prepare your status gui ZSTATS for list with ok_code: BACK/ENDE/CANC..
and change code:
loop at it_out ASSIGNING <p_out> where sel = 'X'.
write:/ <p_out>-region, <p_out>-area.
endloop.
set pf-status 'ZSTATS'.
leave to list-processing.
regards,darek
‎2009 May 19 12:42 PM
hi,
add to your code:
loop at it_out ASSIGNING <p_out> where sel = 'X'.
write:/ <p_out>-region, <p_out>-area.
endloop.
leave to list-processing.
regards,darek
‎2009 May 19 12:46 PM
HI,
In the Exporting parameter of the FM too you need to set the folowing
i_callback_pf_status_set = 'ZPF'
i_callback_user_command = 'ALV_USER_COMMAND'
Hope it helps.
Regards,
Mansi
‎2009 May 19 12:46 PM
Hi,
try like this..
FORM alv_user_command
USING ucomm TYPE syucomm
selfield TYPE slis_selfield. "#EC_CALLED
FIELD-SYMBOLS:
<p> type t_out.
CHECK NOT selfield-value IS INITIAL. "Add this Line
IF ucomm = '&DATA_SAVE'.
loop at it_out ASSIGNING <p_out> where sel = 'X'.
write:/ <p_out>-region, <p_out>-area.
endloop.
selfield-refresh = 'X'.
selfield-row_stable = 'X'.
selfield-col_stable = 'X'.
ENDIF.
ENDFORM.
Regards,
Prabhudas
‎2009 May 19 12:50 PM
check that sy-ucom = compare value is not comming correct. that why its not printing.
‎2009 May 19 1:00 PM
hi,
prepare your status gui ZSTATS for list with ok_code BACK/ENDE/CANC..
and change code:
loop at it_out ASSIGNING <p_out> where sel = 'X'.
write:/ <p_out>-region, <p_out>-area.
endloop.
set pf-status 'ZSTATS'.
leave to list-processing.
regards,darek
‎2009 Jun 04 7:29 AM
I tried out every suggestion, having now my own gui status, but still when i entered the list processing i'm not able to leave it any more. The only way i have is to enter a transaction code.
‎2009 Jun 10 6:26 AM
At least i coded a second ALV scenerio which is called in the user command of the first one.
Unforunatetly, none of the suggested solution worked.