Hi all,
Can anyone help me with a simple exit/function module to derive the username using the characteristic relationship functionality in SEM BPS in the planning area?
I am hoping if I include 0USERNAME (info object) into my cube, then use a char relationship of the type EXIT, then I can populate the 0USERNAME with each users name when they log on and begin planning....?
Thanks,
Rael
Hi,
You can do the following:
- Do not include 0USERNAME in your planning levels
- Create a characteristique relationship of type Exit with a Source characteristic (anything in your level) and 0USERNAME as Target characteristic.
FM: Derivation => see sample code below
FM: Comb proposal => enter a dummy functional module
FM: Comb check => enter a dummy function module
Sample code with user/date:
FUNCTION Z_UPY_CDI_DERIVE_EXIT_W.
*"----
""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.
fill user
ASSIGN COMPONENT '0CREATEDBY' OF STRUCTURE xs_chas
TO <l_chavl>.
<l_chavl> = sy-uname.
fill date
ASSIGN COMPONENT '0CREATEDON' OF STRUCTURE xs_chas
TO <l_chavl>.
<l_chavl> = sy-datlo.
ENDFUNCTION.
Hi,
You can take a look at the 'how to line items in bps' in sap market place. This doc explains how to include username, date... in your records.
Regrads
Add a comment