SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

EMIGALL log modification from RULE (Processing Type 4)

Former Member
0 Kudos
432

Hello everybody.

I'm trying to load an EMIGALL object field using a rule (ABAP programming, Processing Type 4), but I don't know how to modify the Emigall log from my ABAP rutine... I'd like to include specific warning (or even error) lines when I'd like to... And I'd also like to skip the creation of the object, when my rutine would derive the input data is not valid.

Can anyone help me, please?

Thank you all, best regards.

Edited by: Javier Sabariz on Jan 7, 2010 7:00 PM

2 REPLIES 2

Former Member
0 Kudos
230

Hi Javier

First you have to go to the setting of the field you want to change:

Transaction EMIGALL copy the object from the SAP company to your own one.

In your own company, double-click the object, then the structure and finally the field.

Here you have to set the the Generate Flag and the processing type 4.

Afterwards you go to the Rule tab and create/change the code.

You can use the variable $C$ for the incoming (file) value and $S$ for the outgoing value used in SAP.

In the code you write your check condition. In case there's an error you have to use the application log macros:

  mac_msg_putx 'E' '001' 'Z001' 
               'Variable 1' 'Variable 2'
               'Variable 3' 'Variable 4'
               space.

In case you don't want to process the object, you have to set a return code and the Jump/Skip identifier via following macro:

mac_jump 1.

Example:

  if $C$ = '0001'.
    $S$ = $C$.
  else.
      mac_msg_putx 'E' '001' 'Z001' 
                   'Variable 1' 'Variable 2'
                   'Variable 3' 'Variable 4'
                   space.
      mac_jump 1.
  endif.

Afterwards, save the changes and re-generate the import program.

Yep

Jürgen

Edited by: sattlerj on Jan 8, 2010 1:05 AM

Former Member
0 Kudos
230

Javier,

Jürgen is correct. You can find the further explanations in the .

Kind regards,

Fritz