Changing Net Price using bapi 'BAPI_PO_CREATE1'
Hi All,
I have a requirement to create the PO using BAPI .In this , the Net Price value is automatically updated from Info record.
Can any one pls suggest the procedure how to update this Net Price through a flat file , and not through the info record.
Thanks in advance...
Regards,
Sivani.
HI,
Try to set the IMPORT paramter NO_PRICE_FROM_PO = 'X'.
also if u want the data from the flat file collect the data from flat file to internal table.
loop through that internal table
call BAPI.
endloop.
Hope this solves ur problem
Thanks ,
Ruchi
Similar Messages
-
How to add net price in BAPI BAPI_PO_CREATE1
hi all:
when i use bapi BAPI_PO_CREATE1, i cannot add net price in PO. code is as follow.
*POPULATE ITEM DATA.
clear t_po_items.
t_po_items-po_item = v_poitem * 10.
t_po_items-material = SEQ_FILEH-matnr.
t_po_items-SHORT_TEXT = SEQ_FILEH-MAKTX.
t_po_items-plant = p_RESWK.
t_po_items-quantity = SEQ_FILEH-MENGE.
t_po_items-PO_UNIT = SEQ_FILEH-MEINS.
t_po_items-TRACKINGNO = SEQ_FILEH-BEDNR.
t_po_items-ACCTASSCAT = SEQ_FILEH-KNTTP.
t_po_items-ADMOI = SEQ_FILEH-ADMOI.
t_po_items-NET_PRICE = SEQ_FILEH-netpr.
t_po_items-PRICE_UNIT = SEQ_FILEH-peinh.
t_po_items-FREE_ITEM = ' '.
t_po_items-IR_IND = c_x.
APPEND t_po_items.
*POPULATE ITEM FLAG TABLE
clear t_po_itemsx.
t_po_itemsx-po_item = v_poitem * 10.
t_po_itemsx-po_itemx = c_x.
t_po_itemsx-material = c_x.
t_po_itemsx-SHORT_TEXT = c_x.
t_po_itemsx-plant = c_x.
t_po_itemsx-quantity = c_x.
t_po_itemsx-PO_UNIT = c_x.
t_po_itemsx-TRACKINGNO = c_x.
t_po_itemsX-ACCTASSCAT = c_x.
t_po_itemsx-tax_code = c_x.
t_po_itemsX-item_cat = c_x.
t_po_itemsx-ADMOI = c_x.
t_po_itemsX-IR_IND = c_x.
t_po_itemsx-NET_PRICE = c_x.
t_po_itemsx-PRICE_UNIT = c_x.
t_po_itemsX-PO_PRICE = c_x.
t_po_itemsx-FREE_ITEM = c_x.
APPEND t_po_itemsx.
any advice?Hi Gang LI,
Try by adding this to
t_po_items-po_price = '2'. ( 1 = Gross, 2 = Net price ) -
How to change net Price by using BAPI_PO_change
Hi experts..
How i can change net price by using bapi_po_change.
What parameters i have to pass in this fm.
if possible please tell me , which table this FM will update.
Thanks.
I will award points for all help.See the below code and have tested and it works great..
REPORT ZTEST_PG_07 NO STANDARD PAGE HEADING
MESSAGE-ID z9_msg_prash.
Tables Declaration ****
TABLES: ekpo.
Variables Declaration ****
DATA: v_purchaseorder TYPE bapimepoheader-po_number.
DATA: v_ebelp TYPE ekpo-ebelp.
Constants Declaration ****
CONSTANTS: x VALUE 'X'.
Internal Tables Declaration ****
DATA: it_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
DATA: it_poitem TYPE STANDARD TABLE OF bapimepoitem WITH HEADER LINE.
DATA: it_poitemx TYPE STANDARD TABLE OF bapimepoitemx WITH HEADER LINE.
DATA: wa_return TYPE bapiret2.
Selection Screen ****
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p_ebeln LIKE ekpo-ebeln OBLIGATORY.
PARAMETERS: p_ebelp LIKE ekpo-ebelp.
PARAMETERS: p_menge LIKE ekpo-menge.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN
AT SELECTION-SCREEN ON p_ebeln.
IF p_ebeln IS NOT INITIAL.
SELECT SINGLE ebeln INTO v_purchaseorder FROM ekpo
WHERE ebeln = p_ebeln.
IF sy-subrc <> 0.
MESSAGE e002.
ENDIF.
ELSE.
MESSAGE e005.
ENDIF.
AT SELECTION-SCREEN ON p_ebelp.
if p_ebeln is not initial.
IF p_ebelp IS NOT INITIAL.
SELECT SINGLE ebelp INTO v_ebelp FROM ekpo
WHERE ebeln = p_ebeln AND ebelp = p_ebelp.
IF sy-subrc <> 0.
MESSAGE e003.
ENDIF.
ELSE.
MESSAGE e006.
ENDIF.
endif.
START-OF-SELECTION
START-OF-SELECTION.
v_purchaseorder = p_ebeln.
it_poitem-po_item = p_ebelp.
it_poitem-quantity = p_menge.
it_poitem-net_price = '20.00'.
APPEND it_poitem.
it_poitemx-po_item = p_ebelp.
it_poitemx-po_itemx = x.
it_poitemx-quantity = x.
APPEND it_poitemx.
*&----Calling BAPI function module
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = v_purchaseorder
testrun = x
TABLES
return = it_return
poitem = it_poitem
poitemx = it_poitemx.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = space
IMPORTING
RETURN =
END-OF-SELECTION
END-OF-SELECTION.
LOOP AT it_return INTO wa_return.
WRITE:/ wa_return-message.
ENDLOOP.
Thanks
Seshu -
Recreating duty calculations for PO for changed Net price of an item.
Dear Friends,
i am trying to simulate the duty values for a PO by calling the FM's in the below said order.
it is working fine, when i am simply passing the actual value of the item via structure (gfl_komp) shown below.
My requirement is like, i want to change the net price in the item structure (gfl_komp) and recalculate based on the changed Net Price. But when i change the Net value, it is not getting reflected in the simulated value of FM 'Pricing_screen'.
Is there anything i should pass to the header structure (gfl_komk). Please help me out.
CALL FUNCTION 'ME_FILL_KOMK_PO'
EXPORTING
i_ekko = gfl_ekko
i_ekpo = gfl_ekpo_pass
i_lfa1 = gfl_lfa1
i_t001 = gfl_t001
i_kalsm = gfl_ekko-kalsm
i_kappl = 'M'
I_EGIMP = I_EGIMP
I_LFM1 = I_LFM1
I_T001W = I_T001W
I_TRTYP = I_TRTYP
I_WEDATEN = I_WEDATEN
I_KVORG = I_KVORG
IMPORTING
e_komk = gfl_komk
CALL FUNCTION 'ME_FILL_KOMP_PO'
EXPORTING
i_ekpo = gfl_ekpo_pass
i_t001w = gfl_t001w
i_ekko = gfl_ekko
i_komk = gfl_komk
I_MT06E = I_MT06E
I_EINE = I_EINE
I_EINA = I_EINA
I_PREISFINDUNGSMENGE = I_PREISFINDUNGSMENGE
I_UEBPO = I_UEBPO
IMPORTING
e_komp = gfl_komp
Here i am trying to change the values of the actual PO values in gfl_komk and gfl_komp.
CALL FUNCTION 'PRICING_SCREEN'
EXPORTING
comm_head_i = gfl_komk
comm_item_i = gfl_komp
COMM_TEXT = ''
DISPLAY_ONLY = ''
MATERIAL_TEXT = ''
TRTYP_I = 'A'
FPTYP_I = ''
CTRL_NO_DISPLAY = CTRL_NO_DISPLAY
REQUEST_POS1 = '-'
REQUEST_POSM = '-'
REQUEST_POSP = '-'
REQUEST_POSL = '-'
IMPORTING
COMM_HEAD_E = COMM_HEAD_E
COMM_ITEM_E = COMM_ITEM_E
CALCULATION_TYPE = CALCULATION_TYPE
FCODE_E = FCODE_E
TABLES
tkomv = git_tkomv
SVBAP = SVBAP
CHANGING
C_VFKOMV = C_VFKOMV
ENDCASE.
ENDIF.
Regards,
Sandeep Sivan
Edited by: sandeep sivan on Apr 13, 2010 11:32 AM
Edited by: sandeep sivan on Apr 13, 2010 11:32 AM
Edited by: sandeep sivan on Apr 13, 2010 11:37 AM
Edited by: sandeep sivan on Apr 13, 2010 11:47 AMhi sirnivas..
Thanq you for the points..these are the first i ever recieved..
if you are working on peice of code which can get the price history do me a favour if you have finished the code just explain it to me who did u do that...
i have been working on an object from last two weeks to get the latest price...
the thing is even though the price for condition items has been changed it wont get updated in the Sales orders unless new pricing fot the document is done...
so i have to get all the sales orders who condition items price has been changed and display them in an ALV...so if you can get the exact old values...for the conditions i guess the opposite also can be done.....
Here i have suggestion for you...in condition items there is a process called SCHEMA ( pricing Schema) which you can see using Condition Analysis button at the bottom of the condition item window...
you can see all the price changes to the condition when you parse the tree structure of the procedure..EXAMPLE :- R0000 etc...
so some Sales orders if the Schema has been changed all the existing condition are replaced by New ones from the changed Schema...so i guess that would play an important role in deciding the Price of Sales order...
I know this is bit long but .....if you did finsish your program do let me know how you did it...
Thankyou very much and good luck. -
Please provide me how change the Materil using BAPI...?
Hi Guru's,
could please provide me how change the Materil using BAPI...
please provide the BPAI name and step by step process...
if ou provide any program logic that would be helpfull to me...
thanks in advance
Srinivas....Hi,
THis is code .
*& Report Zs_MATMAS_BAPI
*& This program demonstrates how easy it is to create Material master
*& data using BAPI_MATERIAL_SAVEDATA
*& The program also generates a report post-execution displaying errors
*& as well as successful uploads
REPORT Zs_MATMAS_BAPI.
TABLES
FLAGS *
DATA: F_STOP. " Flag used to stop processing
DATA DECLARATIONS *
DATA : V_EMPTY TYPE I, " No. of empty records
V_TOTAL TYPE I. " Total no. of records.
STRUCTURES & INTERNAL TABLES
*BAPI structures
DATA: BAPI_HEAD LIKE BAPIMATHEAD, " Header Segment with Control Information
BAPI_MAKT LIKE BAPI_MAKT, " Material Description
BAPI_MARA1 LIKE BAPI_MARA, " Client Data
BAPI_MARAX LIKE BAPI_MARAX, " Checkbox Structure for BAPI_MARA
BAPI_MARC1 LIKE BAPI_MARC, " Plant View
BAPI_MARCX LIKE BAPI_MARCX, " Checkbox Structure for BAPI_MARC
BAPI_MBEW1 LIKE BAPI_MBEW, " Accounting View
BAPI_MBEWX LIKE BAPI_MBEWX, " Checkbox Structure for BAPI_MBEW
BAPI_RETURN LIKE BAPIRET2. " Return Parameter
*--- Internal table to hold excel file data
DATA: IT_INTERN TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
*--- Internal table to hold Matetrial descriptions
DATA: BEGIN OF IT_MAKT OCCURS 100.
INCLUDE STRUCTURE BAPI_MAKT.
DATA: END OF IT_MAKT.
*--- Internal to hold the records in the text file
DATA : BEGIN OF IT_DATA OCCURS 100,
WERKS(4), " Plant
MTART(4), " Material type
MATNR(18), " Material number
MATKL(9) , " Material group
MBRSH(1), " Industry sector
MEINS(3), " Base unit of measure
GEWEI(3), " Weight Unit
SPART(2), " Division
EKGRP(3), " Purchasing group
VPRSV(1), " Price control indicator
STPRS(12), " Standard price
PEINH(3), " Price unit
SPRAS(2), " Language key
MAKTX(40), " Material description
END OF IT_DATA.
SELECTION SCREEN. *
SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT " Input File
'C:\Material_master.XLS'.
PARAMETER : P_MAX(4) OBLIGATORY DEFAULT '100'. " no.of recs in a session
PARAMETERS: P_HEADER TYPE I DEFAULT 0. " Header Lines
PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
SELECTION-SCREEN END OF BLOCK SCR1.
AT SELECTION-SCREEN *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
*--- Validating file
PERFORM VALIDATE_FILE USING P_FILE.
START-OF-SELECTION
START-OF-SELECTION.
*--- Perform to convert the Excel data into an internal table
PERFORM CONVERT_XLS_ITAB.
IF NOT IT_DATA[] IS INITIAL.
*--- Perform to delete Header lines
PERFORM DELETE_HEADER_EMPTY_RECS.
ENDIF.
END OF SELECTION. *
END-OF-SELECTION.
*--- Perform to upload Material Master data
PERFORM UPLOAD_MATMAS.
Form : validate_input_file
Description : To provide F4 help for file if read from PC
FORM VALIDATE_FILE USING F_FILE TYPE RLGRAP-FILENAME.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
FILE_NAME = F_FILE
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2.
IF SY-SUBRC 0.
MESSAGE S010(ZLKPL_MSGCLASS). " 'Error in getting filename'.
ENDIF.
ENDFORM. " validate_input_file
*& Form CONVER_XLS_ITAB
text
FORM CONVERT_XLS_ITAB.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = P_FILE
I_BEGIN_COL = P_BEGCOL
I_BEGIN_ROW = P_BEGROW
I_END_COL = P_ENDCOL
I_END_ROW = P_ENDROW
TABLES
INTERN = IT_INTERN.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*--- Perform to move the data into an internal data
PERFORM MOVE_DATA.
ENDFORM. " CONVERT_XLS_ITAB
*& Form MOVE_DATA
text
FORM MOVE_DATA.
DATA : LV_INDEX TYPE I.
FIELD-SYMBOLS <FS>.
*--- Sorting the internal table
SORT IT_INTERN BY ROW COL.
CLEAR IT_INTERN.
LOOP AT IT_INTERN.
MOVE IT_INTERN-COL TO LV_INDEX.
*--- Assigning the each record to an internal table row
ASSIGN COMPONENT LV_INDEX OF STRUCTURE IT_DATA TO <FS>.
*--- Asigning the field value to a field symbol
MOVE IT_INTERN-VALUE TO <FS>.
AT END OF ROW.
APPEND IT_DATA.
CLEAR IT_DATA.
ENDAT.
ENDLOOP.
ENDFORM. " MOVE_DATA
*& Form DELETE_HEADER_EMPTY_RECS
To delete the Header and empty records
FORM DELETE_HEADER_EMPTY_RECS.
DATA: LV_TABIX LIKE SY-TABIX.
IF NOT P_HEADER IS INITIAL.
LOOP AT IT_DATA.
IF P_HEADER > 0 AND NOT IT_DATA IS INITIAL.
DELETE IT_DATA FROM 1 TO P_HEADER.
P_HEADER = 0.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
CLEAR IT_DATA.
*--- To delete the empty lines from internal table
LOOP AT IT_DATA.
LV_TABIX = SY-TABIX.
IF IT_DATA IS INITIAL.
V_EMPTY = V_EMPTY + 1.
DELETE IT_DATA INDEX LV_TABIX..
ENDIF.
ENDLOOP.
CLEAR IT_DATA.
*--- Total no of recs in file
DESCRIBE TABLE IT_DATA LINES V_TOTAL.
IF V_TOTAL = 0.
MESSAGE I013(ZLKPL_MSGCLASS). " No records in the file
F_STOP = 'X'.
STOP.
ENDIF.
ENDFORM. " DELETE_HEADER_EMPTY_RECS
*& Form UPLOAD_MATMAS
to upload Material Master data
FORM UPLOAD_MATMAS .
LOOP AT IT_DATA.
Header
UNPACK IT_DATA-MATNR TO IT_DATA-MATNR.
BAPI_HEAD-MATERIAL = IT_DATA-MATNR.
BAPI_HEAD-IND_SECTOR = IT_DATA-MBRSH.
BAPI_HEAD-MATL_TYPE = IT_DATA-MTART.
BAPI_HEAD-BASIC_VIEW = 'X'.
BAPI_HEAD-PURCHASE_VIEW = 'X'.
BAPI_HEAD-ACCOUNT_VIEW = 'X'.
Material Description
REFRESH IT_MAKT.
IT_MAKT-LANGU = IT_DATA-SPRAS.
IT_MAKT-MATL_DESC = IT_DATA-MAKTX.
APPEND IT_MAKT.
Client Data - Basic
BAPI_MARA1-MATL_GROUP = IT_DATA-MATKL.
BAPI_MARA1-BASE_UOM = IT_DATA-MEINS.
BAPI_MARA1-UNIT_OF_WT = IT_DATA-GEWEI.
BAPI_MARA1-DIVISION = IT_DATA-SPART.
BAPI_MARAX-MATL_GROUP = 'X'.
BAPI_MARAX-BASE_UOM = 'X'.
BAPI_MARAX-UNIT_OF_WT = 'X'.
BAPI_MARAX-DIVISION = 'X'.
Plant - Purchasing
BAPI_MARC1-PLANT = IT_DATA-WERKS.
BAPI_MARC1-PUR_GROUP = IT_DATA-EKGRP.
BAPI_MARCX-PLANT = IT_DATA-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
Accounting
BAPI_MBEW1-VAL_AREA = IT_DATA-WERKS.
BAPI_MBEW1-PRICE_CTRL = IT_DATA-VPRSV.
BAPI_MBEW1-STD_PRICE = IT_DATA-STPRS.
BAPI_MBEW1-PRICE_UNIT = IT_DATA-PEINH.
BAPI_MBEWX-VAL_AREA = IT_DATA-WERKS.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-PRICE_UNIT = 'X'.
*--- BAPI to create material
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
HEADDATA = BAPI_HEAD
CLIENTDATA = BAPI_MARA1
CLIENTDATAX = BAPI_MARAX
PLANTDATA = BAPI_MARC1
PLANTDATAX = BAPI_MARCX
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
STORAGELOCATIONDATA =
STORAGELOCATIONDATAX =
VALUATIONDATA = BAPI_MBEW1
VALUATIONDATAX = BAPI_MBEWX
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA = BAPI_MVKE1
SALESDATAX = BAPI_MVKEX
STORAGETYPEDATA =
STORAGETYPEDATAX =
IMPORTING
RETURN = BAPI_RETURN
TABLES
MATERIALDESCRIPTION = IT_MAKT
UNITSOFMEASURE =
UNITSOFMEASUREX =
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
IF BAPI_RETURN-TYPE = 'E'.
WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,IT_DATA-MATNR.
ELSEIF BAPI_RETURN-TYPE = 'S'.
WRITE: 'Successfully created material' ,IT_DATA-MATNR.
ENDIF.
ENDLOOP.
ENDFORM. " UPLOAD_MATMAS
Thanks
Sarada -
Change vendor address using bapi
Hi all,
How to change vendor address using bapi.
The address,and vendornumber coming from XL file.
Based on the vendor number I want to change the address.
Please give me the example.
regards,
rakesh.Hi Vijay,
Please help me in the following.
As Vendor/Customer Master dont have all the address fields ( like Street4-5), we use FM BAPI_ADDRESSORG_SAVEREPLICA to overcome this problem.
In my case i have created one Custom load program to upload address data using
BAPI_ADDRESSORG_SAVEREPLICA and then LSMW project to upload rest of the data.
In this case when i upload rest of the data by LSMW using BI standard program ( having NODATA indicator "/" in my source file for the fields already uploaded using BAPI above) , address data which uploaded through FM should get populate automatically (by concept of Central Address management) but in my case <b>for some of the Account Group it is not getting populated,</b> please suggest.
regards
Sonal -
Update delivery address in PO using BAPI BAPI_PO_CREATE1
Hi,
I want to update the delivery address of line item using BAPI BAPI_PO_CREATE1. I am creating address using BAPI BAPI_ADDRESSORG_SAVEREPLICA and I am sending the address number in the import parameter POADDRDELIVERY but it is not updating the delivery address.
Regards,
Anil N.Hi.
after called the BAPI BAPI_PO_CREATE1 call the FM BAPI_TRANSACTION_COMMIT.
it will work
regards
Marco -
*Is it possible to change NET PRICE of Service PO after Invoice.*
if it is possible can you please mention what are ways to change NET price after INVOICE
I would suggest Forum "ERP - Logistics Materials Management (MM)":
SAP ERP - Logistics Materials Management (SAP MM)
But I believe you should try Forum Search beforehand:
http://forums.sdn.sap.com/search!default.jspa -
Quantity conversion error in net price calculation in BAPI_PO_CREATE1
I'm creating PO from BAPI_PO_CREATE1 .here i'm getting follwing error
quantity conversion error in net price calculation.
plz guide me to remove it.Are you using quantities directly entered by the user while calling the function to do the net price calculation? If that is the case, you should use FM CONVERSION_EXIT_ALPHA_INPUT to convert the quantity from the external format into the internal one!
Another possibility is that some customizing is missing for converting quantities in different unit of measures (like the quantity in pieces is known, but the pricing calculation is being done on kilos.. but the convertion between these 2 unit of measures is missing).
Good luck! -
Is there any transaction that will change net price in a purchase order
Hi All,
Is there any program / transaction where i can change the net price for few materials in the purchase orders (say 100 purchase orders) which has been created few days back. Please let me know at the earliest.
Regards,
PSSHi,
By changing the price in the Info Record price condition it is possible to made to reflect the same in PO Net Price through Automatic document Adjustment.
MEI1 & MEI2 are used for Invidual & Mass processing.
Its applicable to Vendor / Material combination i.e. Info Record.
Regards,
Ramesh -
How create a purchase order without imputation using bapi: BAPI_PO_CREATE1
Hello Forum
I have an request for purchase order with imputation K (cost center, EBAN-KNTTP). During the liberation of the request for purchase order, and using the Bapi: BAPI_PO_CREATE1, I want to create a Purchase Order without imputation (imputation empty or charge empty).
The system displays the following error: The request for purchase order, item (position) 10, is attributed to another order...
I imagine that is because the request for purchase order has imputation (charged) K and the purchase order will have no type of imputation (imputation empty).
However, manually, Yes, I can create the purchase order. That is, I first release, the request for purchase order. Then I create the order of purchase using ME21 and with reference to request for purchase order, and when SAP returns the items of the request for purchase order, I manually remove the imputation K, and these items to become the purchase order.
Please support me want to know how to resolve this case, why can not I create a purchase order without imputation to from the request for purchase order with imputation K, using Bapi
Thank you.
Greetings,Hi,
In the item overview of the purchase order creation screen (ME21N), you have a column Purchasing Doc and next it item no. You can give the existing purchase order number here with item no which will create a purchase order, and changes can be made wherever you require.
Hope this helps.
Thanks
Krishna. -
Changing requisition limits using BAPI
Hi Experts,
I want to change the valuation price in a purchase req using BAPI_PR_CHANGE .
the line has account assignment category 'K' (no material) .
i tried inserting the price using field : preq_price in PRITEM table , but it won't let me . (i used it for a regular req. - with material and it worked fine).
i know that in order to change the price in the ME52N screen ,we need to use the field : overall limits , in limits tab.
how do i change the price with the BAPI ? (or is there another bapi i can use ? )
thanks, Nirit .Did you use BAPI_TRANSACTION_COMMIT after BAPI_PO_CHANGE.
Look also at this <a href="http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm">Sample Abap code on BAPI_PO_CHANGE</a>
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
PURCHASEORDER = T_POHEADER-PO
POHEADER = T_BAPI_POHEADER
POHEADERX = T_BAPI_POHEADERX
TABLES
RETURN = T_BAPIRETURN
POITEM = T_BAPI_POITEM
POITEMX = T_BAPI_POITEMX.
READ TABLE t_bapireturn WITH KEY type = c_err TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x.
ENDIF.
Regards -
Updating Material Master Moving Average Price using BAPI
Hi,
We need to create a program using which we can update material master moving average price for a specific material.
For this we are using BAPI_MATERIAL_SAVEDATA.
when we are executing this bapi with inputs, it is showing data updated or created but when we are checking it in MAterial Master the data (MOving Price ) is not getting updated.
Please advise,
Thanks.I am trying to use BAPI_MATVAL_PRICE_CHANGE to change the price of a material in material master
(The moving average price [MAP] in Accounting View 1)
Using the BAPI, I enter
--> RFC target are
-> Material No.
-> Valuation Area
--> Prices table (I enter the new price that i want)
when I run the BAPI, i get error message (This can be seen in the returns table)
ID --> CKMLSENDPRICE
MESSAGE NUMBER --> 701
DETAILS --> No customizing data for Valuation Area XXXX found
PLease advise. -
Changing Payment terms using Bapi
Hi Gurus,
I want to change the Payment terms in Purchase order / Scheduling agreement Using Bapi.
I used BAPI_PO_CHANGE.but Payment terms are not updating.
Useful Answers will be rewarded with Points.Did you use BAPI_TRANSACTION_COMMIT after BAPI_PO_CHANGE.
Look also at this <a href="http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm">Sample Abap code on BAPI_PO_CHANGE</a>
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
PURCHASEORDER = T_POHEADER-PO
POHEADER = T_BAPI_POHEADER
POHEADERX = T_BAPI_POHEADERX
TABLES
RETURN = T_BAPIRETURN
POITEM = T_BAPI_POITEM
POITEMX = T_BAPI_POITEMX.
READ TABLE t_bapireturn WITH KEY type = c_err TRANSPORTING NO FIELDS.
IF sy-subrc NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = c_x.
ENDIF.
Regards -
How can forbid changing data when using BAPI 'BAPI_MATERIAL_SAVEREPLICA'?
I am using BAPI 'BAPI_MATERIAL_SAVEREPLICA' to creat material master data in batch.
But this BAPI also can be used for change mode.
How to forbid the change of MAT data when use this BAPI?
TKS a lot~~
I am looking foward to your response~~~you have to find out what the user did before your program goes ahead and starts the BAPI.
Maybe you are looking for
-
What is the "protected_media" folder and why can't I access it?
I was going through File Manager and saw a folder called "protected_media". Trying to open it gives me a "Folder Unavailable: You don't have permission to access this folder" message. Why do I have this folder and why can't I access it? Also, what is
-
I deleted my icloud backup by mistake how i can return it
dear all.... I bought the new iphone and i want to trasfer my icloud backup to new iphone but by mistake i deleted icloud backup before transfer the data then when i make setup to new iphone and choose make restore from i cloud backup they told me no
-
PLSQL Collections and record types
Hi, I'm trying to use collection in my code in 10g database declare cursor c_cur is select * from table; TYPE tbl_cur_lines IS TABLE OF c_cur%ROWTYPE INDEX BY BINARY_INTEGER; l_cur_rec tbl_cur_lines; begin OPEN c_cur; FETCH c_cur BULK
-
What CPU is in the N900?
I seem to recall that it has an ARM chip inside, but I could be wrong. I hope so, as Apple are looking like they want to buy the company, which would cause problems for Nokia and others... Apple Looking to buy ARM If tnis post is a cure to your issue
-
Firefox keeps forgetting the Zoom setting per page...
Hi! While surfing the archives of the Dilbert cartoons, I have to zoom in on the sunday cartoon otherwise it is too small. But Firefox 4 keeps forgetting the zoom setting. Everytime I click the next cartoon or even refresh the page the setting is bac