Updating existing PO with new line item
Hi
We are in ECS scenarion. I want to add a new line item to the already existing Po which was transferred to the R/3 system successfylly. I have user pd_po_update and pd_po_save . In pd_po_update I am getting changes = "X" but in es_guid it seems i am getting the old guid . after executing the program when I go back a message popsup saying "update was terminated".
Please let me know what should i do in order to add a new line item to the PO.
thanks
sankar
Hi Sankar,
You must add a COMMIT WORK after having passed the BBP_PD_PO_SAVE.
Regards,
Laurent.
Don't forget points if helpfull.
Similar Messages
-
XVBAP has the new line item but does not update Sales Order
Hi
I need to update the sales order with a new line item when the line item has a base unit of measure as the sales unit. I need to then convert the base unit to sales unit with a whole figure and the rest can be in the base unit.
I am able to see the update in the xvbap but the line item doesn't get updated.
I am puting this code in a perform within
MV45AFZB within Form USEREXIT_CHECK_VBAP
But I guess I am doing something wrong can someone please take a look at it and tell me what is wrong with the coding.
*& Include ZSD_CREATE_NEW_LINE_ITEM *
*& Form create_new_line_item
text
--> p1 text
<-- p2 text
FORM CREATE_NEW_LINE_ITEM .
CONSTANTS: C_MEINH LIKE MARM-MEINH VALUE 'CSE'.
Variables Used
DATA: WS_WMENG LIKE VBEP-WMENG.
DATA: INPUT LIKE VBAP-KWMENG,
WS_EA LIKE VBAP-KWMENG,
WS_CSE LIKE VBAP-KWMENG.
DATA: WS_MVKE_VRKME LIKE MVKE-VRKME.
Internal Tables and Structures
DATA: WS_XVBAP LIKE XVBAP.
DATA:
it_vbap LIKE vbap OCCURS 0 WITH HEADER LINE,
it_vbep LIKE vbep OCCURS 0 WITH HEADER LINE,
it_xvbap LIKE vbapvb OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF WS_MARM,
MEINH LIKE MARM-MEINH,
UMREZ LIKE MARM-UMREZ,
UMREN LIKE MARM-UMREN,
END OF WS_MARM.
CLEAR WS_MVKE_VRKME.
SELECT SINGLE VRKME INTO WS_MVKE_VRKME
FROM MVKE
WHERE MATNR EQ XVBAP-MATNR
AND VKORG EQ XVBAK-VKORG
AND VTWEG EQ XVBAK-VTWEG.
IF VBAP-VRKME <> WS_MVKE_VRKME.
LOOP AT XVBAP.
SELECT SINGLE MEINH UMREZ UMREN
FROM MARM
INTO WS_MARM
WHERE MATNR = VBAP-MATNR
AND MEINH = WS_MVKE_VRKME.
IF XVBAP-MEINS <> WS_MVKE_VRKME.
IF NOT XVBAP-KWMENG = 0.
WS_WMENG = XVBAP-KWMENG / WS_MARM-UMREZ.
IF WS_WMENG > 1.
This means that the line item needs to be split into CSE & EA
INPUT = XVBAP-KWMENG.
WS_EA = INPUT / WS_MARM-UMREZ.
WS_CSE = WS_EA.
WS_EA = WS_CSE * WS_MARM-UMREZ.
WS_EA = INPUT - WS_EA.
Now we have the qty. split into EA & CSE. Now to
assign it to xvbap
XVBAP-KWMENG = WS_EA.
XVBAP-VRKME = WS_MVKE_VRKME.
READ TABLE XVBAP WITH KEY POSNR = XVBAP-POSNR.
MODIFY XVBAP INDEX SY-TABIX.
WS_XVBAP = XVBAP.
WS_XVBAP-KWMENG = WS_CSE.
MOVE-CORRESPONDING WS_XVBAP TO XVBAP.
INSERT XVBAP INDEX SY-TABIX.
ENDIF.
ENDIF.
ENDIF.
ENDIF. " IF xvbap-vrkme 'EA'.
ENDFORM. " create_new_line_itemHi Clark,
Pls check the Include MV45AFZZ instead of the one which you are using . Here in this include MV45AFZZ you can have access to the Header and Line items data .
Here in this include
FORM USEREXIT_SAVE_DOCUMENT *
This userexit can be used to save data in additional tables *
when a document is saved. *
If field T180-TRTYP contents 'H', the document will be *
created, else it will be changed. *
This form is called at from form BELEG_SICHERN, before COMMIT *
form userexit_save_document.
Endform.
Either you can write the code you want to update the XVABP table here or you can use the form .
FORM USEREXIT_MOVE_FIELD_TO_VBAP *
This userexit can be used to move some fields into the sales *
dokument item workaerea VBAP *
SVBAP-TABIX = 0: Create item *
SVBAP-TABIX > 0: Change item *
This form is called at the end of form VBAP_FUELLEN. *
form userexit_move_field_to_vbap.
endform.
This are the 2 performs in this include where you can do you code and it will defnitely solve your problem.
Good Luck to you . Let me know if your problem get solved.
Thanks & Regards,
Naidu. -
How to Reject Quotation line item and update New line item
Hi all,
I have a doubt in Quotation Rejection,Here it goes....
For VC implementation,We are Creating a quotation with Dummy Material,and after Creating Material Masters we have to update the Newly created material back in Quotation for same quotation number and after this the dummy material i.e the previous line item should be rejected with reason as a duplicate(reason code 23)..
So Pls help me in Rejecting the line item of quotation.how this is done.
Reply soon.
Thanks in Advance,
Balaji MedaHi,
The requirement is also to Update the Quotation with the newly created material.
So we need a Bapi or a function module which does 2 things:
1. Reject the previous Line item with a reason code.
2. Update the Quoation with the new material and insert a a new line item.
Thanks,
Balaji. -
Add new line item in existing outbound delivery
Hi,
I am trying to add new line item in existing outbound delivery with material number and quantity.
for this i tried BAPI_OUTB_DELIVERY_CHANGE and LE_MOB_DELIVERY_UPDATE.
but both fm doesn't work and this will not add new line in that delivery.
please help me how can i add new line item in delivery.
I hope someone will help me........plz
ThanksThis kind of question is about to become a FAQ, I think....search the forum for similar questions.
-
I want to update iCloud account with new apple id but don't know password for old apple id. Plus can no longer receive email at old apple id. How can I delete the current iCloud account on my iPhone if the previously stated conditions exist?
If the old ID is yours, and if it is an earlier version of your current ID, go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID. Click edit next to the primary email account, change it back to your old email address and save the change. Then edit the name of the account to change it back to your old email address. You can now use your current password to turn off Find My iDevice, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll. When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud). Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was. Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.
-
How to add a new line item when i click on UPDATE in orderpage B2B webshop?
Hi Gurus,
I need to add a new line item based on some condition when i click on update in the order page in b2b web shop. Is there any way to pass some parameters to the BADI crm_isa_basket_items and create a new line item when i update? If so can you please tell the parameters that i need to pass to the badi.
Any help will be highly appreciated!!!!!
Thanks in advance,
Lakshman.You can put condition when you call java script function while clicking on "update" button.
On order.jsp update button call "submit_refresh()" java script function. You can check your condition over here.
You can find this function in "orderTools.js" file.
And when you enter item in last line on order page and click on the update button it will automatically add new empty lines on your order page as per your selected new line items from drop down box.
Or may be you can call your custome action class when you click on update to check particular condition.
I hope it will help you.
Thanks and Regards.
eCommerce Developer -
Inserting new line item into existing delivery using BAPI
Hi
can you send me the code for inserting new line item into existing delivery either using BAPI or
Function module.
We are using SAP 4.7 versionHi Sreekanth,
Refer to this links
New item for outbound delivery via FM/BAPI?
/message/3976349#3976349 [original link is broken]
BAPI_OUTB_DELIVERY_CHANGE Help - Add new line item
hope it is useful to you.
Regards! -
Idoc Type to add a new line item to existing Inbound delivery
Hi Friends,
we have one requirement.
In the system Inbound delivery is created through Idoc. Once the inbound delivery is created, we need to change that inbound delivery by adding a new line item to that inbound delivery where the line item belongs to another PO. Means, I have an existing inbound delivery number for a PO having one line item. Now I want to add another line item into the inbound delivery for another PO. I have created the inbound delivery through Idoc using the idoc type DESADV. Now I want to change the inbound delivery for adding the line item. Can anybody please tell me which idoc type should I use for this above highlighted requirement?
Thanks & Regards
SatyaHi.
I have one PO 4500000001 for which I have created the inbound delivery 180000001. This inbound delivery has been created through an IDOC. I have another PO 4500000002 having one line item. Now i want to add another line item into the inbound delivery 180000001 for the PO 4500000002 as second line item. To add a second line item to the existing inbound delivery, which IDOC type should I use.
Hope it clarifies the requriement.
Thanks & Regards
Satya -
User Exit / BADI Update new line item in BSEG in MIGO/MB1B Transaction
Hi All,
I Require a BADI or user exit in MIGO transaction from which i can add or change the BSEG line item before Posting the FI document.
Regards,
Madhukar ShettyHi Asik,
Thanks for the the reply, but can tell any other badi or exit from where i can add/append a new line item in the accounting document getting posted from MIGO or MB1B.
Regards,
Madhukar Shetty -
How to add a new line item to a Purchase Requisition number
Hello All,
Can anyone please provide me with some FM or BAPI to add a new line item to an existing Purchase Requisition number.
Can it be done using BAPI_REQUISITION_CHANGE; if yes, then how do I pass the parameters into the BAPI tables..?
Useful pointers would be appreciated...!!
Thanks & Regards,
Tarun Gambhir@Gautham,
Thanks for the quick reply.
I want to update the table EBAN, so should I use the parameter table XEBAN to put in the new line item and then execute..
Also to fill up this table I need to pass certain value, so can I use BAPI_REQUISITON_GETDETAIL and pass the same details as found from the same BAPI and create a new line item...
Regards,
Tarun Gambhir -
Adding new line item directly to PO
Hi,
We have a requirement for adding a new line item directly within the Purchase Order in SRM (without using the shopping cart). We are using the FM BBP_PD_PO_UPDATE for this purpose. However, we are getting the following error while updating. " BUFFER TABLE NOT UP-TO-DATE". Please provide assistance in order to resolve this issue.
Regards,
ArunWe achieved based on the Security roles to identify if the user is Requester or Purchaser or Manager and Webdynpro changes by the portal team to activate the Change and Order button based on the required business rules.
Transaction Code for PO Change to be added to the security role.
Requisitioner: Any user with out any existing A012 relationship with any existing Organizational units on the current date:
Manager: Any user having A012 relationship with any existing Organizational units on the current date.
If the Authorization object checked programmatically results the value of "PUR" then the standard SAP code for "Purchaser" has to be executed.
Some additional Info :
Control list of PO using BADI BBP_WF_LIST - Change Work lists and Search Results Lists Method: BBP_WF_LIST
Badi -BBP_AUTHORITY_CHECK for any additional authorisation checks
Hope this helps.
Thanks
Balaji -
Create new line item while saving a new order
I have a requirement to create a new line item with different item category while creating an order.
i.e
if the item category is ICT1, then create a new line item like item 1 but with item category ICT2.
Also in the conditions tab, we need to update the condition type with different values for both existing and new item.
All this has to be in VA01 i.e on save.
I tried to append lines of structure XVBAP at SAVE_DOCUMENT _PREPARE by changing the item no and item caegory. This works fine. But, how can I get other table details like XKOMV(which stores pricing condition details) for the new item?
Please can you suggest any other exit/subroutine for this?
or any other alternative solutionsHi,
Try to use this EXIT:
'EXIT_SAPMM06E_013' Update Customer's Own Data in Purchasing Document
The Badi and exit contains same parameter.
Thanks,
AMS -
How to add new line item to SO using BAPI_SALESORDER_CREATEFROMDAT2
Hi,
I have sales order A with 1 line item, now i want to add new line item with material x and quantity y to the existing sales order A
using BAPI_SALESORDER_CREATEFROMDAT2.
Line item no for new line item should be generated by SAP internally.Please let me know the mandatory parameters to be passed to the BAPI to fulfill the requirement.
DATA: order_header TYPE bapisdhd1,
order_inx TYPE bapisdhd1x,
partners TYPE TABLE OF bapiparnr,
wa_partners TYPE bapiparnr.
CLEAR: salesdocument,order_header_inx,wa_in, wa_inx.
REFRESH: item_in, item_inx.
salesdocument = wa_vbup-vbeln.
order_header_inx-updateflag = 'X'.
wa_in-itm_number = ' '.
wa_in-material = p_nmatnr.
wa_in-target_qty = gv_menge - gv_wemng.
APPEND wa_in TO item_in.
wa_inx-itm_number = ' '.
wa_inx-updateflag = 'U'.
wa_inx-target_qty = 'X'.
APPEND wa_inx TO item_inx.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
salesdocumentin = salesdocument
order_header_in = order_header
order_header_inx = order_inx
IMPORTING
salesdocument = salesdocument
TABLES
return = return
order_items_in = item_in
order_items_inx = item_inx
order_partners = partners.
Thanks
BhuvanaHello,
You can use FM: BAPI_SALESORDER_CHANGE with update indicator I (insert)
call function 'BAPI_SALESORDER_CHANGE'
exporting
salesdocument = l_vbeln
order_header_inx = l_wa_order_header_inx
simulation = l_simulation
tables
return = l_i_return
order_item_in = l_i_order_item
order_item_inx = l_i_order_item_inx
partners = l_i_partners
schedule_lines = l_i_schedule_lines
schedule_linesx = l_i_schedule_linesx
extensionin = l_i_extensionin.
Thanks
Subhankar -
BOM Change - Delete an item(s) and insert new line items
Hi,
We need to mass update BOMs like for some of the existing BOM's we need to delete some line items and insert new line items. We want to use the BOMMAT04 IDOC in LSMW but I'd like to know couple of things before I go ahead with that approach
For instance, I've a finished good material 12345678 and it has three components
a) Item 0010 Material 30101010 of quantity 10
b) Item 0020 Material 30101011 of quantity 11
C) Item 0030 Material 30101012 of quantity 12
Now, I'd like delete Item 0010 and add a new item 0040 Material 30101013 of quantity 13.
In the segment E1STKOM, there is LOEKZ (Deletion Flag) but I dont want to flag for deletion but instead delete the whole line item and add a new line item.
Is there any way to achieve this using BOMMAT04 IDOC? If not, can you please suggest me a better way to do it
Any help is greatly appreciated
Thanks,
SrinivasDear Srinivas,
1.IF you want to change for an individual BOM,use CS02,select the item which you want to delete,select the entire and click on
delete button and then add new line items and save.
2.For Mass changes of BOM you can use CS20.
3.Check these functional module's also if you want to change using a report,
CS_BI_BOM_CHANGE_BATCH_INPUT Change bill of material via batch input
CSEP_MAT_BOM_SELECT_CHANGE API Bills of Material: Select BOM(s)
CS_CL_P_BOM_MASS_CHANGE
CS_CL_S_BOM_CHANGE_COMPLETE
Check and revert back,.
Regards
Mangalraj.S -
General Ledger Accounting (New): Line Items 0FIGL_O14 Performace issue
Dear Forum,
We are facing a performance issue while loading the data to 0FIGL_O14 General Ledger Accounting (New): Line Items from CUBE ZMMPRC01 -> ODSO 0FIGL_O14 DSO.
Please see my requirement below for updating the data to 0FIGL_O14 DSO.
This report is generated to display Dry Dock and Running Repair expenses for the particular Purchase orders with respective G/L's.
1) The G/L DSO will provide us the 0DEBIT_LC and 0DEB_CRE_DC Foreign currency amount with signs (+/-) amounts and.
2) ZMMPRC01 Cube will provide us the 0ORDER_VALUE (Purchse order value)and 0INVCD_AMNT Invoice amount.
While we are loading the data from CUBE ZMMPRC01 -> ODSO 0FIGL_O14 DSO ,we have created nearly 19 InfoObject level routine to derive the below mentioned fields data for MM Purchase Order related records.
0CHRT_ACCTS Chart of accounts
0ITEM_NUM Number of line item within accounting documen
0AC_DOC_NO Accounting document number
0GL_ACCOUNT G/L Account
0COMP_CODE Company code
0COSTCENTER Cost Center
0CO_AREA Controlling area
0COSTELMNT Cost Element
0SEGMENT Segment for Segmental Reporting
0BUS_AREA Business area
0FUNC_AREA Functional area
0AC_DOC_NR Document Number (General Ledger View)
0AC_DOC_TYP Document type
0POST_KEY Posting key
0PSTNG_DATE Posting date in the document
0DOC_CURRCY Document currency
0LOC_CURTP2 Currency Type of Second Local Currency
0CALQUART1 Quarter
0CALYEAR Calendar year
For reference Please see the below logic to derive the data for PO related record.
DATA:
MONITOR_REC TYPE rsmonitor.
$$ begin of routine - insert your code only below this line -
... "insert your code here
types : begin of ty_FIGL,
CHRT_ACCTS type /BI0/OICHRT_ACCTS,
ITEM_NUM type /BI0/OIITEM_NUM,
AC_DOC_NO type /BI0/OIAC_DOC_NO,
GL_ACCOUNT type /BI0/OIGL_ACCOUNT,
end of ty_FIGL.
data :it_figl type STANDARD TABLE OF ty_figl,
wa_figl type ty_figl.
SELECT single CHRT_ACCTS
ITEM_NUM
AC_DOC_NO
GL_ACCOUNT from /BI0/AFIGL_O1400
into wa_figl
where DOC_NUM = SOURCE_FIELDS-DOC_NUM and
DOC_ITEM = SOURCE_FIELDS-DOC_ITEM and
/BIC/Z_PCODE = SOURCE_FIELDS-/BIC/Z_PCODE
and
/BIC/Z_VOY_NO = SOURCE_FIELDS-/BIC/Z_VOY_NO
and
FISCYEAR = SOURCE_FIELDS-FISCYEAR.
if sy-subrc = 0.
RESULT = wa_figl-AC_DOC_NO.
ENDIF.
clear wa_figl.
Please note the same kind of logic is applied for all the above mentioned fields.
Here is my concerns and issue.
For the all above all routines i am referring BI0/AFIGL_O1400
DSO and finally loading to the Same DSO(BI0/AFIGL_O1400
The worried part is my DSO 0FIGL_O1400 is currecnly having nearly 60 Lacks records and MM cube is having nearly 55 requests which are required to update to the Above DSO for PO related PO value and Invoice amount.
The big issue here is while uploading data from MM cube to DSO say for example if the request is having 25,000 records from this nearly 500-600 records will be updated to DSO.
But here it is taking huge time ( nearly 3 days for request ) for updating these records , like this i have to pull 50 more requests from Cube to DSO as per the requirement.
Please note as of now i haven't created any indexes on DSO to improve this loads.
Please note am facing this issue in Production environment and need your help ASAP.
Thanks & Regards,
Srinivas PadugulaHi,
If selecting data from 0FIGL_O14 is taking long time then you can create secondary indexes on DSO.
0FIGL_O14 would be huge as data volume directly corresponds to data volume in BSEG.
But for you requirement, I think what you can do is,
1. create multiprovider on top of DSO and Cube and create Bex report to give you the fields requried from both the infoproviders, you can then use open hub or APD approach to keep the data in the staging table or direct update DSO and then load the data to the DSO
2. Create secondary indexes on DSO so that fetching would be faster.
3. Do the enhancment at R/3 level to fetch fields from MM during load of G/L
Regards,
Pravin Karkhanis.
Maybe you are looking for
-
MSI Forum HQ USB flashing tool!!!
Hi guys, We the forum team have developed a new way of flashing. You no longer need a floppy or anything, just an USB-stick. The tool has been tested together with MSI and as far as we have done our testing, there are no problems at all. As long as
-
Vendor not inteded for Purch. Org.
Dear all, in ECS SRM 5.0 I am facing an error with some PO: In transaction process PO (BBP_POC) I can not create a PO due to the message and PO remains in status held: Vendor not intended for purchase organisation XXX In fact the error message is cor
-
Acrobat Pro 9.5.0 crashes on ClearScan OCR but not Searchable Image OCR
I have Windows and Mac copies of Acrobat Pro 9.5 running on my computer (both version 9.5.0). My computer is an iMac running Mac OS X 10.7.3 (Lion) with the Parallels hypervisor, version 7.0.15055 installed, in which is running Windows XP. As at 11 A
-
Essbase 11.1.2.1 AIX Install Issue
Can't seem to get Essbase 11.1.2.1 software installed. When we run the installer, it hangs on the component install of Oracle HTTP Server under the Foundation Services. It does the following step, then hangs for 15 minutes (The timeout value): [2011-
-
New iMac: filled out 'wrong' apple ID in setup assistant. What to do?
Our new iMac just arrived and eager as I was, I ran the setup assistant and filled out my apple ID (except for iCloud, skipped that to configure later) that I have for my iPad and iPhone. But since the Mac is the family computer, why buy all apps and