on 12-03-2010 8:25 PM
Hi friends,
My workflow is triggering with specified condition when SC item values is > 1000 , it is triggering with below logic.
Event -9EV_SC_RVR(Expression: 9B_SC_REVIEWER_001) is placed at the place of First level process level Eval ID. Because
Formula 0V_SC_TOTALVALUE > 1,000(1000 is static value) is specified in Expression : 9B_SC_REVIEWER_001, I am obtiaining First level Approver.
But now, my requirement is changes such a way that , 1000 $ will be fetched in Ztable dynamically. That means, amount value will be changed in Ztable by user.
My problem is how to create a expression to obtain 1000$ value from table so that i can compare in formula expression with 0V_SC_TOTALVALUE.
Please help me.
Balaji.T.
Hi,
you have to create a custom FM expression to pass the ztable value.. you can copy standard FM '/SAPSRM/WF_BRF_0EXP000' to Z and pass the Ztable value to 'EV_VALUE'. this will resolve your issue...
Saravanan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Saravanan,
Thank you for quick answer. Result is coming DUMP.
Please help me.
I specified like this.
In formula expression i have specified like this.
0V_PO_POTOTALVALUE > ZEX_VALUE1 .
Regarding expression : ZEX_VALUE1 -> Function module expression. Function module : ZBRFFM(copy of /SAPSRM/WF_BRF_0EXP000).
F Type Length = 8 output length = 22.
Function module is given below.
data : l_GROSS_PRICE type BBP_PDS_SC_ITEM_D-GROSS_PRICE.
select SINGLE netwr from ZSRMVALUE INTO l_GROSS_PRICE where plevel = 'LEVEL1'.
if sy-subrc = 0.
endif.
ev_value = l_GROSS_PRICE.
ev_length = STRLEN( ev_value ).
ev_type = 'F'.
RESULT(DUMP)
-
The following error text was processed in the system SR1 : Unable to interpret 00000 000 as
a number.
The error occurred on the application server passr1_SR1_00 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: GET_BO_PROPERTY of program /SAPSRM/CL_WF_RULE_CONTEXT====CP
Method: /SAPSRM/IF_WF_RULE_CONTXT_PO~GET_PROPERTY of program
/SAPSRM/CL_WF_RULE_CONTXT_PO==CP
Method: CALL_RFW of program /SAPSRM/CL_WF_RULE_CONTEXT====CP
Function: /SAPSRM/WF_BRF_0EXP000 of program /SAPSRM/SAPLWF_BRF_DATA
Method: PROCESS_SPECIFIC of program CL_CALL_FUNC_METHOD_BRF=======CP
Method: IF_RULE_COMPONENT_BRF~PROCESS of program CL_EXPRESSION_BASE_BRF========CP
Method: GET_RESULT of program CL_EXPRESSION_POOL_BRF========CP
Method: IF_EXPRESSION_BRF~GET_SUBEXPRESSION of program CL_EXPRESSION_BASE_BRF========CP
Method: IF_FOEV_CONNECTOR~EVALUATE of program CL_FORMULA_BRF================CP
Method: EVALUATE of program CL_FOEV_FORMULA===============CP
Hi,
Did you use any parameter in the FM expression? it seems like the DUMP is unable to convert 00000 00 as number.
If you have assigned the parameter in the FM expression then remove them..
Just put the below code in the FM
DATA lo_wf_brf_event TYPE REF TO /sapsrm/cl_wf_brf_event.
DATA lo_context_provider TYPE REF TO /sapsrm/if_wf_context_provider.
DATA l_document_guid TYPE /sapsrm/wf_document_guid.
DATA l_document_type TYPE /sapsrm/wf_document_type.
data : l_GROSS_PRICE type /sapsrm/wf_amount_value..
preset return values
ev_type = /sapsrm/if_wf_rule_c=>type_bool.
ev_length = 1.
CLEAR ev_currency.
ev_output_length = 1.
ev_decimals = 0.
ev_value = /sapsrm/if_wf_rule_c=>brf_result_bool_noprocessing. " no processing
ev_data_missing = /sapsrm/if_wf_rule_c=>brf_data_missing.
----
Connection FM from BRF to Rule Handling, Call the rule and
get back the value
----
get event object
IF NOT io_event IS BOUND.
BRF event Object not bound. No further execution possible.
MESSAGE e089(/sapsrm/brf).
TRY.
CALL METHOD /sapsrm/cl_wf_brf_ccms=>send_message( ).
CATCH /sapsrm/cx_wf_abort.
ev_data_missing = /sapsrm/if_wf_rule_c=>brf_data_missing.
EXIT.
ENDTRY.
ev_data_missing = /sapsrm/if_wf_rule_c=>brf_data_missing.
EXIT.
ENDIF.
*----
get document data by context provider
*----
lo_wf_brf_event ?= io_event.
lo_context_provider = lo_wf_brf_event->get_context_provider( ).
get Content Container from BRF event
IF NOT lo_context_provider IS BOUND.
BRF Context Container Object not bound. No further execution possible.
MESSAGE e090(/sapsrm/brf).
TRY.
CALL METHOD /sapsrm/cl_wf_brf_ccms=>send_message( ).
CATCH /sapsrm/cx_wf_abort.
ev_data_missing = /sapsrm/if_wf_rule_c=>brf_data_missing.
EXIT.
ENDTRY.
ev_data_missing = /sapsrm/if_wf_rule_c=>brf_data_missing.
EXIT.
ENDIF.
select SINGLE netwr from ZSRMVALUE INTO l_GROSS_PRICE where plevel = 'LEVEL1'.
if sy-subrc eq 0.
CLEAR ev_data_missing.
ev_type = /sapsrm/if_wf_rule_c=>type_curr.
ev_value = l_GROSS_PRICE .
ev_currency = mv_target_currency.
endif.
make sure the output length and fld / lngth are '16' and type is 'F'.
Saravaana
Hi Saravanan,
Good Evening. Thank you for your document.
I debugged the program. Problem is because of Naming convensions.
It is specified that , we need to maintain Parameters of Expression as given below.
For Class : C1C_
For Method : C2C_
Property : C3C
Value : C4C
I got solution finally with Class and Method as you specified with above naming convensions.
Thank you for your inputs.
I need to give THOUSAND POINTS, And i am ready to send a good gift too.:)
Thank you Very much.
Balaji.T.
Hi ,
Create a Custom expression of type FM (0CF001 - expression type) and add 0V_SC_TOTALVALUE as importing parameter. Copy the FM as said above and compare the 0V_SC_TOTALVALUE with the z table $ value and check the boolean value for EV_VALUE. If EV_VALUE is true, then it will pass through that process level and fetch the approver other wise it will go to the next process level.
Regards
Kannaiah Kavuri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.