cancel
Showing results for 
Search instead for 
Did you mean: 

Error message while i create custom BRF with expression type 0CE001

Former Member
0 Kudos

Hi ,

I am in SRM 7.0 SP5.

I am trying to create custom BRF for expression type 0CE001 to determine dynamic schema based on catalog. my requirement is to determine approval path based on catalog and free item.

When i try to create custom BRF expression with type of 0CE001 i got an error message 'The expressions of WHEN lines do not all deliver the same result type' . When i look in detail, i have found that the CASE expression is not suppose to the result type is 'C'. I don't get this error when the CASE expression is Boolean. I have also found that the standard BRF expression '1V_SC_SCHEME' is giving same error. My question is can't I declare CASE expression with 'C'?.

john.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Put a break point at line no:66 in the method PROCESS_SPECIFIC of the class:CL_CASE_EXPRESSION_BRF and let me know what ev_value you are getting.

Also check in the CASE have you placed the condition for OTHERS also. If not, provide the condition for OTHERS also.

Regards

Kannaiah

Former Member
0 Kudos

Hi Kannaiah Kavuri ,

The Break Point is not stopping at all at line number 66 of class 'CL_CASE_EXPRESSION_BRF~PROCESS_SPECIFIC'. But i got error message 'Process scheme not found'.

Let me explain what i did. I have created custom BRF Event 'zsc_ev_schema_evl' ( This event is Schema Evaluation). I have created a custom CASE (0CE001) BRF Expression 'zsc_ex_schema' that is linked to the Event 'zsc_ev_schema_evl'.

Here is the paramenters of the case expression 'zsc_ex_schema'

WHEN RESULT RESULT TYPE

CAT zsc_ex_cat C

NonCAT zsc_ex_noc C

OTHERS

I have created one more BRF 'zsc_return_schema' type of '0CF001' Result type is 'C' and size 32. create a custom class and method will return the value to EV_VALUE . Class and method are parameters of BRF 'zsc_return_schema' .

I assigned ''zsc_return_schema' to CASE EXPRESSION OF expression 'zsc_ex_schema' which will return where the SC is created by CATALOG or NONCATALOG.

Now.. I have created the process schema definition based on dynamic result from 'zsc_ex_schema' .

i have maintained the process schema definition in SPRO as like below

Object Type Process Level Schema

BUS2121 zsc_ex_cat

BUS2121 zsc_ex_noc

Based on the above configuration. my expetation is, the BRF 'zsc_ex_schema' will return the dynamic schema either 'zsc_ex_cat' nor 'zsc_ex_noc'. instead of that i am getting error message ''Process scheme not found'. your help will be really appreciated..

Please correct me if i did something wrong.

John.

Former Member
0 Kudos

Hi Kannaiah,

I'm facing the same problem as Peter, but i did not build a new class. is that mandantory for the szenario?

I guess it's enough to build a expression of type OSM001 (field of a structure/simple value request) that returns with my custom fm that returns an attribute of my Zbus2121 use this expression in my case expression to found out the schema dynamicly depending on the result of my expression OSM001.?

The problem is, the debugger did not stop in method PROCESS_SPECIFIC of class CL_CASE_EXPRESSION_BRF.

But in method PROCESS_SPECIFIC of class cl_value_request_simple_brf there is in line 134 will 140 the following expression

IF lv_error is initial

assign lp_structure->* to <structure>.

assign component ms_brf142-field.

of structure <structure> to <field>

This runs to the error sy-subrc = 4 because the assigning of lp_structure->* to <structure> went wrong.

Is this a usual behavior or maybe is there the wrong working coding?

Another idea is the context. I do not use the context is this mandantory to transfer the results from one expression to another?

thanks for help

Edited by: Rico Scharm on Apr 1, 2010 8:57 AM

Former Member
0 Kudos

Hey Peter,

i have solved the problem with one expression calling my own function mudule (copy of wf_brf_0exp001) within I get my needed data and hard coded an simple abap case expression that returns my schema name. Its not the best solution because my schema names are literals in the fm and could only changed there not in a simple brf case expression but it works very well.

For more details I got my solution from this threat

Former Member
0 Kudos

Hi John,

I have few questions:

"I have created one more BRF 'zsc_return_schema' type of '0CF001' Result type is 'C' and size 32. create a custom class and method will return the value to EV_VALUE . Class and method are parameters of BRF 'zsc_return_schema' . " Couldnt understand why you had created this?

CAT zsc_ex_cat C

NonCAT zsc_ex_noc C what are these expressions? What values is it returning ?

I will give you my brief understanding of BRF Process flow:

Whenever shopping cart creation is triggered, it triggers BUS2121 BO and then it triggers the application class SRM_WF and then it triggers the evaluation ID attached to it in Process Flow configuration. To this evaluation ID, you can attach an expression which can determine the Process Schema. So You can define this expression of type CASE or FM. If you define it as CASE, then give the expressions in the CASE statements which can identify the product catalog. So here if your product is of non catalog type, then the NON catalog expression should pick up which should result in Process Schema.

In case of FM expression type, please pass the required import parameters like if you need to check the purchasing group pass 0V_SC_PURCHSNGGRUP as the import parameter and check if the specific purchasing group is this , go to one process schema else some other.

This will solve the issue.

Let me know if you have questions.

Answers (2)

Answers (2)

Former Member
0 Kudos

i am facing new issue

Former Member
0 Kudos

Hi Peter,

within the when table there are two columns at the right of your result column in German it is called "Ergebnistyp" I think in English its result type. You have to choose the resulttyp for all lines in your when table with the same type. Example C. The length of the type depends on the longest result in your result column and will be calculated automatically. After fill the columns you are able to save your expression without error.

Former Member
0 Kudos

Hi Rico,

Thank you for your input. Now i am able to create CASE expression, But when I assign the CASE expression to Schema Evaluation Event to trigger the Process schema dynamically, I am getting error message as 'Process scheme not found'. Here is what i did .

My requirement is to trigger the process controlled workflow based on u2018catalogu2019 and u2018noncatalogu2019. I have created a custom BRF 'ZSC_DYNAM_SCHEMA' type of '0CE001'. Case Expression of ''ZSC_DYNAM_SCHEMA' is 'ZSC_EX_CAT_NONCAT' type of '0CF001' and result type is 'C' with size of '26'. i have coded in the method of expression 'ZSC_EX_CAT_NONCAT' to pass the 'catalog -'ZSC_CAT_SCHEMA ' or 'noncatalog-''ZSC_NONCAT_SCHEMA'' to EV_VALUE . Now i assign the expression 'ZSC_DYNAM_SCHEMA' to event ''ZSC_EV_DYNAM_EVA'. event 'ZSC_EV_DYNAM_EVA' is schema evaluation. I have configured in schema definition such as BUS2121 'ZSC_CAT_SCHEMA' and BUS2121 ''ZSC_NONCAT_SCHEMA'. Hope you understand my question. But I am getting an error message said that u2018Process scheme not foundu2019. your help will be highly appreciated .

john.