‎2007 Jun 12 12:00 AM
Hi,
Iam using the following two function modules to craete a dynamic variant.
This function module selects the Selection Screen contents
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = sy-repid
TABLES
selection_table = loc_int_tab
EXCEPTIONS
not_found = 1
no_report = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE i000 WITH 'Error in RS_REFRESH_FROM_SELECTOPTIONS'(029).
LEAVE LIST-PROCESSING.
ENDIF.
Craete the variant VAR1
CALL FUNCTION 'RS_CREATE_VARIANT'
EXPORTING
curr_report = sy-repid
curr_variant = wf_variant
vari_desc = loc_varid
TABLES
vari_contents = loc_int_tab
vari_text = loc_varit
EXCEPTIONS
illegal_report_or_variant = 1
illegal_variantname = 2
not_authorized = 3
not_executed = 4
report_not_existent = 5
report_not_supplied = 6
variant_exists = 7
variant_locked = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE i000 WITH 'Error while creating dynamic variant'(028).
LEAVE LIST-PROCESSING.
ENDIF.
Now my problem is I have one parameter 'filename' on selection screen which is of 255 characters lenth , but the internal table loc_int_tab in above function modules can hold up to 45 characters only. But I want to store all the 255 characters in it.
Have you ever comeacross with this problem"
Or do we have any other function modules which will sove the purpose.
Thanks in advance,
Brahma Reddy
‎2007 Jun 12 12:31 AM
split the file path lenghth into diffrent lines ,
say each line has 45 charcters
use fm split the lines into number of charcter
fm is SWA_SPLIT_STRING - here pass ur file path ,length 45 and internal table
internal table output will have diffrent lines,other program is going to concatenate all the lines into one line.