Application Development and Automation 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: 
Read only

Write statement after ALV

Former Member
0 Likes
3,165

Hello,

I have a requirement where I am displaying the ALV using grid.

Have a button on top.

After ALV display, I select the row and press the button.

The processing takes place like (Delivery creation).

After this delivery creation, I have to display the log output.

But the log has to be using the normal Write Statement.

Like : Write: 'Delivery created : 1001;.

I am trying this but my write is not working.

The code isgetting executed when seen in debug but nothing displayed on screen.

Any idea??

Pranu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,671

Hi

try to use the statame LEAVE TO LIST PROCCESING before the WRITE statament,

Check here, your issue was solved: []

Max

6 REPLIES 6
Read only

Former Member
0 Likes
1,671

Hi,

You need to place the code under the event AT USER-COMMAND den only your code will executed.

Regards

Thiru

Read only

0 Likes
1,671

All these things are taken care of and as mentioned in my question, the code is actually getting executed.

Nothing is written on the screen and the control comes back to the ALV display instead.

Thanks

Edited by: Pranu Pranu on Jun 1, 2009 2:18 PM

Read only

Former Member
0 Likes
1,672

Hi

try to use the statame LEAVE TO LIST PROCCESING before the WRITE statament,

Check here, your issue was solved: []

Max

Read only

Former Member
0 Likes
1,671

Hi,

I did not try it in my system but i think you need a statement like

LEAVE TO LIST-PROCESSING

after the WRITE statements

Just check this

Regards

Read only

MarcinPciak
Active Contributor
0 Likes
1,671

Hi,

In PAI module you have to use LEAVE TO LIST-PROCESSING to show what was collected in list buffer (see write statements on the screen in simple words).


MODULE pai INPUT.
   "your WRITE statements here
   write: ....
   
   "then leave current screen and show classic list 
   LEAVE TO LIST-PROCESSING. 
ENDMODULE.

Regards

Marcin

Read only

Former Member
0 Likes
1,671

Hi,

add the below command in the ALV exporting..

... user_command = 'USER_COMMAND'..

and paste the code at the last ..


FORM user_command USING r_ucomm     TYPE sy-ucomm
                        ls_selfield TYPE slis_selfield.
IF sy-ucomm = 'YOur button'.
   LEAVE TO SCREEN 0.
endif.
ENDFORM.                    "USER_COMMAND

Regards,

Prabhudas