cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer rule producing unexpected results (ABAP issue?)

robertbuttram
Explorer
0 Kudos

Hi,

We are having an issue with one of our flat file loads that I think is related to some ABAP code in a transfer rule. I was hoping someone might understand why it is happening and how to fix it.

The incoming field is a 15 position character field with an ALPHA conversion exit applied. The transfer rule is trying to take a substring out of the incoming data and assign that substring to a 9 position character infoobject. Records are being marked as incorrect in the PSA with messages such as: 'InfoObject /BIC/BSNSN does not contain alpa-conforming value 1'. The long text of the error reads as follows:

The system checked whether the loaded InfoObject value conforms to the   
conversion exit.The check failed.                                                                                
For example:                                                                                
The value '1' was loaded into an InfoObject with alpha exit, even though 
the value '0000000001' was expected."

An example of the problem occurred with an incoming data value of '3 00675 03807 1'.

The transfer rule reads as follows:

  IF strlen( TRAN_STRUCTURE-/BIC/BNSN_LMR ) eq 15.

    RESULT = TRAN_STRUCTURE-/BIC/BNSN_LMR+4(9).
  ENDIF.

I think this is supposed to be returning a substring from BNSN_LMR consisting of 9 characters beginning with the 5th position in the field. So, for our example data, the resulting value would be '675 03807', right? Why, then, is the transfer rule returning a result of '1'?

I've noticed this pops up whenever the incoming value contains blanks (spaces). Are the blanks in the value producing this problem?

Thanks!

Bob

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

first check wether the conversion routine routine (ALPHA) is enabled in your transfer rules. In the left pane, scroll right on your IObj rule and enable the checkbox on the routine option.

Simulate your update again and see if you get the expected result.

Let us know

hope this helps...

Olivier.

robertbuttram
Explorer
0 Kudos

Olivier,

I think you're onto something. I checked in the transfer rules and there is no option to enable the conversion routine on the infoobject being populated. (The box is grayed out.)

I checked the infoobject definition and there is no conversion routine specified in the Dictionary panel on the General properties tab. Should I modify the infoobject definition to include an ALPHA conversion and then enable that routine in the transfer rules?

Thanks!

Bob

Former Member
0 Kudos

Hi,

but you are mentionning an ALPHA conversion error in your original post so are you sure you are talking about the same IObj ?!?

This error is raised when your IObj has the ALPHA conversion maintained in its definition (RSD1) and an non confirming ALPHA value is being updated. In most cases, one forgets systematically to enable the conversion routine in it Trule (scrolling right the row)...

Pay attention on the monitor messages which could be out of date and misleading you if you are loading the same request several times and/or into several targets; I suggest to reload a fresh data request from the source system and then perform a simulation only and with your failing record in order to get real error messages in dialog and not written into the monitor logs.

You could as well write a breakpoint in your routine so that the simulation will stop at your bkpoint and let you see what really happens.

let us know

Olivier.

robertbuttram
Explorer
0 Kudos

My apologies. I was looking at the wrong infoobject. Different portions of the incoming field are used to populate different infoobjects.

In fact, the transfer routine I gave above is not the one that was producing the problem. Here's the one that was producing the problem:

  IF strlen( TRAN_STRUCTURE-/BIC/BNSN_LMR ) eq 15.
    RESULT = TRAN_STRUCTURE-/BIC/BNSN_LMR+13(2).
  endif.

This rule is used when assigning a value to a two position character infoobject. When this code is applied to the value ''3 00675 03807 1' it picks off the last two positions, which are a blank and a 1. Without the ALPHA conversion routine running on the receiving infoobject, the leading blank is discarded, and the resulting value does not conform.

I enabled the conversion routine on the receiving infoobject and this solved the problem.

Thanks Olivier!

Former Member
0 Kudos

OK... good to see your problem solved.

Olivier.

Answers (0)