ME21N Update Text in Line Item User Exit

Hi,  I have created a new PO text item for use in ME21N that I want to populate from document details held in the material master.  After entering a material number what user exit do I need to use to update internal tables for display of the document details before they are saved along with the other PO details.  I know the tables where the material document details are held.  Thanks.

BADI ME_PROCESS_PO_CUST.
Note that this BADI has a number of methods with parameters defined as "Importing" which makes it look like you cannot change data, but some of these parameters are "TYPE REF TO" objects which themselves have methods such as GET_DATA and SET_DATA that actually allow you to access and change the fields.
Search for previous posts including "ME_PROCESS_PO_CUST" - there is sample code in some of them.
In transaction SE19, if you display the BADI then select menu option goto>sample code>display, you will be able to drill down on the PROCESS_ITEM method to some SAP supplied sample code.
This includes the definitions and method calls to get the item data:
DATA: ls_mepoitem TYPE mepoitem.
ls_mepoitem = im_item->get_data( ).
You then just change relevant fields in structure ls_mepoitem and call the set_data method to pass the data back
call method im_item->set_data exporting im_data = ls_mepoitem.
Take care with what you change - SAP does not validate that you have passed back correct / consistant data.
Not sure if the text field you want will be available - you may need to look at further methods of the BADI or of the parameter objects.  If you drill down on the objects that the method parameters are defined as TYPE REF TO you will see the methods that are available - the GET_DATA and SET_DATA ones I have mentioned above are only a small part of the options.  If there are none dealing with texts at the Header / Line, then you may need to put your code in at the latest method available (once the PO number is allocated) and call the SAVE_TEXT function module to do your update - not 100% way of doing it because standard code may save in update event and have rollback handling.
To use the BADI you will need to create an implementation of it - there is a menu option in SE18 to do this, or you can use SE19.
Andrew

Similar Messages

  • Sales Order Line Items User Exit - Credit Management/ Exposure Calculation

    Hello Folks
    I am looking for a solution to a peculiar problem we have in credit management.
    In case of Drop Ship sales order life cycle, the system automatically creates two line items per sales order - one each for Freight and Handling Fees. these are NOT relevant to schedule line delivery, nor are they billed to the customer along with the material billing. The default update rule for credit control area concerned is 12. The system, on finding line items not relevant to schedule line delivery automatically switches from rule 12 to 18. This leads to Open Deliveries field (S067-OLIWW) being updated instead of Open Orders (S066-OEIKW) on saving the sales order.
    Once the sales order is billed for the material, the system should logically display net value as zero for the open order (as the 2 lines of fees and freight are not yet billed, the order is still open). But the system considers this figure at SALES DOCUMENT HEADER level and considers the net value as the total value of the sales document (including the material that is already billed).
    What I am looking for is if there is an exit available whereby the system considers only those line items whose billing status indicator is "not complete". As such, the net value should be updated to the S067-OLIKW field net of the billed items.
    Please advise if there is any such user exit available. Also, is there a way to customize this? We are exploring this at our end, but would appreciate an expert advise. Right advise will be awarded with brownie points
    Regards
    Mandar Barve

    VKM1 uses FM SD_ORDER_CREDIT_RELEASE to release orders on credit.

  • FB60  Line item User exit/BADI/BTE

    Hi Guys,
       I need a user exit/ BADI/BTE to change the  Line item in FB60 transaction.  Please let me know ifyou know  any enhancment on this. Thanks
    Regards,
    Ganesh

    Hi Dude,
    Following are the list of BADIS  for FB60 tcode
    BADI_FDCB_SUBBAS01
    BADI_LAYER
    BADI_FDCB_SUBBAS02
    PPA_CUST_BADI
    BADI_FDCB_SUBBAS03
    WRF_PREPAY_INVOICE
    BADI_FDCB_SUBBAS04
    BADI_FDCB_SUBBAS05
    ADDR_LANGU_TO_VERS
    ADDR_PRINTFORM_SHORT
    BADI_MATN1
    For your requirement the releavant badi is PPA_CUST_BADI
    Thanks & Regards
    Ramakrishna Pathi

  • Sales order line item user exit?

    Hi Folks,
    Can any one of you suggest me an user exit in sales order line item level?
    I want something which stops before/ or just after entering the quantity in the item level.
    We wanted to set up a issue which deals with rounding profile comming from CMIR record to take from Ship-to rather than standard Sold-to party functionality.
    Thanks a TON in advance.
    Praveen.

    Praveen,
    Check this post
    https://forums.sdn.sap.com/click.jspa?searchID=7098802&messageID=1674246
    Regards,
    Satish

  • User defined Characterestics not being updated in actual line items

    Gurus!
    I am using Accounting Based COPA only.
    I have defined a user based characteristic for which I am using user exit to derive.
    However, this charaterstic is not getting updated in actual line items.
    The derivation is working correctly at Sales order and Invoicing documents. (account assignment tab).
    Where could I be going wrong??
    Regards
    Saurabh

    Hi,
    Please check the settlement rule of the sales order and check whether the relevant characteristics have been maintained in the settlement rule of PSG. If not, you may have to include the same.
    Trust this helps much.
    Cheers

  • Service procurement for the free texts ( Multiple line items in PO)

    In the service procurement for the free texts ( Multiple line items in PO)referring to the same  Contract we are cretaing the POs
    thro ME59 ( Program RM06BB20)  an unusual error message appears as under:
    "_Material/Service group STGOP2 does not exist"_This Material group is unavailable in T023 as well.
    We checked the same issue by recreating with the exact data in the Test environment and everything works OK
    We are working on the R3 version 470...
    Any body faced such an issue ?
    Any clues pls?
    Regards,
    Nagarajan

    Hello,
    We have faced another issue of the same nature while a PO is being created using the tcode ME21N for service free text items referring a PR ( Service item has no Contract assigned but a fixed vendor)
    The error relates to SE419 ( Mat grp 'XXXX' does not exist)
    Any takers..
    We are using a custom doc type  for the PR
    Any hep /clue is appreciated
    Regards,
    Nagarajan

  • MIRO - Business Area not getting updated in Vendor Line item

    Hello friends,
    I am posting Vendor invoice in MIRO transaction.
    After Posting if i see the financial document generated,
    Business area has not got updated in Vendor Line item.
    What could be the problem ?
    Please help me out.
    Hari Prasath

    Hi Kale,
    Make sure the field Business area is not supressed in tx. OB14. for the GL account in line item 001.
    On the other hand, have a look to the note and kba below:
    41294 - Business area in customer/vendor item
    Kba 1727802 - Business area not getting populated in sales/ purchase tax

  • Problem in CRM_ORDER_MAINTAIN for updating amount in line items

    Hi abapers,
    I have  a scenario as follows: i want to update amount  for line items  in a transaction. i use the bapi crm_order_maintain followed by CRM_ORDER_SAVE and bapi transaction _commit . The problem is i loop the itab by passing the trnstn id , prdct code  and new amount.
    i applied the logic as given by rita tan (thread no 4)
    link:[Re: Update Pricing Document with CRM_ORDER_MAINTAIN]
    as per the logic i delete the existing value and insert the new amount . this works fine in the first  loop and in second loop it deletes the existing record but does not insert the new value . It doesn't even give error too. what may be the problem.
    here's a snapshot of the code i have written:
    loop at itab.
    SELECT SINGLE * FROM CRMD_ORDERADM_H
              WHERE OBJECT_ID = WA_ZCMR_UPDATE-Z_OBJECTID
              AND PROCESS_TYPE = P_TYPE.
                    SELECT SINGLE * FROM CRMD_ORDERADM_I
                  WHERE HEADER = CRMD_ORDERADM_H-GUID
                  AND ORDERED_PROD = WA_ZCMR_UPDATE-PRODUCT_CODE.
                  SELECT SINGLE * FROM CRMD_LINK
                    WHERE GUID_HI = CRMD_ORDERADM_H-GUID
                    AND OBJTYPE_SET = '18'.
                    SELECT  * FROM  PRCD_COND
                      INTO CORRESPONDING FIELDS OF TABLE IT_PRCD_COND
                      WHERE KNUMV = CRMD_LINK-GUID_SET
                      AND KPOSN = CRMD_ORDERADM_I-GUID
                      AND KSCHL = 'ZR12'.
                      READ TABLE IT_PRCD_COND
                      INTO WA_PRCD_COND INDEX 1.
                        DELETE  FROM PRCD_COND
                        WHERE KNUMV = WA_PRCD_COND-KNUMV
                          AND KPOSN = WA_PRCD_COND-KPOSN
                         AND KSCHL = 'ZR12'.
                          COMMIT WORK.
                          WA_PRIDOC-REF_HANDLE = '0000000001'.
                          WA_PRIDOC-REF_GUID = CRMD_ORDERADM_I-GUID.
                          WA_PRIDOC-REF_KIND = 'B' .
                          WA_COND_ADD-KSCHL = 'ZR12'.
                          WA_COND_ADD-KBETR = WA_ZCMR_UPDATE-NET_VALUE.
                          WA_COND_ADD-KPEIN = '1'.
                          WA_COND_ADD-WAERS = 'INR'.
                          INSERT WA_COND_ADD INTO TABLE IT_COND_ADD.
                          CLEAR WA_COND_ADD.
                          WA_PRIDOC-COND_ADD = IT_COND_ADD.
                          CLEAR IT_COND_ADD[].
                          INSERT WA_PRIDOC INTO TABLE IT_PRIDOC .
                          CLEAR WA_PRIDOC .
                          WA_CT_INPUT_FIELDS1-REF_HANDLE = '0000000001'.
                         WA_CT_INPUT_FIELDS1-REF_GUID = CRMD_ORDERADM_I-GUID.
                          WA_CT_INPUT_FIELDS1-REF_KIND = 'B' .
                          WA_CT_INPUT_FIELDS1-OBJECTNAME = 'PRIDOC'.
                         INSERT WA_CT_INPUT_FIELDS1  INTO TABLE IT_CT_INPUT_FIELDS1.
                          CLEAR WA_CT_INPUT_FIELDS1.
                          AT END OF Z_OBJECTID.
                            CALL FUNCTION 'CRM_ORDER_MAINTAIN'
                              EXPORTING
                                IT_PRIDOC         = IT_PRIDOC
                              CHANGING
                                CT_INPUT_FIELDS   = IT_CT_INPUT_FIELDS1
                              EXCEPTIONS
                                ERROR_OCCURRED    = 1
                                DOCUMENT_LOCKED   = 2
                                NO_CHANGE_ALLOWED = 3
                                NO_AUTHORITY      = 4
                                OTHERS            = 5.
    CALL FUNCTION 'CRM_ORDER_SAVE'
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    endat.
    endloop.
    Please help out.
    Regards,
    Navin
    Edited by: navin.c on Jan 7, 2010 10:09 AM

    Check the link below. This should help
    Re: Change Order Quantity in CRM Sales Order

  • Surcharge on Net not update in PO line item

    Hi,
      we had a problem in Surcharge on Net calculated as per condition value.  Some PO,s Surcharge+ Net value update in PO line item, some PO's not updating.
    I have checked all the configuration part. Validity periods maintained upto 9999.
    Info records valid, Vendor valid.
    Please help me.
    Regards,
    Sridhar

    Hi,
    I have checked EKPO table and I found  If Surcharge on net calculated then Item effects commitment filed (XOBLR) Updated. Otherwise surchage on net failure to calculate XOBLR not update in Table level.
    Is there any way to update XOBLR field?
    Regards,
    Sridhar

  • Retrieving the Change Texts per Line Item (Purchase Order) - Very urgent

    Hi,
    How do you retrieve the Change Texts per Line Item (Purchase Order).
    Table T166T does not list these values per line item.
    Please help. This is very urgent & important.
    Best Regards,
    John

    if you are lookin out for change of item texts ...
    then use the function module ... READ_TEXT.
    and 2 tables r used ... STXH and TLINE ....
    double click on item data ...
    goto PO TEXT tab ....
    double click on text ...
    from menu ...
    goto header ... u'll get 4 fields that u need to consider ...
    TDID
    TDOBJECT
    TDHEAD
    TDNAME
    ALL THESE U'LL FIND IN  STXH
    ITEM TEXT is stored in TLINE
    Edited by: anjali rana on Mar 5, 2008 4:55 AM

  • Subroutine program its display the text at line item as it's service order

    Hi All,
    Am looking for subroutine program its display the text at line item as it's service order, I want to view the text in sapscript in the tcode ME9F of the order text.
    Ex:- in tcode ME23N, select PO & item details in Account Assignment tab, ORDER field is not displaying for some of the orders, but while debugging I can see the ORDER values.
    Can'nt see the ORDER field in print preview, Pls let me know.
    Edited by: Nagendra DS on Feb 19, 2008 3:18 AM

    Hi,
    If you are retrieving the values in the print program, the values will definetly get populated to the sap script. In case of subroutines in the form, the values you pass it to the structure ITCSY should be characters only.
    Hope this helps.
    Sudha

  • PO line level user exit

    Which is the PO line level user exit available?
    Please advice.

    HI.
      Goto se24 class builder ,
    Display the Class Cl_exithandler . There is a function name get_instance, Double click on it and pu a session breakpoint on the function METHOD cl_exithandler=>get_class_name_by_interface
    Now run the Transaction, it will be executed in the debugging mode and find the value of the variable... exit_name in it.
    You will get the exit name.
    regards,
    Kapil.

  • User exit - for ME21N, 22N, 23N - at line item level

    Hi,
    I want to add new text field to display the description of the MPM(material) in it.
    That filed I want to add to the Account Assignment tab at item level.
    How to add that field on the screen, I mean any screen exit for this?
    and function module to pass the data to that field.
    If anybody worked on such problem then pls. let me know.
    Thanks in advance.
    -- Umesh

    Hi,
    These are the user exits for me21n.                
    AMPL0001          
    LMEDR001          
    LMELA002          
    LMELA010          
    LMEQR001          
    M06B0001          
    M06B0002          
    M06B0003          
    M06B0004          
    M06B0005          
    M06E0004          
    M06E0005          
    ME590001          
    MEETA001          
    MEFLD004          
    MELAB001          
    MEVME001          
    MM06E001          
    MM06E003          
    MM06E004          
    MM06E005          
    MM06E007          
    MM06E008          
    MM06E009          
    MM06E010          
    MMAL0001          
    MMAL0002          
    MMAL0003          
    MMAL0004          
    MMDA0001          
    MMFAB001     
    Regards
    praveen

  • Substitution for text of line items in purchase order

    Hi everyone,
    I have this requirement: suppose we create a purchase order, and that this PO is posted to a new (or yet existing) fixed asset. We must update the text in the line item of the PO with some information of the asset (new or existing).
    Any BAdI's/user-exits/enhancements to do so?
    Any help will be appreciated. Best regards,
    Alvaro

    Finally I decided to repair a standard object to do such substitution

  • P.O line items change exit

    Hi All
    Could any one let me know the user exit name used to modify the line items values of a P.O. in the transaction ME22N. I am using the exit EXIT_SAPMM06E_012. Its not changing the values of EKPO. Please suggest.
    Thank You,
    Suresh

    DATA: WA_ERNAM LIKE EBAN-ERNAM.
    IF ( SY-TCODE = 'ME21' OR
         SY-TCODE = 'ME21N' ) AND I_EKKO-BSART = 'NB'.
      LOOP AT TEKPO.
        IF NOT TEKPO-BANFN IS INITIAL.
          SELECT SINGLE ERNAM
                   FROM EBAN
                   INTO WA_ERNAM
                  WHERE BANFN = TEKPO-BANFN AND
                        BNFPO = TEKPO-BNFPO.
          IF SY-SUBRC = 0.
            TEKPO-AFNAM   = WA_ERNAM.
            TEKPO-ZREQUIS = WA_ERNAM.
           MODIFY TEKPO TRANSPORTING AFNAM ZREQUIS
                        WHERE BANFN = TEKPO-BANFN AND
                              BNFPO = TEKPO-BNFPO.
            MODIFY TEKPO INDEX SY-TABIX.
          ENDIF.
        ELSE.
          TEKPO-AFNAM   = SY-UNAME.
          TEKPO-ZREQUIS = SY-UNAME.
         MODIFY TEKPO TRANSPORTING AFNAM ZREQUIS
                      WHERE BANFN = TEKPO-BANFN AND
                            BNFPO = TEKPO-BNFPO.
        ENDIF.
      ENDLOOP.
    ENDIF.
    The above is the code i have written in EXIT_SAPMM06E_012 its not showing the changed values of AFNAM and ZREQUIS in EKPO. That is in ME21N while creating the P.O.
    Please suggest.
    Thank You
    Suresh

Maybe you are looking for

  • EDI 832-Sales/pricing catalogue from vendor

    Hello Experts, We are setting up sales/price catalogue interface from our vendors to SAP through EDI 832. I'm new to Retail and wanted to know the process of once we receive the 832 idoc from them what are the follow up documents that idoc generates

  • CMC Authentication Active Directory Synchronization Updates Drops Users

    We are using SAP Business Objects on a Windows Server 2008 box and have configured single sign-on using Active Directory. We schedule the Active Directory in the Authentication tab to synchronize every day. Yesterday not all of the users updated and

  • Output to other formats for web viewing

    HI all, I was wondering if anyone has found anything handy for shunting out projects for web approvals. I use h264 using the broadband setting high on my work and it looks super. for 16 9 i scale the dimensions to 480 x 270 manually. The file size is

  • Can't reclaim disk space

    (Posting on behalf of friend who is a computer novice and hasn't managed to register on this site) My friend has a 12" PB running 10.3.9 and using iTunes 6.0.4. He has a 60gb HD Two days ago, he deleted all his iTunes files and started re-recording a

  • 10.5.5 Can't open previously created Illustrator files!!

    I've recently updated to 10.5.5 and now I can't open previously created Illustrator files, prior to the update, I had no problems. I get the error message- can't open the illustration with an OK box which, when clicked, opens the document in preview