2007 Sep 27 7:52 PM
hi
I see many suggesting this variant changing function module RS_VARIANT_CHANGE but I could not find any implementation or coding in any of the search threads
Please post this code for me..
My requirement is to change change the MATNR single values for a transaction programatically..
Points for all helpful answers
2007 Sep 27 8:03 PM
Hi Smith,
I suggest you to do a <b>Where-Used List</b> for this Function Module 'RS_VARIANT_CHANGE ' and I am sure that you will come up with few hits which will be useful for you...
Let the forum know if you didn't get any hits and some one can post the code...
Regards,
Vivek
2007 Sep 27 8:03 PM
Hi Smith,
I suggest you to do a <b>Where-Used List</b> for this Function Module 'RS_VARIANT_CHANGE ' and I am sure that you will come up with few hits which will be useful for you...
Let the forum know if you didn't get any hits and some one can post the code...
Regards,
Vivek
2007 Sep 27 8:10 PM
2007 Sep 27 8:13 PM
Well thats in the foreground mode
What about background mode, I mean to say when I want to change programatically
2007 Sep 27 8:22 PM
Hi,
Then you need to
Call fm RS_VARIANT_CONTENTS and loop thru the VALUTAB and change the LOW value and save using fm RS_VARIANT_VALUE_SAVE
a®
2007 Sep 28 11:12 AM
Thanks dude
That solved my problem but not completely, there are some structure contents which vary when I use RS_VARIANT_VALUE_SAVE
When I use the second function module you have mentioned the tables which I need to pass to FM are completely different structure than the ones which are imported from RS_VARIANT_CONTENTS
parms LIKE rsparams OCCURS 0 WITH HEADER LINE,
objs LIKE vanz OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
report = 'RIMODGEN'
variant = p_var
TABLES
valutab = parms
OBJECTS = objs
EXCEPTIONS
variant_non_existent = 1
variant_obsolete = 2
OTHERS = 3.
CALL FUNCTION 'RS_CHANGE_CREATED_VARIANT'
EXPORTING
curr_report = 'RIMODGEN'
curr_variant = p_var
vari_desc = ''
ONLY_CONTENTS =
TABLES
vari_contents = parms
VARI_TEXT =
VARI_SEL_DESC =
OBJECTS =
EXCEPTIONS
illegal_report_or_variant = 1
illegal_variantname = 2
not_authorized = 3
not_executed = 4
report_not_existent = 5
report_not_supplied = 6
variant_doesnt_exist = 7
variant_locked = 8
selections_no_match = 9
OTHERS = 10
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
So I am trying with RS_CHANGE_CREATED_VARIANT and it worked
CALL FUNCTION 'RS_CHANGE_CREATED_VARIANT'
EXPORTING
curr_report = 'RIMODGEN'
curr_variant = p_var
vari_desc = ''
ONLY_CONTENTS =
TABLES
vari_contents = parms
VARI_TEXT =
VARI_SEL_DESC =
OBJECTS =
EXCEPTIONS
illegal_report_or_variant = 1
illegal_variantname = 2
not_authorized = 3
not_executed = 4
report_not_existent = 5
report_not_supplied = 6
variant_doesnt_exist = 7
variant_locked = 8
selections_no_match = 9
OTHERS = 10
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
2007 Sep 27 8:21 PM
Try looking at the code for program RMCP6BCH and see if that helps.
- April King