Thursday, February 14, 2008

Free subscription at SAP Insider

SAP Insider is offering a free subscription to it's online articles.
The registration process takes up to 5 minutes.
Go to http://www.sapinsideronline.com/ to register now!!!!

Wednesday, February 13, 2008

Question from ISU Forum

Hi, Want to know if it is pre-requisite to activate "Deregulation settings" (Supply scenario and service provider agreement) for carrying out "Settlement". Is there any training document (in line with IUT210/220 etc) released by SAP for deregulation and settlement? Thanks in advance Ajay


Hi Ajay,
It is not mandatory to activate the deregulation settings to carrying out Settlement.
The deregulation settings is used to automatically determine Supply Scenario and the deregulation settings are picked from Agremmnets between Service Providers (for example the INVOUT agreeement is used to send the grid invoice to the supplier).
There are some standard SAP Workshop for this topics:
IUTW44 - Master Data for Deregulation and Data Exchange Processes
IUTBIL - EDM Settlement

In in a project which requires both functionalities to be implemented so I'll keep posting about this topics from now on. So stay tune!

How to create ABAP reports with IS-U like logs.

Today I want to share you with a powerfull tool which is the IS-U like log system.
You can display an IS-U like log using transaction SLG1 or SLG_ISU.

How can you create ABAP reports with IS-U like logs?

This is a picture of how a IS-U like log looks like:



You need/can define your own log object in the system in the view BALOBJ. Using SM30 you can define your own log object. Let's define a ZTEST log in this view.






After that you can use the log object in your ABAP reports.
You can copy and paste the above text into SE38 ABAP Editor.

*You need to include the EMSG include program in your report.

INCLUDE EMSG.

*This include contains a lots of macros used to write log messages.
*Second you need the type pool EEMSG.

TYPE-POOLS: eemsg.

*Define a log parameter structure :

DATA: xy_parm TYPE eemsg_parm_open.

*And the log handle:
DATA: handle LIKE emsg_gen-handle.

*Define a parameter to hold the internal log number like this:

PARAMETERS extnr LIKE balhdr-extnumber NO-DISPLAY.

*Open the log using the above code.

CLEAR xy_parm.
xy_parm-extnumber = extnr.
xy_parm-appl_log = 'ZTEST'.

CALL FUNCTION 'MSG_OPEN'
EXPORTING
x_no_dialog = ' '
x_log = 'X'
x_next_msg = ' '
x_obj_twice = ' '
IMPORTING
y_msg_handle = handle
CHANGING
xy_parm = xy_parm.


*Now you can write to the log using the macro mac_msg_putx.

mac_msg_putx co_msg_information '398' '00'
'INFO' '123' space space space.

mac_msg_putx co_msg_error '398' '00' 'Error' '123' space space space.


*When the program is finished you should:

*Save the log like
CALL FUNCTION 'MSG_ACTION'
EXPORTING
x_msg_handle = handle
x_action = co_msg_save
EXCEPTIONS
OTHERS = 1.

IF sy-subrc <> 0.
mac_msg_repeat co_msg_error internal_error.
ENDIF.

*Display the log is not in background like this:
IF sy-batch IS INITIAL.
CALL FUNCTION 'MSG_ACTION'
EXPORTING
x_msg_handle = handle
x_action = co_msg_dspl
EXCEPTIONS
OTHERS = 1.
ENDIF.

*Close the log.

CALL FUNCTION 'MSG_CLOSE'
EXPORTING
x_msg_handle = handle.



*Now we're done. You should have a log which looks like the first picture.