cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting Parameters for debugging

Former Member
0 Kudos

Hu guys

I am working with SAP xMii 12.0

What i want to do is export all of the transaction parameters to a text file at runtime for debugging.

Ideally I would like to do a dump of the entire transaction parameter list (name and value) in one simple call.

I am currently doing this using a logging trasnaction and adding the paramters to the expression editor.

This is a manual process and not very useful if paramters change and are not added to the step.

Any ideas if this is even possible ?

Chris

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You can use event loggers in your transactions and then check the logs for the values of your transaction variables.

Nishad.

Former Member
0 Kudos

I understand that I can do it manually

What I was hoping for is a way to loop through my transaction parameters, without doing it manually.

ie.

for each parameter

print name and vale to a string

Former Member
0 Kudos

Thats what I was saying.. You dont need to do that manually. Manually while debugging you use the tracers. However when you want the values of variables at runtime, you can use Event Loggers action block instead of tracers. Those event loggers will do the same thing as your tracers, but they will log the values of each of your transaction variables in the Log file..

Whenever your transaction runs, the event logger will log the variables values in the log file.

You dont need to even open the transaction. You can just open the log file and check the values for your transaction variables when your transaction was run..

Hope this helps.

Thanks,

Nishad.

Former Member
0 Kudos

In addition to using the event logger action, there is a new feature in MII 12.2 that may benefit you during testing. The transaction debugger allows developers to pause a transaction during execution and view/modify variables and links and then continue processing. MII 12.2 should be entering into the ramp up phase soon.

Regards,

Kevin

Former Member
0 Kudos

Thanks for the suggestion...

I am confused.

I need to better understand what options are available for logging.

I have not used event logging so i am not aware of what it logs and where.

Can you explain how it works and where to access the logs?

Is it possible to get access to this data within the trasnaction (I have specific logging requirements to log to specific locations)

Regards

Chris

Former Member
0 Kudos

Hi,

Event loggers are same like your tracers.

In tracers you can see the output when you execute the transaction.

In the EventLogger action block, you can set the value of the variables you want to see at runtime. In event loggers you can see the logged strings in the log file.

If you are using MII 12 then you can find the logs in the Netweaver UME -> SAP Netweaver Administrator.

The below link will help you understand more about the application log.

http://help.sap.com/saphelp_nw70ehp2/helpdata/en/8a/a8b5386f64b555e10000009b38f8cf/frameset.htm

Thanks,

Nishad.

Former Member
0 Kudos

Chris,

There are three actions for logging in 12.0; Tracer, XML Tracer, and Event Logger. More information on those specific actions can be found [here|http://help.sap.com/saphelp_xmii120/helpdata/en/44/71178b843d3abde10000000a155369/content.htm].

Kevin

Former Member
0 Kudos

Thanks for the links ...

I now understansd the different logging steps.

I alos cannot see the log file in the "logs and traces" section of the admin screen - am i misssing something ?

But this doesnt answer my original question.

Is it possible to get access to a "dump" of all of the local/transaction variables?

I have looked at the logging steps and cant see how to get the local variable variables (other than to manually add them to the message using the expression editor )

e.g. If i have 2 local variables named "barney" and "barney2"

Exrpession Editor :

"Transaction.Barney : " & Transaction.Barney & crlf &

"Transaction.Barney2 : " & Transaction.Barney2

ALSO

"In the EventLogger action block, you can set the value of the variables you want to see at runtime. In event loggers you can see the logged strings in the log file."

what do you mean by this ?? I can't see where or how to do this?

Chris

Former Member
0 Kudos

Hi Chris,

there is no easy way to dynamically dump the Transaction or Local properties of a transaction. You will have to manually link the values to any of the actions mentioned before.

An idea of getting properties of a transaction that I can think of is evaluating the transaction xml file. Every transaction is stored as a xml file in the MII database. You can read it using a xml load action. To get the transaction and local properties, you can evaluate the xml. For example, to get the transaction properties you can use a repeater with a XPath expression like

...{/Transaction/TransactionAttributes/ContextItem/Name}

You can build a helper transaction that reads out the properties and will be called in the transaction that you want to log to dynamically get the contained properties. With this information you can use a repeater to build the log string and use the event logger to write it to the log file.

Michael

Former Member
0 Kudos

Thanks for the feedback guys

It appears the answer to my question is that it cant be done easily (although i might investigate doing it by evaluating the transaciton XML later)

Thanks again

Chris