Use of SAVE_TEXT in customer exits / BADI for purchase order

Hi All,
I am trying to save some long text by using SAVE_TEXT function module in a badi implementation for purchase order header text. The same is working fine if i try to update the PO header text via a report. But if i try using badi (the code is written in a PAI event for the BADI), then though the text transfer and save is successful during the code excution, but for the first time when i add any text its not visible in ME22N tcode. Since its an online event. But when i double click on that editor and the sap script editor gets opened. then i press back button, the text is appearing on the same small screen edtor . after this any number of time i edit or delete text, the save_text function module works fine.
My issue is why for the first time always i have to double click on the editor to open the sap script editor. I have also included commit_text in this case after save_text FM.
the requirement here goes like this. in one tab for PO header the user will enter some number (This is a customizing screen implemented through badi.) and the corresponsing discription should appear when user clicks on text tab in po header screen (me21n / me22n).
Kindly help.
Thanks
Mamata

Hi  mamata rath
I have solve the problem which similar to yours.  the code which is as the following
DATA: textline TYPE tdline,
        name TYPE c LENGTH 70,
        glines TYPE TABLE OF tline,
        gline  LIKE LINE OF glines,
        ls_header TYPE thead.
     CONCATENATE ch_eban-banfn ch_eban-bnfpo INTO name.
         ls_header-tdobject = 'EBAN'.
         ls_header-tdname = name.
         ls_header-tdid = 'B01'.
         ls_header-tdspras = sy-langu.
         CALL FUNCTION 'SAVE_TEXT'
           EXPORTING
*           CLIENT                = SY-MANDT
             header                = ls_header
*           INSERT                = ' '
*           SAVEMODE_DIRECT       = ' '
*           OWNER_SPECIFIED       = ' '
*           LOCAL_CAT             = ' '
*         IMPORTING
*           FUNCTION              =
*           NEWHEADER             =
           tables
             lines                 = glines
           EXCEPTIONS
             ID                    = 1
             LANGUAGE              = 2
             NAME                  = 3
             OBJECT                = 4
             OTHERS                = 5
          IF sy-subrc = 0.
              CALL FUNCTION 'COMMIT_TEXT'
                EXPORTING
                  OBJECT                = 'EBAN'
                  NAME                  = name
*                ID                    = '*'
*                LANGUAGE              = '*'
*                SAVEMODE_DIRECT       = ' '
*                KEEP                  = ' '
*                LOCAL_CAT             = ' '
*              IMPORTING
*                COMMIT_COUNT          =
*              TABLES
*                T_OBJECT              =
*                T_NAME                =
*                T_ID                  =
*                T_LANGUAGE            =
          ENDIF.

Similar Messages

  • User Exit/BADI for Purchase Order and Purchase Requisitions

    HI,
    I have a requireent where i have to check the the user does not enter both Subitems and Over a Limit for a Service Purchase Requisition.
    Is there a User Exit or Badi that i can use where this information is availaible.
    also i have to check that release strategy is assigned to every purchase order where the version has been completed.
    Is there a User Exit or Badi where Information of EREV table is availaible.
    Regards,
    Tarun Bahal

    For Purchachase requisition , the BADIs and USER EXITS are
    ME_COMMITMNT_PARKING BAdI for Redefining Commitment Interface When Parking
    ME_MEREQ_PARKING BAdI Purchase Requisition: "Hold"
    ME_REQ_HEADER_TEXT Copy Header Text: Enjoy Purchase Requisition
    try with the above BADI's
    MEREQ001 Customers' Own Data in Purchase Requisition
    for Purchase order , the BADIs and USER EXITS are
    ARC_MM_EKKO_CHECK BAdI: Enhancement of Archivability Check (MM_EKKO)
    ARC_MM_EKKO_WRITE BAdI: Enhancement of Scope of Archiving (MM_EKKO)
    EXTENSION_US_TAXES Extended Tax Calculation with Additional Data
    MEGUI_LAYOUT BAdI for Enjoy Purchasing GUI
    ME_ACTV_CANCEL_PO BAdI for Activating the Cancel Function at Header Level
    ME_BADI_DISPLAY_DOC BAdI for Internal Control of Transaction to be Invoked
    ME_BAPI_PO_CREATE_01
    ME_BAPI_PO_CREATE_02
    ME_BAPI_PR_CREATE_01
    ME_BAPI_PR_CREATE_02
    ME_BSART_DET Change document type for automatically generated POs
    ME_CCP_ACTIVE_CHECK BAdI to check whether CCP process is active
    ME_CCP_BESWK_AUTH_CH BAdI for authorization checks for procuring plant
    ME_CCP_DEL_DURATION Calc. of Delivery Duration in CCP Process (Not in Standard)
    ME_CHANGE_CHARACTER Customer-Specific Characteristics for Product Allocation
    ME_CHANGE_OUTTAB Enrich ALV Output Table in Purchasing
    ME_CHECK_ALL_ITEMS Run Through Items Again in the Event of Changes in EKKO
    ME_CHECK_OA Check BAdI for Contracts
    ME_CHECK_SOURCES Additional Checks in Source Determination/Checking
    ME_CIN_LEINRF2R BADI for CIN India - Delivery charges
    ME_CIN_LEINRF2V BADI for LEINRF03 excise_invoice_details
    ME_CIN_MM06EFKO Copy PO data for use by Country version India
    ME_CIP_ALLOW_CHANGE Configuration in Purchasing: Changeability Control
    ME_CIP_REF_CHAR Enables Reference Characteristics in Purchasing
    ME_COMMITMENT_RETURN Commitment for return item
    ME_COMMITMENT_STO_CH BadI for checking if commitments for STOs are active
    ME_COMMTMNT_PO_RELEV Check for Commitment-Relevance of Purchase Orders
    ME_COMMTMNT_PO_REL_C Check for Commitment-Relevance of Purchase Orders
    ME_COMMTMNT_REQ_RELE Check of Commitment Relevance of Purchase Requisitions
    ME_COMMTMNT_REQ_RE_C Check of Commitment Relevance of Purchase Requisitions
    ME_DEFINE_CALCTYPE Control of Pricing Type: Additional Fields
    ME_DP_CLEARING Clearing (Offsetting) of Down Payments and Payment Requests
    ME_FIELDSTATUS_STOCK FM Account Assignment Behavior for Stock PR/PO
    ME_GUI_PO_CUST Customer's Own Screens in Enjoy Purchase Order
    ME_HOLD_PO Hold Enjoy Purchase Orders: Activation/Deactivation
    ME_INFOREC_SEND Capture/Send Purchase Info Record Changes - Internal Use
    ME_PO_PRICING Enhancements to Price Determination: Internal
    ME_PO_PRICING_CUST Enhancements to Price Determination: Customer
    ME_PO_SC_SRV BAdI: Service Tab Page for Subcontracting
    ME_PROCESS_COMP Processing of Component Default Data at Time of GR: Customer
    ME_PROCESS_PO Enhancements for Processing Enjoy Purchase Order: Intern.
    ME_PROCESS_PO_CUST Enhancements for Processing Enjoy Purchase Order: Customer
    ME_PROCESS_REQ Enhancements for Processing Enjoy PReqs: Internal
    ME_PROCESS_REQ_CUST Enhancements for Processing Enjoy PReqs: Customer
    ME_PURCHDOC_POSTED Purchasing Document Posted
    ME_RELEASE_CREATE BAdI: Release Creation for Sched.Agrmts with Release Docu.
    ME_REQ_OI_EXT Commitment Update in the Case of External Requisitions
    ME_REQ_POSTED Purchase Requisition Posted
    ME_TAX_FROM_ADDRESS Tax jurisdiction code taken from address
    ME_TRF_RULE_CUST_OFF BADI for Deactivation of Field T161V-REVFE
    ME_TRIGGER_ATP Triggers New ATP for Changes in EKKO, EKPO, EKPV
    ME_WRF_STD_DNG PO Controlling Reminder: Extension to Standard Reminder
    MM_DELIVERY_ADDR_SAP Determination of Delivery Address
    MM_EDI_DESADV_IN Supplementation of Delivery Interface from Purchase Order
    SMOD_MRFLB001 Control Items for Contract Release Order
    AMPL0001  User subscreen for additional data on AMPL             
    LMEDR001  Enhancements to print program                          
    LMELA002  Adopt batch no. from shipping notification when posting
    LMELA010  Inbound shipping notification: Transfer item data from 
    LMEQR001  User exit for source determination                     
    LMEXF001  Conditions in Purchasing Documents Without Invoice Rece
    LWSUS001  Customer-Specific Source Determination in Retail       
    M06B0001  Role determination for purchase requisition release    
    M06B0002  Changes to comm. structure for purchase requisition rel
    M06B0003  Number range and document number                       
    M06B0004  Number range and document number                       
    M06B0005  Changes to comm. structure for overall release of requi
    M06E0004  Changes to communication structure for release purch. d
    M06E0005  Role determination for release of purchasing documents 
    ME590001  Grouping of requsitions for PO split in ME59           
    MEETA001  Define schedule line type (backlog, immed. req., previe
    MEFLD004  Determine earliest delivery date f. check w. GR (only P
    MELAB001  Gen. forecast delivery schedules: Transfer schedule imp
    MEQUERY1  Enhancement to Document Overview ME21N/ME51N           
    MEVME001  WE default quantity calc. and over/ underdelivery toler
    MM06E001  User exits for EDI inbound and outbound purchasing docu
    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 P
    MM06E008  Monitoring of contr. target value in case of release or
    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 proces
    MMAL0004  ALE purchasing info record distribution: Inbound proces
    MMDA0001  Default delivery addresses                             
    MMFAB001  User exit for generation of release order              
    MRFLB001
    Regards,
    Anirban

  • I found a exit CIFPUR02 for purchase order inbound process.is it suitable?

    I found a exit CIFPUR02 for purchase order inbound process.is it suitable?
    my idoc is PORDCR102 AND message type is PORDCR1. my requirement is this is EXIT should trigger before saving the data in me21n.
    Edited by: rk.kolisetty on Jun 24, 2010 4:59 PM

    Hi,
    Following are the user exit relevant to T Code ME21n.
    AMPL0001  User subscreen for additional data on AMPL
    LMEDR001  Enhancements to print program
    LMEKO001  Extend communications structure KOMK for pricing
    LMEKO002  Extend communications structure KOMP for pricing
    LMELA002  Adopt batch no. from shipping notification when posting
    LMELA010  Inbound shipping notification: Transfer item data from
    LMEQR001  User exit for source determination
    LMEXF001  Conditions in Purchasing Documents Without Invoice Rece
    LWSUS001  Customer-Specific Source Determination in Retail
    M06B0001  Role determination for purchase requisition release
    M06B0002  Changes to comm. structure for purchase requisition rel
    M06B0003  Number range and document number
    M06B0004  Number range and document number
    M06B0005  Changes to comm. structure for overall release of requi
    M06E0004  Changes to communication structure for release purch. d
    M06E0005  Role determination for release of purchasing documents
    ME590001  Grouping of requsitions for PO split in ME59
    MEETA001  Define schedule line type (backlog, immed. req., previe
    MEFLD004  Determine earliest delivery date f. check w. GR (only P
    MELAB001  Gen. forecast delivery schedules: Transfer schedule imp
    MEQUERY1  Enhancement to Document Overview ME21N/ME51N
    MEVME001  WE default quantity calc. and over/ underdelivery toler
    MM06E001  User exits for EDI inbound and outbound purchasing docu
    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 P
    MM06E008  Monitoring of contr. target value in case of release or
    MM06E009  Relevant texts for "Texts exist" indicator
    MM06E010  Field selection for vendor address
    MM06E011  Activate PReq Block
    MMAL0001  ALE source list distribution: Outbound processing
    MMAL0002  ALE source list distribution: Inbound processing
    MMAL0003  ALE purcasing info record distribution: Outbound proces
    MMAL0004  ALE purchasing info record distribution: Inbound proces
    MMDA0001  Default delivery addresses
    MMFAB001  User exit for generation of release order
    MRFLB001
    Rgd,
    Chetan

  • User exit/BADI  for Purchase requisition through release of Process order

    Hi ,
    i need to add some text to the Pur Req.
    The Pur Req will be created THROUGH the release of PROCESS order. Please let me know any exits are available for the same.
    regards

    Hi
    Check the following Exits and BADI for Pur Requisition
    Enhancement
    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
    MM06E011                                Activate PReq Block
    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
    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
    M06B0003                                Number range and document number
    MEQUERY1                                Enhancement to Document Overview ME21N/ME51N
    MELAB001                                Gen. forecast delivery schedules: Transfer schedule implem.
    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
    Business Add-in
    ME_PROCESS_REQ_CUST                     Enhancements for Processing Enjoy PReqs: Customer
    ME_PROCESS_REQ                          Enhancements for Processing Enjoy PReqs: Internal
    ME_PROCESS_PO_CUST                      Enhancements for Processing Enjoy Purchase Order: Customer
    ME_PROCESS_PO                           Enhancements for Processing Enjoy Purchase Order: Intern.
    ME_PROCESS_COMP                         Processing of Component Default Data at Time of GR: Custome
    ME_PO_SC_SRV                            BAdI: Service Tab Page for Subcontracting
    ME_PO_PRICING_CUST                      Enhancements to Price Determination: Customer
    ME_PO_PRICING                           Enhancements to Price Determination: Internal
    ME_INFOREC_SEND                         Capture/Send Purchase Info Record Changes - Internal Use
    ME_HOLD_PO                              Hold Enjoy Purchase Orders: Activation/Deactivation
    ME_GUI_PO_CUST                          Customer's Own Screens in Enjoy Purchase Order
    ME_FIELDSTATUS_STOCK                    FM Account Assignment Behavior for Stock PR/PO
    ME_DP_CLEARING                          Clearing (Offsetting) of Down Payments and Payment Requests
    ME_PURCHDOC_POSTED                      Purchasing Document Posted
    SMOD_MRFLB001                           Control Items for Contract Release Order
    EXTENSION_US_TAXES                      Extended Tax Calculation with Additional Data
    ARC_MM_EKKO_WRITE                       BAdI: Enhancement of Scope of Archiving (MM_EKKO)
    ARC_MM_EKKO_CHECK                       BAdI: Enhancement of Archivability Check (MM_EKKO)
    MM_EDI_DESADV_IN                        Supplementation of Delivery Interface from Purchase Order
    MM_DELIVERY_ADDR_SAP                    Determination of Delivery Address
    ME_WRF_STD_DNG                          PO Controlling Reminder: Extension to Standard Reminder
    ME_TRIGGER_ATP                          Triggers New ATP for Changes in EKKO, EKPO, EKPV
    ME_TRF_RULE_CUST_OFF                    BADI for Deactivation of Field T161V-REVFE
    ME_TAX_FROM_ADDRESS                     Tax jurisdiction code taken from address
    ME_REQ_POSTED                           Purchase Requisition Posted
    ME_REQ_OI_EXT                           Commitment Update in the Case of External Requisitions
    ME_RELEASE_CREATE                       BAdI: Release Creation for Sched.Agrmts with Release Docu.
    ME_DEFINE_CALCTYPE                      Control of Pricing Type: Additional Fields
    ME_CHANGE_OUTTAB                        Enrich ALV Output Table in Purchasing
    ME_CHANGE_CHARACTER                     Customer-Specific Characteristics for Product Allocation
    ME_CCP_DEL_DURATION                     Calc. of Delivery Duration in CCP Process (Not in Standard)
    ME_CCP_BESWK_AUTH_CH                    BAdI for authorization checks for procuring plant
    ME_CCP_ACTIVE_CHECK                     BAdI to check whether CCP process is active
    ME_BSART_DET                            Change document type for automatically generated POs
    ME_BAPI_PR_CREATE_02
    ME_BAPI_PR_CREATE_01
    ME_BAPI_PO_CREATE_02
    ME_BAPI_PO_CREATE_01
    ME_BADI_DISPLAY_DOC                     BAdI for Internal Control of Transaction to be Invoked
    ME_ACTV_CANCEL_PO                       BAdI for Activating the Cancel Function at Header Level
    MEGUI_LAYOUT                            BAdI for Enjoy Purchasing GUI
    ME_CHECK_ALL_ITEMS                      Run Through Items Again in the Event of Changes in EKKO
    ME_COMMTMNT_REQ_RE_C                    Check of Commitment Relevance of Purchase Requisitions
    ME_COMMTMNT_REQ_RELE                    Check of Commitment Relevance of Purchase Requisitions
    ME_COMMTMNT_PO_REL_C                    Check for Commitment-Relevance of Purchase Orders
    ME_COMMTMNT_PO_RELEV                    Check for Commitment-Relevance of Purchase Orders
    ME_COMMITMENT_STO_CH                    BadI for checking if commitments for STOs are active
    ME_COMMITMENT_RETURN                    Commitment for return item
    ME_CIP_REF_CHAR                         Enables Reference Characteristics in Purchasing
    ME_CIP_ALLOW_CHANGE                     Configuration in Purchasing: Changeability Control
    ME_CIN_MM06EFKO                         Copy PO data for use by Country version India
    ME_CIN_LEINRF2V                         BADI for LEINRF03 excise_invoice_details
    ME_CIN_LEINRF2R                         BADI for CIN India - Delivery charges
    ME_CHECK_SOURCES                        Additional Checks in Source Determination/Checking
    ME_CHECK_OA                             Check BAdI for Contracts
    Reward points if useful
    Regards
    Anji

  • User exit or BADI for purchase order

    Hi,
    I want send outbound IDOC for purchase order to 3rd party integration system.
    It is too hard to map between standard purchase order IDOC and business object of 3rd party system because the structure of standard purchase order IDOC is so complicated.
    So I want bring purchase order data into CBO table when purchase order is created or released. And this data will be inserted CBO IDOC for more simple structure than standard one.
    I'm trying to find some of user exit or BADI to insert from standard purchase order to CBO table in the time of purchase order is created or released.
    And I'm trying to find another way using message type.
    As far as I know it is possible to set sending IDOC in the purchase order message type setting in IMG.
    Is anyone who has related situation or know the way to do this?

    Hi,
    I have similar requirement, however the BADI name you mentioned does not exist.
    Pls let me know the right one.
    Thanks,
    Dipak

  • User-Exit message for Purchase Order

    Hello,
    I've implemented a specific type of message (ZNEU) for purchase order.
    With some specifics conditions (not managed in SPRO), I'd like that the ouput message of a purchase order is either the standard one NEU or my specific ZNEU..but noth both as actually.
    Is there any user-exit where I can code and change the ouput message determination  ?
    Thanks a lot in advance.
    Best regards
    Fanny PONEL ( GROUX).

    No user exit for this but this can be control by MN04.
    Here you can control the ouyput type trigger
    youmay need to configure the access seq and maintian that for your ZNEU conditon.

  • User Exit/BADI for Production Order Availability Check

    Hi PP experts,
    Is there any user exit or BADI which can be used for Production Order Availability Check during order creation/release or while running collective availability check (COMAC) to include additional check conditions such as do not commit quantity (commitment qty = 0) if storage location for a component is missing in the production order due to storage location is not maintained/specified for that component in the material master.
    Note: In this case the availability check is set (configured)  to check at the storage location level.

    Dear ,
    Availablity Check is not Plant Specific or Storage Loaction spefic .ATP does not check the stock for any particualar stock in storage loaction rather it cheks various stocks based inward and out ward movement time through PR/PO/Dependent /Planned Order /Stock Type  irrespective of any Storage Location .
    BAPI which can be used :
    1.BAPI_PRODORD_CHECK_MAT_AVAIL
    can we exclude materials of prod order in availability check
    what is availability check concept  how it is used in SAP
    Check the above if it is useful
    Regards
    JH

  • BADI for Purchase  Order

    Hi,Friends
    I Want to Implement BADI , Which is already available in SAP.
    The Path for BADI is given below.
    SPRO->SAP Reference IMG->Materials Management->Purchasing->Business Add-Ins for Purchasing
    Name of BADI
    1 Control of Pricing Type: Additional Fields : ME_DEFINE_CALCTYPE
    2.Run Through Items Again in the Event of Changes in EKKO : ME_CHECK_ALL_ITEMS
    This enhancement is about Transaction Code ME23N for creating Purchase Order.
    I am not getting what exactly this BADI does?
    while creating purchase order and Price determination process ,When i define Incoterms at Header level i want to change condition type for Item Level according to our requirement.
    my problem is that , i don't have parameters to pass condition types.
    can anybody tell me the solution?

    Hi archana,
    actually i want to use the same BAdi and method (PROCESS_ITEM).
    Question: did you use parameter GET_HEADER of method PROCESS_ITEM ?
    my problem: i want to read BSART from MEPOHEADER-data and according to result i want check MEPOITEM-data (here: WEPOS)
    ls_mepoitem = im_item->get_data( )
    works, but i did not find out how to use
    ...->get_header( )
    If you used it, can you paste© your source code ???
    Thanx a lot !
    Jörg
    P.S. it's my first BAdI
    -- no more help needed ! Problem solved by adding own post!!! ---
    Message was edited by: Jörg Sauterleute

  • BADI for purchase order item confirmation?

    Hi all,
    In Purchase Order change mode (ME22N), we want to calculate the delivery date based on the confirmation date that was entered in the PO item detail, confirmation tab (instead of based on the PO creation date).
    Please help by specifing Which BADI should we use for that purpose? And which method will be helpful? 
    Thanks,
    Vamshi.

    Hi
    You can use BADI ME_PROCESS_PO_CUST
    Ranga

  • User Exit MIGO for Purchase Orders

    I need to check a purchase order during the Migo process.
    I tried the User Exit EXIT_SAPLEINR_001, but the break-point has no effect. The user- exit is useful for schedule agrmts but it seems that there is a different handling.
    Do you have an idea where I can check the MIGO date?

    hi alexander,
    this program will display all the user exits available for any specified Tcode.
    when u execute this code...... it will ask for tcode..... u enter any tcode.... it will display all available exits for specified tcode.....
    i hope this may help u...... all the best....
    report y_user_exit .
    tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
    tables : 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 obligatory.
    select single * from tstc where tcode eq p_tcode.
    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 = 'SMOD'
    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:/(95) sy-uline.
    format color col_heading intensified on.
    write:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    write:/(95) sy-uline.
    loop at jtab.
    select single * from modsapt
    where sprsl = sy-langu and
    name = jtab-obj_name.
    format color col_normal intensified off.
    write:/1 sy-vline,
    2 jtab-obj_name hotspot on,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    endloop.
    write:/(95) sy-uline.
    describe table jtab.
    skip.
    format color col_total intensified on.
    write:/ 'No of Exits:' , sy-tfill.
    else.
    format color col_negative intensified on.
    write:/(95) 'No User Exit exists'.
    endif.
    else.
    format color col_negative intensified on.
    write:/(95) 'Transaction Code Does Not Exist'.
    endif.
    at line-selection.
    get cursor field field1.
    check field1(4) eq 'JTAB'.
    set parameter id 'MON' field sy-lisel+1(10).
    call transaction 'SMOD' and skip first screen.
    reward me if it is useful..............
    with regards.....

  • Required BADI  for  purchase order

    Hi experts,
    Can any one please suggest me which BADI or userexit suitable in purchase order to restrict accountassignement category depend upon Doc type with the suitable method.

    Hi Ram,
              Actually my requirement is like this .
    In the me21n tcode, if doctype of purchase order is 'ZCAP' then it has to allow the accasscategory 'A' only.
    If any other accasscategory assigned then it has to display error message.
    For that i have gone for me_process_po_cust BADI. But it does not had any changing parameters to satisfy my requirements.
    Is there any alternative?
    pleae Reply me asap .
    Its very urgent...

  • Issue using material document number as dynamic bin for purchase orders

    Hi...
    We are currently using the material document number as a dynamic bin at receiving because we expect to have multiple receipts of the same purchase order.  The current setup has everything going into quality inspection, and an inspection lot creates for each goods receipt.
    When QM rejects parts to return to vendor, a 122 movement is automatically generated.  When this 122 movement generates, the WM stock overview shows a negative balance using the material document number of the 122 movement as the dynamic bin.  The positive balance still shows as the material document from the 101 movement.
    Is there any configuration that can be set up to fix this issue or will SAP always take the most recent material document as the dynamic bin?
    Thanks for the help!

    I've tried the following configuration with movement type configuration:
    Quality stock in 902 storage type with material document as dynamic bin (requirement type configuration updated).  When a return to vendor is completed, there is a positive balance in 902 with the GR material doc number as the bin and a negative balance with the 122 material doc # as the bin. 
    I also tried configuring this with using GR-DOCK as a bin, and had the issue with the quant record being updated by the most recent inspection lot #. 
    I also tried using the PO as dynamic bin, and have the same error as above with the quant.
    Error:
    Error during creation of transfer orders for material document 0026001535
    Date: 05/16/2008
    Time: 10:52:23
    Post.chge not. HR1 2000000011
    No quants exist for posting changes
    So as according to the OSS note I should use material doc # as dynamic bin to avoid this...but when I set this up I get the issue with positive and negative balances in my stock overview because SAP uses the most recent material document number for each posting.

  • BADI for Purchase Order - WBS link

    Hello Experts,
    I am making a report where the user will be able to select on project and wbs, and depending on this selection the belonging purchase orders are to be listed. Is there any function modules that return this data? Or which tables do I have to look through to see the linking between PO's and project/wbs...
    best Regards Baljinder

    Hi,
    Its PRPS for the WBS elements will be stored,
         proj is the table which stores all the projects for the header data,
         ekbe for the purchase order history will be stored,
         fmifiit is the table which stores all the object numbers related to the posted data against purchase     order.
    Regards,
    Naresh
    Edited by: naresh kumar on Mar 25, 2009 10:51 AM

  • User Exit/BADI for Sales Order Line Partner Change

    I am looking for a user exit or BADI which gets triggered when partner function of a sales order line is changed.
    My detailed requirement is-We have created a new Partner Function - END CUSTOMER(EC). Requirement is to trigger a business logic whenever the End Customer partner function is changed from its default value to anything else.
    If you have any suggestions please let me know.

    Hi
    have a look at function module EXIT_SAPLV09A_004 .
    Cheers

  • USer Exit/BADI  for Purchase requisition creation in MDBT or WC27 /MRP Run

    I am looking for an enhancement where a purchase req is created during MRP Run in the background ( MDBT or WC27 or program - RMMRP000 .
    Any suggestions would be welcome.

    Hi,
    try the exits:
    LMDR2001  User exits restr. profiles of opt. pur.ord.
    LMDZU001  User exits in additional planning
    Regards,
    Renjith Michael.

Maybe you are looking for