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

WT log creation log with custom steps

former_member722016
Participant
0 Likes
1,987

Hello, since we have a custom putaway strategy I wanted to know if there is a way to update the standard WT log creation with a custom log according to our putaway strategy.

Thanks,

Accepted Solutions (0)

Answers (2)

Answers (2)

j_blohm
Active Participant

Hi llatch,

not sure if I understand your question correctly, but I assume you have implemented one of the BAdIs in enhancement spot /SCWM/ES_CORE_PTS.

The methods of these BAdIs should all have an exporting parameter ET_BAPIRET. You can add the messages from your custom logic to the log by writing them into this table.

Example coding for this:


MESSAGE e010(/SCWM/L3) WITH 'BIN X' 'STORAGE TYPE Y' INTO DATA(lv_msg).
APPEND VALUE #( id = sy-msgid
                number = sy-msgno
                type = sy-msgty
                message_v1 = sy-msgv1
                message_v2 = sy-msgv2
                message_v3 = sy-msgv3
                message_v4 = sy-msgv4 ) TO ET_BAPIRET.

... or use your own local log object (of class /SCWM/CL_LOG), add the messages with LO_LOG->ADD_MESSAGE( ) in your coding and convert the messages to BAPIRETTAB in the end, i.e. LO_LOG->GET_PROT( ), and then add the result table of type BAPIRETTAB to ET_BAPIRET.

By doing this, you will receive an enhanced standard log (i.e. mixture of standard messages with your custom messages). If you don't like this, you can always implement your own log object / subobject via SLG0 and write an entirely separate log in the BAdI.

0 Likes

Hi Lucas,

Perhaps underneath blog can be of help?

https://blogs.sap.com/2012/04/18/create-and-view-log-using-slg0-and-slg1-transaction/

Kr,

Maarten