06-23-2010 11:01 AM
Hi..
I am little confused with the function module used for creating the spool request.
well...I am practicing the ALV report and sending the that report to the spool.
I ve used the FM SLVC_TABLE_PS_TO_SPOOL.
this is the way i defined the internal table.
Data:
begin of imat occurs 0,
matnr like marav-matnr,
maktx like marav-maktx,
matkl like marav-matkl,
ntgew like marav-ntgew,
gewei like marav-gewei,
end of imat.
data i_lines type sy-tfill
and i declared..
describe table imat lines i_lines.
then i given the value for i_file_length as i_lines in the export paramet of the FM SLVC_TABLE_PS_TO_SPOOL.
CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
EXPORTING
i_file_length = i_lines
IMPORTING
E_SPOOLID = spoolid
tables
it_textdata = imat
when i executed it shows the list and wen going back it shows the runtime error as
CALL_FUNCTION_CONFLICT_LENG - Type conflict when calling a function module (field length).
please provide me some solutions.
thanks in advance.
etienne.
06-23-2010 11:20 AM
Table imat should be of type LVC_S_1022 as parameter IT_TEXTDATA is of same type in FM interface. Check for the rest of the parameters as well. All the values passed should be of same type of parameters in the FM interface.
06-24-2010 6:35 AM
Hi satyajit,
Thanks for your response....but the fields in my internal table "IMAT" is not compatible with the structure LVC_S_1022 as it has it componenrt - LINE.
so how can i define my internal table IMAT as type lvc_s_1022 as you suggested.
thanks in advance.
etienne.
06-24-2010 8:32 AM
You need to pass the content in line format. For example, first row will contain the header and rest of the columns will contain the data.
Anyways, you can do it from ALV directly. Why are you separately calling this FM? Are you using OOPS/FM for ALV?