02-12-2009 5:31 PM
Hi!
I'm having some trouble creating a program which does the following:
1. The variant of a program is uploaded in an internal table
2. The internal table is modified (to change the parameters in the variant content)
3. The variant has to be saved
I used function RS_VARIANT_VALUES_TECH_DATA to upload the variant data in an internal table. The problem is when I want to save those values I modified, I cannot find any function to save it.
I took a look at this post:
but I still cannot figure out a way to save them
Do you know a way to solve this problem? Thanks!
Edited by: Pablo Oscar Felitti on Feb 12, 2009 6:31 PM
02-12-2009 5:50 PM
Try this way
data : v_field like dd03l-fieldname.
move sy-sysid to v_sysid.
call function 'RS_VARIANT_CONTENTS'
exporting
report = 'YST3009'
variant = v_sysid
tables
valutab = i_params
exceptions
variant_non_existent = 1
variant_obsolete = 2
others = 3.
if sy-subrc eq 0.
loop at i_params.
assign (i_params-selname) to <fs>.
<fs> = i_params-low.
" <<< Modify here with new values
endloop.
endif.
Then
CALL FUNCTION 'RS_CHANGE_CREATED_VARIANT'
EXPORTING
curr_report = varid_tab-report
curr_variant = varid_tab-variant
vari_desc = varid_tab
TABLES
vari_contents = i_params
vari_text = varit_tab
a®
02-12-2009 5:50 PM
Try this way
data : v_field like dd03l-fieldname.
move sy-sysid to v_sysid.
call function 'RS_VARIANT_CONTENTS'
exporting
report = 'YST3009'
variant = v_sysid
tables
valutab = i_params
exceptions
variant_non_existent = 1
variant_obsolete = 2
others = 3.
if sy-subrc eq 0.
loop at i_params.
assign (i_params-selname) to <fs>.
<fs> = i_params-low.
" <<< Modify here with new values
endloop.
endif.
Then
CALL FUNCTION 'RS_CHANGE_CREATED_VARIANT'
EXPORTING
curr_report = varid_tab-report
curr_variant = varid_tab-variant
vari_desc = varid_tab
TABLES
vari_contents = i_params
vari_text = varit_tab
a®
06-12-2009 9:25 PM