‎2009 Jul 31 7:20 AM
Dear ABAPers,
I am working on creating the purchase order using BAPI.In that i am facing the Problem while giving the condition type.If anybody have done the program creating the Purchase order with condtion types help me to solve this problem.
Thanks & Regard,
Ashok.
‎2009 Jul 31 7:31 AM
Hi,
First you creat a PO using BAPI_PO_CREATE , once PO is created then you use the FM BAPI_PO_CHANGE and update the condtions in PO. See the code below given.
Fm lt_cond-condition_no = lvc_knumv.
lt_cond-itm_number = gt_output-ebelp.
lt_cond-cond_type = 'FRB1'.
lt_cond-cond_st_no = '020'.
lt_condx-condition_no = lvc_knumv.
lt_condx-itm_number = gt_output-ebelp.
lt_condx-itm_numberx = 'X'.
lt_condx-cond_st_no = lt_cond-cond_st_no.
lt_condx-cond_st_nox = 'X'.
lt_condx-cond_type = 'X'.
lt_cond-cond_value = gt_output-frcst.
lt_condx-cond_value = 'X'.
lt_cond-currency = p_cndcur.
lt_condx-currency = 'X'.
lt_cond-vendor_no = gt_output-frvndr.
lt_condx-vendor_no = 'X'.
lt_cond-change_id = 'I'.
lt_condx-change_id = 'X'.
APPEND lt_cond.
APPEND lt_condx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = gt_output-ebeln
TABLES
return = lt_return
* poitem = lt_poitem
* poitemx = lt_poitemx
pocond = lt_cond
pocondx = lt_condx.Thanks.
‎2010 Jan 19 12:17 PM
Hi,
Thank you very much for your valuable reply.
Thanks & Regards,
Ashok.
‎2010 Apr 26 5:17 AM