on 11-30-2009 6:56 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.