cancel
Showing results for 
Search instead for 
Did you mean: 

Routins in Transformation.

Former Member
0 Kudos

Hi All,

Here is the Scenario, In Data Source I have Fields wit data is as follows

CustNo CustName Status

1 xyz A

2 abc I

3 san C

But in Dso I want The Data to be in Below Format

CustNo CustName Status

1 xyz Active

2 abc Inactive

3 san Cancle

Please Provide the Code For This Transformation Routine.

Regards,

santosh.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Santhosh,

The code is at your object level. It will be something like the following:

IF SOURCE_FIELDS-STATUS EQ 'A'.

RESULT = 'Active'.

ELSEIF SOURCE_FIELDS-STATUS EQ 'I'.

RESULT = 'Inactive'.

ELSEIF SOURCE_FIELDS-STATUS EQ 'C'.

RESULT = 'Cancel'.

ENDIF.

Hope this helps.

Former Member
0 Kudos

Hi Hotshot,

The logic is very much fine. But i don't know how to write ABAP code in Routine.

Could please send documents to write code.

Regards,

santosh

Former Member
0 Kudos

HI,

Thanks very Much for u r code.In SDN I got so many Queries how to Write ABAP Queries.

Regards,

santosh

Former Member
0 Kudos

You can very well write transformation for this but ideal way would be populate the Text data for "Status" InfoObject & display the text at the report level.