Sales pricing function module
I would like to know if there is a FM that can be used to perform pricing outside of a sales document. I would like a FM that the key pricing data can be passed to and a table returned with all relevant pricing.
Is there a way to do this? Any suggestions are appreciated.
Thank you.
Hi,
Try this code..
DATA: t_t682i LIKE TABLE OF t682i.
DATA: lwa_t682i LIKE t682i.
DATA l_koprt TYPE koprt.
DATA: lwa_komk TYPE komk,
lwa_komp TYPE komp.
DATA l_condition_records TYPE STANDARD TABLE OF a000.
DATA: lwa_condition_record TYPE a000.
DATA: lwa_konp TYPE konp.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY,
p_matnr TYPE matnr OBLIGATORY,
p_vtweg TYPE vtweg OBLIGATORY,
p_waerk TYPE waerk OBLIGATORY,
p_pltyp TYPE pltyp.
lwa_komk-vkorg = p_vkorg.
lwa_komk-vtweg = p_vtweg.
lwa_komk-prsdt = sy-datum.
lwa_komk-pltyp = p_pltyp.
lwa_komp-matnr = p_matnr.
lwa_komk-waerk = p_waerk.
lwa_komp-pmatn = lwa_komp-matnr.
* Get access
CALL FUNCTION 'SD_T682I_SINGLE_READ'
EXPORTING
kvewe_i = 'A'
kappl_i = 'V'
kozgf_i = 'PR00'
count_i = 50
TABLES
t682i_tab_io = t_t682i
EXCEPTIONS
OTHERS = 1.
LOOP AT t_t682i INTO lwa_t682i.
* Get condition
CALL FUNCTION 'SD_COND_ACCESS'
EXPORTING
application = 'V'
condition_type = 'PR00'
date = lwa_komk-prsdt
header_comm_area = lwa_komk
position_comm_area = lwa_komp
t682i_i = lwa_t682i
koprt_i = l_koprt
TABLES
condition_records = l_condition_records
EXCEPTIONS
field_is_initial = 1
not_read_unqualified = 2
read_but_not_found = 3
read_but_blocked = 4
t682z_missing = 5
t681v_missing = 6
t681z_missing = 7
mva_error = 8
OTHERS = 9.
READ TABLE l_condition_records INTO lwa_condition_record INDEX 1.
IF sy-subrc <> 0.
CONTINUE.
ENDIF.
SELECT SINGLE * FROM konp
INTO lwa_konp
WHERE knumh = lwa_condition_record-knumh.
WRITE: / lwa_konp-kbetr.
EXIT.
ENDLOOP.
Thanks
Naren
Similar Messages
-
Please help with 'Pricing' function module
Hi!
I am trying to use function module 'Pricing' but the table it_komv is still empty even after calling. I am basically trying to print some free of charge items on invoice sapscript and hence I am using 'Pricing' function in the print program. I am passing the below parameters. Please tell me whatelse I need to pass/not to pass.
wa_komk-mandt = sy-mandt.
wa_komk-kalsm = vbdkr-kalsm.
wa_komk-kappl = 'V'.
wa_komk-waerk = vbdkr-waerk.
wa_komk-knumv = vbdkr-knumv.
wa_komk-knuma = vbdkr-knuma.
wa_komk-vbtyp = vbdkr-vbtyp.
wa_komk-land1 = vbdkr-land1.
wa_komk-vkorg = vbdkr-vkorg.
wa_komk-vtweg = vbdkr-vtweg.
wa_komk-spart = vbdkr-spart.
wa_komk-prsdt = vbdkr-erdat.
wa_komk-kurst = vbdkr-kurst.
wa_komk-kurrf = vbdkr-kurrf.
wa_komk-kurrf_dat = vbdkr-kurrf_dat.
wa_komp-kposn = vbdpr-posnr.
wa_komp-kursk = vbdpr-kursk.
wa_komp-kursk_dat = vbdpr-kursk_dat.
wa_komp-werks = vbdpr-werks.
CALL FUNCTION 'PRICING'
EXPORTING
CALCULATION_TYPE = 'A'
comm_head_i = wa_komk
comm_item_i = wa_komp
PRELIMINARY = ' '
NO_CALCULATION = ' '
IMPORTING
comm_head_e = wa_komk
comm_item_e = wa_komp
TABLES
tkomv = it_komv
SVBAP =
CHANGING
REBATE_DETERMINED = ' '
Thanks a lot!Hi,
Check this example..
tables: vbdkr.
data: s_komk type KOMK.
data: s_komp type komp.
data: t_komv like KOMV occurs 0 with header line.
data: t_komvd like komvd occurs 0 with header line.
Input
s_komk-mandt = sy-mandt.
s_komk-knumv = vbdkr-knumv.
CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
EXPORTING
comm_head_i = s_komk
comm_item_i = s_komp
tables
tkomv = t_komv
tkomvd = t_komvd
You can check the program RVADIN01 for a sample..
Hope this helps..
Thanks,
Naren -
Sales Order function module to retrieve the item availability values
Hi,
Is there any function module to retrieve the item availability schedule line values.
Navigation:->
Go to sales order (Change Mode) -> Schedule lines tab -> In application toolbar you can find Item availability icon.
When this is pressed, next screen you can find the split up of schedule line values. I am developing an ALV report and is required to retrieve the Split up of the schedule line values.
Is there any function module to retrieve the same.
BR/ JoshHI,
I have found one function module ATP_EXPLANATION. I am not able to figure out the parameters that needs to be inputted to this function module. If anyone has used this before, could you kindly help me out.
This function module returns the Split up for Schedule lines in the tablea 'MDVEX'.
BR/ Josh -
Direct Delivery Sales Order - Function Module for Purchase Requisition
Hello Experts,
When we creat a Direct Delivery Sales Order at Production Plant then one Direct Delivery Purchase Requisition automatically gets generated at the Distribution Warehouse. If anyone knows the function module which actually generates this Direct Delivery PReq, then request him/her to please let us know.
Thanks and Regards
JosephHi,
Whatever Function Module's given are for or above 4.6C versions.
I want for 4.6B version.
At the same time, the returned tables should return more than 1 Pur.Req number as the FM's mentioned returns only 1.
Thanks,
Mich -
hello,
which function module do the pricing in SD?
Which parameters are necessary to start this function module?
Thanks,
Haraldhi,
The following is used in SD to calculated pricing ,
You need to fill the komk & komp structure and pass the structure komv .
call function 'PRICING'
exporting
calculation_type = 'C'
comm_head_i = komk
comm_item_i = komp
importing
comm_head_e = komk
comm_item_e = komp
tables
tkomv = komv.
saravanan -
From Sales Pricing to Quotation
Hi all,
I want to use Sales Pricing function to generate a Quotation.
Can anyone help me?
Thanks.Hi all,
I use PS Sales Pricing Project (DP82) to calculate sale price and make quotation.
Can you help me?
Thanks. -
Function module to add record into incompletion log of creating sale order
Hi SD Experts,
Do you know any function module / class to add record a into incompletion log procedure of creating / changing sale order process? We can do it through configuration OVA2 but I need to add more condition before adding to this table.
Thanks,
DuyHi,
Refer to The SDN Post : [user exit to update the incompletion log in sales order for pricing error |Re: user exit to update the incompletion log in sales order for pricing error].
Limitation : While creating Sales order, this works only for document type with external number range as the code required for updating XVBUV require Sales Order Number.
Regards
Vinod -
Function module to validate Sales Deal in VA01
Dear Experts,
I have a requirement to validate the sales deal for material/material group and customer/customer group
discounts. I need to activate/deactivate the condition type based on the sales deal entered in the sold-to-party and ship-to-party
level. Please let me know if any function module is available for the same.
Thanks
Ramesh ManoharanHi,
Using custom ROUTINES in requirement column of pricing procedure (V/08) we can activate/deactivate any condition type in sales order. For your requirement you have to define the exact logic to write in routine.
n routine, you need to set the SY-SUBRC value.
If SY-SUBRC = 0, then the condition type will be triggered in sales order.
If SY-SUBRC = 4, then the condition type will not be triggered in sales order.
I hope this will help you.
If my understanding is wrong, please explain in detail about your requirement.
Regards,
Shashwath -
Function module to pricing procedure calculation
hi,
I want to know whether any function modules available to get as I see in Invoice ->
select item level conditions.
Where i can see the basic price ,discount, etc as defined in the corresponding pricing procedure.
i have tried with
RV_INVOICE_PRICE_PBO
PRICING_SUBSCREEN_SET_DATA
here i get only the records which have condition type,
similarly for P.O. we have
ME_SWP_SIC_GET_PRICING_INFO
regards,
Prabhu
Points assured.REPORT zmm_pvr.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TYPE-POOLS *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TYPE-POOLS slis.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TABLES *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TABLES: mara, " General Material Data
marc, " Plant Data for Material
ekko, " Purchasing Document Header
ekpo, " Purchasing Document Item
lfa1, " Vendor Master (General Section)
konv, " Conditions (Transaction Data)
mbew, " Material Valuation
makt. " Material Descriptions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DATA DECLARATION *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DATA: BEGIN OF i_mat OCCURS 1,
matnr LIKE mara-matnr,
mtart LIKE mara-mtart,
werks LIKE marc-werks,
abcin LIKE marc-abcin,
END OF i_mat.
DATA: BEGIN OF itab OCCURS 1,
ebeln LIKE ekko-ebeln,
bedat LIKE ekko-bedat,
lifnr LIKE ekko-lifnr,
waers LIKE ekko-waers,
bukrs LIKE ekko-bukrs,
ekorg LIKE ekko-ekorg,
name1 LIKE lfa1-name1,
werks LIKE ekpo-werks,
menge LIKE ekpo-menge,
meins LIKE ekpo-meins,
netpr LIKE ekpo-netpr,
netwr LIKE ekpo-netwr,
menge1(16),
netpr1(16),
menge2 TYPE string,
netpr2 TYPE string,
lrate TYPE p DECIMALS 2,
stax LIKE ekpo-netwr,
exbed LIKE ekpo-netwr,
dcost LIKE konv-kwert,
nomvl LIKE ekpo-netwr,
nomrt LIKE ekpo-netwr,
zplp1 LIKE mbew-zplp1,
verpr LIKE mbew-verpr,
bgval LIKE ekpo-netwr,
varnc LIKE ekpo-netwr,
maktx LIKE makt-maktx,
knumv LIKE ekko-knumv,
ebelp LIKE ekpo-ebelp,
matnr LIKE ekpo-matnr,
matkl LIKE ekpo-matkl,
mtart LIKE ekpo-mtart,
bprme LIKE ekpo-bprme,
txz01 LIKE ekpo-txz01,
mwskz LIKE ekpo-mwskz,
prdat LIKE ekpo-prdat,
END OF itab.
DATA: wtab LIKE itab.
DATA: v_steuc TYPE marc-steuc.
DATA: v_brsch TYPE lfa1-brsch.
DATA: wa_komk TYPE komk.
DATA: wa_komp TYPE komp.
DATA: it_komv TYPE TABLE OF komv.
DATA: wa_komv TYPE komv.
DATA : wa_fieldcat TYPE slis_fieldcat_alv,
gt_fieldcat TYPE slis_t_fieldcat_alv,
wa_layout TYPE slis_layout_alv,
lt_sort TYPE slis_t_sortinfo_alv,
i LIKE sy-tabix.
DATA: gt_events TYPE slis_t_event.
DATA: gd_prntparams TYPE slis_print_alv.
DATA: it_color TYPE slis_t_specialcol_alv.
DATA: wa_color TYPE slis_specialcol_alv.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Begin Of Selection Screen *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SELECTION-SCREEN BEGIN OF BLOCK pas WITH FRAME TITLE text-001.
SELECT-OPTIONS s_matnr FOR ekpo-matnr.
SELECT-OPTIONS s_werks FOR ekpo-werks.
SELECT-OPTIONS s_bedat FOR ekko-bedat.
PARAMETERS p_abcin LIKE marc-abcin OBLIGATORY.
SELECTION-SCREEN END OF BLOCK pas.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
INITIALIZATION *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
INITIALIZATION.
IF sy-datum+4(2) GE 4.
s_bedat-low+6(2) = 01.
s_bedat-low+4(2) = 04.
s_bedat-low(4) = sy-datum(4).
ENDIF.
IF sy-datum+4(2) LT 4.
s_bedat-low+6(2) = 01.
s_bedat-low+4(2) = 04.
s_bedat-low(4) = sy-datum(4) - 1.
ENDIF.
s_bedat-high = sy-datum.
APPEND s_bedat.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AT Selection Screen Output *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AT SELECTION-SCREEN.
Check for Material Type
SELECT amatnr amtart bwerks babcin INTO CORRESPONDING FIELDS OF TABLE i_mat
FROM mara AS a INNER JOIN marc AS b
ON amatnr = bmatnr
WHERE a~matnr IN s_matnr
AND ( amtart = 'IRAM' OR amtart = 'IPAM' OR amtart = 'PRAM' OR amtart = 'PPAM' )
AND b~werks IN s_werks
AND b~abcin = p_abcin.
SORT i_mat BY matnr werks.
CHECK NOT i_mat[] IS INITIAL.
READ TABLE i_mat INDEX 1.
IF sy-subrc <> 0.
MESSAGE e006(zmm).
LEAVE LIST-PROCESSING.
ENDIF.
Check for Date
IF ( s_bedat-low IS INITIAL AND s_bedat-high IS INITIAL ).
s_bedat-sign = 'I'.
s_bedat-option = 'BT'.
IF sy-datum+4(2) GE 4.
s_bedat-low+6(2) = 01.
s_bedat-low+4(2) = 04.
s_bedat-low(4) = sy-datum(4).
ENDIF.
IF sy-datum+4(2) LT 4.
s_bedat-low+6(2) = 01.
s_bedat-low+4(2) = 04.
s_bedat-low(4) = sy-datum(4) - 1.
ENDIF.
s_bedat-high = sy-datum.
ELSEIF ( s_bedat-low IS NOT INITIAL AND s_bedat-high IS INITIAL ).
s_bedat-low6(2) = s_bedat-low6(2).
s_bedat-low4(2) = s_bedat-low4(2).
s_bedat-low(4) = s_bedat-low(4).
ELSEIF ( s_bedat-low IS NOT INITIAL AND s_bedat-high IS NOT INITIAL ).
s_bedat-sign = 'I'.
s_bedat-option = 'BT'.
s_bedat-low6(2) = s_bedat-low6(2).
s_bedat-low4(2) = s_bedat-low4(2).
s_bedat-low(4) = s_bedat-low(4).
s_bedat-high6(2) = s_bedat-high6(2).
s_bedat-high4(2) = s_bedat-high4(2).
s_bedat-high(4) = s_bedat-high(4).
ENDIF.
APPEND s_bedat.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
START OF SELECTION *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
START-OF-SELECTION.
*----- Get all PO for given selection criteria.
LOOP AT i_mat.
SELECT
aebeln abedat alifnr aknumv awaers abukrs a~ekorg
bebelp bmatnr bmatkl bnetpr bbprme btxz01 bwerks bmenge bmeins bnetwr bmtart bmwskz b~prdat
FROM ( ekko AS a INNER JOIN ekpo AS b ON amandt = bmandt AND aebeln = bebeln )
INTO CORRESPONDING FIELDS OF TABLE itab
FOR ALL ENTRIES IN i_mat
WHERE a~bedat IN s_bedat
AND a~loekz = ''
AND b~matnr = i_mat-matnr
AND b~werks = i_mat-werks
AND b~loekz = ''
AND b~pstyp = '0'
AND b~bstyp = 'F'
AND b~knttp = ''.
ENDLOOP. " END OF i_mat
CHECK NOT itab[] IS INITIAL.
SORT itab BY ebeln ebelp.
*----- Calculating The DCOST -- Delivery Cost
DATA: BEGIN OF i_konv OCCURS 0,
knumv LIKE konv-knumv,
kposn LIKE konv-kposn,
stunr LIKE konv-stunr,
zaehk LIKE konv-zaehk,
kschl LIKE konv-kschl,
kbetr LIKE konv-kbetr,
kwert LIKE konv-kwert,
END OF i_konv.
SELECT knumv kposn stunr zaehk kschl kbetr kwert
FROM konv
INTO CORRESPONDING FIELDS OF TABLE i_konv
FOR ALL ENTRIES IN itab
WHERE knumv = itab-knumv
AND kposn = itab-ebelp
AND ( kschl = 'ZFC3' OR kschl = 'ZQIQ'
OR kschl = 'ZQIV' OR kschl = 'ZFA3'
OR kschl = 'ZFB3' OR kschl = 'ZPF2'
OR kschl = 'ZPQ2' OR kschl = 'ZPV2'
OR kschl = 'ZOCP' OR kschl = 'ZOCQ'
OR kschl = 'ZOCV' OR kschl = 'ZMT1'
OR kschl = 'ZIN2' OR kschl = 'ZIQ2'
OR kschl = 'ZIV2' OR kschl = 'ZBK1'
OR kschl = 'ZBKQ' OR kschl = 'ZBKV' ).
SORT i_konv BY knumv kposn stunr zaehk kschl .
DELETE ADJACENT DUPLICATES FROM i_konv.
DELETE i_konv WHERE kbetr = 0.
DATA: BEGIN OF i_knumv OCCURS 0,
knumv LIKE konv-knumv,
kwert LIKE konv-kwert,
END OF i_knumv.
LOOP AT i_konv.
MOVE i_konv-knumv TO i_knumv-knumv.
MOVE i_konv-kwert TO i_knumv-kwert.
COLLECT i_knumv.
ENDLOOP.
CLEAR i_konv.
CLEAR i_knumv.
LOOP AT itab INTO wtab.
READ TABLE i_knumv WITH KEY knumv = wtab-knumv.
IF sy-subrc = 0.
wtab-dcost = i_knumv-kwert.
MODIFY itab FROM wtab.
ENDIF.
ENDLOOP.
CLEAR i_knumv.
CLEAR itab.
*----- Get the vendor name.
LOOP AT itab.
SELECT SINGLE name1 FROM lfa1 INTO itab-name1
WHERE lifnr = itab-lifnr.
MODIFY itab INDEX sy-tabix TRANSPORTING name1.
ENDLOOP.
*----- Calculate Excise Duty, Educat. cess, Sec edu. cess, sales tax
CLEAR: wa_komk, wa_komp.
Selecting The Value Of STEUC (Controlling Code)
CLEAR itab.
LOOP AT itab.
SELECT SINGLE steuc
FROM marc
INTO v_steuc
WHERE matnr = itab-matnr
AND werks = itab-werks.
Selecting The Value Of BRSCH (Industry key)
SELECT SINGLE brsch
FROM lfa1
INTO v_brsch
WHERE lifnr = itab-lifnr.
Filling KOMK (Header Structure)
wa_komk-kappl = 'TX'.
wa_komk-kalsm = 'TAXINN'.
wa_komk-lifnr = itab-lifnr.
wa_komk-waerk = itab-waers.
wa_komk-aland = 'IN'.
wa_komk-hwaer = 'INR'.
wa_komk-bukrs = itab-bukrs.
wa_komk-brsch = v_brsch.
wa_komk-prsdt = itab-bedat.
wa_komk-ekorg = itab-ekorg.
wa_komk-mwskz = itab-mwskz.
Filling KOMP (Details Structure)
wa_komp-kposn = itab-ebelp.
wa_komp-matnr = itab-matnr.
wa_komp-werks = itab-werks.
wa_komp-matkl = itab-matkl.
wa_komp-meins = itab-meins.
wa_komp-vrkme = itab-bprme.
wa_komp-netwr = itab-netwr.
wa_komp-wrbtr = itab-netwr.
wa_komp-mwskz = itab-mwskz.
wa_komp-netpr = itab-netpr.
wa_komp-mtart = itab-mtart.
wa_komp-kursk_dat = itab-prdat.
wa_komp-steuc = v_steuc.
wa_komp-mgame = itab-menge.
wa_komp-mglme = itab-menge.
FREE it_komv.
Calling The Pricing Function To Get GR EXCISE, GR ECES, GR VAT/CST
CALL FUNCTION 'PRICING'
EXPORTING
calculation_type = 'B'
comm_head_i = wa_komk
comm_item_i = wa_komp
TABLES
tkomv = it_komv.
Calculating The Excise --excise duty
DATA: l_kbetr TYPE komv-kbetr.
DATA: l_gr_excise TYPE ekpo-brtwr.
DATA: l_basic_gr_val TYPE ekpo-netpr.
l_basic_gr_val = itab-netwr.
CLEAR: l_kbetr, l_gr_excise.
LOOP AT it_komv INTO wa_komv WHERE kschl = 'JMOP'
OR kschl = 'JAOP'
OR kschl = 'JMIP'
OR kschl = 'JAOQ'.
l_kbetr = ( wa_komv-kbetr / 10 ).
l_gr_excise = ( l_kbetr * l_basic_gr_val ) / 100.
ENDLOOP.
LOOP AT it_komv INTO wa_komv WHERE kschl = 'JAIP'
OR kschl = 'JAIQ'
OR kschl = 'JMIQ'
OR kschl = 'JMOQ'.
l_gr_excise = ( wa_komv-kbetr * l_basic_gr_val ).
ENDLOOP.
Calculating The ECES -- Educational Cess
DATA l_gr_eces TYPE ekpo-netpr.
CLEAR: l_kbetr, l_gr_eces.
LOOP AT it_komv INTO wa_komv WHERE kschl = 'ZECE'
OR kschl = 'ZECN'.
l_kbetr = ( wa_komv-kbetr / 10 ).
l_gr_eces = ( l_kbetr * l_gr_excise ) / 100.
ENDLOOP.
Calculating The SECES -- Sec. Educational Cess
DATA l_gr_secs TYPE ekpo-netpr.
CLEAR: l_kbetr, l_gr_secs.
LOOP AT it_komv INTO wa_komv WHERE kschl = 'JSEP'
OR kschl = 'JSEI'.
l_kbetr = ( wa_komv-kbetr / 10 ).
l_gr_secs = ( l_kbetr * l_gr_excise ) / 100.
ENDLOOP.
Calculating The VAT/CST --Sales Tax
DATA l_gr_vatcst TYPE ekpo-netpr.
CLEAR: l_kbetr, l_gr_vatcst.
LOOP AT it_komv INTO wa_komv WHERE kschl = 'JVRN'
OR kschl = 'JVRD'
OR kschl = 'JVCS'
OR kschl = 'JVCD'
OR kschl = 'JVCN'
OR kschl = 'JIPS'
OR kschl = 'JIPC'
OR kschl = 'JIPL'.
l_kbetr = ( wa_komv-kbetr / 10 ).
l_gr_vatcst = ( ( l_basic_gr_val + l_gr_excise + l_gr_eces + l_gr_secs ) * l_kbetr ) / 100.
ENDLOOP.
Calculating The NOMVL & NOMVR -- NOM Value (Setoff / Inventory ) & NOM Rate
DATA: l_netpr TYPE ekpo-netpr,
l_menge TYPE ekpo-menge,
l_dcost TYPE ekpo-netwr,
l_nomvl TYPE ekpo-netwr,
l_nomrt TYPE ekpo-netwr.
l_netpr = itab-netpr.
l_menge = itab-menge.
l_dcost = itab-dcost.
CLEAR: l_nomvl, l_nomrt.
LOOP AT it_komv INTO wa_komv WHERE kschl = 'JMOP' "------setoff
OR kschl = 'ZECE'
OR kschl = 'JSEP'.
l_nomvl = ( l_netpr * l_menge ) + l_gr_vatcst + l_dcost - ( l_gr_excise + l_gr_eces + l_gr_secs ).
l_nomrt = l_nomvl / l_menge.
ENDLOOP.
LOOP AT it_komv INTO wa_komv WHERE kschl = 'JMIP' "-------inventory
OR kschl = 'ZECN'
OR kschl = 'JSEI'.
l_nomvl = ( l_netpr * l_menge ) + l_gr_vatcst + l_dcost.
l_nomrt = l_nomvl / l_menge.
ENDLOOP.
itab-exbed = l_gr_excise + l_gr_eces + l_gr_secs.
itab-stax = l_gr_vatcst.
itab-nomvl = l_nomvl.
itab-nomrt = l_nomrt.
MODIFY itab .
CLEAR itab.
ENDLOOP. " end of itab
LOOP AT itab WHERE exbed = 0.
itab-nomvl = ( itab-netpr * itab-menge ) + itab-stax + itab-dcost.
itab-nomrt = itab-nomvl / itab-menge.
MODIFY itab INDEX sy-tabix TRANSPORTING nomvl nomrt.
ENDLOOP.
*----- Calculating The Budget Rate, Moving Average Price, Landed Rate & Material Description
DATA: verp(15).
DATA: matdes(40).
LOOP AT itab.
SELECT SINGLE zplp1 FROM mbew INTO itab-zplp1
WHERE matnr = itab-matnr AND bwkey = itab-werks.
SELECT SINGLE verpr FROM mbew INTO itab-verpr
WHERE matnr = itab-matnr AND bwkey = itab-werks.
itab-lrate = itab-netwr / itab-menge.
SELECT SINGLE maktx FROM makt INTO itab-maktx
WHERE matnr = itab-matnr AND spras = 'EN'.
MODIFY itab INDEX sy-tabix TRANSPORTING zplp1 verpr lrate maktx.
verp = itab-verpr.
matdes = itab-maktx.
ENDLOOP.
*----- Calculating The Budget Value & Variance
LOOP AT itab.
itab-bgval = itab-zplp1 * itab-menge.
itab-varnc = itab-bgval - itab-nomvl.
MODIFY itab INDEX sy-tabix TRANSPORTING bgval varnc.
ENDLOOP.
*------ Calculating Total of Quantity
DATA: BEGIN OF i_quan OCCURS 1,
quant LIKE ekpo-menge,
unit LIKE ekpo-meins,
nomvl LIKE ekpo-netwr,
curr LIKE ekko-waers,
varnc LIKE ekpo-netwr,
bgval LIKE ekpo-netwr,
END OF i_quan.
LOOP AT itab.
MOVE itab-menge TO i_quan-quant.
MOVE itab-meins TO i_quan-unit.
MOVE itab-nomvl TO i_quan-nomvl.
MOVE itab-waers TO i_quan-curr.
MOVE itab-varnc TO i_quan-varnc.
MOVE itab-bgval TO i_quan-bgval.
COLLECT i_quan.
ENDLOOP.
CLEAR itab.
CLEAR i_quan.
DATA: qty(15).
DATA: unt(3).
DATA: wtd TYPE p DECIMALS 2.
DATA: wtd2(15).
DATA: cur(3).
DATA: var(15).
DATA: nomvl(15).
DATA: bgval(15).
DATA: bgv TYPE p DECIMALS 2.
DATA: bgv2(15).
LOOP AT i_quan.
qty = i_quan-quant.
unt = i_quan-unit.
cur = i_quan-curr.
var = i_quan-varnc.
bgval = i_quan-bgval.
nomvl = i_quan-nomvl.
wtd = nomvl / qty.
bgv = bgval / qty.
ENDLOOP.
CLEAR i_quan.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DATA DISPLAY *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wa_fieldcat-fieldname = 'EBELN'.
wa_fieldcat-seltext_l = 'Purchase Order'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 1.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'BEDAT'.
wa_fieldcat-seltext_l = 'PO Date'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 2.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'NAME1'.
wa_fieldcat-seltext_l = 'Vendor Name'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 3.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'WERKS'.
wa_fieldcat-seltext_l = 'Plant'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 4.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'MENGE2'.
wa_fieldcat-fieldname = 'MENGE'.
wa_fieldcat-seltext_l = 'Quantity'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 5.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'NETPR2'.
wa_fieldcat-fieldname = 'NETPR'.
wa_fieldcat-seltext_l = 'Basic Rate'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 6.
wa_fieldcat-do_sum = ' '.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'EXBED'.
wa_fieldcat-seltext_l = 'Excise'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 7.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'STAX'.
wa_fieldcat-seltext_l = 'Sale Tax'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 7.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'DCOST'.
wa_fieldcat-seltext_l = 'Delivery Cost'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 8.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'NETWR'.
wa_fieldcat-seltext_l = 'Landed Value'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 9.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'LRATE'.
wa_fieldcat-seltext_l = 'Landed Rate'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 10.
wa_fieldcat-do_sum = ' '.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'NOMVL'.
wa_fieldcat-seltext_l = 'NOM Value'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 12.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'NOMRT'.
wa_fieldcat-seltext_l = 'NOM Rate'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 13.
wa_fieldcat-do_sum = ' '.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'BGVAL'.
wa_fieldcat-seltext_l = 'Budget Value'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 11.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'ZPLP1'.
wa_fieldcat-seltext_l = 'Budget Rate'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 12.
wa_fieldcat-do_sum = ' '.
APPEND wa_fieldcat TO gt_fieldcat.
wa_fieldcat-fieldname = 'VARNC'.
wa_fieldcat-seltext_l = 'Variance'.
wa_fieldcat-tabname = 'ITAB'.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 13.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO gt_fieldcat.
wa_layout-colwidth_optimize = 'X'.
wa_layout-zebra = ' '.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gt_events[].
READ TABLE gt_events WITH KEY name = slis_ev_end_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE 'END_OF_PAGE' TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
READ TABLE gt_events WITH KEY name = slis_ev_end_of_list
INTO ls_event.
IF sy-subrc = 0.
MOVE 'END_OF_LIST' TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
gd_prntparams-reserve_lines = '7'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
i_callback_top_of_page = 'TOP-OF-PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
i_callback_html_end_of_list = 'END_OF_LIST_HTML'
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
is_layout = wa_layout
it_fieldcat = gt_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = 'X'
IS_VARIANT =
it_events = gt_events
IT_EVENT_EXIT =
is_print = gd_prntparams
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*& Form top-of-page
text
--> p1 text
<-- p2 text
FORM top-of-page .
ALV Header Declarations
DATA: t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
wa_header1 TYPE slis_listheader,
wa_header2 TYPE slis_listheader,
wa_header3 TYPE slis_listheader,
wa_header4 TYPE slis_listheader.
Title
wa_header-typ = 'H'.
wa_header-info = 'Purchase Variance Report'.
APPEND wa_header TO t_header.
CLEAR wa_header.
Material
SHIFT p_matnr LEFT DELETING LEADING '0'.
wa_header1-typ = 'S'.
wa_header1-info = ' '.
CONCATENATE 'Material : ' p_matnr matdes INTO wa_header1-info SEPARATED BY space.
APPEND wa_header1 TO t_header.
CLEAR wa_header1.
Plant
IF ( s_werks-low IS NOT INITIAL AND s_werks-high IS NOT INITIAL ).
wa_header2-typ = 'S'.
wa_header2-info = ' '.
CONCATENATE 'Plant : ' s_werks-low 'to' s_werks-high INTO wa_header2-info SEPARATED BY space.
APPEND wa_header2 TO t_header.
CLEAR wa_header2.
ELSEIF ( s_werks-low IS NOT INITIAL AND s_werks-high IS INITIAL ).
wa_header2-typ = 'S'.
wa_header2-info = ' '.
CONCATENATE 'Plant : ' s_werks-low INTO wa_header2-info SEPARATED BY space.
APPEND wa_header2 TO t_header.
CLEAR wa_header2.
ELSEIF ( s_werks-low IS INITIAL AND s_werks-high IS INITIAL ).
EXIT.
ENDIF.
Period
IF ( s_bedat-low IS NOT INITIAL AND s_bedat-high IS INITIAL ).
wa_header4-typ = 'S'.
wa_header4-info = ' '.
CONCATENATE 'Period : '
s_bedat-low+6(2) '.'
s_bedat-low+4(2) '.'
s_bedat-low(4) INTO wa_header4-info SEPARATED BY space.
APPEND wa_header4 TO t_header.
CLEAR wa_header4.
ELSE.
IF ( s_bedat-low IS INITIAL AND s_bedat-high IS INITIAL ).
wa_header4-typ = 'S'.
wa_header4-info = ' '.
CONCATENATE 'Period : '
s_bedat-low+6(2) '.'
s_bedat-low+4(2) '.'
s_bedat-low(4)
'to'
s_bedat-high+6(2) '.'
s_bedat-high+4(2) '.'
s_bedat-high(4) INTO wa_header4-info SEPARATED BY space.
APPEND wa_header4 TO t_header.
CLEAR wa_header4.
ENDIF.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
ENDFORM. " top-of-page
*& Form end_of_list_html
output at the end of the list - not in printed output *
FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
DATA: ls_text TYPE sdydo_text_element,
l_grid TYPE REF TO cl_gui_alv_grid,
f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
DATA: qty1 TYPE sdydo_text_element.
DATA: unt1 TYPE sdydo_text_element.
DATA: wtd1 TYPE sdydo_text_element.
DATA: cur1 TYPE sdydo_text_element.
DATA: var1 TYPE sdydo_text_element.
DATA: verp1 TYPE sdydo_text_element.
DATA: bgv1 TYPE sdydo_text_element.
qty1 = qty.
unt1 = unt.
wtd1 = wtd.
cur1 = cur.
var1 = var.
verp1 = verp.
bgv1 = bgv.
ls_text = 'SUMMARY'.
CALL METHOD end->add_text
EXPORTING
text = ls_text
sap_emphasis = 'strong'.
Total Qty Bought (start new line)
CALL METHOD end->new_line.
CALL METHOD end->add_text
EXPORTING
text = 'Total Qty Bought : '.
CALL METHOD end->add_text
EXPORTING
text = qty1.
CALL METHOD end->add_text
EXPORTING
text = unt1.
Wtd. Avg. Purchase Rate
CALL METHOD end->new_line.
CALL METHOD end->add_text
EXPORTING
text = 'Wtd. Avg. Purchase Rate : '.
CALL METHOD end->add_text
EXPORTING
text = cur1.
CALL METHOD end->add_text
EXPORTING
text = wtd1.
Wtd. Avg. Budget Rate
CALL METHOD end->new_line.
CALL METHOD end->add_text
EXPORTING
text = 'Wtd. Avg. Budget Rate : '.
CALL METHOD end->add_text
EXPORTING
text = cur1.
CALL METHOD end->add_text
EXPORTING
text = bgv1.
Gain / Loss
CALL METHOD end->new_line.
CALL METHOD end->add_text
EXPORTING
text = 'Gain / Loss : '.
CALL METHOD end->add_text
EXPORTING
text = cur1.
CALL METHOD end->add_text
EXPORTING
text = var1.
MAP ( Moving Average Price )
CALL METHOD end->new_line.
CALL METHOD end->add_text
EXPORTING
text = 'Mov Avg Price : '.
CALL METHOD end->add_text
EXPORTING
text = cur1.
CALL METHOD end->add_text
EXPORTING
text = verp1.
ENDFORM. "end_of_list_html.
*& Form END_OF_PAGE
FORM end_of_page.
DATA: listwidth TYPE i,
ld_pagepos(10) TYPE c,
ld_page(10) TYPE c.
wtd2 = wtd.
bgv2 = bgv.
CONDENSE qty.
CONDENSE unt.
CONDENSE wtd2.
CONDENSE bgv2.
CONDENSE var.
CONDENSE verp.
SKIP.
WRITE:/ 'SUMMARY:'.
write:/ sy-uline(7).
WRITE:/ 'Total Qty Bought : ', qty, unt.
WRITE:/ 'Wtd. Avg. Purchase Rate : ', wtd2, cur.
WRITE:/ 'Wtd. Avg. Budget Rate : ', bgv2, cur.
WRITE:/ 'Gain / Loss : ', var, cur.
WRITE:/ 'Mov Avg Price : ', verp, cur.
ENDFORM. "END_OF_PAGE
*& Form END_OF_LIST
FORM end_of_list.
DATA: listwidth TYPE i,
ld_pagepos(10) TYPE c,
ld_page(10) TYPE c.
wtd2 = wtd.
bgv2 = bgv.
CONDENSE qty.
CONDENSE unt.
CONDENSE wtd2.
CONDENSE bgv2.
CONDENSE var.
CONDENSE verp.
SKIP.
WRITE:/ 'SUMMARY:'.
write:/ sy-uline(7).
WRITE:/ 'Total Qty Bought : ', qty, unt.
WRITE:/ 'Wtd. Avg. Purchase Rate : ', wtd2, cur.
WRITE:/ 'Wtd. Avg. Budget Rate : ', bgv2, cur.
WRITE:/ 'Gain / Loss : ', var, cur.
WRITE:/ 'Mov Avg Price : ', verp, cur. -
Header Pricing conditions in BAPI function module
I am using BAPI function module BAPI_SALESDOCU_CREATEFROMDATA1 to create sales orders through program.
It is working fine with item level pricing conditions.
But my requirement is ... I need to update few pricing conditon types in item level and one in header level.
Could you please help me where I need to pass header pricing conditions. Please help me.
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
EXPORTING
SALESDOCUMENT = SALESDOCUMENT
SALES_HEADER_IN = SALES_HEADER_IN
SALES_HEADER_INX =
SENDER =
BINARY_RELATIONSHIPTYPE = 'VORL'
INT_NUMBER_ASSIGNMENT = ' '
IMPORTING
SALESDOCUMENT_EX = SALESDOCUMENT_EX
TABLES
RETURN = RETURN
SALES_ITEMS_IN = SALES_ITEMS_IN
SALES_ITEMS_INX =
SALES_PARTNERS = SALES_PARTNERS
SALES_SCHEDULES_IN = SALES_SCHEDULES_IN
SALES_SCHEDULES_INX =
SALES_CONDITIONS_IN = SALES_CONDITIONS_IN.
SALES_CFGS_REF =
SALES_CFGS_INST =
SALES_CFGS_PART_OF =
SALES_CFGS_VALUE =
SALES_CFGS_BLOB =
SALES_CCARD =
KEY_TABLE =
Thanks in advance.
RaghuIf the correct configuration allows for manual entry of the condition type you want to populate, You can map your value using
' ORDER_CONDITIONS_IN' . If item level map line number, cond step number of the condition type in your pricing procedure, your condition type you are using, condition value you are sending into the system, currency, and cond unit. If it is a header condition, then send in 000000 as the item number. You can also consider using BAPI_SALESORDER_CREATEFROMDAT2 -
Function Module for Sales items condition types
Hi,
I would like to get Sales item amount details based on condition types tax or discount.
Is there any function module to output amount for sales item and condition type.
Thanks in advance for your help.
Thanks,
Ramanahi
i have vbeln and posnr
my requirement is to calculate repricing for sales order.
i am having problem with function pricing means what parameters to be passed in komp and komk structure.
can you plz send me sample code if possible?
thankx in advance. -
Functional module for determining the sales tax code
Dear all,
Kindly help me is there any Functional module to determine the sales tax code?
My Requirement is Based on the Country, Sales Org and Tax code Pricing should pick up automatically.
I tried adding the same fields in the table and inserted in the access sequence and created the condition record for the same.
Created the order but system is not able to get the Tax code while determining the price?
Please help ...
Regards,
SKMy Requirement is Based on the Country, Sales Org and
Tax code Pricing should pick up automatically
but system is not able to get the Tax code while determining the price?
Your both the above comments are contradict to each other. In the first statement, you say pricing should pick up automatically whereas, in the next statement, you say tax code is not determining. Please indicate the requirement clearly.
thanks
G. Lakshmipathi -
Function module for Sales Deal Determination
Hi,
could any body suggest the function module used for sales deal determination.
Regards,
PradeepSales Deal Determination is part of SD pricing:
Section:
Data Determination in the Access:: Data Determination for Sales Deals.
This is a special data transfer technique used for sales deal data determination in SD pricing. You enable this by assigning condition class H (sales deal determination) in the condition type.
We need to read all sales deals of a particular sales deal type applicable for a particular customer.
We feel there would be specific function module defined for this in SAP. -
IF statement in Standard function module PRICING
Hi,
In standard function module PRICING
I found one if statement like this.
if xkomv-kntyp na '1$' .
Plz tell me the meaning of thai '1$' value.
Regards,
Upender Verma.Hi,
NA means Contains Not Any ..
if xkomv-kntyp na '1$' means .. xkomv-kntyp does not contain '1' or '$'.
Read help on comparision operator 'NA'
Regards,
Srini. -
IPC Pricing with AP 7.00 Database Access/Call function module user-exit
Hi experts,
we are running SAP ECO on SAP ECC 6.0 with IPC Pricing AP 7.00 running in the VMC.
I'm facing a new requirement. In an user-exit for requirements the access to the ABAP database is needed.
(I know that the SAP recommendation is, don't have access to database. But we need this functionality)
In ABAP it looks like:
select single * from a590
into LH_674_a590
where kappl = 'V'
and kschl = 'ZSPR'
and kunnr = komk-kunnr
and matnr = komp-matnr
and datbi >= komk-prsdt
and datab =< komk-prsdt.
Is there a possibility to implement the same SELECT in the Java-User-Exit?
Is there maybe the alternative to call a function module instead?
The database exits on the same application server on which the VMC runs.
If there is a possiblity can anyone provide me with sample coding or give an advice where to find samle coding?
I would prefer to call a functions module.
Thanks in adcance
Karl-WilhelmHi Shanto & Sumit,
Thanks for the inputs.
as per my understanding of the log
java.lang.IncompatibleClassChangeError: com.sap.leasing.pricing.tools.LeasingPricingTools: method getPricingConditionByConditionTypeName(Lcom/sap/spe/pricing/transactiondata/userexit/IPricingItemUserExit;Ljava/lang/String;)Lcom/sap/spe/pricing/transa ctiondata/IPricingCondition; used to be stati
error is thrown by the SAP standard user exit and because of which execution is failing in customer user exits and surprisingly we have not made any changes in both of them.
this was working earlier before upload.could this be because of the jar packaging.
how i can download the standard user exit com.sap.leasing.pricing.tools.LeasingPricingTools from crm
for further investigation.
Thanks,
Siddharth
Maybe you are looking for
-
How can I use Airport Extreme just as a file server - no wifi
I'm setting up a new Apple environment for an invalid music buff. Here are the components, all newly purchased. MacBook Pro Airport Extreme Airport Express I was handed a G-Drive with a large iTunes file collection on it. The user will have Comcast
-
How to synchronise the job processing from the program.
How to synbchronize the job processing when we are creating jobs from the program. Thanks, Ramana.
-
1. Subscriber – Employee Details has these three records 2. Call Details has these two records My main goal is to populate date diff in table 1 as 1 if "work order check in date" >= 3 of Aspect calender date from the 2nd table. The Problem i am faci
-
i returned my last iphone and got a new one. i rerecorded my voicemail greeting and set it as my voicemail greeting thing. but everytime someone calls me and it goes to my voicemail it doesnt give them the option to leave a voicemail. please help.
-
Can not change anything relating to users
I am running OS X Mavericks server. When I try to go into the "Users" pane to add a user, the buttons on the bottom left are completely greyed out. Also, when I try to edit an existing user, all of the fields are greyed out. I looked into my Admin us