‎2009 Aug 07 8:30 AM
Hi experts,
i've searched for a function wich are doing same job like VK11. I've found BAPI_PRICES_CONDITIONS but it does not meet my requirements. My condition price have two fields: customer (KUNNR) and manufacturer (MFRNR).
There is something in SAP for creating condition records? And if yes, how can i use it according to my condition price fields (KUNNR and MFRNR)?
Thanks in advance.
‎2009 Aug 07 8:40 AM
check program RV14BTCI ( Batch Input )..
check the documentation for this program
‎2009 Aug 07 9:02 AM
try the Function Grp : CND_PRICES_INBOUND
See if it suits ur requirements
-Raj
‎2009 Aug 07 10:20 AM
Hi Dan,
Not sure of any BAPI for VK11, but long back I used below code from standard program for IDoc.
Attaching you the snippet of the code.. hope it helps...
You need to populate the Idoc... as follows:
E1KOMG: Filter segment with separated condition key i_idoc_data-segnam = 'E1KOMG'.
Segment E1KONH - condition header i_idoc_data-segnam = 'E1KONH'.
Segment E1KONP - condition items i_idoc_data-segnam = 'E1KONP'.
and then Post Idoc for Creating Pricing Condition
----
FORM post_idoc
TABLES i_idoc_data STRUCTURE edidd.
*-- Local data declaration
DATA: lv_komg LIKE komg, " Condition Structures
lv_subrc LIKE sy-subrc, " Sy-subrc
lw_messages TYPE rsuvm_msg, " Message Description
lw_idoc_status TYPE bdidocstat. " ALE IDoc status
DATA: idoc_contrl " IDoc Control data
LIKE edidc OCCURS 1 WITH HEADER LINE.
*-- Initialize Internal Tables
CLEAR: t_konh,
t_konp,
t_konm,
t_konw,
i_idoc_status,
t_kona.
REFRESH: t_konh,
t_konp,
t_konm,
t_konw,
i_idoc_status,
t_kona,
i_messages.
************************************************************************
This code is taken from IDOC_INPUT_COND_A
************************************************************************
PERFORM fill_appl_structures(saplvkoi)
TABLES i_idoc_data
t_konh
t_konp
t_konm
t_konw
i_idoc_status
t_kona
USING lv_komg
lv_subrc
idoc_contrl-docnum
idoc_contrl-mestyp.
IF lv_subrc = 0.
************************************************************************
This code is taken from IDOC_INPUT_COND_A
************************************************************************
PERFORM idoc_in_datenbank(saplvkoi)
TABLES idoc_contrl
t_konh
t_konp
t_konm
t_konw
i_idoc_status
t_kona
USING lv_komg
lv_subrc
idoc_contrl-docnum.
IF lv_subrc = 0.
COMMIT WORK AND WAIT.
flg_condition = c_x.
*--added
Hope this Helps, (If moderator does not reject this code for you)
Manish