cancel
Showing results for 
Search instead for 
Did you mean: 

EXIT to derive values in characteristic relationship.

Former Member
0 Kudos

Hi BPS Experts,

I am working with BW-BPS Planning area.

This contains 0COMP_CODE characteristic in the planning level.

The is another characteristic called YTIMEZONE in the planning area but not included in the planning level.

Now we have to define a characterstic relationship of type EXIT to derive the values of YTIMEZONE based on the 0COMP_CODE values entered in the planning layout.

There is a Custom table ZTZONEMAP maintained in the BW system which has the mapping between 0COMP_CODE & YTIMEZONE. So we have to derive the YTIMEZONE values based on this table,

Please let me know how to achieve this! what is the FM source code to get this logic?

Thanks & Regards

Narendra Reddy

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi.

Create a characteristisc relationship of type exit with a source characteristic 0COMP_CODE and YTIMEZONE as target characteristic.

FM: Derivation => Z_DERIVE_YTIMEZONE (you will ceate ti function later)

FM: Comb proposal => enter a dummy function module

FM: Comb check => enter a dummy function module

Create FM via se37 like Z_DERIVE_YTIMEZONE

FUNCTION Z_DERIVE_YTIMEZONE .

*"----


""Local interface:

*" IMPORTING

*" VALUE(I_AREA) TYPE UPC_Y_AREA

*" REFERENCE(ITO_CHA) TYPE UPC_YTO_CHA

*" CHANGING

*" REFERENCE(XS_CHAS) TYPE ANY

*" EXCEPTIONS

*" FAILED

*"----


FIELD-SYMBOLS: <l_chavl> TYPE ANY.

FIELD-SYMBOLS: <l_comp_code> TYPE ANY.

DATA: lv_timezone TYPE YOURTYPEOFTIMEZONE.

ASSIGN COMPONENT 'YTIMEZONE' OF STRUCTURE xs_chas

TO <l_chavl>.

ASSIGN COMPONENT '0COMP_CODE ' OF STRUCTURE xs_chas

TO <l_comp_code>.

SELECT YTIMEZONE INTO lv_timezone FROM ZTZONEMAP WHERE 0COMP_CODE = <l_comp_code>.

<l_chavl> = lv_timezone .

ENDFUNCTION.

Plz note this cod not tested (I wrote it on the fly). You need to check it in debug mode.

But it should work.

Regards.