cancel
Showing results for 
Search instead for 
Did you mean: 

Question on RSR_VARIABLE_F4_RESTRICT_BADI

Former Member
0 Kudos

Hi All,

I have a question regarding RSR_VARIABLE_F4_RESTRICT_BADI. I implemented this for one variable based on 0FISCPER and it worked fine in one query where I use that variable. When I use the same variable in another query, the implementation does not work fine. Is there a restriction that one implementation will work only in one query?

Also can I use this in a user exit variable which is Input ready (in case I have to populate default value)?

Regards,

Sundar

Accepted Solutions (1)

Accepted Solutions (1)

former_member182470
Active Contributor
0 Kudos

I don't think BADI variable is restricted to only one query. If you use 0FISCPER with same BADI in another query, it should work. You can debug your Query in RSRT.

To populate default value in your User exit variable, you should i_step = 1 in your CMOD code.

Former Member
0 Kudos

Thank you Suman for your reply. I tried debugging and the code is getting executed for second query. But for some reason, I don't see the restrictions when I click on F4 on the variable. That is why I am puzzled.

Regards,

Sundar

former_member182470
Active Contributor
0 Kudos

Try regenerating the Query in RSRT. Otherwise, try to save your second query once again and then regenerate it. After that, try to debug the query.

Things should work normal.

Answers (2)

Answers (2)

anshu_lilhori
Active Contributor
0 Kudos

Can you share the piece of code:

Especially this part

READ TABLE i_t_compid WITH TABLE KEY table_line

Because i_t_compid has the information related to the queries so you must have passed the technical name of the query.Please check.

Regards,

AL

Former Member
0 Kudos

Anshu, I tried two options:

1. Commented that line of code so that it executes for any query.

2. Wrote the same lines of code again for the second query.

Generated the query from RSRT.

None of the above seems to help.

Regards,

Sundar

anshu_lilhori
Active Contributor
0 Kudos

Hi,

Please can you share the code ?

Instead of read table make use of Loop and give both the queries name.

Best is to debug and understand the issue.

Regards,

AL

Former Member
0 Kudos

I am debugging the code now. I will let you know what I find along with the code if it still does not work. Thank you again

Regards,

Sundar

anshu_lilhori
Active Contributor
0 Kudos

Ok..No issues..Good luck..

Regards,

AL

anshu_lilhori
Active Contributor
0 Kudos

HI,

As far as i understand there are two restrictions one is obviously for variable and other for query as well.

So in the code you can add another query technical name in which you need to use the same variable.

Hope that helps.

Regards,

AL