BAdi for COR1 Need data of MCHA MCA1

Hi Experts,
I am using Badi WORKORDER_UPDATE and i m doing my implementaion inside method BEFORE_UDATE.
I am trying to send some dat afor Label Printing to external system . I am getting all teh data and printing is also ok .
Que-> My Reqiurement is that i need two date field(VFDAT & ESDAT) from MCA1 or MCHA(Batch Table) while createing Process Order via COR1. I create and release the PO and then save and my BAdi triggered.
Here i get batch ( a new batch is assigned each time ) but i need to access MCA1 or MCHA table , but i could not select from MCA1 or MCHA based on MATNR & BAtch as new batch is create each time with PO. But at as the saving is complete i get these values in MCHA & MCA1.
How can i get these values inside method BEFORE_UPDATE.
I think these must be stored in some int.table or Buffer(as they ae updated in tabes at end).But dont know how to get these values.
Please help me how to find to such values before they get updated in tables.
Can i do it ?
Thanks a lot.

Hi Saurabh,
Please try method AT_SAVE.
Hope this will help you.......

Similar Messages

  • Search for BAdi for Customer Master Data (XD01)

    Hi experts,
    i am looking for a BAdi for Customer Master data (XD01). Can anyone suggest me which one can i use?
    thanks in advance.
    Regards,
    aksh

    hi
    execute this report
    *& Report  ZNAGBADI
    REPORT  ZNAGBADI.
    *report zbadi_find .
    tables : tstc,
    tadir,
    modsapt,
    modact,
    trdir,
    tfdir,
    enlfdir,
    sxs_attrt ,
    tstct.
    data : jtab like tadir occurs 0 with header line.
    data : field1(30).
    data : v_devclass like tadir-devclass.
    parameters : p_tcode like tstc-tcode,
    p_pgmna like tstc-pgmna .
    data wa_tadir type tadir.
    start-of-selection.
    if not p_tcode is initial.
    select single * from tstc where tcode eq p_tcode.
    elseif not p_pgmna is initial.
    tstc-pgmna = p_pgmna.
    endif.
    if sy-subrc eq 0.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'PROG'
    and obj_name = tstc-pgmna.
    move : tadir-devclass to v_devclass.
    if sy-subrc ne 0.
    select single * from trdir
    where name = tstc-pgmna.
    if trdir-subc eq 'F'.
    select single * from tfdir
    where pname = tstc-pgmna.
    select single * from enlfdir
    where funcname = tfdir-funcname.
    select single * from tadir
    where pgmid = 'R3TR'
    and object = 'FUGR'
    and obj_name eq enlfdir-area.
    move : tadir-devclass to v_devclass.
    endif.
    endif.
    select * from tadir into table jtab
    where pgmid = 'R3TR'
    and object in ('SMOD', 'SXSD')
    and devclass = v_devclass.
    select single * from tstct
    where sprsl eq sy-langu
    and tcode eq p_tcode.
    format color col_positive intensified off.
    write:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    skip.
    if not jtab[] is initial.
    write:/(105) sy-uline.
    format color col_heading intensified on.
    Sorting the internal Table
    sort jtab by object.
    data : wf_txt(60) type c,
    wf_smod type i ,
    wf_badi type i ,
    wf_object2(30) type c.
    clear : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
    loop at jtab into wa_tadir.
    at first.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Enhancement/ Business Add-in',
    41 sy-vline ,
    42 'Description',
    105 sy-vline.
    write:/(105) sy-uline.
    endat.
    clear wf_txt.
    at new object.
    if wa_tadir-object = 'SMOD'.
    wf_object2 = 'Enhancement' .
    elseif wa_tadir-object = 'SXSD'.
    wf_object2 = ' Business Add-in'.
    endif.
    format color col_group intensified on.
    write:/1 sy-vline,
    2 wf_object2,
    105 sy-vline.
    endat.
    case wa_tadir-object.
    when 'SMOD'.
    wf_smod = wf_smod + 1.
    select single modtext into wf_txt
    from modsapt
    where sprsl = sy-langu
    and name = wa_tadir-obj_name.
    format color col_normal intensified off.
    when 'SXSD'.
    For BADis
    wf_badi = wf_badi + 1 .
    select single text into wf_txt
    from sxs_attrt
    where sprsl = sy-langu
    and exit_name = wa_tadir-obj_name.
    format color col_normal intensified on.
    endcase.
    write:/1 sy-vline,
    2 wa_tadir-obj_name hotspot on,
    41 sy-vline ,
    42 wf_txt,
    105 sy-vline.
    at end of object.
    write : /(105) sy-uline.
    endat.
    endloop.
    write:/(105) sy-uline.
    skip.
    format color col_total intensified on.
    write:/ 'No.of Exits:' , wf_smod.
    write:/ 'No.of BADis:' , wf_badi.
    else.
    format color col_negative intensified on.
    write:/(105) 'No userexits or BADis exist'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(105) 'Transaction does not exist'.
    endif.
    at line-selection.
    data : wf_object type tadir-object.
    clear wf_object.
    get cursor field field1.
    check field1(8) eq 'WA_TADIR'.
    read table jtab with key obj_name = sy-lisel+1(20).
    move jtab-object to wf_object.
    case wf_object.
    when 'SMOD'.
    set parameter id 'MON' field sy-lisel+1(10).
    call transaction 'SMOD' and skip first screen.
    when 'SXSD'.
    set parameter id 'EXN' field sy-lisel+1(20).
    call transaction 'SE18' and skip first screen.
    endcase.
    reward for useful answers
    regards
    Nagesh.Paruchuri

  • WRITE_BACK BADI for Parent Level Data Save

    Hi Experts,
    I am using write back badi for Parent level data saving in BPC 10, but my requirement is to save data at parent level for time period 2007.Q1 without segregating at corresponding base members level.
    Is it possible so? if yes , please suggest.
    I will highly appreciate for your quick response.
    Regards,
    Dipesh Mudras

    Hi Dipesh,
    BPC NetWeaver related questions should be posted in the corresponding forum, cf.
    SAP Planning and Consolidation, version for SAP NetWeaver
    Regards,
    Gregor

  • Need exit or Badi for updating Warranty data in IE02 while Prod Order conf.

    Hi All,
    I need a user exit or Badi for updating the Warranty data in IE02(Equipment Master) while production order confirmation(CO15)?
    I need to update the Begin guarantee date from Production order and warranty master type in IE02 while confirming the production order.
    Thanks,
    Sudha

    Hi,
    Are you saying first create notification,then service order
    and then Sales order.
    But the requirement is create notification then sales order and when you go in va02 and while modifying the sales order and create service order.
    Thanks & regards,
    chetan.

  • Need a BADI for Change Own Data Application to implement customer needs

    Hi All,
      I wanted to know the specific BADI which could be used for doing customer specific coding for 'Change Own Data" application.
    Here the need is to do some business specific checks to suit the the customer needs
    Best Regards,
    Sowmya

    Hi Sowmya,
    We are also having same kind of requirement so I was wondering if you can help me with the kind of solution that you implemented. BADI name or Implementation code etc.,
    Appreciate any inputs on this...
    Thanks,
    Rgds,
    Lakshmi

  • User Exit or BADI for COR1/COR2

    Dear Experts,
    Can you please tell me if we have any user-exit or BADI for chaning the value of the technical completion date field
    i.e. AUFK-IDAT2 while saving the Process Order in COR1 or COR2?
    Thanks,
    Praveen

    Hi Praveen,
    Implement the customer exit EXIT_SAPLCOKO_006 in enhancement
    PPCO0020  Process order: Display/change order header data
    This is only importing one field I_AUFNR.
    but try the logic below.
    data: lv_fnam type char16 value '(SAPLCOKO)caufvd'.
    field-symbols : <fs_caufvd> type caufvd.
    your checks for changing the field IDAT2 (Technical completion date).
    Try to change <fs_caufvd>-IDAT2 field value.
    Regards,
    Dwarakanath.S

  • BADI for PM Order data change

    Dear all,
    In one of our requirements, we need to update the data present on the CAUFVD structure before AUFK is updated.
    There is an existing Z bespoke field on the table AUFK added through an include. As a part of the Order creation, this field remains empty and is generally filled in through a workflow that runs after the order is saved.
    The requirement now is to update this field as a part of the Order creation process and it has to be calculated using a Function Module.
    I was trying to see if we can use WORKORDER_UPDATE BADI for this purpose, but seems like this BADI doesn't allow users to Modify/Update the contents of CAUFVD structure. And we haven't found any user exits for the same purpose.
    Is there any way I can update the Z field on the CAUFVD structure through a BADI or an User Exit please?
    Warm regards,
    Vijay.

    Hi,
    After upgardeecc5.0 to ecc 6.0  BADI_SD_SALES_ITEM badi is migrated to spot with same name,so now this spot not working and its saying SAP internal use,but in ecc5.0 we have a code its not effecting on ecc6.0.
    Please help on this .
    Regards
    Mahesh

  • BADI for Foreign Trade Data(EIKP)

    Hi ,
    I need to update/change Foreign Trade Data(EIKP) during Invoice creation.
    I would just like to ask if any of you have used a BADI for Updating values for  Foreign Trade Data during Invoice Creation (VF01).
    Thanks!
    Donna
    Edited by: Donna Cherr Matias on Feb 26, 2009 6:04 PM
    Edited by: Donna Cherr Matias on Feb 27, 2009 3:29 AM

    Hi ,
    I need to update/change Foreign Trade Data(EIKP) during Invoice creation.
    I would just like to ask if any of you have used a BADI for Updating values for  Foreign Trade Data during Invoice Creation (VF01).
    Thanks!
    Donna
    Edited by: Donna Cherr Matias on Feb 26, 2009 6:04 PM
    Edited by: Donna Cherr Matias on Feb 27, 2009 3:29 AM

  • User exit or badI for COR1 transaction

    Hi Experts,
    Is there any user exit, badi or Enhancement point to assign our own number range for Process order based on Plant. I searched thru all available userexits for COR1 but didnt able to find the exact one, please suggest in this regard...
    Thanks.............

    Hi,
    The following r the userexits.
    CCOWB001            Customer exit for modifying menu entries
    COIB0001            Customer Exit for As-Built Assignment Tool
    COZF0001            Change purchase req. for externally processed operation
    COZF0002            Change purchase req. for externally procured component
    PPCO0001            Application development: PP orders
    PPCO0002            Check exit for setting delete mark / deletion indicator
    PPCO0003            Check exit for order changes from sales order
    PPCO0004            Sort and processing exit: Mass processing orders
    PPCO0005            Storage location/backflushing when order is created
    PPCO0006            Enhancement to specify defaults for fields in order header
    PPCO0007            Exit when saving production order
    PPCO0008            Enhancement in the adding and changing of components
    PPCO0009            Enhancement in goods movements for prod. process order
    PPCO0010            Enhancement in make-to-order production - Unit of measure
    PPCO0012            Production Order: Display/Change Order Header Data
    PPCO0013            Change priorities of selection crit. for batch determination
    PPCO0015            Additional check for document links from BOMs
    PPCO0016            Additional check for document links from master data
    PPCO0017            Additional check for online processing of document links
    PPCO0018            Check for changes to production order header
    PPCO0019            Checks for changes to order operations
    PPCO0021            Release Control for Automatic Batch Determination
    PPCO0022            Determination of Production Memo
    PPCO0023            Checks Changes to Order Components
    STATTEXT            Modification exit for formatting status text lines
    Regards,
    Deepthi.

  • Exit/BADi for GR Posting Date =PO date

    Hi all ,
    Is there any Exit or BAdi for restricting users to post GR date greater than PO creation date.
    Regards
    Gibi Philip

    Hii,
    Check the below exit
    MB_CF001 Updating of material document data upon posting
    or
    BADI
    MB_DOCUMENT_BADI
    Ask the abaper to check the above exits
    Regards,
    Kumar

  • 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 K

    Thanks 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

  • User exit or badi for saving the data in mm01

    Hi All,
    I added one custom screen in mm01  using SPRO ,as well as i added 2 new fields in makt table using Append statement, now the problem is am not able to save the custom screen data in standard makt table  can any one  help me in this ,tell me which Badi or Exit is useful for this requirement.
    Thanks,
    Priyanka
    Edited by: priyankanukala on Feb 21, 2012 7:55 AM
    Edited by: priyankanukala on Feb 21, 2012 8:01 AM
    Edited by: priyankanukala on Feb 21, 2012 8:04 AM

    Hi
    You don't need them. See Note 44410 - Integrating cust.-specific fields in matl master for further information, and copy the code for PAI event in your custom dynpro. You need something similar to this:
    process after input.
    *coding......
      chain.
        field: mara-zzfield1,
               mara-zzfield2.
        module checks_on_zz on chain-request.
      endchain.                                               
    * coding .......
    I hope this helps you
    Regards
    Eduardo
    Edited by: E_Hinojosa on Feb 21, 2012 9:26 AM

  • BADI for COR1 transaction(Process orders)

    HI All,
    My requirement is to create a idoc  for the process order which is released from COR1.(idoc part is completed)
    Can any one suggest me a badi which will triger while releasing the process order from COR1 (not cor5),
    i worked with workorder_update and BEFORE_UPDATE but they are not satisfying my requirement bcoz when releasing a process order from COR1 the order number is not creating it is in the form of %00000001..so i need a badi which will get the process order after it is saved and has to triger the code which we written in that badi.

    Hi Suresh,
    My Application is also like that but instead there is COR5. Is it possible to pass me the codes you used using BADI. Eventhough its not satisfying ur requirement, I just want to see how ur doing it.
    Please.
    Thank you.

  • Code  of ME_process_cust_Po BADI for checking item data?

    Hi all,
    While users are creating new PO in ME21N, I have to check the condition records for the Materials they entered.
    If the condition record is not maintained for the respective material The creation of PO while saving it , should not be  allowed  and a message should be displayed.
    Please mention  the respective method and code to do this?
    Thanks
    Vamshi.

    Hi ,
    this is the sample code for Item check, by using mm_messages_mac(include u can raise error msg based on the INFNR(info record) field.
      DATA: ls_mepoitem TYPE mepoitem,
            ls_customer TYPE mepo_badi_exampl,
            ls_tbsg     TYPE tbsg.
      INCLUDE mm_messages_mac. "useful macros for message handling
    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.
    check field badi_afnam*
        IF ls_customer-badi_afnam IS INITIAL.
          mmpur_metafield mmmfd_cust_02.
          mmpur_message_forced 'W' 'ME' '083' text-003 '' '' ''.
        ENDIF.
      ENDIF.
    regards
    Prabhu

  • User exit / substiution /  badi for changing baseline date

    Dear Experts ,
                           I have a requirement to change the base line date of residual document created in F-28 / F-32 to the base line date of original document getting partially cleared .
    I have explored the option of substitution but it doesnt work as field ZBLDT is not available for substitution there .
    Please let me know any BADI / Exit which can perform this change of baseline date .
    thanks in advance

    Hi Milind,
    Following are the user-exits for F-32 :
    RFAVIS01            Customer Exit for Changing Payment Advice Segment Text
    RFEPOS00            Line item display: Checking of selection conditions
    RFKORIEX            Automatic correspondence
    SAPLF051            Workflow for FI (pre-capture, release for payment)
    F050S001            FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002            FIDCC1: Change IDoc/do not send
    F050S003            FIDCC2: Change IDoc/do not send
    F050S004            FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S005            FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006            FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007            FIDCCH Outbound: Influence on IDoc for Document Change
    F180A001            Balance Sheet Adjustment
    FARC0002            Additional Checks for Archiving MM Vendor Master Data
    I hope this will help you.
    Regards,
    Nitin.

Maybe you are looking for

  • What can I do to get iTunes to make my past music purchases available for re-download?

    I lost my Itunes music from my computer. I've tried to re-download my iTunes purchased music from "Purchased" where they all show up but it gives me no option to download. I know that they are all in the "Cloud" because I've downloaded them to my 5s.

  • Punctuation and comma keys do not respond

    Macbook Air 11" - 2012 running Lion. The period and the comma keys appear to be "dead" - not responding, also not when shift or other keys pressed simultaneous. All other keys appear to function as usual. There was no prior incident - they simply sto

  • OMS generates tones of core files in OMS_HOME?

    Hi, We recently upgraded OMS to 10.2.0.4 and found that OMS has generated lot of core files where the file size is 0 bytes.Please let me know,what might could be the cause. Thanks, Regards, Vinoth

  • Change base unit of measure

    Hi, Its me again. I need to change the base unit of measure of a material but a task listw as created via QP01. I tried to delete this via QP02 but i still cannot change the base unit of measure. Is there any way except for deleting the task list via

  • QT in background: active hotkeys?

    Hi, I've got hours and hours of .wav-files with texts that i have to type into Word.(yes, it does suck). My life would be much easier if it were possible to control the play/pause function in QT through a keyboard shortcut, without losing the focus o