cancel
Showing results for 
Search instead for 
Did you mean: 

Custom field in Expression for actions in transactions

Former Member
0 Kudos

Hi experts,

I´m trying to define an action for an opportunity. First I created a "simple" action with condition "if status = 'In Process' then send mail" ->this works fine (by creating a method call (badi implementation).

Now I want to create a new condition in which I want to check a custom field (created with AET). In UI config I can see this new field (i.e. ZFLD00), and in GENIL_MODEL_BROWSER a I can see this new field too.

My problem ist that this custom field is not shown in expression view (for creating conditions for actions). All other fields in the same Object (BTOPPORTH) are shown, except for my custom field.

Do I miss something? I hope I´ve descibed this issue clear 😉

Full points for helpful answer 😉

Thanks in advance!

Anna

Accepted Solutions (1)

Accepted Solutions (1)

lovekush_singh
Active Participant
0 Kudos

Hi Anna,

We have achieved what you want to by using CONATAINER_PPF Badi. This can help you to define conditions based on the standard fields or Z fields (created using AET) from the transaction. you can check the field value and if it passes your criterion you can fill the container with the desired value. This value will be check in conditions and required action can be triggered.

For reference check SAP Note 502389 and 865619 which will explain how you can use these and achieve the results without modifying the Business Object.

I always prefer the use the above Badi in place of modifying the business object. Let me know if you have any trouble in using this.

Thanks,

Lovekush Singh

Former Member
0 Kudos

Hi Lovekush,

thank the reply and for this alternative way.

I´ve create a new implementation of the Badi CONTAINER_PPF. My question now is: How can I get this Badi triggerd? In the action (where I can select a method) only the implementations of the Badi EXEC_METHODCALL_PPF are shown. So where do I have to call the implementation of CONTAINER_PPF? I hope you understand my bad english 😉

Thank you!

Best regards

Anna

Former Member
0 Kudos

Okay....the badi implementation get called automatically 😉 ups...I will test it and give feedback!

Thanks !!!

Former Member
0 Kudos

Hello Lovekush,

I am having the same requirement of reading Zfield (added through AET) in action profile condition, for the BO BUS2000116. Is it required (as per note 502389) to create subtype of BO, to read Zfield value, in BADI CONTAINER_PPF ?

Regards,

Nikhil Savle

lovekush_singh
Active Participant
0 Kudos

Hi Nikhil,

If you implement BADI then there is no need to do any change in BO. During action processing BADI will be called and you can read the new field and use in action conditions.

Thanks,

Lovekush Singh

Former Member
0 Kudos

Hello Lovekush,

Thanks for the reply. I used CRM_ORDER_READ FM to read the data. It is working well.

Wish you Happy new year.

Regards,

Nikhil Savle

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

former_member184067
Active Contributor
0 Kudos

Hi Anna,

you need to create a new subtype of certain business object/transaction category (example : BUS2000115 for Quotation) and add a new attributes that represent the custom field that you have added before.

after that you need to delegate the standard of business object/transaction category to your custom.

after doing it, you can use your custom additional field in configuration screen of action condition.

all of this things can be done via t-code SWO1.

hopes it helps

cheers

eddhie kurnianto

Former Member
0 Kudos

Hi Eddhie,

is this the only way to achieve the goal?? Is there any possibility to see the z-attributes without creating a subtype? I don´t really understand, why I have to create a subtype. The standard object is enhanced, the new attributes have to be visible in the configuration screen of action condition, because they are now a part of this object???

Need more clarification please.

Thanks a lot!

Anna