Updating Purchase Order data in VBKD table
Hello,
We are trying to update Purchase order data in VBKD table for Sales Order at Item level. When sales Order is created, VBKD has a default record with VBELN = 'sales order number' and Item = '00000'. We want to update BSTKD_E field with Purchase order number for VBELN= 'sales order number' and Item = '00010'.
We wrote our logic in USEREXIT_SAVE_DOCUMENT_PREPARE and USEREXIT_MOVE_FIELDS_TO_VBKD in MV50AFZZ to append new entries in XVBKD with VBELN= 'sales order number' and Item = '00010'. But in this case Sales order is not created with UPDATE TERMINATED message. We are not sure if we can append a new record in XVBKD.
wa_xvbkd = xvbkd.
wa_xvbkd-posnr = wa_xvbap-posnr. "00010
wa_xvbkd-bstkd_e = vbkd-bstkd. "PO no
wa_xvbkd-posex_e = wa_xvbap-posnr. "Purch. order item no
wa_xvbkd-updkz = C_I.
APPEND wa_xvbkd TO xvbkd.
CLEAR wa_xvbkd.
Please advice the suitable way to have a Purchase Order item level data in Sales Order.
Thanks
Rohit
Hi,
You can try these FM to update info record.
ME_DB_UPDATE_INFORECORDS
ME_UPDATE_INFORECORD
ME_UPDATE_INFORECORD_COND
ME_UPDATE_INFORECORD_PD
Check the sample code on BAPI_PO_CHANGE
http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
Regards,
Shiva Kumar
Similar Messages
-
Updating Purchase Order data - BAPI_PO_CHANGE?
Hi,
I have been searching for a SAP standard tool that can update a Purchase Order upon its execution. The closest function module I could find was BAPI_PO_CHANGE. However, it was documented as a restriction that updating of service data is not possible with this function module (I have also tested this).
Are there any other possible mechanisms which can be called/used for the purpose of updating a PO including its services? It would be most desirable if the following fields on a Purchase Order can be changed/updated via this mechanism (fields in bold are data found in a service):
Field Field name
Percentage EBKN-VPROZ
Distribution Indicator EBAN-VRTKZ
Project EBKN-PROJN
Order EBKN-AUFNR
Responsibility Cost Centre EBKN-ZZMRESP
WBS Element EBKN-PS_PSP_PNR
Cost Centre EBKN-KOSTL
Unblocking User ESLL-USERF2_TXT
User for Approval ESLL-USERF1_TXT
Currency EBAN-WAERS
Quantity EBAN-MENGE
Price EBAN-PREIS
Price unit EBAN-PEINH
Overall Limit ESUH-SUMLIMIT
Expected Value ESUH-COMMITMENT
Net Value ESLL-NETWR
Thanks in advance.
~ AndiHi,
You can try these FM to update info record.
ME_DB_UPDATE_INFORECORDS
ME_UPDATE_INFORECORD
ME_UPDATE_INFORECORD_COND
ME_UPDATE_INFORECORD_PD
Check the sample code on BAPI_PO_CHANGE
http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
Regards,
Shiva Kumar -
Tables for sales & purchase order data relating to delivery
hi all,
i am writing a report to download all the delivery data after the delivery is created.i have to download the sales order data & purchase order data relating to this delivery also.
i am using likp & lips table for delivery.which tables i
should use to get the sales order data & PO data for the same delivery (likp-vbeln). i.e i need the sales & purchase order related tables which has link with delivery tables like likp & lips etc.
plz advice me. it is very urgent.
any idea is highly appreaciated.
Regards
pabitrain Addition to NM ,
in case of STO there is no Sales Order , Process will be like this
PO-->Delivery->PGI--->Billing then u have to
link
*getting the History data of the PO
select ebeln
ebelp
belnr
menge
from ekbe
into corresponding fields of table w_ekbe
where ebeln eq w_lips-vgbel
and ebelp eq w_lips-vgpos
and bewtp eq 'L'.
Regards
Prabhu -
Bad performance updating purchase order (ME22N)
Hello!
Recently, we face bad performance updating purchase orders using transaction ME22N. The problem occurs since we implemented change documents for a custom table T. T is used to store additional data to purchase order positions using BAdIs ME_PROCESS_PO_CUST and ME_GUI_PO_CUST.
I've created a change document C_T for T using transaction SCDO. The update module of the change document is triggered in the method POST of BAdI ME_PROCESS_PO_CUST.
Checking transaction SM13, I recognized that the update requests of ME22n have status INIT for several minutes before they are processed. I also tried to exclude the call of the update module for change document C_T (in Method POST) - the performance problem still occurs!
The problem only occurs with transaction ME22N, thus I assume that the reason is the new change document C_T.
Thanks for your help!
Greetings,
WolfgangI agree with vikram, we don't have enough information, even not a small hint on usage of this field, so which answer do you expect (The quality of an answer depends ...) This analysis must be executed on your system...
From a technical point of view, the BAPI_PO_CHANGE has EXTENSIONIN table parameter, fill it using structure BAPI_TE_MEPOITEM[X] alreading containing CI_EKPODB (*) and CI_EKPODBX (**)
Regards,
Raymond
(*) I guess you have used this include
(**) I guess you forgot this one (same field names but data element always BAPIUPDATE) -
Reference document missing in purchase order data
Dear Experts,
When i checked with material document with 105 movement type,i found reference
103 material document is missing in material document item data in Purchase order
data tab.in the MSEG table also reference document is not updated.please suggest
me.
Thanks in Advance,
Varunmadhu varun tirupati wrote:
Dear Experts,
>
> When i checked with material document with 105 movement type,i found reference
> 103 material document is missing in material document item data in Purchase order
> data tab.in the MSEG table also reference document is not updated.please suggest
> me.
>
> Thanks in Advance,
>
> Varun
Hi,
Check whether GR-Based IV is checked in PO Invoice tab, if this is not checked then it wont update MSEG Table. Check it out.
Thanks -
Update Purchase order number in Sales order item level from inbound ORDCHG iDoc
Hi Gurus,
I want to update purchase order number from the iDoc 'ORDCHG' to sales order item level (sold to party purchase order number) i.e, VBAK-BSTKD.
Which exit I need to use? where to update? Can you please help.
Thank you in advance.
Regards,
SanFinally Resolved the problem by writing 2 exits.
one exit 'EXIT_SAPLVEDB_007' for identify correct item in the sales order by updating the customer purchase order item number i.e., VBAP-POSEX. if we update the POSEX field then it wont create new item instead, it will update the item which it is referring to .
2nd exit for updating the purchase order number.
I have tried to pass the program name, screen number, field name, field value etc to bdcdata in the exit 'EXIT_SAPLVEDB_002'. but I observed that it is not going to that screen in the debugging.
when I try E1EDP02 with QUALF '044' it will update ship-to party's purchase order number. so to update ship-to party's purchase order number it is going to that screen.
so I have used that thing to update purchase order number in sold-to party's purchase order number.
so when it is going that screen iam changing the field name 'VBKD-BSTKD_E' to 'VBKD-BSTKD' in bdcdata. Then it is worked.
This is the solution I found in my time.
Any way it is solved. Hope it will be helpful for others who will get this problem. -
Can anyone give me user exit name for create/update purchase order partners
Hello guys
Can anyone gives me user exit name for create/update purchase order partners?
Requirement is to insert/update partner when SC flag is checked while creating/updating purchase order (ME22N / ME21N) by using user exit.hi,
check these exits.
Transaction Code - ME21N Create Purchase Order
Enhancement/ Business Add-in Description
Enhancement
MEQUERY1 Enhancement to Document Overview ME21N/ME51N
MEVME001 WE default quantity calc. and over/ underdelivery tolerance
MM06E001 User exits for EDI inbound and outbound purchasing documents
MM06E003 Number range and document number
MM06E004 Control import data screens in purchase order
MM06E005 Customer fields in purchasing document
MM06E007 Change document for requisitions upon conversion into PO
MM06E008 Monitoring of contr. target value in case of release orders
MM06E009 Relevant texts for "Texts exist" indicator
MM06E010 Field selection for vendor address
MMAL0001 ALE source list distribution: Outbound processing
MMAL0002 ALE source list distribution: Inbound processing
MMAL0003 ALE purcasing info record distribution: Outbound processing
MMAL0004 ALE purchasing info record distribution: Inbound processing
MMDA0001 Default delivery addresses
MMFAB001 User exit for generation of release order
MRFLB001 Control Items for Contract Release Order
MELAB001 Gen. forecast delivery schedules: Transfer schedule implem.
AMPL0001 User subscreen for additional data on AMPL
LMEDR001 Enhancements to print program
LMELA002 Adopt batch no. from shipping notification when posting a GR
LMELA010 Inbound shipping notification: Transfer item data from IDOC
LMEQR001 User exit for source determination
LMEXF001 Conditions in Purchasing Documents Without Invoice Receipt
LWSUS001 Customer-Specific Source Determination in Retail
M06B0001 Role determination for purchase requisition release
M06B0002 Changes to comm. structure for purchase requisition release
MEFLD004 Determine earliest delivery date f. check w. GR (only PO)
MEETA001 Define schedule line type (backlog, immed. req., preview)
ME590001 Grouping of requsitions for PO split in ME59
M06E0005 Role determination for release of purchasing documents
M06E0004 Changes to communication structure for release purch. doc.
M06B0005 Changes to comm. structure for overall release of requisn.
M06B0004 Number range and document number
M06B0003 Number range and document number -
Update Purchase Order number.(Link GL to PO)
Hi all,
Currently i am using the below query for one of our report(R12). However there is a need to update Purchase Order Number .Could anyone please help on how to link GL to PO and provide the updated query.The query is as follows.
SELECT gjl.je_line_num,
gjl.code_combination_id,
SUM(NVL(GJL.accounted_dr, 0)) AS Accounted_DR,
SUM(NVL(GJL.accounted_cr, 0)) AS Accounted_CR,
( SUM(NVL(GJL.accounted_dr, 0)) - SUM(NVL(GJL.accounted_cr, 0)) ) AS Accounted_Balance,
gjb.actual_flag,
NULL AS "Check Number",
gjb.name AS "Batch Name",
TO_CHAR(gjh.currency_conversion_date, 'DD-Mon-YYYY') currency_conversion_date,
ROUND(gjh.CURRENCY_CONVERSION_RATE,4) CURRENCY_CONVERSION_RATE,
gjh.currency_conversion_type,
NULL AS Document_Number,
SUM(NVL(GJL.entered_dr, 0)) AS Entered_DR,
SUM(NVL(GJL.entered_cr, 0)) AS Entered_CR,
( SUM(NVL(GJL.entered_dr, 0)) - SUM(NVL(GJL.entered_cr, 0)) ) AS Entered_Balance,
gcc.segment1
|| '.'
|| gcc.segment2
|| '.'
|| gcc.segment3
|| '.'
|| gcc.segment4
|| '.'
||gcc.segment5
|| '.'
|| gcc.segment6
|| '.'
|| gcc.segment7
|| '.'
|| gcc.segment8 "Account Code",
gl.currency_code AS "Ledger Currency",
gjh.name AS "Header Name",
gjl.description AS "Journal Line Description",
NULL AS party_name,
NULL AS party_id,
GJH.period_name,
TO_CHAR(gjh.POSTED_DATE, 'DD-Mon-YYYY') POSTED_DATE,
NULL AS "Purchase Invoice Number",
NULL AS "AP Invoice Line Description",
NULL AS "Sales Invoice Number",
gcc.segment1 Company ,
gcc.segment2 Account,
DECODE(gcc.segment2,NULL,'',apps.gl_flexfields_pkg.get_description_sql(gcc.chart_of_accounts_id,2,gcc.segment2)) AS "Seg2 Desc",
gcc.segment3 AS "Business Model",
gcc.segment4 Region,
gcc.segment5 AS "Cost Profit Center",
gcc.segment6 AS "Product Group",
gcc.segment7 AS "Related Company",
gcc.segment8 AS "Reserve",
gjl.status AS "Journal Line Status",
GL.name AS "LEDGER NAME",
GJH.currency_code,
GJH.je_category je_cat_f,
GJCT.user_je_category_name je_category,
GJH.je_source,
NULL AS "Sales_order" ,
NULL AS "Purchase Order Number"
FROM APPS.gl_je_headers gjh,
APPS.gl_je_batches gjb,
APPS.gl_ledgers gl,
APPS.gl_je_lines gjl,
APPS.gl_code_combinations gcc,
(SELECT je_category_name,
user_je_category_name
FROM APPS.GL_JE_CATEGORIES_TL
WHERE language='E'
) GJCT
WHERE gjh.je_from_sla_flag IS NULL
--AND gjh.EXTERNAL_REFERENCE IS NULL
AND gjb.je_batch_id = gjh.je_batch_id
AND gjh.ledger_id = gl.ledger_id
AND gjh.je_header_id = gjl.je_header_id
AND gcc.code_combination_id = gjl.code_combination_id
AND GJH.JE_CATEGORY = GJCT.je_category_name(+)
AND GL.name NOT IN('NL ABX RepCorp USD (EUR)')
GROUP BY gjl.je_line_num,
gjl.code_combination_id,
gjb.actual_flag,
gjb.name,
gjh.currency_conversion_date,
ROUND(gjh.CURRENCY_CONVERSION_RATE,4),
gjh.currency_conversion_type,
gcc.segment1
|| '.'
|| gcc.segment2
|| '.'
|| gcc.segment3
|| '.'
|| gcc.segment4
|| '.'
||gcc.segment5
|| '.'
|| gcc.segment6
|| '.'
|| gcc.segment7
|| '.'
|| gcc.segment8,
gl.currency_code,
gjh.name,
gjl.description,
gjb.je_batch_id,
gjb.status,
gjb.posted_date,
gjb.description,
gl.name,
gjh.name,
GJH.period_name,
gjh.posted_date,
gcc.segment1,
gcc.segment2,
gcc.segment3,
gcc.segment4,
gcc.segment5,
gcc.segment6,
gcc.segment7,
gcc.segment8,
GL.name,
gjl.status,
GJH.je_category,
GJCT.user_je_category_name,
GJH.je_source,
GJH.currency_code,
DECODE(gcc.segment2,NULL,'',apps.gl_flexfields_pkg.get_description_sql(gcc.chart_of_accounts_id,2,gcc.segment2))Finally Resolved the problem by writing 2 exits.
one exit 'EXIT_SAPLVEDB_007' for identify correct item in the sales order by updating the customer purchase order item number i.e., VBAP-POSEX. if we update the POSEX field then it wont create new item instead, it will update the item which it is referring to .
2nd exit for updating the purchase order number.
I have tried to pass the program name, screen number, field name, field value etc to bdcdata in the exit 'EXIT_SAPLVEDB_002'. but I observed that it is not going to that screen in the debugging.
when I try E1EDP02 with QUALF '044' it will update ship-to party's purchase order number. so to update ship-to party's purchase order number it is going to that screen.
so I have used that thing to update purchase order number in sold-to party's purchase order number.
so when it is going that screen iam changing the field name 'VBKD-BSTKD_E' to 'VBKD-BSTKD' in bdcdata. Then it is worked.
This is the solution I found in my time.
Any way it is solved. Hope it will be helpful for others who will get this problem. -
Purchase order data for ATP category BH and BI not retrieved
Hi Experts,
I have a requirement where I need to extract purchase orders data from the bapi BAPI_POSRVAPS_GETLIST3. I am passing the locations, products and ATP categories AG,EF,BF,BI and BH. However, my bapi works correctly for AG,EF and BF, but it does not retrieve the data for BI and BH categories.
I have debugged the bapi and found that it is unable to retrieve data from the live cache.
Can anybody please help me out and let me know the exact reason for this issue? I have checked the return table of the bapi and it does not give any error message as well.
Looking forward to your reply.
Thanks in advance.
--Warm Regards,
Prajakta K.Hi,
BI (stock transport order) and BH (PreqRel) are demand elements for which there exist corresponding receipt element as BF (Purchase order) and AG (Preq) respectively. BAPI will give data for these categories.Thus you can get data for BI and BH from corresponding BF and AG.
Similarly EF (Dep:Preq) is receipt element and you will not get data for corresponding demand element which is available in the system as EG (Dep:ConRel).
I think BAPI is working fine.
Regards,
~Vaibhav -
How can I prevent any use to update Purchase order if status was "Approval"
I have some users can update any purchasing order update after "Approval"
Please I would any Purchasing oracle module expert to Assist me to get way to solve problem.
How can I prevent any use to update Purchase order if status was "Approval"?
Further Information :
Oracle Allpication Release : 11.5.9
Oracle Purchasing Module.
Oracle Data Base: 11i
Khaled,Try writing a personalization on the PO screen that adds the following condition to the where clause
"and authorization_status !='APPROVED'
However, I will be careful with a blanket restriction like this. There are situations when you need to modify an existing PO. So you should code some exceptions for this rule.
Hope this helps,
Sandeep Gandhi -
Customer purchase order date allow 01.01.0511 in sales order ??
Hello All,
In sales order,Customer purchase order date (filed name BSTDK) 01.01.0511 was maintained.
the date format 01.01.0511 will allowing in this field in SAP in teh slaes order.
or this is typo error.??
VBKD-BSTDK is having DATS data type.
rec
if we use same date 01.01.0511 on the POs, system will give error message
"Delivery date outside period covered by factory calender DE (DE-germany) with message no:ME078".
so how to corHello All,
In sales order,Customer purchase order date (filed name BSTDK) 01.01.0511 was maintained.
the date format 01.01.0511 will allowing in this field in SAP in teh slaes order.
or this is typo error.??
VBKD-BSTDK is having DATS data type.
if we use same date 01.01.0511 on the POs, system will give error message
"Delivery date outside period covered by factory calender DE (DE-germany) with message no:ME078".
so how to correct the date 01.01.0511 in VBKD-BSTDK ?? -
Hi all,
I have a requirement to modify the purchase order data in the ekko table and other underlying tables. I want to modify the field Invoicing Party(LIFRE in EKKO).
is there any BAPI or standard function module to do this.
Regards,
Ravi Gin BAPI: BAPI_PO_CHANGE
BAPIMEPOHEADER-PO_NUMBER = <PO Number>
BAPIMEPOHEADER-DIFF_INV = <data>
BAPIMEPOHEADERX-PO_NUMBER = <PO Number>
BAPIMEPOHEADERX-DIFF_INV = 'X'.
Finally DB Commit by BAPI: BAPI_TRANSACTION_COMMIT.
Message was edited by:
Murugesh Arcot -
Hi Can anyone tell me how to download purchase order data of material master data? Which table?
Hi
The Purchaser Order Text of the Material Master data can be downloaded ans saved to the local file using the 'Save to File' Icon in the Material Master data.
Goto MM03, for the material and select the Purchase order text view and in the small window where the Text is written, you can see the icon 'Save to File'.
Regards
Siva -
Manage Ship-to party Purchase order date at item level
Hello Experts:
I have a requirement in which the business wants to maintain "Purchase order date" field for "Ship-to party"
in "Order Data" tab at the Item level. So different items in the same order can have a different
date for that field.
I have check marked the "Business Item" option in Item Category maintenance that
allows to manipuate the data at the item level.
I still see the field is greyed out. The field in questions is BSTDK_E.
Pls. help
Thanks,
RRHi
Please check two things here.
Business Item field is checked for this item category in VOV7.
In VOV8 for this order type check in field Variant whether they have assigned some variant or not?
Check this and update.
Thank$ -
Doubt in uploading purchase order data using BDC
Hi friends,
how to upload purchase order data.
1) In both BDC and BAPI which one is preferable?
2) for suppose if it is through BDC, how to use? what are the transactions that we can use(SHDB, ME21N,ME21)?
3) To execute the job in background, is it possible for both call transaction and session method.
Thanks in advance
Sreenivas kIt really depends on the number of records you have. Still for a set of 5,000 records my answer to your questions will be:
1) In both BDC and BAPI which one is preferable? - <b>Go with BDC</b>
2) for suppose if it is through BDC, how to use? what are the transactions that we can use(SHDB, ME21N,ME21)? - <b>Yes, its SHDB for recording, SE38 for abap program and ME21 for PO. Avoid SAP Enjoy transactions for recording as you may end up having problems wiht it.</b>
3) To execute the job in background, is it possible for both call transaction and session method. - <b>If you use call transaction method then you have to schedule the job to run in background or simply run it through F9 instead of F8. In case of session method you can chose to process the session in background. However I would suggest you go with BDC Session method for this.</b>
- Guru
Reward points for helpful answers
Maybe you are looking for
-
Using Coherence in the context of BPEL
Hi, I am planning to try the use of coherence in BPEL to leverage the cache capabilities to improve the performance. I am successfully able to do this in OSB 11.1.1.4 as its achievable much through some simple configuration. I am trying to do the sam
-
Register 2 purchase contidions with different currency
Hello All, In our project we are facing to a big issue with different currencies in the PO conditions. An example of the situation in the PO is the following (but should be different currencies, not always the same currency for the same condition):
-
Financial Template Reports (Balance Sheet) - Auto appearance of running profit figure
Dear Experts, I am working on SAP 9 Business One. I have prepared a Customized Balance Sheet through the Financial Report Templates for presentation purposes. But when I run the balance sheet using the Financial Template Report, the balance sheet doe
-
i have this flash site iv been working on, and its been fine, and im ready to get paid. (the site looks bad but shes changed it so much she likes it...) but i use a mac so i test everthing in safari, and firefox. but when she looks at it, she uses in
-
Problem facing in Function module.
Hi friends, Happy New year to all. I am facing the problem while crating Function module. As my requirement: I need to call this Function module in SAP-BW application area. I am creating this in BW side(SE37). The intenal table which i am passing to