cancel
Showing results for 
Search instead for 
Did you mean: 

Agentry app - Change object through a transaction without bind to screen.

Former Member
0 Kudos

Hi All

I need to add next the following logic in Agentry app.

User enter value on the screen.

Application performs some arithmetical operation with the value using values from Complex Tables and write result to record of over Complex Table.

The contents of the Complex Table will be send to SAP ERP.

I want to use Agentry Transaction to write value to the Complex Table but is it possible?

Agentry Transaction transaction must be bind to the Agentry Screen and take values from screen fields. But we need to write calculated value.

Accepted Solutions (1)

Accepted Solutions (1)

former_member265714
Participant
0 Kudos

Hi Konstantin,

As Jason mentioned, all the values can be modified in the edit object transaction. Also please marked this post as answered unless you have any more questions.

Thanks

Subash Narayan

SAP Support Engineer

Former Member
0 Kudos

I have a transaction.

I have a Transaction Step.

There is a field no the a screen - vCountNum, where the user enters information about the number of goods in a specific location of the warehouse.

It is necessary to perform the following operation in a Agentry transaction.

MeanObj-CountNum = MeanObj-CountNum + vCountNum

so that the entered number is added to the current number of entries in the table record (Object of Collection).

How can I pass <MeanObj-CountNum + vCountNum> value into the transaction?

Former Member
0 Kudos

1) on the Transaction Step remove "Target Properity"
2) In the transaction on the CountNum field create set the "Rule - after data entry"
3) Create a new rule for the field
4) In the new rule set to the following:

SUM
- Current Object:>CountNum
- <Name of detail Screen>:>vCountNum

5) Make sure to add an "Apply" action step into the transaction to update the local object

jason_latko
Advisor
Advisor
0 Kudos

Konstantin,

Remove the target property on the transaction step.  That is unnecessary in this case and will cause it to fail.  The action should accept a MeanObj object.  The step will then automatically use that object for your edit transaction step.  I'm confused as to if your screen where you enter the quantity is tied to this MeanObj, or is that screen tied to some other transaction?  There is no need to have a second transaction as I see it.  Just tie your screen to your edit transaction, and like Steve mentioned, set your count property to be "rule after data entry" and write a sum rule that looks at the property from the screen and sums it with the existing count value from the object.  There is no reason to reference the screen itself, just use the transaction property that is bound to the screen field.

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Jason Latko wrote:

I'm confused as to if your screen where you enter the quantity is tied to this MeanObj, or is that screen tied to some other transaction?

Jason,

Looking at the screenshoots, it looks to be an Object Detail Screen, and not an Object Screen.  The the action calls the transaction also, is not linked to show a screenset.  So the screen field for user to type into is not linked to the object or transaction value, but just to a String, so users can enter data into it.  Then the calling transaction will need the the name of the Screenset, that is being used, because the screen is not linked to the transaction.

Former Member
0 Kudos

Stephen,

I created rule and bind it to the transaction field.

"Apply" also added.

It writes values to the object but it rewrites the value, but does not add.

Here is a log of Button Down Execution:


2016/09/30 17:39:08.793: Opening log file

2016/09/30 17:39:08.793: + Module=FlightBookingModule

2016/09/30 17:39:08.793:   + Action=WriteMeanCountNum

2016/09/30 17:39:08.793:     (1)   Info: Begin action execution.

2016/09/30 17:39:08.793:     + Transaction Step='ChangeCountNumStep'

2016/09/30 17:39:08.793:       (8)   Info: Begin step execution.

2016/09/30 17:39:10.309:       (11)  Display Screen Set: <NONE>.  Status: Action_Complete - Transaction valid.  No screen set to be displayed

2016/09/30 17:39:10.934:     + Apply Step='NewApplyStep1'

2016/09/30 17:39:10.934:       (60)  Info: Begin step execution.

2016/09/30 17:39:10.996:       + Rule=NewCountNum_TransactionInitialValueRuleID

2016/09/30 17:39:10.996:         Result<Decimal>= 28

2016/09/30 17:39:11.809:       (67)  Status: Action_Complete

2016/09/30 17:39:11.809:     (7)   Status: Action_Complete - End action execution.

Former Member
0 Kudos

Change the "CountNum" to "Current Object:>CurrentNum"
In the object selector, click "browse objects".  In the First section for the transaction open it, an scroll down to the option for Current Object.  In this section select the CurrentNum object.

Former Member
0 Kudos

I can't select "Current Object" in the Rule Edit Window,

There are

- Actions item with Browse Actions menu Item

- Constant

- Global Constant

- Java Script

- Property with Browse Properties menu Item...

- ScreenSet constants with Browse ScreenSet ... menu Item

- SubRules with Browse Rules... menu Item

Items in Rule Edit Window

I tried in "Browse Properties". No "Current Object" there too.

jason_latko
Advisor
Advisor
0 Kudos

Konstantin,

Current Object is achieved by right clicking on object entries in the Property Browser and changing the context via the popup provided.

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Thank you Jason

It is in the Property Browser

  Other Objects

     Current "Mean Obj" Object

Although I thought that the property with name - :>Current Object>"CountNum" Property

must be in the top level of the Tree Browser.

Answers (1)

Answers (1)

jason_latko
Advisor
Advisor
0 Kudos

Konstantin,

You do not need to bind a screen to your transaction.  In the action step that runs your transaction, do not specify a screen set.  This is perfectly valid.  If you want to update the complex table values locally and send this data to the backend, create a Complex Table Change transaction, picking the CT in the Table drop-down.  You must then add at least all the fields that identify the unique key of the CT and set values for them, plus any other fields you want to modify.  If the data needs to be sent up, add an Update Step to the transaction.

Jason Latko

Senior Product Developer at SAP

Former Member
0 Kudos

Hello Jason.

Thank you for answer.

You reffer to "Complex Table Change transaction". I keep data in Objects and Object Collections.

Will it work for "Object Change transaction"?

jason_latko
Advisor
Advisor
0 Kudos

Konstantin,

In your original post, you mentioned only complex tables, but of course it will work with objects also.  Just create an edit object transaction.  Again, no screen is required.  Just set the values you want by adding those properties to the transaction and alter them using one of the initial value options on each property.

Jason Latko - Senior Product Developer at SAP