cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CG42 MSDS designing error

Former Member
0 Likes
225

Module EHS

My requirement is to check for a condition which is in a different repetition group and display certain details of a different repetion group, if true or false.

My question is : is it possible to do a repetition group within a different repetition group, if yes then how?

I tried doing it but it gives me an error " cannot access environment M here "

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Mathew,

Can let me know the exact requirement? You cannot have two master RG looped. You can have conditional output type for your requirement, symbol type 15 for checking conditions.

Regards

Ravindra

Former Member
0 Likes

Hi ,

The exact requirement could be said like this:

I have a symbol which has to be checked whether its a A or B but its in a different class, based on this condition if its a A , go to a different class and print the symbols and vice versa

And for checking the symbol , i need to loop the repetition group and within that other loop comes into picture.

Loop SAP_1 class.

If SYMBOL_1 eq A

Loop SAP_2 class.

Print SYMBOL

Endloop.

else.

Loop SAP_3 class.

Print SYMBOL

Endloop.

Endloop

Thanks.

nirajsikligar
Active Contributor
0 Likes

Hi Mathew,

For 'Else' Functionality you can use Alternative Control Statement for Blank Compression.

Here you can specify the symbol that is to be printed as an alternative (ELSE) if blank compression is activated for the symbols in question.

Regards,

Niraj

Former Member
0 Likes

Hi Niraj,

I think Blank compression is used for checking empty values, we cannot use this for checking some specific values. We can use conditional output with alternative for checking specific values.

Regards

Ravindra

nirajsikligar
Active Contributor
0 Likes

Hi

Yes I agree, in blank compression, the system checks only for empty values; where as in conditional output, it checks for the values you specify.

If I have understood the requirement clearly, if a value for one symbol is not found, then print the value for another symbol.

And this can be achieved by using Blank compression with Alternative.

Regards,

Niraj Sikligar

Former Member
0 Likes

Hi Niraj,

As per my understanding the requirement is like this,

If the symbol value is A then print " A" which is in SAP_CLASS_1.

If the symbol value is B then print " B". which is in SAP_CLASS_2.

And Blank compression checks if the value set is empty and then supress the relavent data and outputs the alternative. But the requirement here is he wants the system to check for a value and based on this he wants to output the data from another Class.

I think we can go for a FM where we can have this logic processed and output the requried data through the relavent symbol.

Regards

Ravindra

Former Member
0 Likes

Thanks a lot for all your response.

A repetition group M within a repetiotion group M is not not possible. But yes we need to call in a funtion module for this purpose which can store in the value for our case.

Regards,

Appu