cancel
Showing results for 
Search instead for 
Did you mean: 

Variant change FM RS_VARIANT_CONTENTS gives error

former_member524141
Participant
0 Kudos

Hi Experts,

I am using FM RS_VARIANT_CONTENTS to change the variant saved in a report, from another report. However, I am getting one error which I am not able to resolve. I searched on web but could not find anything.

Message Class - DB

Message No. - 251

Calling of FM.

Also, same is working fine in Sandbox system but not in quality system.

Please help.

Thanks

Sandra_Rossi
Active Contributor
0 Kudos

Please post the code as text instead of image, so that we can easily answer by modifying portions of your code.

Sandra_Rossi
Active Contributor

Hopefully RS_VARIANT_CONTENTS is not for changing a program variant, but for reading it.

You should pass both the report name and the variant name in upper case.

former_member524141
Participant

sandra.rossi Thank you, your Solution worked.

It was a silly mistake, I was passing the program name in small letters.

Accepted Solutions (0)

Answers (1)

Answers (1)

matt
Active Contributor
0 Kudos

I know it is the format of an error message, but otherwise it doesn't look like an error message. It is saying it worked fine, isn't it?

former_member524141
Participant
0 Kudos

Yes, it says that variant updated successfully but program execution stops after this error.

matt
Active Contributor
0 Kudos

Search for notes on support.sap.com. Set a watchpoint for sy-msgno = 251 and debug what's happening.