Bapi to update 'plan fixed cost' using KP06 tranaction
Hi All,
Am updating Plan fixed cost depending on cost element using KP06 transaction.
Could you please suggest a Bapi for doing the same because sometimes BDC is creating some issues .
your help is highly appreciated.
Thanks,
Ravi.
Hi Saha,
In KP06, you have to key in plan value manually, account wise. You do not have to go any where. Before that you need to decide the planner profile thru KP04.
You can take the Variance report, in case after planning the actual fixed cost has been posted.
Hope this solves your query
Regards
Bharat
Similar Messages
-
Hi All,
In transaction KP06, when you go to period screen, there is a field Plan Fixed Costs. I need to get the value in this field. Anyone knows which table contain this data?
Thanks in advance....
Naba.
Message was edited by:
n. saha
Message was edited by:
n. saha
Message was edited by:
n. sahaHi Saha,
In KP06, you have to key in plan value manually, account wise. You do not have to go any where. Before that you need to decide the planner profile thru KP04.
You can take the Variance report, in case after planning the actual fixed cost has been posted.
Hope this solves your query
Regards
Bharat -
BAPI to update planned price 2
Dear All,
Could some one tell the BAPI to update the planned price 2 ( Costing view of MM) ?
Thanks,
RamHi Ram
Why not use Lsmw? It will be less expensive
Typically, you can use any Bapi that changes the material masters. You can search it in the T Code BAPI
Also, if you have few materials, use MM17 or MASS and copy paste from excel into it
Br. AjayM -
Bapi to post planned delivery cost of a purchase order
Hi every body,
Can anybody please give me the full details of the planned delivery cost data
to post with BAPI_INCOMINGINVOICE_CREATE
what are the manditory fields,
I am using the following code , but a few are posting , remaining r not posting
but when I post the same through MIRO it is posted what is difference
this error was came
ERROR: enter good reciept data only when working with GR-based IV
REPORT ZBAPI_MIRO .
tables: ekko,ekbe,ekpo,lfa1,EKBZ,t000.
data: itemdata like BAPI_INCINV_CREATE_ITEM occurs 0 with header line,
headerdata like BAPI_INCINV_CREATE_HEADER occurs 0 with header line,
return like BAPIRET2 occurs 0 with header line,
DOC_NO LIKE BAPI_INCINV_FLD-INV_DOC_NO,
FISC_YEAR LIKE BAPI_INCINV_FLD-FISC_YEAR.
DATA:error_flag.
data: item_data like EK08BN occurs 0 with header line.
data: begin of itab occurs 0,
p_order like ekpo-ebeln,
p_item like ekpo-ebelp,
p_ctype like konv-kschl,
p_lifnr like lfa1-lifnr,
end of itab.
data: order(10) type N,
vendor(10) type N.
data: begin of it_doc occurs 0,
DOC_NO LIKE BAPI_INCINV_FLD-INV_DOC_NO,
p_order like ekko-ebeln,
end of it_doc.
PARAMETERS: fn LIKE rlgrap-filename OBLIGATORY.
DATA: FN1 TYPE STRING,
l .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR fn. "p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
field_name = 'FN'
IMPORTING
file_name = fn.
START-OF-SELECTION.
FN1 = FN.
PERFORM upload.
loop at itab.
CLEAR: EKBZ,EKPO,LFA1,ITEM_DATA,HEADERDATA,itemdata.
REFRESH:itemdata,HEADERDATA,ITEM_DATA.
order = itab-p_order.
itab-p_order = order.
vendor = itab-P_lifnr.
itab-p_lifnr = vendor.
select single * from ekbz where ebeln = order
and ebelp = itab-p_item
and kschl = itab-p_ctype
and bewtp = 'F'.
select single * from ekpo where ebeln = order
and ebelp = itab-p_item.
SELECT SINGLE * FROM LFA1 WHERE LIFNR = vendor.
clear: item_data.
refresh:item_data.
call function 'ME_READ_COND_INVOICE'
exporting
I_BUDAT =
I_EBELN = itab-p_order
I_EBELP = itab-p_item
I_FRBNR = ' '
i_lifnr = ' '
I_XBLNR = ' '
RE_KURSF =
RE_WAERS =
I_RESWK = ' '
I_EKKI = 'X'
I_BUBIS =
RE_WWERT =
XEK08B_FLAG =
I_BELNR =
I_BUZEI =
I_READ_KRUEK = ' '
I_DISPLAY = ' '
TABLES
XEK08BN = item_data
XEK08BN_CURR =
read table item_data with key kschl = itab-P_ctype.
headerdata-INVOICE_IND = 'X'.
headerdata-DOC_TYPE = 'KR'.
headerdata-DOC_DATE = ekbz-budat.
headerdata-PSTNG_DATE = SY-DATUM.
headerdata-REF_DOC_NO = itab-P_ORDER.
headerdata-COMP_CODE = 'HPL'.
headerdata-DIFF_INV = itab-p_lifnr.
headerdata-CURRENCY_ISO = ekbz-waers.
headerdata-GROSS_AMOUNT = item_data-WEWWR - item_data-AREWR .
headerdata-BLINE_DATE = SY-DATUM.
headerdata-DEL_COSTS_TAXC = 'V0'.
headerdata-PO_REF_NO = itab-P_ORDER.
headerdata-bus_area = 'OTHR'.
headerdata-ITEM_TEXT = LFA1-NAME1.
*headerdata-HEADER_TXT = .
headerdata-ALLOC_NMBR = itab-P_ORDER.
APPEND HEADERDATA.
CLEAR HEADERDATA.
itemdata-INVOICE_DOC_ITEM = '00001' .
itemdata-PO_NUMBER = itab-P_ORDER.
itemdata-PO_ITEM = itab-P_ITEM.
*itemdata-REF_DOC = ekbz-belnr.
itemdata-REF_DOC_YEAR = ekbz-gjahr.
itemdata-REF_DOC_IT = itab-P_ITEM.
itemdata-TAX_CODE = 'V0'.
itemdata-ITEM_AMOUNT = item_data-WEWWR - item_data-AREWR .
itemdata-QUANTITY = item_data-BPWEM - item_data-BPREM .
itemdata-PO_UNIT = ekpo-meins.
itemdata-PO_PR_UOM = ekpo-meins.
itemdata-COND_TYPE = itab-P_CTYPE.
*itemdata-ITEM_TEXT = .
append itemdata.
clear itemdata.
CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
EXPORTING
HEADERDATA = HEADERDATA
IMPORTING
INVOICEDOCNUMBER = DOC_NO
FISCALYEAR = FISC_YEAR
TABLES
ITEMDATA = ITEMDATA
ACCOUNTINGDATA = I_ACCOUNTINGDATA
TAXDATA = I_TAX
RETURN = RETURN.
if sy-subrc <> 0.
message e999(re) with 'Problem occured'.
else.
loop at return.
if not return is initial.
clear bapi_retn_info.
move-corresponding return to bapi_retn_info.
if return-type = 'A' or return-type = 'E'.
error_flag = 'X'.
endif.
append bapi_retn_info.
endif.
endloop.
if error_flag = 'X'.
message e999(re) with 'Problem occured'.
rollback work.
else.
Return Table from BAPI call is empty
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = RETURN.
endif.
endif.
write:/ 'Document no :', doc_no.
it_doc-doc_no = doc_no.
it_doc-p_order = itab-p_order.
append it_doc.
CLEAR IT_DOC.
endloop.
loop at it_doc.
if it_doc-doc_no = ' '.
write:/ 'purchase order not posted ' , it_doc-p_order.
else.
write:/ 'document no:' , it_doc-doc_no, 'p.order:' , it_doc-p_order.
endif.
endloop.
*& Form upload
text
--> p1 text
<-- p2 text
form upload .
CALL function 'GUI_UPLOAD'
exporting
filename = FN1
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = ' '
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = ITAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
endform. " uploadI think you need to implement user-exit EXIT_SAPMM06E_012 of enhancement MM06E005.
Look in OSS with seach term MM06E005 to get some examples.
Note310154 "ME21N/ME51N: Customer-specific check, generating error log" has some examples.
You should use the macros to set errors/warnings
Example:
mmpur_business_obj_id pt_ekpo-id.
mmpur_metafield mmmfd_partners.
mmpur_message_forced 'W' '00' '208' text-001 '' '' ''.
regards,
JG -
How to update Planned PGI dates using FM: WS_DELIVERY_UPDATE_2
Hi,
I have a requirement to update the Planned PGI dates (LIKP-WADAT) of all deliveries in a given shipment with the NEWLY selected Scheduled pick-up date.
I have found the FM 'WS_DELIVERY_UPDATE_2' can be used. Can anyone help me with the parameters to be passed?
Thanks in Advance,
QureshHiren Chitalia's answer was copied from the question asked here: WS_DELIVERY_UPDATE_2 VBFA entry created and has been rejected, the points removed.
May I remind all forum contributers that posting just links, or copy pasting other people's work, is not permitted.
matt -
Cost center planning data-Plan Variable Costs in Object Currency
Dear All:
I have copied a standard planning layout and for the field, 'Planned Fixed Cost' and 'Planned Variable Cost', I have selected 'Plan Variable Costs in Object Currency' and 'Plan Fixed Costs in Object Currency' as the Key Figure.
I am doing this because our Controlling Area currency is TWD and the other company will upload the planning data in RMB .
However when I do the above settings and try to save, I am getting the following errors.
The column 'Plan Fixed Costs in Object Currency' can input correctly but the column 'Plan Variable Costs in Object Currency' canu2019t be update in KP06 .
ex.
Planner profile: SAPALL
layout :1-101
I can't update the column "Plan Variable Costs "
I copy the layout 1-101 and change the column to 'Plan Fixed Costs in Object Currency' and it still can't input variable cost
BR,
CarolHi Carol
I have done this many times and never faced this issue
Just delete the copied layout and Copy it again from 1-101....
May be delete the existing columns of the layout and choose the desired key figure of object currency
Then assign the layout to Planner Profile
Regards
Ajay M -
MIRO planned delivery cost and document reference
Hi
I create a purchase order with one position including the planned delivery with flag Indicator: GR-Based Invoice Verification. OK
I create the good receive with reference to purchase order: in Migo I update field xblnr Number of External Delivery Note. OK
I enter an invoice to reference to purchase order number including the planned delivery costs using transaction MIRO: SAP enter the document and in RSEG update 2 record: on first record (refer to material) the field rseg - LBRNR (material document GR) and the field rseg - XBLNR are update BUT on second position (refer planned delivery cost) the fiel rseg - LBRNR (material document GR) and the field rseg - XBLNR are missing.
I wanti to updat it. Is it possible?
TKSHelp me....
-
Function modules or BAPI for deleting plan costs on a cost center
Hi all,
I search for a function module or bapi to delete plan costs / activity on a cost center.
At the moment I update the planning with 0, but that cause a mass of needles entries on the cost centers.
For check and posting I use the function group 6026 - BAPI_COSTACTPLN_* ,
but there is no function for deleting.
Has anyone an idea?
Thx for help - points as reward !check
BAPI_COSTACTPLN_POSTACTINPUT Activity Input Planning: Posting
BAPI_COSTACTPLN_POSTACTOUTPUT Activity/Price Planning: Posting
BAPI_COSTACTPLN_POSTKEYFIGURE Stat. Key Figure Planning: Postings
BAPI_COSTACTPLN_POSTPRIMCOST Primary Cost Planning: Postings
BAPI_PDTRANSCO_POSTPRIMCOST Transfer of Planning Data: Post Primary Costs
K40C CO Actual Postings, Manual
BAPI_ACC_PRIMARY_COSTS_POST Accounting: Post Primary Costs
BAPI_COPAACTUALS_POSTCOSTDATA BAPI Operating Concern: Post Costing-Based Actua
BAPI_PRIM_COST_CHECK_AND_POST Primary Costs: Formal Parameter Check
S@meer -
BAPI / FM to update planning hierarchy details
Hi,
I need to update planning hierarchy details. Please suggest.
I see some forums where they say there is no BAPI or FM. I also saw one where it said the BDC did not work.
Have anyone done updation on planning hierarchy details?
I would also like to know if it is a better idea to update the table directly.[For example: if i need to update details in table S350, can i just a update statement on that table].
Thanks in advance.
Regards
Shanthi
Edited by: shanthi v on Sep 28, 2010 8:14 AMHi,
I used update on the table directly. It's not a good idea but i was not able to find any FM or BAPI.
Thanks -
Function modules or BAPI for posting plan costs for WBS Element
Hi all,
Does anyone know, whether there exists a function module or BAPI for posting plan costs to a WBS Element? K_COSTS_PLAN_PS does not work, because RKP1 is not allowed.
Greetingscheck
BAPI_COSTACTPLN_POSTACTINPUT Activity Input Planning: Posting
BAPI_COSTACTPLN_POSTACTOUTPUT Activity/Price Planning: Posting
BAPI_COSTACTPLN_POSTKEYFIGURE Stat. Key Figure Planning: Postings
BAPI_COSTACTPLN_POSTPRIMCOST Primary Cost Planning: Postings
BAPI_PDTRANSCO_POSTPRIMCOST Transfer of Planning Data: Post Primary Costs
K40C CO Actual Postings, Manual
BAPI_ACC_PRIMARY_COSTS_POST Accounting: Post Primary Costs
BAPI_COPAACTUALS_POSTCOSTDATA BAPI Operating Concern: Post Costing-Based Actua
BAPI_PRIM_COST_CHECK_AND_POST Primary Costs: Formal Parameter Check
S@meer -
Planner group is not updated in service notification using BAPI
Hi,
Planner group is not updated in service notification using BAPI BAPI_ALM_ORDER_MAINTAIN.
I have written the below code, but planner group is not updated in the service notification.
Please advice which parameters do i need to pass to update planner group in the service notification.
wa_methods-refnumber = '000001'.
wa_methods-objecttype = 'PARTNER'.
wa_methods-method = 'CREATE'.
wa_methods-objectkey = wa_subscr1-aufnr.
APPEND wa_methods TO i_methods.
wa_methods-refnumber = '000002'.
wa_methods-objecttype = 'HEADER'.
wa_methods-method = 'CREATE'.
wa_methods-objectkey = wa_subscr1-aufnr.
APPEND wa_methods TO i_methods.
wa_methods-refnumber = '000000'.
wa_methods-objecttype = ' '.
wa_methods-method = 'SAVE'.
APPEND wa_methods TO i_methods.
REFRESH i_partner.
CLEAR wa_partner.
wa_partner-orderid = wa_subscr1-aufnr.
wa_partner-partn_role = 'VW'.
wa_partner-partn_role_old = ''.
wa_partner-partner = wa_subscr1-parnr.
wa_partner-partner_old = ''.
APPEND wa_partner TO i_partner.
REFRESH i_planrgrp.
CLEAR wa_planrgrp.
wa_planrgrp-orderid = wa_subscr1-aufnr.
wa_planrgrp-plangroup = wa_subscr1-ingpr.
APPEND wa_planrgrp TO i_planrgrp.
REFRESH i_planrgrp_up.
CLEAR wa_planrgrp_up.
wa_planrgrp_up-orderid = wa_subscr1-aufnr.
wa_planrgrp_up-plangroup = 'X'.
APPEND wa_planrgrp_up TO i_planrgrp_up.
*----Change order details with Technician name
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = i_methods
it_header = i_planrgrp
it_header_up = i_planrgrp_up
it_partner = i_partner
return = i_return.
Thanks & regards,
KrishnaTry this way
CALL FUNCTION 'BAPI_SERVNOT_CREATE'
EXPORTING
* EXTERNAL_NUMBER =
notif_type = 'S3'
notifheader = ls_notif_h
* TASK_DETERMINATION = ' '
* SENDER =
* ORDERID =
IMPORTING
NOTIFHEADER_EXPORT = ls_notif_e
TABLES
* NOTITEM =
* NOTIFCAUS =
* NOTIFACTV =
* NOTIFTASK =
* NOTIFPARTNR =
* LONGTEXTS =
* KEY_RELATIONSHIPS =
return = lt_return
* IF lt_return IS INITIAL. " <<< Comment this lie
read table lt_return into ls_return with key type = 'E'. " << Change
if sy-subrc ne 0. " << Change
COMMIT WORK AND WAIT.
write: / ls_notif_e-NOTIF_NO.
ELSE.
LOOP AT lt_return INTO ls_return.
WRITE:/ 'errors'.
* ls_return.
ENDLOOP.
endif.
a® -
Material Master: Update the Z fields using BAPI
Hi to all,
My requirement is simple. But I do not have much knowledge on BAPI. I have got some information that we can extend th BAPI and update the Z fields in material master. I have added the z fields in MARA. So when I call the bapi z fields has to get update.
Which BAPI can i use? I have got one BAPI - BAPI_MATERIAL_SAVEDATA. plz suggest me to do it.
1. how do i enhance the BAPI or extend th BAPI.
2. Is ther any approch to do it.
thnks
Yerukala SettyHi,
Append the z fields to BAPI_TE_MARA and BAPI_TE_MARAX structures using append structures.
Populate two structures for the fields in BAPI_TE_MARA and BAPI_TE_MARAX.
To BAPI_MATERIAL_SAVEDATA, under EXTENSIONIN parameters, pass structure name as BAPI_TE_MARA and Value Part1, 2, 3, 4 with the filled structure info.
Similarly append X structure as well.
Regards,
Ganga -
Updating T'code ME23N using BAPI's
Dear All,
I am updating T'code ME23N using BAPI " BAPI_PO_CHANGE". First i m tried in SE37 there its not updating it giving error like " PO could not be changed using the Enjoy-BAPI" for this i m trying in 4.6c.
Here i have to update only two check boxes those are NO_MORE_GR(ELIKZ) and FINAL_INV(EREKZ).
Please tell me any one there are any other BAPI's are avialable or how to slove this porblem.
Best Regards,
Srinivas.Hello
I just have run this code in 4.6C. It working fine.
DATA: xreturn like BAPIRET2 occurs 0 with header line,
xpoitem like BAPIMEPOITEM occurs 0 with header line,
xpoitemx like BAPIMEPOITEMX occurs 0 with header line.
xpoitem-po_item = p_ebelp. " set position here
xpoitem-no_more_gr = 'X'.
xpoitem-final_inv = 'X'.
append xpoitem.
xpoitemx-po_item = p_ebelp. " set position here
xpoitemx-no_more_gr = 'X'.
xpoitemx-final_inv = 'X'.
append xpoitemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = p_ebeln "set ebeln here
TABLES
return = xreturn
poitem = xpoitem
poitemx = xpoitemx.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING WAIT = 'X'.
endif. -
Report Painter - Use SKF to calc act/plan unit costs in CCtr report
Hi Report Painter Gurus,
I am an end user working with our Report Painter consultant and I have asked for a Cost Centre report with columns for Actual Costs, Actual Unit costs, Plan costs, Plan Unit costs for Month and Cumulative. I have seen this report in my previous business so I know it can be done but consultant says it's impossible.
The report I previously used had the SKF values at the bottom of the cost centre report and then the unit costs columns (both actual and plan) referenced these SKF cells in the formula which divided Cost by SKF.
We have created the SKF using KK01 and posted dummy amounts in KB31N but consultant says he cannot reference the SKF values in the formlas.
If you can spell it out to me (I have dabbled in Report Painter myself), then I am sure I can explain it to consultant.
Any help gratefully appreciated!
Cheers,
Matthew.Matthew,
I think it is quiet simple. When you add a column to the report painter report you can choose from the drop down menu for 'Basic Key figure' whether it is Costs, Activity quantity, Statistical quantities, etc.
So if you have a column with Costs (X1) and one more column with quantities (X2), you can easily come up with another 'formula' column and use the equation (X1/X2).
I think this should serve your purpose.
Best regards,
Vishal Thakur.
Edited by: Vishal Thakur on Mar 2, 2010 11:08 AM -
Planned delivery cost not updating Through Invoic02 idoc
Hi,
We are using Inbound IDOC (INVOIC02) to create invoice. The enhancement that we are looking to do is to use the indicator Goods/Service items + planned delivery costs which is seen when we manually post invoices using MIRO. Can you please let us know of any inputs in this regard.
For your information - the current functional module we are using to post invoices received through EDI is IDOC_INPUT_INVOIC_MRM and the message type is INVOIC. But this does not seem to help us in case of goods which has got a planned freight attached to it.
Thanks
ShasiHi Experts ,
Kaindly provide me your inputs ..
Thanks
Shasi
Maybe you are looking for
-
Hi, What exactly does Rollback do? I know that COMMIT applies the changes to the database system. The thing is, I've read that until commit is applied, the database in permanent storage is unchanged. So what exactly does a ROLLBACK "roll back"? D
-
Settlement rule not created automatically
HI All, Every time when i create a maintenance order , system did not create settlement rule automatically , when i click on settlement rule it ask with default or without default and cancel , when i click on with default the only settlement rule ge
-
Imported quick time movie frame rate
I have just used Quicktime to convert some old royalty free archive footage. When the conversion is done, the new movie is in the correct format for PAL at 25 frames per second. However, when I import into FCE4, the frame rate of the imported movie d
-
How to get Sims 3 for MacBook Pro?
So i have a MacBook Pro and I want to get Sims 3. Is there anywhere online where I can buy it and download instead of buying it as a disc? if so could anyone send me the link and also would I still be able to use the Sims 3 online downloadable conten
-
How to make emplyee category mandatory
Hi, I will make the emplyoee caterogry field in the assignment as mandatory. Please advice. I done follwowing: 1. Triger Event: when-validate-record 2. Trigger Object: ASSGT 3. in the action: Please enter a value for Employee Category as warning. But