Inserting New Line item in PO
Hi,
I need to insert new line item into PO if the material entered is BOM material. My requirement is like this, If the user creates the PO with BOM material then i need to insert all the inside components as line item in that PO. Please suggest me any user exits avaiable or any way to achieve this( It's not a subcontracting PO).
Thanks,
Ganga.
hi
PCSD0001 Applications development R/3 BOMS
PCSD0002 BOMs: Customer fields in item
PCSD0003 BOMs: Customer fields in header
PCSD0004 BOM comparison
PCSD0005 BOMs: component check for material items
PCSD0006 Mass changes user exit
PCSD0007 Check changes in STKO
PCSD0008 WBS BOM: Customer-specific explosion for creating
PCSD0009 Order/WBS BOM, determine URL page
PCSD0010 Order/WBS BOM, determine explosion date
PCSD0011 Knowledge-based order BOM, parallel update
PCSD0012 Customer - Mat. number/mat. number during material exch
PCSD0013 Customer-specific processing of an explosion for BOM br
**Please reward suitable points***
With Regards
Navin Khedikar
Similar Messages
-
Insert new line item in va01&va02 - urgent
Hi frndz,
At the time of creation standard sales order using va01.
When user enters the sold to party in header and then
material & quantity in line item reocrds. After user enters the details in first line. I have some checks to be executed and on the basis of that customer will get the free material that should come on second line item.
I am getting the details which i will be inserting on new line item but the problem is that in which exit i should write the code for the same.
So frndz could you please let me know, in which userexit I should insert this new line item. There can be more than one free material.
If anyone has done this already, please let me know.
I know one exit i.e.MV45AFZB but in that there are many forms. so exactly which form i should where i will write the code to insert new line item???
Points will be awarded surely.
Regards,
PrashantHI Stephen,
I have the same prolem. I modified the 5 global tables, but I don't see the new line in the screen.
Can you help me with some details?
Thx!
Mihaela -
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! -
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 -
Insert new line items in Delivery
Hello All,
Is there any BAPI or FM in which i can add new line item in SD delivery vl01n? The new line item will not be there in SO , but i want it in delivery. Manually i can insert new line item using VL01n , but i need FM to do the same.
ThanksHello,
I need a Bapi or FM through which i can add new line item in delivery , maybe while creation of delivery or changing the delivery i.e. via VL01n or Vl02n. The new item will not be there in SO. It is a non valuated material.
Helpful answers will be rewarded.
Thank you -
Inserting new line item in Sales order
Hi,
We are doing a feasibility check to find out whether a new line item can be successfully inserted into a sales order based on certain pricing conditions that is received through an ORDERS05 inbound idoc.
I tried adding a new segment E1EDP01 to the existing idoc in the user exit EXIT_SAPLVEDA_011 assuming that the VA01 posting program would accept the new line item but that approach is not working.
Looking at various posts in the forum, I gather that the best way is to use the function 'BAPI_SALESORDER_CHANGE'. Can anyone please let me know how exactly a new item can be inserted using this function module?
Any help would be appreciated.
ThanksHi Sneha,
Please use the FM 'BAPI_SALESORDER_CHANGE' to add a new line item as under:
CALL 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = "Pass the Sales order no here"
order_header_inx = "Pass the value of update flag as I as u need to "
"insert a new line item"
TABLES
return = "Will contain the error/success messages"
"after the processing"
ORDER_ITEM_IN = "Here pass the item info tht needs to be added"
Also do a Commit Work after this FM call to reflect the changes in database.
Regards,
Chetan.
PS: Reward points if this is helpful.
Message was edited by:
Chetan H. Dubey -
*insert new line item in sales order*
Hi guys,
I have requirment where, user would enter a material and system determines if free material is to be added to it. thats standard based on configuration.
the user is maintaing ztable for additional free product for the material. now, i want to insert the third additional item along with other items. this has to be added before saving and it has to show on screen before user saves it.
Thanks,
Abhi.See, if u debug and enter the exit, then it shows 2 line item in xvbap[] i.e. sale material and free material.
now i want to add third add. free item. if insert in internal table xvbap[], it doesn't show on screen
i want the solution for that.
can anybody help me with that. -
New line item insertion in delivery via EDI - PI
hi,
the requirement is to insert a new line item in the delivery.
This new line item inserted should be done via an IDOC, which while entering the SAP will insert a new line item in the delivery.
The question if this line item insertion should be done through the inbound FM in SAP or via XI/PI.
How will this be done in PI??
Thanks a lotHai,
How you delivery creating or updation working in ECC??
like if you are using PI interface create/update delivery in ECC ,then you cae use PI only to insert new line item for material id.
else if you want do manually you can create in VA02/VA42 TRASACTIONs or using function module also we can do that.
option is yours.
if you dont have much idea then better to talk with ABAP/Functional guys they will easily do this without PI.
Regards,
Raj -
How to insert contract line item from file using any bapi
Hi gurus,
Just wanted to ask how can I insert new line item which were created from a file
when updating/changing contract details.
The requirement was to create new line item from a file and use those details in updating the contracts.
What BAPI can I use to address this requirement?
Thanks!Hi Rajvansh Ravi,
This is for Service Contracts. Sorry for missing this detail.
Hi Tarangini Katta,
I have already used BAPI_CONTRACT_CHANGE, and it was good in updating existing line items,
but it doesn't update the contract when a new line item is created in the file.
To make a clearer view of the flow (requirement)
First scenario:
From the tcode (ME32K or ME33K), we can download contract details into an excel file for a particular service contract.
Next scenario:
That same excel file (downloaded) can be enhanced per line item (can also insert new line) and be saved locally.
Next scenario:
This same excel file can also be uploaded. And the changes done to the file have to overwrite or rather have to changed the details of the same contract and then will appear/reflect in the tcode.
With this, if we had a new line item created (inserted) on the file (not change), we can not see the changes when we view the same contract in the tcode. (ME33K)
Do you have any idea how the insertion from the file can be reflected on the tcode using an existing bapi?
Hope this was clear enough...
Thanks and hope to hear something from you soon. -
How to insert a new line item in VA01/VA02 by using ABAP code?
Hi Gurus
i have a very tough requirement. the customer wants to insert a free goods after an item has been populated in VA01/VA02 automatically according to some certain rules. the input material may be a main material of a sales BOM.
for example. let's suppose there is a material A who has two sub-material B and C which is maintained in a sales BOM via CS01/CS02. when the material A has been input in the line item in VA01/VA02, its quantity input and after the ENTER key has been clicked, another material D may be displayed in a new line as a gift if the condition met. the condition relates to customer/material/quanity and these information are stored in a Z-table.
on the other hand, if the material A is only a single material(not a BOM), the gift(material D) will also be filled automatically if the condition met.
i have already enhance the FM cs_bom_explosion to filfill the requirment for BOM materials. whereas it is very hard to find the enhanment point for the single material.
so my question is where is the correct place for me to insert the ABAP code, which decides whether the gift should be given or not and furthermore inserts the new line item into XVBAP. i tried to use MV45AFZZ, whereas the data is always inconsistant if a new line has been inserted. it is very strange that there is no temperary internal table storing line item data input in the table controal of VA01/VA02. system reads the line item data , line by line, via a system kernal function call.
any hints are welcome. thanksHI Stephen,
I have the same prolem. I modified the 5 global tables, but I don't see the new line in the screen.
Can you help me with some details?
Thx!
Mihaela -
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. -
Add New Line item while creating a new PO in ME21N
Hi All,
I have a requirement to add a new line item when user is pressing enter on the Line item 1 based on some condition.
I am using the BADI 'ME_PROCESS_PO_CUST' and Method is 'PROCESS_ITEM'.
I have tried lots of options and also look for method 'Create_Item ' but not able to understand what exactly I need to pass in that method.
Can somebody elaborate on it if somebody has work on it? Even sample code will also help me.
Thanks in advance.
With regards
Sachin GuptaHi Sachin,
Please find the sample code :
METHOD if_ex_me_process_po_cust~process_item .
DATA: ls_mepoitem TYPE mepoitem,
ls_customer TYPE mepo_badi_exampl,
ls_tbsg TYPE tbsg.
* here we check customers data
ls_mepoitem = im_item->get_data( ).
IF ls_mepoitem-loekz EQ 'D'.
* a physical deletion of the item was carried out. therrefor we have to
* delete customer data on the level of the item
ls_customer-ebeln = ls_mepoitem-ebeln.
ls_customer-ebelp = ls_mepoitem-ebelp.
CALL FUNCTION 'MEPOBADIEX_SET_DATA'
EXPORTING
im_data = ls_customer
im_physical_delete_request = 'X'.
ELSE.
* update/insert operation
CALL FUNCTION 'MEPOBADIEX_GET_DATA'
EXPORTING
im_ebeln = ls_mepoitem-ebeln
im_ebelp = ls_mepoitem-ebelp
IMPORTING
ex_data = ls_customer.
* check customers data
* check field badi_bsgru. This should be carried out only for new items. Once the PO is posted the
* field should no longer be changeable. This is done in Method FIELDSELECTION_ITEM.
IF im_item->is_persistent( ) EQ mmpur_no.
IF ls_customer-badi_bsgru IS INITIAL.
* Place the cursor onto field badi_bsgru. The metafield was defined in BAdI ME_GUI_PO_CUST,
* Method MAP_DYNPRO_FIELDS.
mmpur_metafield mmmfd_cust_01.
mmpur_message_forced 'W' 'ME' '083' text-002 '' '' ''.
ELSE.
* check whether the field is valid
SELECT SINGLE * FROM tbsg INTO ls_tbsg WHERE bsgru EQ ls_customer-badi_bsgru.
IF NOT sy-subrc IS INITIAL.
mmpur_metafield mmmfd_cust_01.
mmpur_message_forced 'E' 'ME' '083' text-004 '' '' ''.
* invalidate the object
CALL METHOD im_item->invalidate( ).
ENDIF.
ENDIF.
ENDIF.
Try to check the import and export paremeters to pass the vales.
I hope this may helpfull.
Thank you,
Thanks,
AMS -
Adding new line item while save
Hi all,
use an implementation of BADI ME_PROCESS_REQ_CUST in the MM-Purchase-Requisition, method IF_EX_ME_PROCESS_REQ_CUST~POST while save.
based on the line items available(USER ENTERED) i have to add few more line items based on the account assignment category and quantity while save.
How to create new line items (copying the existing line item and change the quantity ) and save the requestion with the additional line items. I used this code. while calling the method CRETE_ITEM create based on the object REF_ITEM in the MY_STATE.
the REF_ITEM object is Initial . so while creation the empty object is created.
kindly help to give tips/details to handle.
Coding:
data: l_item_list TYPE MMPUR_REQUISITION_ITEMS,
l_item TYPE MMPUR_REQUISITION_ITEM,
l_item_akt TYPE mereq_item,
l_item_ref TYPE ref to IF_PURCHASE_REQUISITION_ITEM.
l_item_list = im_header->get_items().
loop at l_item_list into l_item.
l_item_akt = l_item-item->get_data( ).
IF l_item_akt-MENGE > 1 AND
l_item_akt -KNTTP = 'A'.
DO l_item_akt -MENGE TIMES.
l_item-item= IM_HEADER->CREATE_ITEM( IM_ITEM = l_item-item).
INSERT l_item INTO TABLE IT_ITEMS_list.
%%%%% here i checked useing get data method i am not getting any data other than relesing procedure data.
I used SET_DATA method to set the data. even I am not getting data.
endloop.
(Debugging the code, I manage by doubleclicking while create Item method the fieldcontent of l_item (e.g ) to show the content of the class-attribute my_state. This works only if the field Interface in the Debugger is empty because then I see the attributes of the class. If the field Interface is filled with IF_PURCHASE_REQUISITION_ITEM, there arent any attributes shown.)
Thanks in advance for your kind help!!
NicoleI searched sdn and found this not possible.
-
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. -
New line item in the service contract
Hi Gurus,
I have requirement to add the new line item in the service contract. Details are as follows.
as per the requirment, manually we are entering the outbound category via web Ui (service -> service contract).Now I have to develope a badi/method in standard badi exec_methodcall_ppf which will insert a new line item with the same material as of outbout category but with the item category as inboud.
could you please help in how can I maintain the new line time. I know we have to use the crm_order_maintain FM but I'm confused what all parameter we need to pass to maintain this.
can someone please share the code to do that. TIAHi Paul,
It seems there is no option in changing the condition records at the billing plan item level.
Please try the following.. see if it helps. To execute the invoices with new condition record values directly, make the settings at the billing item category level goto -- the billing document frame -- under serivces frame -- pricing type select option Carryout new pricing (Option B). This option updates the billing document at the time of invoicing with new price calculation.
please see if this can help you out.
Have a good day!!!
Nandu
Maybe you are looking for
-
Premiere Pro cc 2014 super buggy
running new mac pro (trash can) fully loaded with newest osx. here are the bugs i have: when working in premiere and have a dynamic link to after fx and after fx is open renders basically don't happenwhen you close after fx the renders are fast again
-
Cannot install Flash Video. Template Locked
The .htm that I am tryig to insert the Flash 8 video was built from a .dwt. At the end of the installtion I get this Dreamweaver error message is "Making this change would require changing code that is locked by a template or a translator. The change
-
When I want to share one e-mail, all that is written text disappears?
I can't share e-mail with somebody as all text desappears. I have checked all settings and everything is ok. Before this was working and one day just stoped. I don't really know when.
-
I'd like to save space for more sites on my bookmark bar so I'd like to take off the text on the bookmark bar and just leave the site Icon's...that way there will be much more space to add on more sites to my bookmark bar.
-
Cannot see/edit white text in editor mode
I am using contribute 3.11 and have run into a strange issue. On a few of my webpages i noticed that when going into editor mode contribute has a few of my page's text <li> highlighted in white. (The highlights are only in editor mode and do not publ