IW51 - Badi during save to change item data
Hello experts,
we are trying to modify on service notification the item data (classification data).
We are trying to do it via BAdI Interface IF_EX_NOTIF_EVENT_SAVE.
Once we reach that badi we want to update classification data using function BAPI_OBJCL_CHANGE.
We pass the document number we have to the object key of the bapi (qmnum + fenum).
But bapi returs us message that document xxxx does not exist.
When we test bapi vie SE37 it works .
But in the badi it seems failing cause the document is not yet commited.
Do you have an idea of how we could call the bapi to change item data with document number saved before ? (other badi, exit, other solution,...)
Or any other idea could be welcome.
Thanks for the help.
S.N
Hi
Transaction Code - VF01 Create Billing Document
Exit Name Description
J_3RSINV
SDVFX001 User exit header line in delivery to accounting
SDVFX002 User exit for A/R line in transfer to accounting
SDVFX003 User exit cash clearing in transfer to accounting
SDVFX004 User exit G/L line in transfer to accounting
SDVFX005 User exit reserves in transfer to accounting
SDVFX006 User exit tax line in transfer to accounting
SDVFX007 User exit: Billing plan during transfer to Accounting
SDVFX008 User exit: Processing of transfer structures SD-FI
SDVFX009 Billing doc. processing KIDONO (payment reference number)
SDVFX010 User exit item table for the customer lines
SDVFX011 Userexit for the komkcv- and kompcv-structures
V05I0001 User exits for billing index
V05N0001 User Exits for Printing Billing Docs. using POR Procedure
V60A0001 Customer functions in the billing document
V60P0001 Data provision for additional fields for display in lists
V61A0001 Customer enhancement: Pricing
No of Exits: 17
With Regards
Nikunj Shah
Similar Messages
-
Reg. Exit/BADI for changing item data of PO in ME22N
Hi all,
My requirement is to update the field LABNR (Order Ack.) of few specific line items of a PO, in the Transaction ME22N, using Exit/BADI.
I have tried the BADI ME_PROCESS_PO_CUST. But the PROCESS_ITEM method of this BADI processes only the line item which has been changed/inserted in ME22N transaction. But my requirement is to update line items irrespective of whether that line item was "changed/not changed" during the process in ME22N screen.
Could you please suggest me some suitable Exit/BADI for this requirement.
Regards,
Anbarasan KThanks Martin.
Problem solved by implementing the method Process_Header.
1. Get the items from Header - im_header->get_items
2. Loop the item list and get the line item record - re_item-item->get_data
3. <- Logic to Update the line item - >.
4. Update the line item - re_item-item->set_data
Thank you very much.. Martin.
Regards,
Anbarasan K -
ME_PROCESS_PO_CUST "IMPLEMENTING CLASS
IF_EX_ME_PROCESS_PO_CUST " INTERFACE
POST "METHOD
POST HAS TWO PARAMETERS
IM_EBELN
IM_HEADER TYPE REF TO IF_PURCHASE_ORDER_MM
IF_PURCHASE_ORDER_MM "INTERFACE
GET_DATA "METHOD , WORKIG FINE
GET_ITEMS "METHOD
GETI_ITEMS HAS PARAMETER REITEMS
REITEMS IS TABLE TYPE PURCHASE_ORDER_ITEMS
WHICH IS LINE TYPE PURCHASE_ORDER_ITEM
AND THIS LINE TYPE HAS FIELD
ITEM WHICH IS TYPE IF_PURCHASE_ORDER_ITEM_MM
AND AGAIN IN THIS INTERFACE THERE IS METHOD GET_DATA TO GET ITEM DATA.
PLEASE SUGGEST ME HOW TO ACCESS ITEM DATA ,
IF POSSIBLE PLEASE WRITE THE CODE AS I AM VERY POOR AT 'OOPS' AND ITS VERY VERY URGENT.
THANKS AND REGARDS
Edited by: TRY-N-TRY on Jan 7, 2008 6:23 PMHello
If you had searched the SDN forums you would have found plenty of answers to your question.
Following is some sample coding:
method IF_EX_ME_PROCESS_PO_CUST~POST.
DATA:
ls_header TYPE mepoheader,
lt_items TYPE purchase_order_items,
ls_item TYPE purchase_order_item,
ls_item TYPE mepoitem.
ls_header = im_header->get_data( ).
lt_items = im_header->get_items( ).
LOOP AT items INTO ls_item.
ls_item = line_item-item->getdata( ).
" process item data...
ENDLOOP.
ENDMETHOD.
Regards,
Uwe
PS: Do not use such kind of pseudonyms instead of your real name. Because my impression is that a nobody (in term of ABAP development competence) tries to claim to be a somebody who fills his knowledge gaps via SDN. Using pseudonyms significantly decreases your changes to get any answers at the SDN forums. -
VA02 blocking from change -- item data
HI,
How to block a perticular item in the sales order from Change in the VA02...
That is the user must not be allowed to change any data related to that item..
Thanks and Regards,
SanthoshI think you dont want user to do some changes in the data of particular item in VA02.
U can do it using user exits.
Have a look at below link which will give you deatails about all the user exits associated with VA02.
http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm
Hope it helps you.
Best Regards,
Vibha
*Please mark all the helpful answers -
Badi/ User Exit - to update item data on Post GR in MIGO
Guyz,
I have a requirement to update the value in ALAN1 , ALAN2 fields while posting GR in MIGO. And also I need to access the value of realted PO (ebeln) and line item(ebelp) and equipment number(or serial number) EQUNR filed ,while doing the coding for this enhanemnet.
I was looking for Badi or User exit to meet the need. I have found a Badi MB_MIGO_ITEM_BADI, which I have implemented. I have put a break in the method and found that I can access all the value in the above mentioned field (IS_GOITEM, is the sturcture in the Badi signature) but one problem still persists.
I can see only the last line item(ebelp), in IS_GOITEM, where I need to see all the line item, so that I can relate which Equnr is assigned to which Lineitem.
Please tell me if you know any badi or user exit for this purpose.
Regd,
Anid
Points Guranteed
Message was edited by:
AnidHi,
we have checked above BADI;s but will not suffice the requirement;
The requiement is
While Creating PO(ME21N) and Changing PO(ME22N):
When the user tries to Save the PO:
All the line items should be accessible and can be editable.
If the validation fails, error message should be displayed on
the screen and user should be able to edit at that location.
Please let me know if there is any other way or enhancement point for the same...
Regards
Shiva -
Clicking a file during "save as" changes name to that filename
This is an old peeve about OS X.
Do a save as... on this page. In the save dialog box, make sure you're in a subfolder (navigate into one if necessary). Also make sure you're in icon view or list view. Now assume you don't want to save the page into this folder, but in its parent. So you navigate up a level using command-up arrow or by clicking in the drop-down menu at the top of the dialog box.
Now you are up a level but the selection is the subfolder you were in a moment ago.
If you click "save" you'll be back in the subfolder, which you don't want.
If you click on a different folder, you still can't click "save", or you'll be in that folder.
If you try to "click off" by clicking on a filename, the name of the file you're saving will be replaced by the name of that file.
If you have enough screen space, you can expand the dialog box until there's empty space in the file list, then click there. But this isn't always an option.
You may be able to go up another level, and then down again into the folder you want, which will eliminate the selection, but this is crazy.
What I'd really like to know is, does anyone find the italicized behavior above to be functional? If not, why does Mac OS still do this? (Note, it didn't do this prior to Mac OS X.) And is there a better approach than the ones I've given, to move up a level in the folder hierarchy when doing a save?Kurt, Steve, thanks for your answers. I think I see the reason for the discrepancy. The behavior doesn't happen when you use the popup menu. It does happen if you use command-up arrow to navigate to the parent folder.
Again, if there aren't too many files in the parent folder, one workaround is to expand the save dialog box...but that requires you to take your hands off the keyboard. A lot of the time, I'm using command-s and would rather not pick up the mouse. And it may not even be an option, if the are a lot of files/folders in the parent folder.
The "foolproof" approach, which can be done entirely at the keyboard, is to do command-up arrow twice, then navigate back down. But this is pretty clumsy and unintuitive.
What bugs me about this isn't the danger of overwriting a file (somehow I've never fallen for that pitfall) but the annoyance of not being able save the file under the name provided, e.g. when saving a web page (or a PDF displayed in Safari) or doing right-click > save as (again, typically on a link to a PDF).
I've never had a need to pick up a name from the Save (As) dialog box. So for me this feature is completely anti-functional, and I really wish there was an option or hack to disable it and let "click off" just remove the folder selection. Even better, if I could remove the folder selection using a (non-kludgy) keyboard approach. -
Hi,
We want to change data when saving the invoice. We use these user-exits and enhancements but it doesn't change item data. (field : MATNR)
enhancemet : LMR1M001 ,
badi : INVOICE_UPDATE
What can I do to change item data for matnr field.
Thanks.Hi
What you are intendiing to change is the Important criteria, if you are trying to change data whcih is linked to other objevct then it is not possible.
Only free fields caqn be altered in the Invoice line item such as texts or any Cost object like cost center or WBS or Profit center....
What is the field you are intending to change at update.
Thanks & Regards
Kishore -
Change Sales Contract Item Data - VA42
Dear Colleagues,
I'm trying to create an LSMW that will allow us to change item data in a quantity contract. We used a direct input program to create the contracts but I'm not sure that it can be used to change them as well. Our info from the contract creation is below.
The item level fields we're attempting to change are contract start date and contract end date VEDA-VBEGDAT and VEDA-VENDDAT
Does anyone know if it's possible to use this program to change contract item data? Is there a better method other than trying a batch input recording?
Your help is greatly appreciated.
Thanks,
Brian StookalMany times this has been discussed and if you search SCN or Google with the text "LSMW for sale orders with multiple line items", you will get lot of inputs. Take the inputs from there and try.
G. Lakshmipathi -
Module pool- only first line item data saved, rest disappears??
Hi Experts,
I have one module pool that was developed by other developer. It has header details input fields and items details input by table control.
Now below scenarios occur:
1) When I enter only one line item, and save it, the data is saved properly
2) when I enter more than one item data and save it, it only saves first line item data.
3).When I press ENTER button after every new line item data, it saves all the data properly.
I tried to debug the report but could not find the exact problem statement as the code is written very badly without any comments.
I am pasting the flow logic code below for the screen.
So please help me figure out the problem and solution for it.
+++++++++++++++++++++++++++++++++++
PROCESS BEFORE OUTPUT.
*&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'IT_MSEG'
MODULE it_mseg_change_tc_attr.
*&SPWIZARD: MODULE IT_MSEG_CHANGE_COL_ATTR.
LOOP AT it_gp
INTO wa_gp
WITH CONTROL it_mseg
CURSOR it_mseg-current_line.
MODULE it_mseg_get_lines.
*&SPWIZARD: MODULE IT_MSEG_CHANGE_FIELD_ATTR
ENDLOOP.
* MODULE STATUS_9001.
MODULE deactive_screen.
PROCESS AFTER INPUT.
*&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'IT_MSEG'
LOOP AT it_gp.
CHAIN.
FIELD wa_gp-yposnr.
FIELD wa_gp-matnr.
FIELD wa_gp-maktx.
FIELD wa_gp-meins MODULE check_uom ON INPUT..
* FIELD WA_GP-DOC_QTY.
* FIELD WA_GP-REC_QTY.
FIELD wa_gp-gp_qty.
FIELD wa_gp-chall_qty.
FIELD wa_gp-netwr.
FIELD wa_gp-remarks.
FIELD wa_gp-exp_ret.
MODULE it_mseg_modify ON CHAIN-REQUEST.
ENDCHAIN.
FIELD wa_gp-chk
MODULE it_mseg_mark ON REQUEST.
ENDLOOP.
MODULE it_mseg_user_command.
*&SPWIZARD: MODULE IT_MSEG_CHANGE_TC_ATTR.
*&SPWIZARD: MODULE IT_MSEG_CHANGE_COL_ATTR.
MODULE user_command_9001.
+++++++++++++++++++++++++++++++++++
Thanks,
Vishal.Hi Aruna,
Below is the code as you required.
+++++++++++++++++++++++++++++
MODULE user_command_9001 INPUT.
ygp_header_mas-ret_type = v_gpt.
CASE sy-ucomm.
WHEN 'MBLNR'.
PERFORM select_mblnr.
WHEN 'DEL'.
PERFORM select_delivery.
WHEN 'INTI'.
PERFORM grt_gi_details.
WHEN 'GENT'.
PERFORM get_ge_details.
WHEN 'GP'.
PERFORM get_returnable_gp.
WHEN 'SAVE'.
PERFORM gen_gp_number.
PERFORM gen_data.
PERFORM save_data.
WHEN OTHERS.
PERFORM get_ge_details_other.
IF it_gp[] IS INITIAL.
INSERT INITIAL LINE INTO it_gp INDEX 1.
ENDIF.
ENDCASE.
IF v_entry = 07 .
PERFORM serial_no1.
PERFORM insert_row.
ENDIF.
IF sy-ucomm IS INITIAL.
PERFORM calc_amt.
ENDIF.
CLEAR:sy-ucomm.
ENDMODULE. "user_command_9001 INPUT
+++++++++++++++++++++++++++++++
MODULE it_mseg_user_command INPUT.
ok_code = sy-ucomm.
PERFORM user_ok_tc USING 'IT_MSEG'
'IT_GP'
'CHK'
CHANGING ok_code.
sy-ucomm = ok_code.
ENDMODULE. "IT_MSEG_USER_COMMAND INPUT
++++++++++++++++++++++++++++++++++
MODULE it_mseg_modify INPUT.
MODIFY it_gp
FROM wa_gp
INDEX it_mseg-current_line.
ENDMODULE. "IT_MSEG_MODIFY INPUT
====> Above module has some problem i think as while debugging it was not updating IT_GP as the current line number was not matching with IT_GP as it has only one line item and WA_GP was changing. Also WA_GP data was getting changed with LOOP with all line items data.
++++++++++++++++++++++++++++++++++++++++++++++
MODULE it_mseg_mark INPUT.
DATA: g_it_mseg_wa2 LIKE LINE OF it_gp.
IF it_mseg-line_sel_mode = 1
AND wa_gp-chk = 'X'.
LOOP AT it_gp INTO g_it_mseg_wa2
WHERE chk = 'X'.
g_it_mseg_wa2-chk = ''.
MODIFY it_gp
FROM g_it_mseg_wa2
TRANSPORTING chk.
ENDLOOP.
ENDIF.
MODIFY it_gp
FROM wa_gp
INDEX it_mseg-current_line
TRANSPORTING chk.
ENDMODULE. "IT_MSEG_MARK INPUT
+++++++++++++++++++++++++++++++++++++++++
If I press ENTER after entering each line item, all records come in IT_GP but if not then only first line item comes. Also if I dont press ENTER after entering the first line item and and add one item (total 2) and then press ENTER then sometimes both the lines disappear.
Thanks,
Vishal -
BAPI_ADMGMTSO_CHANGE for change billing data set of mam order
Dear,
i change Start of Copy/Publication Date Period of mam order using BAPI_ADMGMTSO_CHANGE this bapi but the billing dataset can't change it's date(i.e serv.date,edservdate).
Give the solution for above problem.Hi,
in this BAPI 'BAPI_ADMGMTSO_CHANGE' you have to pass update parameter.
for example you are going to change item data, then you have to update
item table and itemx table.
and check the documentation of the BAPI.
Test program is also avilable for this BAPI. in SE37 give the BAPI name and click the 'Where used list' button, it will show the test program.
Regards,
Boobalan S -
User Exit / BADI for F-02 during SAVE to update BSEG Line Items.
Hi Experts,
I need a User Exit / BADI for Transaction code F-02 which triggers during save to update BSEG-SGTXT with Vendor / Customer
name in the Tax Line Item.This is to update table BSEG .
Thanks in Advance,
NithyHi,
Do it with the BTE 00001120 (tcode FIBF).
I hope this helps you
Regards,
Eduardo
PD: I forgot, check this link. It will tell you how to do it
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/207835fb-0a01-0010-34b4-fef1240ba9b7
Edited by: Eduardo Hinojosa on Jul 15, 2009 6:38 PM -
BADI name during SAVE after creating or changing a material in MM01and MM02
Hi gurus,
Please refer me BADI name during SAVE after creating or changing a material in MM01and MM02.
Whenever a user changes or creates a meterial ,I want the BADI name at that point.Exit name or Enhancement point will also suffice.Please help..Hi,
Enhancement: MGA00001
Function module Exit : EXIT_SAPLMGMU_001 Enhancements for Material Master Tables
BADI_MATERIAL_CHECK Enhanced Checks for Material Master Tables
BAPI_MATERIAL_SAVEDATA Create and Change Material Master Data -
Change item condition in BADI order save with crm_order_maintain
Hi all,
i could update conditions in report but not successful in BADI order save, below is my code in BADI...
what is the problem maybe ? Ths
* Get order info.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_header_guid
it_requested_objects = lt_requested_objects
IMPORTING
et_ORDERADM_I = lt_ORDERADM_I
ET_TEXT = lt_text
ET_STATUS = lt_status
et_pridoc = et_pridoc
EXCEPTIONS
DOCUMENT_NOT_FOUND = 1
ERROR_OCCURRED = 2
DOCUMENT_LOCKED = 3
NO_CHANGE_AUTHORITY = 4
NO_DISPLAY_AUTHORITY = 5
NO_CHANGE_ALLOWED = 6
OTHERS = 7.
read table lt_ORDERADM_I into ls_ORDERADM_I with key ITM_TYPE = 'YTS1'.
if sy-subrc = 0.
read table et_pridoc INTO es_pridoc index 1.
LOOP AT es_pridoc-pric_cond into es_pric_cond where kposn = ls_ORDERADM_I-guid.
clear is_cond_chg.
move-corresponding es_pric_cond to is_cond_chg.
clear is_cond_chg-kbetr. " clear the amount
INSERT is_cond_chg INTO TABLE is_pridoc-cond_change.
endloop.
CLEAR: lt_input_field_names.
ls_input_field_names-fieldname = 'COND_CHANGE'.
INSERT ls_input_field_names INTO TABLE lt_input_field_names.
CLEAR: cs_input_fields, ct_input_fields.
cs_input_fields-ref_guid = ls_ORDERADM_I-guid.
cs_input_fields-ref_kind = 'B'.
cs_input_fields-objectname = 'PRIDOC'.
cs_input_fields-field_names = lt_input_field_names.
INSERT cs_input_fields INTO table ct_input_fields.
is_pridoc-ref_guid = ls_ORDERADM_I-guid.
is_pridoc-ref_kind = 'B'.
INSERT is_pridoc INTO it_pridoc INDEX 1.
endif.
CALL FUNCTION 'CRM_ORDER_MAINTAIN'
EXPORTING
it_pridoc = it_pridoc
CHANGING
ct_input_fields = ct_input_fields
EXCEPTIONS
error_occurred = 1
document_locked = 2
no_change_allowed = 3
no_authority = 4
OTHERS = 5.Try this Function Modul after Order_Maintain
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait =
IMPORTING
return = .
Edited by: Richard Brünning on Nov 12, 2009 1:55 PM -
Changing the item data in MIRO ,MIR7,MIR4 transactions
Hi,
Please help in finding out the BADI/User exit to change the line item data and passing changed data back to the main screen for MIRO,MIR7 and MIR4 transactions.Hi Neil,
1. U said u have used SAVE_TEXT
and it saves.
2. To check if this happens or not,
After that write COMMIT Work.
3. In DEBUG mode,
execute till the FM and COMMIT Work,
4. In another session,
see the table STXH
to know whether it REALLY Gets
updated or not!
regards,
amit m. -
BADI ME_PROCESS_PO_CUST for changing header data
Hello Experts,
I'm using Method PROCESS_HEADER in Badi ME_PROCESS_PO_CUST in order to change some header data.
I want to change header data depending on the partner data which are on header level.
It works fine as long as there are data changed in the header or item level and not only on the partner screen.
The method in this Badi isn't processed if only partner data are changed. But for me it is necessary to set a special field on the header depending on the partner data.
Regards,
SvenHi,
Firstly, for changing Header data without any INSERT/UPDATE?MODIFY statement, badi - ME_PROCESS_PO_CUST will not be useful.
As method you mentioned has no header parameters under CHANGING / EXPORTING clause.
You can use the badi which has the parametrs you want in either change/ Export mode. It can be defined under table also.
Below is the list of important badis gettign called, however none of them contains header values in change/export clause.
ME_CCP_ACTIVE_CHECK
MD_STOCK_TRANSFER
ME_DEFINE_CALCTYPE
ME_PO_PRICING
ME_FIELDSTATUS_STOCK
ME_COMMITMENT_STO_CH
ME_COMMITMNT_PARKING
ME_INFOREC_SEND
ME_CHECK_SOURCES
ME_PURCHDOC_POSTED
Instead you can use enhacement MM06E005 Customer fields in purchasing document.
Create a project under Transaction CMOD.
Assign enhancement as Project component.
You'll find Exit 012. At time of save you can change header im_ekko based on you parterner data tab.
Regards,
Amee.
Maybe you are looking for
-
DTW Batch Load (B1 8.8)
Hi All, I have gone thru most of the threads related to the issue of uploading Batches. Header DocNum DocType Handwrtten Printed DocDate CardCode Ref1 Ref1 500 dDocument_Items tNO psYes 20110303 BRI012
-
I find information about the performance of the ATG scenario engine.
Hi all, It is a big point that I can release a business user directly by using a scenario of the ATG. It is the strongest that I can use the information that tracked a site for the element of the scenario. I almost collect the tracking information of
-
I can't adjust to wide screen mode in Need For Speed: Carbon
Dear guys, I can't adjust the graphic to Wide Screen Mode in EA game "Need For Speed: Carbon", I had tried to adjust the dpi in "Options", but it seems no wide screen mode there! Is that normal? Thank you guys! -DANIEL
-
Help please
-
Can't Open MS Outlook e-mail messages w/ Blazer on a T/X
My company recently upgraded its Microsoft Exchange Server and now I can't open e-mail messages using Blazer on my T/X. I now get a message saying, "To use Microsoft Outlook web access, browser settings must allow scripts to run." I am using Palm B