How to change price of item using salesorder create bapi
hi all,
As per requirement i have to change price of the item while i am creating sales order using sales order create bapi. kindly tell me the process or if possible any sample program.
thanks in advance
thanks,
pavan
Message was edited by: pavan kumar pisipati
hi max ,
i created sales order using following code. from here onwords i have to update to change the price of the item. kindly do the needful. i am working 4.7 ides
<b>report zmybapi1 .
data : my_order_header_in like bapisdhd1 occurs 0 with header line,
my_order_header_ix like bapisdhd1x.
data : my_orderitemsin like bapisditm occurs 0 with header line,
my_orderitemsix like bapisditmx occurs 0 with header line.
data : my_order_partners like bapiparnr occurs 0 with header line.
data : my_return like bapiret2 occurs 0 with header line.
data : w_vbeln like bapivbeln-vbeln.
data:
my_orderschedulesin like bapischdl occurs 0 with header line,
my_orderschedulesinx like bapischdlx occurs 0 with header line.
start-of-selection.
this is to assign values to internal table my_order_header_in
my_order_header_in-doc_type = 'TA'.
my_order_header_in-sales_org = 'JNJ1'.
my_order_header_in-distr_chan = '02'.
my_order_header_in-division = 'J1'.
my_order_header_in-sales_off = 'JNJ1'.
my_order_header_in-purch_no_c = 'testbapipo'.
my_order_header_in-purch_date = sy-datum.
my_order_header_in-req_date_h = sy-datum.
append my_order_header_in.
this is to assign values to internal table my_orderitemsin
my_orderitemsin-material = '000000000000000727'.
my_orderitemsin-plant = 'JNJ1'.
my_orderitemsin-target_qu = 'EA'.
my_orderitemsin-target_qty = '50'.
append my_orderitemsin.
this is to assign values to internal table my_order_partners
my_order_partners-partn_role = 'AG'.
my_order_partners-partn_numb = '0000000011'.
append my_order_partners.
my_order_partners-partn_role = 'WE'.
my_order_partners-partn_numb = '0000000011'.
append my_order_partners.
This is to assign values to internal table my_orderschedulesin
my_orderschedulesin-itm_number = '10'.
my_orderschedulesin-req_qty = '10'.
append my_orderschedulesin.
my_orderschedulesin-itm_number = '20'.
my_orderschedulesin-req_qty = '20'.
append my_orderschedulesin.
my_order_header_ix-updateflag = 'I'.
my_order_header_ix-doc_type = 'X'.
my_order_header_ix-sales_org = 'X'.
my_order_header_ix-distr_chan = 'X'.
my_order_header_ix-division = 'X'.
my_order_header_ix-sales_off = 'X'.
my_order_header_ix-purch_no_c = 'X'.
my_order_header_ix-purch_date = 'X'.
my_order_header_ix-req_date_h = 'X'.
my_orderitemsix-updateflag = 'I'.
my_orderitemsix-material = 'X'.
my_orderitemsix-target_qty = 'X'.
my_orderitemsix-plant = 'X'.
my_orderitemsix-division = 'X'.
my_orderitemsix-target_qu = 'X'.
append my_orderitemsix.
my_orderschedulesinx-updateflag = 'I'.
my_orderschedulesinx-itm_number = 'X'.
my_orderschedulesinx-req_qty = 'x'.
append my_orderschedulesinx.
my_orderschedulesinx-itm_number = 'X'.
my_orderschedulesinx-req_qty = 'x'.
append my_orderschedulesinx.
call function 'BAPI_SALESORDER_CREATEFROMDAT2'
exporting
SALESDOCUMENTIN =
order_header_in = my_order_header_in
order_header_inx = my_order_header_ix
SENDER =
BINARY_RELATIONSHIPTYPE =
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
importing
salesdocument = w_vbeln
tables
return = my_return
order_items_in = my_orderitemsin
order_items_inx = my_orderitemsix
order_partners = my_order_partners
ORDER_SCHEDULES_IN = my_orderschedulesin
order_schedules_inx = my_orderschedulesinx
ORDER_CONDITIONS_IN =
ORDER_CONDITIONS_INX =
ORDER_CFGS_REF =
if sy-subrc ne 0.
write: my_return-message, my_return-number, my_return-type.
else.
call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
write: my_return-message, my_return-number, my_return-type.
endif.</b>
thanks,
pavan
Message was edited by: pavan kumar pisipati
Similar Messages
-
How to change arround 1500 items price in one times in vk11 tcode
Dear All,
can anybudy know How to change arround 1500 items price in one times in vk11 tcode
or any other method to change at a one time
Regards
Pritpal Mehruhello again, friend.
LSMW is a t-code and it is a tool for uploading master data and condition records. the general steps as follow:
1. execute t-code LSMW
2. after entering the title of the PROJECT, the system will ask you what transaction to record. in this case, it is VK11.
3. you will go through the process of creating a price condition record just like normal. after you finish the transaction, you will now select the fields that you will use for your template. you will have to take note of the technical names of the fields (online help will be available, so don't worry).
4. you will also specify the name of your template, which the system will use in the actual upload. at this point you can choose to save and work on your template in a separate screen.
5. now you create your price condition template in an EXCEL file. how many fields you specified in LSMW is how many columns you will need in the template. for example, you will have columns such as SALES ORGANIZATION, DISTRIBUTION CHANNEL, MATERIAL NUMBER, PRICE, VALIDITY DATES, etc. you then enter your data in this template. if you have 1500 prices, then your template will have 1500 or more lines.
6. after saving the template, you will save this into a delimited text file.
7. go back to your LSMW, select this file, process it. the system will do the VK11 for you using the info from your template.
try this in a sandbox of DEV environment. it is difficult only at the beginning. with practice it becomes easier. your customers will love you for it.
hope this helped. please reward if it did.
regards. thanks! -
How to change spare part item price in sap
Dear All,
Can you tell me how to change spare part item price in sap ,
like in our company hike new price of spare part item so how can update a new price in bluk order
thankx and Regards
PritpalHi,
Try MR21 & MR22.
First assign the appropriate G/L account against the account key for the same.
Regards,
Sourabh -
How to change the line item storage location during the sales order creatio
How to change the line item storage location during the sales order creatio
Hi Kumar,
I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
Regards,
Rachel -
How to change a text item to have a link that opens a different page?
Hi,
How to change a text item to have a link that opens a different page?
Thanks,
GuyHi Denes,
I understood what the code will do. But it did not work.
...a href="f?p=&APP_ID.:2:&SESSION.">LINK</a...
By default, P5_TASK_NAME displays Task Name which is passed from Page 3.
So I changed your code as follows so that P5_TASK_NAME value may be displayed with a link.
...a href="f?p=&APP_ID.:3:&SESSION.">:P5_TASK_NAME</a...
But P5_TASK_NAME value appears without any link and does not open page 3.
Then I created a new text item (display only) in the same HTML region in page 5 and entered the following code in the default box:
...a href="f?p=&APP_ID.:3:&SESSION.">LINK</a...
When I ran the application, it displayed the whole code as text.
How can I display P5_TASK_NAME value with a link to open page 3?
Would appreciate your help.
... to be replaced with < or >
Could you please let me know how to display link code correctly?
Thanks,
Guy
Edited by: GUY3 on Mar 11, 2009 4:20 PM -
How to add new line item using BAPI BAPI_CONTRACT_CHANGE for contract-ME32K
HI Experts,
how to add new line item using BAPI: BAPI_CONTRACT_CHANGE for existing contract.
Requirement:
Already the contract having two line items using ME31K.
Custom program has to add new line items in existing contract.
Thanks,
SendilI got the solution:
We can do like this:
1. Get all details using details, BAPI_CONTRACT_GETDETAIL.
2. After getting results, append new line item. Then use your BAPI.
Check this posting program.. where this bapi is used, use the same coding technique.
IDOC_INPUT_PURCONTRACT_CHANGE -
hello ! how to change document sizes and use our own size (not A3, A2 ...) thank you !
Experiment. No harm in trying.
If you are just starting to use Pages you need to make your own assessment given current events whether committing your work to a format and software given this support is a wise move.
You also need to look at what will produce workable results. Particularly if your large posters are to be commercially printed and contain large bitmap (photographic) images.
Always work backwards from your output. Ask your printer what they require to do their job.
Peter -
How to Change S960 Lockscreen wallpaper using own image?
Can anybody advise on how to change S960 lockscreen wallpaper using own image? I only manage to use the default or existing lockscreen wallpaper which appear in theme setting.
Hi all, the solution is very simple.Simply save the pictures that you want to use as your lockscreen into storage/sdcard0/Download/pictures/lockscreenYour lockscreen picture should be in 16:9 or (1920 x 1080 pixels). To set the pictures as your lockscreen, go to theme setings, swipe to the right and tap the lockscreen wallpaper option that is on the right (red box).You'll see all the lenovo default lockscreen wallpapers, as well as the lockscreen pictures that you saved. Just tap the picture and set as lockscreen wallpaper.
-
How to change the number im using on my messages?
how to change the number im using on my messages?
If you are asking about the telephone number, Messages/Preferences/Accounts/Messages account - click add e-mail and enter it.
-
How to change position for items in shopping cart
Hello,
I am creating shopping cart using flat file. But i am not able to change the position for items i.e. both items contain position as 0000000001.
Following are the item details of shopping cart which is created through portal. (from tcode BBP_PD)
Items:
Pos Type Quantity Unit Ordered_Prod Description Gross price
0000000001 1 EA keyboard 100,00
0000000002 1 EA CPU 1.000,00
Following are the item details of shopping cart which is created using flat file & BAPI BBP_PD_SC_CREATE.(from tcode BBP_PD)
Items:
Pos Type Quantity Unit Ordered_Prod Description Gross price
0000000001 1 EA MONITOR 1,00
0000000001 1 EA MONITOR 1,00
Position is not getting changed for item 2 & only first record is getting uploaded 2 times. My code is creating Shopping cart number .
Please tell me how to change position of each item.
Thanks & regards,
Edited by: Ketkee Bhale on Sep 14, 2011 3:58 PMModerator message - Cross post locked
Rob -
How to set price list to use in a Document
Hi all,
I have a simple question. I'm trying to insert a draft document into SAP B1 via DI API. I can't seem to find the correct property to set in order to change the price list to use for that draft.
Example: The price list in the Supplier BP is 'Price List 01' and I want to change it only for the current document to 'Price List 02'.
Can you guys help me?
Thanks.
Edited by: Pedro Magueija on Aug 28, 2009 6:11 PM
Edited by: Pedro Magueija on Aug 28, 2009 6:41 PMThat's too bad, since it is possible to do it in SAP B1.
OK, but since I can only change the price for the item, line by line is it possible to force a .UnitPrice = 0 and .PriceAfterVAT = 100.00?
The reason I ask is, the document I'm trying to insert get's it's prices from a source where only VAT included prices are present. So instead of the unit price, I want to set the price after VAT and have SAP B1 calculate the unit price.
I set the BP default price list to a list where no prices are defined, and it works. But has you can imagine, when doing a document in SAP B1 this will cause it to set the prices to 0 on the lines, and the users might get angry at it.
So if you guys have any ideas on how to go around this some other way, please do tell.
Thanks in advance. -
How to change price total for "Change Unit Cost Estimate Screen" for KKE1 Tcode ?
There is a requirement of bringing the Material Price in KKE1 while entering the Item Catogory M ( M for Material) from the Gross Price in the condition type (P001) that is entered in the Purchase order.Currently systems brings the material value from MAP(Moving average Price) in the Material Master data.
I have looked into the user exit 1) EXIT_SAPLKKEC_001 2) EXIT_SAPLKKEC_002 available in this T code KKE1.When I put break-point in these user-exit,it is not going in debugging mode while fetching the price value in Price total column for "Change Unit Cost Estimate" screen in KKE1.
How will change pricing condition for material in KKE1?
I want to change price condition for material as marked in red as shown in the screen-shot.
Where will write the code such that I will bring Price Total based on material number as shown in the image?Hi Ram,
I think you can do the same in thei manner.
Go to program SAPMV45A.
use menu GOTO -
> Text Elements----
>Text Symbols
Here make change of Text-002 Sold-To Party as saleable .
Regards,
Pravin -
How to Change a Sales Order using BAPI
Hi All
How can we change the sales document using BAPI as the requirement is
--> First we create a Sales order using a BAPI.
--> If the sales order is changed then we get the changed order information alonge with the old order data in a CSV file.
here i have the problem that we are uncertain which fields will be changed some times we may get the item changes or some times we may get the quantity changed information and some times the condition type may be changed . So how to handle this ?
Thanks,
ChindamHi,
try this
DATA: IT_MESSAGE TYPE STANDARD TABLE OF BAPIRET2,
WA_VBELN TYPE BAPIVBELN-VBELN.
DATA: WA_BAPIHEAD TYPE BAPISDH1,
WA_BAPIHEADX TYPE BAPISDH1X,
WA_HEADDATA TYPE BAPISDH1.
DATA: I_BAPIITEM TYPE STANDARD TABLE OF BAPISDITM,
WA_BAPIITEM TYPE BAPISDITM,
WA_DATA TYPE BAPISDITM,
I_BAPIITEMX TYPE STANDARD TABLE OF BAPISDITMX,
WA_BAPIITEMX TYPE BAPISDITMX.
CHANGE ITEM DATA
WA_BAPIITEM-ITM_NUMBER =WA_DATA-ITM_NUMBER.
WA_BAPIITEM-REASON_REJ = WA_DATA-REASON_REJ. "(REASON FOR REJECTION)
WA_BAPIITEMX-ITM_NUMBER = WA_DATA-ITM_NUMBER. "(ITEM NUMBER)
WA_BAPIITEMX-UPDATEFLAG = 'X'.
WA_BAPIITEMX-REASON_REJ = 'X'.
APPEND WA_BAPIITEM TO I_BAPIITEM.
APPEND WA_BAPIITEMX TO I_BAPIITEMX.
TO CHANGE HEADER DATA
WA_BAPIHEADX-UPDATEFLAG = 'U'.
WA_BAPIHEADX-DLV_BLOCK = 'X'.
WA_BAPIHEAD-SALES_ORG = WA_HEADDATA-SALES_ORG. "(COMPANY CODE)
WA_BAPIHEAD-DLV_BLOCK = WA_HEADDATA-DLV_BLOCK. "(DELIVERY BLOCK)
WA_VBELN = '0000000168'.
CALL BAPI AND PASS THE VALUE
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
SALESDOCUMENT = WA_VBELN " (SALES AND DOCUMENT NO)
ORDER_HEADER_IN = WA_BAPIHEAD
ORDER_HEADER_INX = WA_BAPIHEADX
TABLES
RETURN = IT_MESSAGE
ORDER_ITEM_IN = I_BAPIITEM
ORDER_ITEM_INX = I_BAPIITEMX
CLEAR IT_MESSAGE. -
How to change the storage location using BAPI_OUTB_DELIVERY_CHANGE
Hi !
I want to do batch split in the delivery using BAPI_OUTB_DELIVERY_CHANGE.
Can anyone tell me how to pass/change the storage location of each batch item.
Is there any other BAPI that can do the batch split and populate the storage location also for the split batches?
Regards,
Firoz.Hi all,
BAPI_OUTB_DELIVERY_CHANGE can be used to do batch split and updating storage loaction against each item of an outbond delivey.
I have done that in the folllowing way:
1 > Firstly i have updated the storage location for each delivery item using 'BAPI_OUTB_DELIVERY_CHANGE' passing some mininal parameters.
Fetch the item details from LIPS table based on the outbound delivery and pass the corresponding fields to item_data, item_control and item_data_spl parameters and passed into intenal table li_lips.
Loop at li_lips inti lw_lips.
lw_item_data-deliv_numb = lw_lips-vbeln.
lw_item_data-deliv_item = lw_lips-posnr.
lw_item_data-material = lw_lips-matnr.
lw_item_data-fact_unit_nom = lw_lips-umvkz.
lw_item_data-fact_unit_denom = lw_lips-umvkn.
lw_item_data-base_uom = lw_lips-meins.
lw_item_data-sales_unit = lw_lips-vrkme.
lw_item_control-deliv_numb = lw_lips-vbeln.
lw_item_control-deliv_item = lw_lips-posnr.
lw_item_data_spl-deliv_numb = lw_lips-vbeln.
lw_item_data_spl-deliv_item = lw_lips-posnr.
lw_item_data_spl-pick_denial = 'X'.
lw_item_data_spl-stge_loc = v_lgort.
"(This would be your Storage Location which you want to be updated)
Appending work areas into internal table to pass as parameter
APPEND lw_item_data_lgort TO li_item_data_lgort .
Appending work areas into internal table to pass as parameter
APPEND lw_item_control_lgort TO li_item_control_lgort.
Appending work areas into internal table to pass as parameter
APPEND lw_item_data_spl_lgort TO li_item_data_spl_lgort.
endloop.
Passing the delivery no in the work area of header data
lw_header_data-deliv_numb = v_delivery_no.
lw_header_control-deliv_numb = v_delivery_no.
lw_header_tech_control-upd_ind = 'U'.
Calling BAPI to change the Storage location
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
EXPORTING
header_data = lw_header_data
header_control = lw_header_control
delivery = v_delivery_no
techn_control = lw_header_tech_control
TABLES
item_data = li_item_data
item_control = li_item_control
return = li_return_change
item_data_spl = li_item_data_spl.
Calling BAPI to committ the task
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
2> Then i have used the same BAPI again 'BAPI_OUTB_DELIVERY_CHANGE' to do the batch split/update batch only(if required) and change the Actual Delivered Quantity.
Here you have to pass the same thing along with actual delivery qauntity and different batches to do batch split.
Here it is assumed that Batch numbers, actual delivered quantity are coming from an internal table i_lqua.
Looping through Internal table to get Bin details
LOOP AT i_lqua INTO w_lqua .
Clearing work area before use
CLEAR : lw_item_data, lw_lips, lw_item_control, lw_item_data_spl.
Reading table comparing metrial number
READ TABLE li_lips INTO lw_lips
WITH KEY matnr = w_lqua-matnr BINARY SEARCH.
If read is successful, passing values from table
IF sy-subrc EQ 0.
Passing the delivery details into Item level table
lw_item_data-deliv_numb = lw_lips-vbeln.
lw_item_data-deliv_item = lw_lips-posnr.
lw_item_data-material = lw_lips-matnr.
lw_item_data-batch = w_lqua-charg.
lw_item_data-dlv_qty = w_lqua-verme.
lw_item_data-dlv_qty_imunit = w_lqua-verme.
lw_item_data-base_uom = w_lqua-meins.
lw_item_data-hieraritem = lw_lips-posnr.
lw_item_data-usehieritm = 1.
lw_item_data-fact_unit_nom = lw_lips-umvkz.
lw_item_data-fact_unit_denom = lw_lips-umvkn.
lw_item_data-sales_unit = lw_lips-vrkme.
lw_item_control-deliv_numb = lw_lips-vbeln.
lw_item_control-deliv_item = lw_lips-posnr.
lw_item_control-chg_delqty = 'X'.
lw_item_data_spl-deliv_numb = lw_lips-vbeln.
lw_item_data_spl-deliv_item = lw_lips-posnr.
lw_item_data_spl-stge_loc = w_lqua-lgort.
lw_item_data_spl-pick_denial = 'X'
Appending work area into internal table to pass as parameter
APPEND lw_item_data TO li_item_data.
Appending work area into internal table to pass as parameter
APPEND lw_item_control TO li_item_control.
Appending work area into internal table to pass as parameter
APPEND lw_item_data_spl TO li_item_data_spl.
Clearing work areas after use
CLEAR : lw_item_data, w_lqua,lw_item_data_spl,lw_item_control,
lw_vbpok, lw_lips.
ENDIF.
ENDLOOP.
Passing the delivery no in the work area of header data
lw_header_data-deliv_numb = v_delivery_no.
lw_header_control-deliv_numb = v_delivery_no.
lw_header_tech_control-upd_ind = 'U'.
Calling BAPI to change the Batch/Batch-Split/Delivery Quantity
CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
EXPORTING
header_data = lw_header_data
header_control = lw_header_control
delivery = v_delivery_no
techn_control = lw_header_tech_control
TABLES
item_data = li_item_data
item_control = li_item_control
return = li_return_change
item_data_spl = li_item_data_spl.
Calling BAPI to committ the task
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
This is the only way which i found as better way to do the Batch split and updating storage location togetherly.
I hope this code will help you. -
I have an HP photosmart 2610 4 in1. How can I scan multiple items and put them in the same attachment using e-mail? Using my laptop.
Hi @needyrhelp,
Welcome to the HP Forums!
I see that you are wondering how to scan multiple items using your HP photosmart 2610 and for them to be able to be in one attachment in your e-mail. I am happy to look into this for you!
Please see the how to scan guide for the Operating System you are using. Here is the list of how to scan guides, Scan. Select your Operating System from the list, then select How to scan with HP software, then How to scan a multi-page original text document into a single file. You will need to scan each page one at a time, and add it to the same document. The how to scan guide will show you how. After done scanning to the file, then see the link for How to attach a scan to an email.
If you do not know the Operating System you are using, please visit this website. Whatsmyos.
Hope this information is helpful, and thank you for posting!
RnRMusicMan
I work on behalf of HP
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos Thumbs Up" to say “Thanks” for helping!
Maybe you are looking for
-
Automatic Cloning through Cold back up
There is a requirement from my client, that they need to perform automated cloning through cold backup everyday morning at 3.00 am. One of my senior said it can be done through shell scripts as a hint. I'm not having much knowledge in developing shel
-
HELP!! IPOD WON'T TURN OFF
No matter what I do. It's stuck! It won't turn off. Right now it's unplugged from the computer & won't turn off. The battery will run down completely now. I also had trouble with my computer recognizing the iPod after I installed the iTunes & softwar
-
My Time Machime is. full what next?
what do i do to save my info and get the time machine working again? I dont have enough memory to use Lion.either, Computer says not enough....
-
HELP ! My USB ports seems to be deads !
Hello, For my weekly back-up, I use an USB external HDD that have to use 2 USB ports. In order to use only 1 port, I've connected my external HDD to a power supply. Unfortunately, it seems that the power suplly I used wasn't the goos one for my HDD a
-
Accidentally deleted startup disk
I dont really remember what exactly I was doing to have deleted my start up disk, but recently my keyboard has been on the fritz and wont let me type anything, or, it lets me type, but its in symbols and its locked with no way out of it. Therefore I