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

BRF expression to check company code in SC

Former Member
0 Likes
243

Hello,

I need to check company code in SC as a starting condition. There is standard expression 0V_IN_COMPANYCODE to check Company code in Invoice with those parameters :

Result Type : C

Access FM : /SAPSRM/WF_BRF_0EXP000

0C_C1_C_FWFINRLCNTNT Class: /SAPSRM/CL_WF_RULE_CONTXT_INV C 30

0C_C2_C_GET_PROPERTY Method - Get Atrribute Value C 12

0C_C3_C_COMPANYCODE Company Code C 30

I created a Z expression Z_SC_COMPANY with SC class and those parameters :

Result Type : C

Access FM : /SAPSRM/WF_BRF_0EXP000

0C_C1_C_FWFSCRLCNTNT Class: /SAPSRM/CL_WF_RULE_CONTXT_SC C 28

0C_C2_C_GET_PROPERTY Method - Get Atrribute Value C 12

0C_C3_C_COMPANYCODE Company Code C 30

In an other expression I check Z_SC_COMPANY = '1234' And it does NOT work.

Any idea why?

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

masa_139
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

What was the result value of Z_SC_COMPANY? Please check it in SLG1?

If it does not return value you can create customer FM type expression.

Regards,

Masa

Former Member
0 Likes

Hi

Yes of course we can create a custom FM and this is what we eventually did. My question is why it does not work with standard FM and standard parameters?

Thanks

masa_139
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi,

Please go to SWO1 transaction and check attributes for BUS2121 and BUS2205.

You pass Company Code parameter which does not exist in SC. System can not get value from Business Object.

You can create sub object and add attributes in SC Business Object if you need to use standard FM.

Regards,

Masa

Answers (0)