SchwarzIT / sap-usi-logging-api

An easy-to-use, object-oriented encapsulation around the SAP application log (Transaction SLG1)
Apache License 2.0
23 stars 0 forks source link

Function module /USI/BAL_POPUP_MESSAGE_DETAILS - Data Containers missing in tree #20

Closed NeumannJoerg closed 6 months ago

NeumannJoerg commented 6 months ago

The following test program creates a log having one message with two structure containers.

DATA(logger) = /usi/cl_bal_factory=>get_instance( )->get_existing_logger( ).
DATA(token)  = logger->claim_ownership( ).

logger->add_free_text(
    i_message_type = /usi/cl_bal_enum_message_type=>information
    i_free_text    = 'Just a test'
    i_details      = NEW /usi/cl_bal_dc_collection( )->insert(
                             NEW /usi/cl_bal_dc_structure( i_structure = VALUE sflight( carrid = 'AA'
                                                                                        connid = '123' ) )
                     )->insert(
                             NEW /usi/cl_bal_dc_structure( i_structure = VALUE sflight( carrid = 'BB'
                                                                                        connid = '234' ) ) ) ).

logger->save( token ).
logger->free( token ).

Since the data container allows multiple instances for the same log message, both structures should be available in SLG1, but only the second instance is offered in the navigation tree. image

The bug is caused by the following type declaration. image

Logging multiple instances of the same data container having the same description will cause the issue. Passing a different title for each data container instance would prevent this and is highly recommended anyway, but this is still a bug in the UI.