extracting pricing conditions

Upload: koos-en-elmien-goss

Post on 08-Apr-2018

255 views

Category:

Documents


4 download

TRANSCRIPT

  • 8/7/2019 Extracting Pricing Conditions

    1/18

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 1

    Extracting Pricing Condition Dataon Purchase Order in BI

    Applies to:

    SAP BW3.5, BI7.0. For more information, visit theBusiness Intelligence homepage.

    Summary

    This document gives a method to extract pricing condition data on purchase order in BI.

    Authors: Tej Trivedi,and Kartik Ravi

    Company: L&T Infotech

    Created on: 22 December 2009

    Author BioTej Trivedi is a SAP BI/BO Consultant currently working in Larsen & Toubro Infotech Ltd. Hehas over 4+years of core experience in various BW/BI Implementation, Migration, Rollout,Support Pack Upgrade and Support Projects. The experience includes 1 year experience onBO Platform.

    Kartik Ravi is a SAP BI and Business Objects (BOBJ) Consultant with 4 years experiencein SAP and Datawarehousing technology.

    https://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/sdn/nw-bi
  • 8/7/2019 Extracting Pricing Conditions

    2/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 2

    Table of Contents

    Introduction ......................................................................................................................................................... 3

    Business Scenario .............................................................................................................................................. 3

    Steps to view pricing condition data on purchase order ................................................................................. 3

    Pricing table Navigation .................................................................................................................................. 4

    Step by Step Method to create Data source ................................................................................................... 4

    Appendix: Source Code to extract pricing data for Purchase Order .................................................................. 9Include Declaration ......................................................................................................................................... 9

    Function module code ................................................................................................................................... 11

    Related Content ................................................................................................................................................ 17

    Disclaimer and Liability Notice .......................................................................................................................... 18

  • 8/7/2019 Extracting Pricing Conditions

    3/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 3

    Introduction

    A purchase order is created by a Buyer to procure material or commodities from the vendor. PricingCondition data on a purchase order gives an overview of different components involved in arriving at the Netvalue of the purchase order. For example, components like Freight prices that were incurred in shipping aquantity, discounts given by vendor on the quantity ordered, etc. Every component is assigned a conditiontype. All this components are responsible to arrive at the net value of a purchase order. Standard purchaseorder data sources do not extract pricing condition data on purchase order. This document will explain thesteps needed to create a data source that extracts pricing condition data on a purchase order.

    Business Scenario

    You want to extract pricing condition data on a purchase order for which there is no standard data sourceprovided by SAP business content.

    Steps to view pricing condition data on purchase order

    For those who are not familiar with pricing condition data can proceed as follows:1. Go to t-code ME23 and enter a purchase order number.

    2. Double click on the purchase order item as shown in the below screenshot.

    3. From the item menu , select Conditions as shown in the screenshot below.

    4. Below screenshot displays the pricing condition data for purchase order item.

  • 8/7/2019 Extracting Pricing Conditions

    4/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 4

    Pricing table Navigation

    Pricing condition data is stored table KONV. As it is a cluster table, we cannot create a view on this table.Hence, we will refer this table in a function module. As this table holds condition data of Sales Order, Billingdocument and Purchase order, we need to provide a filter so that we have condition record related topurchase order. The filter can be provided through a field Application (i.e. KONV-KAPPL) with a value M(i.e. Purchasing).In order to refer this table we need Number of the document condition (i.e. KNUMV) andCondition item number (i.e. KPOSN). Number of the document condition (i.e. KNUMV) can be obtainedfrom Purchasing Document Header table (i.e. EKKO- KNUMV) and Condition item number (i.e. KPOSN) isnothing but Item Number of Purchasing Document (i.e. EKPO-EBELP). One can also provide a filter forcondition type (i.e. KONV-KSCHL).

    Step by Step Method to create Data source

    We will now create a custom data source to extract the pricing condition data from purchase order.

    Proceed as follows:1. Create a structure for the data source.

    Create a structure with the fields as shown in the following screenshots.

    Screenshot 1 (Fields 1 to 18)

  • 8/7/2019 Extracting Pricing Conditions

    5/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 5

    Screenshot 2(Fields 19 to 36)

    Screenshot 3(Fields 37 to 45)

    2. We will create a generic data source using a function module. The logic used in the function module

    is as follows:

    a. Define a table i_ekko_ekpo as defined in the TOP include . This table will be filled in the function module based on the fields EKKO-

    AEDAT, EKPO-AEDAT, EKKO-BUKRS, EKKO-EBELN, EKPO-EBELP, EKPO-EMATN,

    EKKO-LIFNR, and EKPO-MATNR. In other words, the table should be filled with all the fields

    which are marked as Selection fields in the data source except for AEDAT from EKKO and

    EKPO.

    b. Define a table i_konvas defined in the TOP include .

    This table will be filled in function module based on KONV-KNUMV and KONV-KPOSN by

    equating them with the corresponding fields of table i_ekko_ekpo. In addition there will be a

    filter KONV-KAPPL = M to make sure we are reading only Purchasing relevant records.

  • 8/7/2019 Extracting Pricing Conditions

    6/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 6

    One can use condition type while reading the table KONV if it is marked in the Selection

    field in the data source.

    c. Define a work area lwa_data of type e_t_data.

    d. Loop at the table i_ekko_ekpo. We will have a nested loop on table i_konvby equating

    KNUMV and KPOSN. Fill all purchase order header and item information from the table

    i_ekko_ekpo to relevant fields of lwa_data. Fill all the purchase order condition data from

    the table i_konvto relevant fields of lwa_data.

    e. For more details on any of the above points, refer theAppendixsection.

    3. Go to t-code RSO2 to create a generic data source using the function module created in step 2.

    Select the data source type and assign a technical name to it. Choose Create. The screen to create

    generic data source appears.

    4. Choose application component as MM. Provide short, medium and long description. Enter the

    name of the function module and structure.

  • 8/7/2019 Extracting Pricing Conditions

    7/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 7

    5. Choose Generic Delta to specify the delta specific field. Select Time stamp radio button and

    choose AEDAT as a field for generic delta. Select the radio button New Status for Changed

    Records to ensure that an After Image is delivered by the generic data source.

    Note: In the function module we are comparing AEDAT with the AEDAT in EKKO as well as EKPO. This is to ensure thatwe take care of creation as well as changes to purchase orders. When a purchase order is created, AEDAT inEKKO is populated. When a purchase order is changed, AEDAT in EKPO is populated. One has to check thisfeature prior to data source creation by creating a purchase order as well as changing pricing condition data on apurchase order.

    6. Specify the fields for selection for the data source

    Select following fields for selection:

    BUKRS Company Code

    EBELN - Purchasing Document Number

  • 8/7/2019 Extracting Pricing Conditions

    8/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 8

    EBELP - Item Number of Purchasing Document

    EMATN - Material Number

    KSCHL - Condition type

    LIFNR - Vendor Account Number

    MATNR - Material Number

    7. Save and activate the data source.8. As the delta process of generic data source is AIE, the data should be loaded first into a staging

    DSO. In other words, the data should not be loaded directly to cube.

  • 8/7/2019 Extracting Pricing Conditions

    9/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 9

    Appendix: Source Code to extract pricing data for Purchase Order

    Include Declaration

    Include declaration for

    FUNCTION-POOL . "MESSAGE-ID ..

    * Include LRSAXD01 can be directly referenced by application APIs !!

    INCLUDE lrsaxd01.

    * Include macros for "describe field"

    INCLUDE rsaucmac.

    TYPES: BEGIN OF t_ekko_ekpo,

    ebeln LIKE ekko-ebeln,

    ebelp LIKE ekpo-ebelp,

    aedat LIKE ekko-aedat,

    aedat1 LIKE ekpo-aedat,

    bukrs LIKE ekko-bukrs,

    matnr LIKE ekpo-matnr,

    matkl LIKE ekpo-matkl,

    werks LIKE ekpo-werks,

    lgort LIKE ekpo-lgort,

    knumv LIKE ekko-knumv,

    ekorg LIKE ekko-ekorg,

    ekgrp LIKE ekko-ekgrp,

    bwtar LIKE ekpo-bwtar,

    status LIKE ekpo-status,

    bsgru LIKE ekpo-bsgru,

    ematn LIKE ekpo-ematn,

    bstyp LIKE ekpo-bstyp,

    elikz LIKE ekpo-elikz,

    erekz LIKE ekpo-erekz,

    pstyp LIKE ekpo-pstyp,

    txz01 LIKE ekpo-txz01,

    ltsnr LIKE ekpo-ltsnr,

    loekz LIKE ekpo-loekz,bedat LIKE ekko-bedat,

    lifnr LIKE ekko-lifnr,

    statu LIKE ekko-statu,

    reswk LIKE ekko-reswk,

    bsart LIKE ekko-bsart,

    waers LIKE ekko-waers,

    menge LIKE ekpo-menge,

    meins LIKE ekpo-meins,

    kposn LIKE konv-kposn,

    END OF t_ekko_ekpo.

    DATA : i_ekko_ekpo TYPE STANDARD TABLE OF t_ekko_ekpo.

    FIELD-SYMBOLS: TYPE t_ekko_ekpo.

    TYPES: BEGIN OF t_konv,knumv LIKE konv-knumv,

    kposn LIKE konv-kposn,

    kschl LIKE konv-kschl,

    kappl LIKE konv-kappl,

    kdatu LIKE konv-kdatu,

    zaehk LIKE konv-zaehk,

    kinak LIKE konv-kinak,

    koaid LIKE konv-koaid,

  • 8/7/2019 Extracting Pricing Conditions

    10/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 10

    kherk LIKE konv-kherk,

    kntyp LIKE konv-kntyp,

    kstat LIKE konv-kstat,

    kwert LIKE konv-kwert,

    kkurs LIKE konv-kkurs,

    varcond LIKE konv-varcond,

    stunr LIKE konv-stunr,

    kvarc LIKE konv-kvarc,

    END OF t_konv.

    DATA : i_konv TYPE STANDARD TABLE OF t_konv.

    FIELD-SYMBOLS: TYPE t_konv.

    CONSTANTS:c_nedi TYPE ekes-estkz VALUE '2',

    c_la TYPE ekes-ebtyp VALUE 'LA'.

  • 8/7/2019 Extracting Pricing Conditions

    11/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 11

    Function module code

    FUNCTION < Function Module Name >.

    *"----------------------------------------------------------------------

    *"*"Local Interface:

    *" IMPORTING

    *" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR

    *" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL

    *" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL

    *" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL

    *" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL

    *" VALUE(I_REMOTE_CALL) TYPE SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF

    *" TABLES

    *" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL

    *" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL

    *" E_T_DATA STRUCTURE < Extract Structure Name > OPTIONAL

    *" EXCEPTIONS

    *" NO_MORE_DATA

    *" ERROR_PASSED_TO_MESS_HANDLER

    *"----------------------------------------------------------------------

    * DataSource for table KONV, EKPO, EKKOTABLES: konv, ekpo, ekko.

    * Auxiliary Selection criteria structure

    DATA: l_s_select TYPE srsc_s_select.

    * Maximum number of lines for DB table

    STATICS: s_s_if TYPE srsc_s_if_simple,

    * counter

    s_counter_datapakid LIKE sy-tabix,

    * cursor

    s_cursor TYPE cursor.* Select ranges

    RANGES: l_r_aedat FOR ekko-aedat,

    l_r_bukrs FOR ekko-bukrs,

    l_r_ebeln FOR ekko-ebeln,

    l_r_ebelp FOR ekpo-ebelp,

    l_r_ematn FOR ekpo-ematn,

    l_r_kschl FOR konv-kschl,

    l_r_lifnr FOR ekko-lifnr,

    l_r_matnr FOR ekpo-matnr.

    DATA: lwa_data LIKE LINE OF e_t_data.

    * Initialization mode (first call by SAPI) or data transfer mode

    * (following calls) ?

    IF i_initflag = sbiwa_c_flag_on.

    ************************************************************************

    * Initialization: check input parameters

    * buffer input parameters

    * prepare data selection

    ************************************************************************

  • 8/7/2019 Extracting Pricing Conditions

    12/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 12

    * Check DataSource validity

    CASE i_dsource.

    WHEN ''.

    WHEN OTHERS.

    IF 1 = 2. MESSAGE e009(r3). ENDIF.

    * this is a typical log call. Please write every error message like this

    log_write 'E' "message type

    'R3' "message class

    '009' "message number

    i_dsource "message variable 1

    ' '. "message variable 2

    RAISE error_passed_to_mess_handler.

    ENDCASE.

    APPEND LINES OF i_t_select TO s_s_if-t_select.

    * Fill parameter buffer for data extraction calls

    s_s_if-requnr = i_requnr.

    s_s_if-dsource = i_dsource.

    s_s_if-maxsize = i_maxsize.

    * Fill field list table for an optimized select statement* (in case that there is no 1:1 relation between InfoSource fields

    * and database table fields this may be far from beeing trivial)

    APPEND LINES OF i_t_fields TO s_s_if-t_fields.

    ELSE. "Initialization mode or data extraction ?

    ************************************************************************

    * Data transfer: First Call OPEN CURSOR + FETCH

    * Following Calls FETCH only

    ************************************************************************

    * First data package -> OPEN CURSOR

    IF s_counter_datapakid = 0.

    * Fill range tables BW will only pass down simple selection criteria

    * of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.

    LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'AEDAT'.

    MOVE-CORRESPONDING l_s_select TO l_r_aedat.

    l_r_aedat-sign = 'I'.

    l_r_aedat-option = 'GE'.

    CLEAR l_r_aedat-high.

    APPEND l_r_aedat.

    ENDLOOP.

    LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'BUKRS'.

    MOVE-CORRESPONDING l_s_select TO l_r_bukrs.

    APPEND l_r_bukrs.

    ENDLOOP.

    LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'EBELN'.

    MOVE-CORRESPONDING l_s_select TO l_r_ebeln.

    APPEND l_r_ebeln.

    ENDLOOP.

  • 8/7/2019 Extracting Pricing Conditions

    13/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 13

    LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'EBELP'.

    MOVE-CORRESPONDING l_s_select TO l_r_ebelp.

    APPEND l_r_ebelp.

    ENDLOOP.

    LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'EMATN'.

    MOVE-CORRESPONDING l_s_select TO l_r_ematn.

    APPEND l_r_ematn.

    ENDLOOP.

    LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'KSCHL'.

    MOVE-CORRESPONDING l_s_select TO l_r_kschl.

    APPEND l_r_kschl.

    ENDLOOP.

    LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'LIFNR'.

    MOVE-CORRESPONDING l_s_select TO l_r_lifnr.

    APPEND l_r_lifnr.

    ENDLOOP.

    LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'MATNR'.

    MOVE-CORRESPONDING l_s_select TO l_r_matnr.APPEND l_r_matnr.

    ENDLOOP.

    * Determine number of database records to be read per FETCH statement

    * from input parameter I_MAXSIZE. If there is a one to one relation

    * between DataSource table lines and database entries, this is trivial.

    * In other cases, it may be impossible and some estimated value has to

    * be determined.

    *-- Fetch Purchase Order data from Database Tables EKKO and EKPO

    OPEN CURSOR WITH HOLD s_cursor FOR

    SELECT ekko~ebelnekpo~ebelp

    ekko~aedat

    ekpo~aedat

    ekko~bukrs

    ekpo~matnr

    ekpo~matkl

    ekpo~werks

    ekpo~lgort

    ekko~knumv

    ekko~ekorg

    ekko~ekgrp

    ekpo~bwtar

    ekpo~status

    ekpo~bsgru

    ekpo~ematn

    ekpo~bstyp

    ekpo~elikz

    ekpo~erekz

    ekpo~pstyp

    ekpo~txz01

    ekpo~ltsnr

  • 8/7/2019 Extracting Pricing Conditions

    14/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 14

    ekpo~loekz

    ekko~bedat

    ekko~lifnr

    ekko~statu

    ekko~reswk

    ekko~bsart

    ekko~waers

    ekpo~menge

    ekpo~meins

    FROM ekko AS ekko

    INNER JOIN ekpo AS ekpo

    ON ekko~ebeln = ekpo~ebeln

    WHERE ( ( ekko~aedat IN l_r_aedat

    OR ekpo~aedat IN l_r_aedat )

    AND ekko~bukrs IN l_r_bukrs

    AND ekko~ebeln IN l_r_ebeln

    AND ekpo~ebelp IN l_r_ebelp

    AND ekpo~ematn IN l_r_ematn

    AND ekko~lifnr IN l_r_lifnr

    AND ekpo~matnr IN l_r_matnr ).

    ENDIF. "First data package ?

    * Fetch records into table i_ekko_ekpo

    FETCH NEXT CURSOR s_cursor

    INTO CORRESPONDING FIELDS

    OF TABLE i_ekko_ekpo

    PACKAGE SIZE s_s_if-maxsize.

    IF sy-subrc 0.

    CLOSE CURSOR s_cursor.

    RAISE no_more_data.

    ELSE.

    IF i_ekko_ekpo[] IS NOT INITIAL.LOOP AT i_ekko_ekpo ASSIGNING .

    MOVE -ebelp TO -kposn.

    ENDLOOP.

    * Populating LWA_DATA with pricing condition for each Purchase order based on Number

    of * the document condition (i.e. EKKO- KNUMV) and Item Number of Purchasing

    Document * (i.e. EKPO-EBELP).

    SELECT knumv

    kposn

    kschl

    kappl

    kdatu

    zaehk

    kinak

    koaid

    kherk

    kntyp

    kstat

    kwert

    kkurs

  • 8/7/2019 Extracting Pricing Conditions

    15/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 15

    varcond

    stunr

    kvarc

    FROM konv

    INTO TABLE i_konv

    FOR ALL ENTRIES IN i_ekko_ekpo

    WHERE knumv EQ i_ekko_ekpo-knumv

    AND kposn EQ i_ekko_ekpo-kposn

    AND kappl EQ 'M'

    AND kschl IN l_r_kschl.

    SORT i_konv BY knumv kposn.

    LOOP AT i_ekko_ekpo ASSIGNING .

    LOOP AT i_konv ASSIGNING

    WHERE knumv EQ -knumv

    AND kposn EQ -kposn.

    CLEAR lwa_data.

    IF -aedat1 IS INITIAL.MOVE -aedat TO lwa_data-aedat.

    ELSE.

    MOVE -aedat1 TO lwa_data-aedat.

    ENDIF.

    MOVE: -ebeln TO lwa_data-ebeln,

    -ebelp TO lwa_data-ebelp,

    -bukrs TO lwa_data-bukrs,

    -matnr TO lwa_data-matnr,

    -matkl TO lwa_data-matkl,

    -werks TO lwa_data-werks,

    -lgort TO lwa_data-lgort,

    -ekorg TO lwa_data-ekorg,-ekgrp TO lwa_data-ekgrp,

    -bwtar TO lwa_data-bwtar,

    -status TO lwa_data-status,

    -bsgru TO lwa_data-bsgru,

    -ematn TO lwa_data-ematn,

    -bstyp TO lwa_data-bstyp,

    -elikz TO lwa_data-elikz,

    -erekz TO lwa_data-erekz,

    -pstyp TO lwa_data-pstyp,

    -txz01 TO lwa_data-txz01,

    -ltsnr TO lwa_data-ltsnr,

    -loekz TO lwa_data-loekz,

    -bedat TO lwa_data-bedat,

    -lifnr TO lwa_data-lifnr,

    -statu TO lwa_data-statu,

    -reswk TO lwa_data-reswk,

    -bsart TO lwa_data-bsart,

    -waers TO lwa_data-waers,

    -menge TO lwa_data-menge,

    -meins TO lwa_data-meins.

  • 8/7/2019 Extracting Pricing Conditions

    16/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 16

    MOVE: -kschl TO lwa_data-kschl,

    -kappl TO lwa_data-kappl,

    -kdatu TO lwa_data-kdatu,

    -zaehk TO lwa_data-zaehk,

    -kinak TO lwa_data-kinak,

    -koaid TO lwa_data-koaid,

    -kherk TO lwa_data-kherk,

    -kntyp TO lwa_data-kntyp,

    -kstat TO lwa_data-kstat,

    -kwert TO lwa_data-kwert,

    -kkurs TO lwa_data-kkurs,

    -varcond TO lwa_data-varcond,

    -stunr TO lwa_data-stunr,

    -kvarc TO lwa_data-kvarc.

    lwa_data-bwapplnm = 'MM'.

    APPEND lwa_data TO e_t_data.

    ENDLOOP.

    ENDLOOP.

    ENDIF.

    ENDIF.

    s_counter_datapakid = s_counter_datapakid + 1.

    ENDIF. "Initialization mode or data extraction ?

    ENDFUNCTION.

  • 8/7/2019 Extracting Pricing Conditions

    17/18

    Extracting Pricing Condition Data on Purchase Order in BI

    SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com

    2009 SAP AG 17

    Related Content

    SAP BI Generic Extraction Using a Function Module

    Functional Understanding of Pricing

    For more information, visit theBusiness Intelligence homepage.

    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33http://help.sap.com/saphelp_srm30/helpdata/en/72/f40f3c98ddaa4ce10000000a11402f/frameset.htmhttp://help.sap.com/saphelp_srm30/helpdata/en/72/f40f3c98ddaa4ce10000000a11402f/frameset.htmhttps://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/sdn/nw-bihttps://www.sdn.sap.com/irj/sdn/nw-bihttp://help.sap.com/saphelp_srm30/helpdata/en/72/f40f3c98ddaa4ce10000000a11402f/frameset.htmhttp://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
  • 8/7/2019 Extracting Pricing Conditions

    18/18

    Extracting Pricing Condition Data on Purchase Order in BI

    Disclaimer and Liability Notice

    This document may discuss sample coding or other information that does no t include SAP official interfaces and therefore is notsupported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,and anyone using these methods does so at his/her own risk.

    SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article orcode sample, including any liability resulting from incompatibility between the content within this document and the materials andservices offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the con tent of this

    document.