Skip to Content
author's profile photo Former Member
Former Member

Call Function in CL_RSPLS_CR_EXIT_BASE to derive values

Dear all,

we want to derive the location from item (material). If item gebinns with "EMU" then location is 2. If item beginns with "X" then locations is "68" and so on.

To realise we chose characteristic relationship with derivation and based on "Exit Class".

we copied the Class "CL_RSPLS_CR_EXIT_BASE" to "Z_CL_RSPLS_CR_EXIT_BASE". Now we want to call a function method "IF_RSPLS_CR_METHODS~DERIVE" like:

  • implement your derivation algorithm here:

field-symbols: <l_chavl> type any.

assign component 'BW_LAGER' of structure c_s_chas to <l_chavl>.


The function look like:



""Lokale Schnittstelle:




  • lesen

But we did not know wich are the IMPORTING (like I_INFOPROV ?) parameters to fecht the values for the data. In BW-BPS we have UPC_Y_AREA, UPC_Y_VARIABLE, UPY_Y_CHANM and so on. Wich are the same in BI-integrated planning.


Daniel Meyer

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2008 at 11:04 AM

    Dear all,

    we use this code:

    field-symbols: <l_chavl> type any.

    DATA: LAGER(2).

    assign component '/BIC/P_RMRESC' of structure c_s_chas to <l_chavl>.

    IF <l_chavl>+0(3) = 'EMU'.

    LAGER = '2'.

    ELSEIF <l_chavl>+0(1) = 'O'.

    LAGER = '1'.


    <l_s_buf>+2(15) = <l_chavl>.

    assign component '/BIC/BW_LAGER' of structure c_s_chas to <l_chavl>.

    <l_chavl> = LAGER.

    <l_s_buf>+0(2) = <l_chavl>.

    But now we have the problem, how to write ist back to the buffer? If we debugg it, we see in this code:

    IF o_use_buffer = rs_c_true.

    o_r_is_valid->* = l_is_valid.

    IF o_r_is_valid->* = rs_c_true.

    INSERT <l_s_buf> INTO TABLE <l_th_buf>.

    c_s_chas = <l_s_buf>.


    IF e_t_mesg IS SUPPLIED.

    o_r_s_mesg->* = l_s_mesg.

    APPEND l_s_mesg TO e_t_mesg.


    INSERT <l_s_buf> INTO TABLE <l_th_buf>.

    RAISE EXCEPTION TYPE cx_rspls_failed


    msgid = l_s_mesg-msgid

    msgty = l_s_mesg-msgty

    msgno = l_s_mesg-msgno

    msgv1 = l_s_mesg-msgv1

    msgv2 = l_s_mesg-msgv2

    msgv3 = l_s_mesg-msgv3

    msgv4 = l_s_mesg-msgv4.



    that o_r_is_valid->* has no value, so he goes to the ELSE-part.

    Could anyone help?



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 06, 2008 at 05:11 PM

    Hi Daniel,

    I don't understand why you want to call a function module to implement the derive Method. Add you code simply in the derive method. In BI IP there exists no planning area etc. Everything you need is contained in the class, e.g. the public attribute N_BASIC_PROV.

    Or is this a question how to reuse BPS exit in BI Planning. This easy, simply use the class CL_RSPLS_CR_EXIT_BPS.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Gregor,

      i did not know that we can use code in the class directly. I have a sample code her and in this they call a funktion.

      You are right code in the class is the better way. But i did not know how to assign the components.

      In the data in the infocube ist an item like "0MATERIAL" and we havo to derive to item "0LAGER" depending from beginning of "0MATERIAL":

      IF 0MATERIAL beginns with X then 0LAGER = 06

      IF0MATERIAL beginns with Y then 0LAGER = 07

      and so on



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.