Using enhancement COPA0001 in a derivation to clear value fields

Dear colleagues,
In our sales process, freight is added as an item of the sales order, which means we maintain different freight types as materials (mat type ZFRE - "Freight") and we create cost estimates, so that this cost can be valuated into COPA.
Our problem is that we do not want to capture the cost of goods sold and the cost of sales for those materialss, as they only represent the freight cost that is paid by us and reimbursed by our customers. In addition, I we would like to move the value of the revenue value field to another value field (Freight sales).
I am trying to accomplish this by using enhancement COPA0001 - I created an enhancement step and I added a code to include ZXKKEU11 which specifies the "clear" of 2 value fields and the "move" of the revenue to another value field.
I had done this in the past to clear quantity fields, but I am testing this new config and it doesn't work.
When testing the derivation analyzer tells me that "Derivation was not carried out. Reason: None of the target fields are to be derived".
I looked in the known resources, but couldn't find any valuable information about such an issue. I did see in the SAP library that target fields can be "All quantity unit fields" , but value fields are not mentioned.
Did anyone have a similar experience or knows if what I'm trying to do is possible?
Thanks,
Yoel.

Hi
You can try with exit COPA0005 as Christian mentioned...
But, I would like to know your process in ddetail to see if any standard mechanism is possible...
1. What does your sale order look like? Does it has one saleable material + Multiple freight materials?
2. What purpose these freight materials serve? Do they have a revenue as well as cost in the sale order pricing procedure?
3. Can you explain your total scenario with accounting entries? and what exactly are you looking at
Regards
Ajay M

Similar Messages

  • Clearing Network field in shopping cart using BBP_PD_SC_GETDETAIL

    Hi,
    in  Doc_Change badi to clear out the Network value from BBP_PDS_ACC-NETWORK field whenever user enters some value using the Activity Search help.
    i think code has to be written using fm BBP_PD_SC_GETDETAIL but who can we clear network field based on search help.
    Thanks ,
    Goutam.

    Hi Pradeep,
    I still cant find the deduct_ind. How could this happen, the DEDUCT_IND field is not in E_item?
    CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
          EXPORTING
            i_guid    = iv_doc_guid
          IMPORTING
            e_header  = lt_sc_header
          TABLES
            e_item    = lt_sc_item
            e_account = lt_sc_account.
         LOOP AT lt_sc_item INTO ls_sc_item
          WHERE del_ind IS INITIAL AND deduct_ind IS INITIAL.
        ENDLOOP.
    Error: No component exists with the name "DEDUCT_IND", but there is a component with a similar name "DEL_IND".
    Appreciate helps!
    Thanks.

  • Derivation rule for value fied

    can any one tel me how we define derivation rules for value fields. is it posible to put derivation and how it
    will effect.
    Thanks&Regards
    Amar

    Hi
    In COPA Derivation rules you can only map characteristic.. i mean you can derive only Characteristic values not for Value fields.
    Value fields are normally mapped with SD conditions or GL accounts.
    If you want to manipulate or recalculate the values flowing into value fields you need to use enhancements.
    In this step you can set up system enhancements which are not supported in the standard R/3 System. These so-called "standard enhancements" can be used in the following areas of Profitability Analysis as below.
    Derivation of characteristic values        (COPA0001)
    Valuation                                    (COPA0002)
    Direct postings to profitability segments  (COPA0003)
    Currency translation                        (COPA0004)
    Actual data update                          (COPA0005)
    Hope this helps
    Regards
    Venkat

  • How to derive a variable value from another variable of a different IO?

    Hi Gurus,
    I am aware that using BEx variables and Customer Exit you are able to derive a variable value from another variable of the same infoobject (for example, Fiscal Year/Period (0FISCPER) and Calendar Day (0CALDAY)).
    However, is is possible, using the same approach to derive a variable value from another variable that is in a different InfoObject? (for example, Input Fiscal Year/Period (0FISCPER) but derive Output of Required Start Date (0REQSTDAT))?
    There are 2 BEx variables involved,
    1) A user entry variable that is restricted in 0FISCPER
    2) A customer exit variable that is restricted in ZREQSTDAT
    In CMOD under EXIT_SAPLRRS0_001, Include ZXRSRU01, the code (I assume, correct me if I'm wrong) should perform 3 functions in I_STEP = 2,
    1) After the pop up, capture user entry of Fiscal Year/Period
    2) Identify or convert Fiscal Year/Period to Calendar Day range (unsure on how to code this portion)
    3) Use the Calendar Day to lookup on matching Required Start Date and display all Required Start Date that matches. (unsure on how to code on this portion)
    Hope to hear your thoughts soon.
    Regards,
    Eric

    Hi Shanthi,
    I've made the necessary adjustments. The only difference in my code is,
    Instead of,
    If I_VNAM = 'ZREQSTDAT'
    I use,
    CASE I_VNAM.
    Instead of,
    PARAMETERS: ZFISCPER TYPE /BI0/OIFISCPER.
    ZYEAR = ZFISCPER(4).
    ZMM = ZFISCPER+4(3).
    I use ,
    This is the Customer Exit Variable in ZREQSTDAT
    WHEN 'ZRSD_CX'.
    The loop I use for the User Entry Variable in 0FISCPER-ZFYP_IN
      LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
          WHERE VNAM = 'ZFYP_IN'.
        IF SY-SUBRC = 0.
            CLEAR L_S_RANGE.
    ZYEAR = LOC_VAR_RANGE(4).
    ZMM = LOC_VAR_RANGE+4(3).
    The codes were checked with no errors.
    However, when I input the Fiscal Year/Periods and hit 'Execute'. The report went blank, not sure what is the cause. I've tried it several times. No error message appeared.
    Regards,
    Eric

  • Clearing Network field in shopping cart

    Hi,
    in Doc_Change badi to clear out the Network value from BBP_PDS_ACC-NETWORK field whenever user enters some value using the Activity Search help.
    i think code has to be written using fm BBP_PD_SC_GETDETAIL but who can we clear network field based on search help.
    Thanks ,
    Goutam.

    Hi,
    Add the fields into the below structures-
    1- INCL_EEW_PD_ITEM_CSF_SC  (For Item Level)
    2- INCL_EEW_PD_HEADER_CSF_SC (For Header Level)
    And then activate the BADI "BBP_CUF_BADI_2".
    and manage the fields in this badi for display or hide.
    Regards,
    Sachin

  • CO-PA Enhancement COPA0001 (ZXKKEU11)

    Hi Gurus:
    Iu2019m investigating CO-PA enhancement COPA0001 (Include ZXKKEU11), first in my KEDR configuration (Characteristic derivation) I added cost element (KSTAR) as source field and user defined characteristic (WW123) as target field, while debugging this include it is not populating Cost element! I tried with several other characteristics Iu2019m getting them fine but not KSTAR. Did anyone have any experience in this area? Thanks for your help.
    Raghu

    Hi
    I believe, the field HKONT or SAKNR should be available and not KSTAR
    moreover, you will be able to use this enhancement only for manual FI postings to COPA where only one line item posts to COPA... While Posting from SD, you can have Discounts, Revenues, etc where all of them post to COPA... In that case, which GL Account would you populate??
    So, its not techniically feasible to achieve what you want... If thats the requirement, adopt Acct Based COPA
    Moreover, you can achieve this using a Table Look up also... I dont remember fully now, but I guided someone to achieve that...
    Try once to create a derivation step using BSEG Table... Map fields BELNR and BUZEI to temp Fields
    And Assign HKONT to WW123
    br, Ajay M

  • Clear WBS field in sales order using bapi_salesorder_createfromdat2.

    Hi,
    Situation is this, I have a sales order, where the WBS element in the line item is populated. I want to clear that field to blank and save the sales order.
    When I try to do that using the bapi_salesorder_createfromdat2, it says that it is successful, but when I go back to the sales order and see that field is still populated and not cleared. But the same field if I clear it through VA02 it works fine.
    Header level update flag is set as 'U'.
    I have tried setting up 'D' 'U' and 'I' for the update flag for the line item. Still no luck.
    Given below is the sample code, did anybody else also faced the same issue.
    Data Section.
    data : sal_t_in type standard table of BAPISDHD1,
           sal_s_in like line of sal_t_in.
    *data : sal_t_in type standard table of BAPISDH1,
    *       sal_s_in like line of sal_t_in.
    data : ret_t type standard table of bapiret2,
           ret_s like line of ret_t.
    data : partner_t type standard table of bapiparnr,
           partner_s like line of partner_t.
    data : item_t type standard table of bapisditm,
           item_s like line of item_t.
    data : item_t_inx type standard table of BAPISDITMX,
           item_s_inx like line of item_t_inx.
    data : schdl_t type standard table of BAPISCHDL,
           schdl_s like line of schdl_t.
    data : schdl_t_inx type standard table of BAPISCHDLX,
           schdl_s_inx like line of schdl_t_inx.
    data : ord_view type order_view.
    data : sal_t_key type standard table of sales_key,
           sal_s_key like line of sal_t_key.
    data : ord_t_hdr type standard table of bapisdhd,
           ord_s_hdr like line of ord_t_hdr.
    data : ord_t_itm type standard table of bapisdit,
           ord_s_itm like line of ord_t_itm.
    data : hdr_inx type BAPISDHD1X.
    data : hdr2_inx type BAPISDH1X.
    data : qty type DZMENG.
    data : logic_switch type BAPISDLS.
    data : sd_doc_out type BAPIVBELN-VBELN.
    data : sd_hdr_out type BAPISDHD.
    data : sd_hdr_stat type BAPISDHDST.
    Logic Section.
    sal_s_in-doc_type = 'ZOR'.
    hdr_inx-updateflag = 'U'.
    ord_view-header = 'X'.
    ord_view-item = 'X'.
    sal_s_key-vbeln = '0000001067'.
    append sal_s_key to sal_t_key.
    call function 'BAPISDORDER_GETDETAILEDLIST'
      exporting
        i_bapi_view                   = ord_view
    *   I_MEMORY_READ                 =
      tables
        sales_documents               = sal_t_key
       ORDER_HEADERS_OUT             = ord_t_hdr
       ORDER_ITEMS_OUT               = ord_t_itm
    *   ORDER_SCHEDULES_OUT           =
    *   ORDER_BUSINESS_OUT            =
    *   ORDER_PARTNERS_OUT            =
    *   ORDER_ADDRESS_OUT             =
    *   ORDER_STATUSHEADERS_OUT       =
    *   ORDER_STATUSITEMS_OUT         =
    *   ORDER_CONDITIONS_OUT          =
    *   ORDER_COND_HEAD               =
    *   ORDER_COND_ITEM               =
    *   ORDER_COND_QTY_SCALE          =
    *   ORDER_COND_VAL_SCALE          =
    *   ORDER_CONTRACTS_OUT           =
    *   ORDER_TEXTHEADERS_OUT         =
    *   ORDER_TEXTLINES_OUT           =
    *   ORDER_FLOWS_OUT               =
    *   ORDER_CFGS_CUREFS_OUT         =
    *   ORDER_CFGS_CUCFGS_OUT         =
    *   ORDER_CFGS_CUINS_OUT          =
    *   ORDER_CFGS_CUPRTS_OUT         =
    *   ORDER_CFGS_CUVALS_OUT         =
    *   ORDER_CFGS_CUBLBS_OUT         =
    *   ORDER_CFGS_CUVKS_OUT          =
    *   ORDER_BILLINGPLANS_OUT        =
    *   ORDER_BILLINGDATES_OUT        =
    *   ORDER_CREDITCARDS_OUT         =
    *   EXTENSIONOUT                  =
    loop at ord_t_itm into ord_s_itm.
    move-corresponding ord_s_itm to item_s.
    call function 'CONVERSION_EXIT_ABPSP_OUTPUT'
      exporting
        input         = item_s-WBS_ELEM
    IMPORTING
       OUTPUT        = item_s-WBS_ELEM
    *move space to item_s-WBS_ELEM.
    append item_s to item_t.
    endloop.
    clear item_s_inx.
    item_s_inx-updateflag = 'D'.
    item_s_inx-wbs_elem = 'X'.
    append item_s_inx to item_t_inx.
    call function 'BAPI_SALESORDER_CREATEFROMDAT2'
      exporting
        SALESDOCUMENTIN               = '0000001067'
        order_header_in               = sal_s_in
        ORDER_HEADER_INX              = hdr_inx
    *   SENDER                        =
    *   BINARY_RELATIONSHIPTYPE       =
    *   INT_NUMBER_ASSIGNMENT         =
    *   BEHAVE_WHEN_ERROR             =
    *   LOGIC_SWITCH                  =
    *   TESTRUN                       =
    *   CONVERT                       = ' '
    * IMPORTING
    *   SALESDOCUMENT                 =
      tables
        RETURN                        = ret_t
       ORDER_ITEMS_IN                = item_t
       ORDER_ITEMS_INX               = item_t_inx
        order_partners                = partner_t
    *   ORDER_SCHEDULES_IN            =
    *   ORDER_SCHEDULES_INX           =
    *   ORDER_CONDITIONS_IN           =
    *   ORDER_CONDITIONS_INX          =
    *   ORDER_CFGS_REF                =
    *   ORDER_CFGS_INST               =
    *   ORDER_CFGS_PART_OF            =
    *   ORDER_CFGS_VALUE              =
    *   ORDER_CFGS_BLOB               =
    *   ORDER_CFGS_VK                 =
    *   ORDER_CFGS_REFINST            =
    *   ORDER_CCARD                   =
    *   ORDER_TEXT                    =
    *   ORDER_KEYS                    =
    *   EXTENSIONIN                   =
    *   PARTNERADDRESSES              =
    call function 'BAPI_TRANSACTION_COMMIT'
    * EXPORTING
    *   WAIT          =
    * IMPORTING
    *   RETURN        =
    Result I get when I execute is
    S     V4     233     SALES_HEADER_IN has been processed successfully     VBAKKOM
    S     V4     233     SALES_ITEM_IN has been processed successfully          VBAPKOM     000001
    S     V1     311     Standard order 1067 has been saved          Standard order     1067
    Which means it says it save successfully..but data is not changed.
    Any Ideas??
    Thanks and Regards,
    Mahesh.

    Hi,
    The problem is fixed. The item inx table I was not passing the item number field, so the bapi was not knowing which line item to update.
    It was a stupid overlook on my part.
    Thanks and Regards,
    Mahesh.

  • How to avoid displaying date,time using Enhancement point.

    Hi friends,
    i have to work on the standard report.
    stadard report displays date,time ,reportname on the top of the page. my requirement is not to display date ,time,reportname.
    they have used the following code,
    WRITE text-001 TO m_line+d_offset(4). " Time
    WRITE sy-timlo USING EDIT MASK '__:__:__' TO m_line+d_offset(08).
    WRITE text-002 TO m_line+d_offset(05). " Date
    WRITE sy-datlo DD/MM/YYYY TO m_line+d_offset(10).
    BY using Enhancement point how to achieve my task.
    kindly help me

    Post Author: jsanzone
    CA Forum: WebIntelligence Reporting
    basham,
    You didn't mention which type of DBMS you are using (i.e. Oracle, MS SQL, MySQL, etc), but in a nutshell using MS SQL here is the principle.  Your time that is recorded in the records is dependent upon a setting in your RDBMS.  For instance, the RDBMS can use the machine time (which would most likely be local time), or it can use the machine time with an offset (to accomodate GMT, for instance).  GMT is factored differently based upon your time zone (and time of year, i.e. DST or EST, etc).  I'm on the east coast so right now my offset is GMT - 5, so if my time right now is 1457, then GMT is 1957.  To get SQL to compute an offset you must take the number of hours to offset and divide by 24 (24 hours in a day) and add that to the record in the database.  For instance, to get GMT right now I would use:
    select cast(getdate()5/24. as char(12))rtrim(convert(char(12),getdate()5/24.,8))' GMT'
    Hope this helps.  If you're on Oracle, then the mathematical principles remain the same, just the formatting will be different.

  • How to create new tab in Me21N using enhancement MM06E005

    Hi All,
    Can u guys please tell me know to create a new tab at item level in purhcase order ME21N using enhancement MM06E005.
    Thanks in advance.
    Thanks,
    Jaffer Ali.S

    Please search the forum:
    addition of new tab (reasons) on me21n (item level)
    Re: Adding a new Tab - ME22n - Item Detail Level

  • Does anyone know how to clear the fields between uses of a form used in Adobe Reader on an iPhone?

    The iPhone app for Adobe Reader is automatically saving the form each time it is filled out.  (Windows Adobe Reader does not do this.)  This means that you have to manually clear each field before you can use the form again.  Does anyone know a work-around?
    Thanks,

    Hi,
    Please post your question to the Adobe Reader for iOS user forum:
    http://forums.adobe.com/community/adobe_reader_forums/ios
    Regards,
    Brian

  • Can I Using Enhance Receiver Determination?

    Hi,
    Can I used Enhanced Receiver Determination to push data to Receiver 2 , based on the response coming from Receiver 1 ( a BPM that that has a synchronous send step and fetches response from SAP through a proxy) ? If yes, how ?
    thanks & regards,
    XA

    We can have just a send step and for that send step we can configure a condition based receiver Determination right?
    yeah correct
    > and Can you throw some light on how to deal with queues, in case if the response doesnt come from SAP to PI due to some reason, which can happen in real time?
    it will thhrow time out exception or message expired exception, if you want to do exception handling do it accrodingly using Control step.
    Regards,
    Raj

  • Changing the name of the tab created using enhancement MM06E005

    Hi,
    Is there anyone know how to change the name of item level tab from "customer data" to our own tab name in screen exit for trans ME21N/2N/3N? Enhancement used is MM06E005.
    And is it possible to show or hide the newly created tab using enhancement depending on the data displayed in tab? If so how?
    Any help will be appreciated.
    Regards,
    Naveen

    I came across the same issue as well a while ago, see my thread at Can you programmatically change the iView Title?
    No one could answer my question properly, so I decided to go the DHTML route; find the <DIV> element encapsulating the proper iView title, and then replace the innerHtml with the new title.... Ackward, I agree, but it works
    It's java based, but the actual replacing is all DHTML, I will look up the code and post it

  • Clear a field using RMDATIND

    Hi,
    I'm using Direct Input to create/change material.
    I'm using nodata field to let unmodify the fileds that I don't want change.
    If I try to clear a field using ' ' the rmadatind program lets the filed unmodify (as for nodata).
    Any suggests?

    Make sure that the field TCODE on structure BMM00 has the value MM02 for changes. I just tried it and it works.

  • How to use Enhancement spot in program

    Hi gurus,
    now i am working ecc 6.0, so how to use Enhancement spot in program, can anybody explain step by step.
    Rewarded with points.
    Thanks
    Naveen

    Hi Naveen ,
    Enhancement Spot are available.
    Examples:
    -End of Executable Program, Include, Function group, Dialog module
    -Begin/End of Form routine / Function module / Method
    -End of a structure
    -End of Private/Protected/Public Section of a local class
    If you want to create Implementation , You have to right click on yellow color line and gve Zxxx and save it in any
    transport request under any dev class. Then you can write your own code and save it and activate it .
    Later If you want to Transport it you need to transport this request.
    Reqward if usefuil
    Thanks
    Jagadeesh.G

  • Videos won't load on specific sites using Safari and FireFox. I've cleared the caches, reset Safari, removed and reinstalled Flash player, downloaded newest update.

    Videos won't load on specific sites using Safari and FireFox. I've cleared the caches, reset Safari, removed and reinstalled Flash player, downloaded newest update.

    Videos won't load on specific sites using Safari and FireFox. I've cleared the caches, reset Safari, removed and reinstalled Flash player, downloaded newest update.

Maybe you are looking for

  • Audio Inputs no longer work after upgrade to 10.4.10

    Anyone else having trouble with audio inputs after upgrading to 10.4.10? Here's my deal: MacPro dual 2.66, 4GB RAM, running 10.4.10 as of this morning. Upgraded to 10.4.10 today and the mic on my Plantronics USB headset quit working. 'Phones still wo

  • Advantco SFTP for retaining source file name

    We are using Advantco SFTP adapter in a File to File scenario on both sender and receiver side. We have 2 files to be picked from Source (both with different name) and need to place them on receiver directory with the name that we picked from source

  • OAS 4.0.8.1 (wrksf and Listener Admin)

    Installed OAS 4.0.8.1 onto SUSE 6.4. Install fine but I am unable to start the wrksf process either through the OAS admin or directly with owsctl. It appears to start then stops ????. Also when I try to administer the Listeners the wladmin call fails

  • Connect PC to Mac

    So far, I've managed to log in to my local network (Airport Extreme) from a Sony Vaio (Vista Home Premium). So, on the Vaio I have full access to the internet, and I can see/use my Public folder on the mac. I assume the network setup is fairly OK, bu

  • To Do's/Calendar

    Is there any way to see the to do's in iCal from the calendar screen on iPhone?