‎2007 Dec 18 11:06 AM
Hello,
I've here one problem, i have a screen created by me with a tablecontrol, and now in one PAI module i want to do a validation and then present a page with errors of the validation, for that i tried to use something like this:
loop at itab
if itab-material = '2424'.
write: / itab-materia.
endif.
endloop.
but what happens is that the program executes the write statement but it what he write don't show in the screen.
can anyone help me? I need to do the error log and to have the possibility of export it to excel.
Regards,
Ricardo
‎2007 Dec 18 11:33 AM
Hi,
It may be, it does not contain any values based on ur if condition
if itab-material = '2424'.
just try it with some other values..
Thanks,
Ari
‎2007 Dec 18 11:33 AM
Hi,
you can not use write statements in module pool programs, what you can do is create the same messages into your status bar.
Reward if useful.
Thanks,
Sreeram.
‎2007 Dec 18 11:40 AM
Hi,
You cannot use write statements in Module pool, for ur purpose try the following code,
if itab-material = '2424'.
message s888(sabapdocu) with itab-materia'.
endif.
Plzz reward points if it helps.
‎2007 Dec 18 11:43 AM
Hi ,
Dont use write stmt for Module pool progs.
If you want to show all those values on screen means you use table control or step loops.
so that you can able to show the values what ever exist in that internal table can be viewed on screen.
For steploop here is the flowlogic sample code
SE38 internal table declaration::::
DATA: BEGIN OF tbl_serial_disp OCCURS 0,
remove,
serial_no LIKE zmdemain-serial_no,
matnr LIKE mara-matnr,
END OF tbl_serial_disp.
data: top_line1700 TYPE i.
Flow logic for that scrren where you used steploop...
******************************************
process before output.
module status_1700.
module initialize_1700.
loop at tbl_serial_disp cursor top_line1700.
module display_serialno_1700.
endloop.
process after input.
loop at tbl_serial_disp.
module set_line_count_1700.
endloop.
module user_command_1700.
***********************************************************
MODULE display_serialno_1700 OUTPUT.
CALL FUNCTION 'CONVERSION_EXIT_MATN2_OUTPUT'
EXPORTING
input = tbl_serial_disp-matnr
IMPORTING
output = st_delivery_info-matnr_rem
EXCEPTIONS
number_not_found = 1
length_error = 2
OTHERS = 3.
st_delivery_info-serial_no = tbl_serial_disp-serial_no.
st_delivery_info-remove = tbl_serial_disp-remove.
ENDMODULE. " display_serialNo_1700 OUTPUT
**************************************************
I think you know how to drag and group step loops in module pool prog thru se51-Layout editor.
Thanks
Sivaparvathi
Please reward points if helpful..
‎2007 Dec 18 12:03 PM
And is there anyway to show my table with the errors with the chance to export it to microsoft excel?