Skip to Content

RS_VARIANT_CHANGE

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 07: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

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 27, 2007 at 07:10 PM

    Hi,

    Check for report

    RS_CHANGE_VARIANT

    Add comment
    10|10000 characters needed characters exceeded

    • Grame Smith .Subramony A R .Subramony Ramakrishnan

      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.

  • author's profile photo
    Former Member
    Posted on Sep 27, 2007 at 07:21 PM

    Try looking at the code for program RMCP6BCH and see if that helps.

    - April King

    Add comment
    10|10000 characters needed characters exceeded