While creating po i want to display 'ERROR MESSAGE'

Hi
experts
In tcode ME21N .
when we created PO under COMPANY CODE  if vendor is not in company code  PO is craeted .
eg
comapny code 1000 .
vendor = rajesh .
if comapny code 2000 and vendor 'RAJESH' is not in comany code then
when we save 'i want to diplay ERROR MESSAGE '(WHILE SAVING PO).''VENDOR IS NOT IN COPMANY CODE'
PLZ HELP ME OUT.
THANKS
AJAY.

hi
i used badi but if the vendor  between  1000 or 2000 then po wiil be save but it gives error whille saving po.
error"enter proper vendor".
I also used *FUNCTION EXIT_SAPMM06E_012. same problem is comming.
.*method IF_EX_ME_PROCESS_PO_CUST~CHECK.
BREAK:MIL_ABAP.
data it_items type purchase_order_items.
data wa_item type purchase_order_item.
data wa_data type mepoitem.
data it_data type table of mepoitem.
data wa_header type mepoheader.
DATA: IT_DATA1 TYPE TABLE OF MEPOHEADER.
CLEAR wa_header.
call method im_header->get_data
receiving
re_data = WA_HEADER.
IF NOT wa_HEADER-LIFNR EQ '1000' or not wa_HEADER-LIFNR EQ '2000'.
MESSAGE e000(zmm01) WITH 'Enter Poper Vendor'.
ENDIF.
endmethod.
THANKS
AJAY.

Similar Messages

  • While creating PO i am getting an error message as purchase org. not respon

    Hi,
    After assigning return order type to plant when i am trying to create PO it is giving me error as
    "Purchase org. not responsible for plant"
    Is it because of some assignment missing?if ,yes than what is a navigation path.
    if,no then which assignment is missing.
    Regards,
    Dharmesh

    Hi
    Just check In Txn OX17 if your plant is assigned to the Plant.
    Regards

  • Prb display error message while creating PR at ME51n in ME_PROCESS_REQ_CUST

    Hi All,
    I have this requirement to check the cost center availability in PR screen (ME51n).
    If cost center in the Account assignment tab is not empty, display error message  and not able to create the PR.
    With my code below, it doesn't triggered the error message and PR created.
    Could anyone help?
    METHOD if_ex_me_process_req_cust~process_account.
    DATA: w_account_ref TYPE exkn.
    w_account_ref = im_account_ref->get_data( )
    IF w_account_ref-kostl IS NOT INITIAL.
      MESSAGE e303(ME) WITH text-001 w_account_ref-kostl text-002.
    ENDIF.
    ENDMETHOD.
    Thank you.
    SW

    Hi,
    You have to use definition MMPUR_MESSAGE 'E'  ME 303   text-001 w_account_ref-kostl text-002.
    This will throw the error during check and save instead of message e303(me) .
    Hope it helps.
    Sujay
    Edited by: Sujay Venkateswaran Krishnakumar on Oct 5, 2010 2:54 PM

  • I have never been able to migrate my ibooks library from iTunes to ibooks. Setup stops during creating ibooks library with the following error message:iBooks quit unexpectedly while creating your library.

    i have never been able to migrate my ibooks library from iTunes to ibooks. Setup stops during creating ibooks library with the following error message:iBooks quit unexpectedly while creating your library.

    Hello cpikehfx, 
    Welcome to the forums. 
    You can try one of the two options below to work around your issue. 
    Drag and drop the files from the desired music folder to the BlackBerry Music folder using the computer.
    Open the desired music folder on the computer
    Go into Computer or My Computer and open the BlackBerry network drive
    Open the Music folder
    Drag the desired music files from the computer music folder to the BlackBerry Music folder
    Try a different Windows profile.
    Go into the Control Panel and create a new user account
    Put some music files in a folder that is accessible by all profiles or transfer them to the BlackBerry device
    Log out of the current profile and log into the new profile
    Transfer music into iTunes or Windows Media Player
    Launch BlackBerry Link and go through the setup configuring the music source of your choice
    Click on the Computer name in the bottom left corner of Link
    Select Music on the left side
    Drag and drop the desired music files from the list to the BlackBerry name in the bottom left corner of Link
    If neither of these options work for you then you will want to contact your mobile service provider and ask that this issues be escalate to BlackBerry support for investigation. 
    Hope this helps. Have a good day. 
    -SR
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • When I try to open a document created in Pages, I get an error message saying "[Document Name" can't be opened."  I don't want to lose hours of work; has anyone else encountered this?

    When I try to open a document created in Pages, I get an error message saying "[Document Name" can't be opened."  I don't want to lose hours of work; has anyone else encountered this?

    A few general trouble shooting tips that may apply here:
    1. If you used Software Update to do the OS update(s) to reach 10.6.7, go to http://support.apple.com/downloads/ and download and apply the Mac OS v10.6.7 Combo Updater. The Combo Updater contains some fixes that were not included in the incremental updaters used by Software Update.
    1a. Check that you have the current version of Pages (and of the other iWork applications) installed. All three applications' current version numbers end in .0.5
    2. A common cause of malfunctioning applications is a corrupted preferences file (.plist file). Your Pages '09's plist is at yourname > Library > Preferences > com.apple.iWork.pages.plist
    Quit Pages, locate the file and Drag it to the Desktop (or to the Trash).
    Restart Pages and attempt to open one of the files.
    If all is well, Trash the plist file and empty the Trash.
    If there's no change, AND you've made changes to the Preferences that you wish to keep, drag the file back to its previous location, replacing any new one that has been created.
    Regards,
    Barry

  • Keep getting an error message that reads, "LR An error has occurred while creating the book on Blurb" An error has occurred while trying to create texts and fonts.  Pleas advise as Blurb has said that it's a LR issue.

    Keep getting an error message that reads, "LR An error has occurred while creating the book on Blurb" An error has occurred while trying to create texts and fonts.  Pleas advise as Blurb has said that it's a LR issue.

    Are you behind a firewall or double NAT??
    What is the device that is immediately plugged into the main modem or router? Has that one been able to update?
    It is plugged in of course isn't it.. no nasty join wireless anywhere??
    The best way to work around these sort of problems is to simplify the network.. Plug each device directly into the main router.. by ethernet. You can trigger the firmware upgrade by wireless but use ipad or iphone version of airport utility and see what happens.

  • How to validate VO result and display error message?

    Hi,
    I have created 2 pages:
    Page 1: User to enter employee number and click 'Go' button to search (redirect to Page 2)
    Page 2: To display employee details
    In situation where employee is suspended, employee detail will be display as blank in Page 2.
    At the same time, we would like to display error message which inform user to refer to HR Department for this scenario.
    Need guidance on how to perform the validation and display error message.
    Thanks and Regards,
    Shiau Chin

    Hi Shiau,
    In this case instead of redirecting to next page, throw an exception on the same page.
    If you want redirect it to next page then while redirecting it to next page pass some info that can indicate that employee is suspended, get this value in Process request if it has value then throw exception else query details.
    Regards,
    Reetesh Sharma

  • Trying to create package and do not understand error message

    What is wrong with this statement. Its say ASH411APPROVALEMAIL_PKG is not declared. I am trying to create it. Whats wrong?
    ERROR MESSAGE
    I get the following error.
    Error at line 1: PLS-00201: IDENTIFIER 'ASH411APPROVALEMAIL_PKG' must be declared1. CREATE OR REPLACE PACKAGE BODY ASH411APPROVALEMAIL_PKG
    2. AS
    3. PROCEDURE ASH411APPROVALEMAIL_async (P_ATS_NO NUMBER
    CODE
    CREATE OR REPLACE PACKAGE BODY ASH411APPROVALEMAIL_PKG
    AS
    PROCEDURE ASH411APPROVALEMAIL_async (P_ATS_NO NUMBER)
    AS
    BEGIN
    DBMS_SCHEDULER.define_program_argument (program_name => 'ASH411APPROVALEMAIL',
    argument_position => 1,
    argument_name => 'P_ATS_NO',
    argument_type => 'NUMBER'
    --,DEFAULT_VALUE => whatever_value
    DBMS_SCHEDULER.ENABLE (NAME => 'ASH411APPROVALEMAIL');
    DBMS_SCHEDULER.create_job (job_name => 'ASH411APPROVALEMAIL_JOBNAME'
    || P_ATS_NO,
    program_name => 'ASH411APPROVALEMAIL',
    enabled => TRUE,
    comments => 'Comments'
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
         null;
    END ASH411APPROVALEMAIL_async;
    end ASH411APPROVALEMAIL_PKG;

    Hi, Howard,
    csphard wrote:
    Now when I go back and create the package again with the procedures it say package body created but does not
    display anything."Package body created" is all it ever says (unless there's an error message).
    How do I see the procedures I just created when I ran the package again with the procedures?If you want to see the source code, look at the CREATE PACKAGE BODY command in the script you just ran, or query the data dictionary view user_source:
    SELECT       text
    FROM       user_source
    WHERE       name     = 'ASH411APPROVALEMAIL_PKG'
    AND       type     = 'PACKAGE BODY'
    ORDER BY  line
    ;

  • How do i get data when displaying error message in BDC

    hi,
    I have generated one internal table for displaying error message using BDCMSGCOLL, i want the the error to display according to the field name,
    Hw can i get it...
    ex: <Material name> Error message as name already created or unit doesnt exit...
    Pls reply,
    Regards,
    Divi.

    Hi Divya,
    Try the below
    CALL TRANSACTION 'MM01'
                        USING bdcdata
                        MODE   'N'
                        MESSAGES INTO MSGTAB.
    IF SY-SUBRC NE 0.
    move itab-matnr to jtab-matnr.
    append jtab.
    PERFORM CHECK.
    ENDIF.
    FORM CHECK.
    LOOP AT MSGTAB where msgtyp = 'E'.
    read table jtab index sy-index.
    write:/ jtab-matnr.
    CALL FUNCTION 'MESSAGE_PREPARE'
      EXPORTING
        LANGUAGE                     = sy-langu
        MSG_ID                       = MSGTAB-MSGID
        MSG_NO                       = MSGTAB-MSGNR
       MSG_VAR1                     = MSGTAB-MSGV1(50)
       MSG_VAR2                     = MSGTAB-MSGV2(50)
       MSG_VAR3                     = MSGTAB-MSGV3(50)
       MSG_VAR4                     = MSGTAB-MSGV4(50)
       IMPORTING
       MSG_TEXT                     = L_MSG
    EXCEPTIONS
       FUNCTION_NOT_COMPLETED       = 1
       MESSAGE_NOT_FOUND            = 2
       OTHERS                       = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    WRITE:   L_MSG.
    ENDLOOP.
    ENDFORM.
    - Satish

  • Display error message in batch job log

    Hello
    I have a batch job running and I have an error coming during some validation logic.
    The problem is I need to continue the batch job when this error message comes and it should not cancel the batch job as it is doing currently but display that error message in batch job log, there are more similar error messages coming in job log and job gets finished, but when my error message comes job gets cancelled.
    I cannot give it as info message as it will give wrong idea about message type.
    Is there any FM by which we can add message in job log?

    Sanjeev I have done that but problem is I do not want to give that as Information message but Error message only and continue processing.
    If you see in screenshot 3rd message is given by me as information and you can see error messages also 6th and 7th and job continued till it is finished
    Basically I want that 'I' to be displayed as 'E'.
    Display error message in batch job log 

  • How to display error message with some variable

    Hi
    I want to display errror message along with material number which is thr in d LOOP .
    Basically i want some variable to display along with error message .
    Can anybody suggest me how can i go about it?
    Edited by: sonal musale on Apr 14, 2009 12:06 PM

    Hi,
    In the message class, suppose  you use 001 for invalid material message.
    So keep it like:-
    Invalid Material : &1
    in the message class for 001.
    Now in loop use as:-
    loop at itab into wa.
      "perform validations
      "if validation fails for current material
      MESSAGE e001 WITH wa-matnr.
    endloop.
    Similary you can use more variables:-
    Invalid Material : &1 &2 &3
      MESSAGE e001 WITH <variable1> <variable2> <variable3>.
    Hope this helps you.
    Regards,
    Tarun

  • A way to display error messages from the program

    Dear all,
    I am looking forward to display a set of error messages(in a internal table) during the execution of the program to the user.
    I wanted to know the better way of displaying error messages from my program with more options.
    Well I tried out using displaying errors as ALV list/Grid or as simple list processing.
    But I found some  stanadard transactions (Like in MM and FI  where errors are shown in a better way, but failed to find out how they are done.
    Please guide me.
    Thanks in advance
    Aryan

    Try to use application logging it has a very good way to display a set of messages.
    [http://abap4.tripod.com/Using_Application_Logging.html|http://abap4.tripod.com/Using_Application_Logging.html]
    Run this report in se38 an example sap report to understand logging way to show a set of messages
    Report Name  :  SBAL_DEMO_01
    Edited by: Vighneswaran CE on Dec 19, 2010 3:01 PM
    Edited by: Vighneswaran CE on Dec 19, 2010 3:11 PM

  • How to display error message in Billing Output Type (VF03).

    Hi,
    could anyone suggest how do i display error message via billing (VF03) output type?

    i want to display an error message from my sapscript program.
    *determine discount
    it_zmas-discount = it_zmas-gross_value - zkwert.
    MODIFY it_zmas.
    ELSE.
    MESSAGE ID 'Z0' TYPE 'S' NUMBER '999' WITH 'Please maintain cust pricing grp 34 for ' wa_zmas-matnr.
    p_proc_screen = 'X'.
    ENDIF.
    when user enter billing doc no in vf03, user will click 'issue output type' and select their output type to be printed out.
    if there's an error in the print program, it should promt out an error message and do not allowed user to print preview and print the form out.
    what i had did previously, i prompt the error message and disable the print preview button. i think its not a good solution and i am not sure how to stop the form from not printing it out.
    i was wondering is there any user exit of the output type, vofm (which i had this solutions from my previous question, but unsure how to use it) or any other solutions.
    please help.

  • How to display error message in Shopping Cart?

    How to display error message in Shopping Cart and stop the shopping cart for further processing? I try MESSAGE w001(zshop) or MESSAGE e001(zshop). But it is causing run-time error.

    Hi Paul,
    In the DOC_CHECK or DOC_SAVE BADI, you have a global internal table named et_messages. The structure of this table is 'bbp_smessages_badi'. You can append your error message here by inputting the message type, ID and number. The message type is either 'E' for error or 'W' for warning and the number would depend on your message class(ID). You will be able to see the error message on top of the screen, can be a red or yellow highlight depending on your appended message. I don't think creating the error message via the MESSAGE syntax will be successful, maybe this is why you are getting a runtime error.
    Regards,
    Noel

  • Display Error message in Empty grid

    Hi All,
    A query again !!!
    I have an AdvancedDataGrid , in which I want to show an error msg , No Records found , if my dataprovider is null.
    I dont want to show an alert.
    Want to display a message in empty grid.
    How can I do that,if someone can help?
    Thanks in Advance
    Ashudeep

    It depends on why the dataProvider is null.
    If your remote object has not returned data, you can detect that in its result handler, and then manually construct a data item that has a message in one of the fields, but null in the rest.
    If this post answers your question or helps, please mark it as such.

Maybe you are looking for

  • Year view not showing location summary

    I have a problem with the new photos app on iPhone6 and Yosemite 10.10.3. In the "year view" places where the photos were taken can usually be accessed in a map (e.g. "United States, Germany and 3 more >"). I have several years of photos and this doe

  • Java exception: Planning Data Form Import/Export Utility: FormDefUtil.sh

    Hi, We have the following in our environment Oracle 10gAS (10.1.3.1.0) Shared Services (9.3.1.0.11) Essbase Server (9.3.1.3.01) Essbase Admin Services (9.3.1.0.11) Provider Services (9.3.1.3.00) Planning (9.3.1.1.10) Financial Reporting + Analysis UI

  • Cannot open embedded font

    Have pdf on website, tried to open with Adobe Reader, get error "Cannot open embedded font CGOmega". So, I tried to open the file with Acrobat Pro 9 - same error. Client doesn't have original Word document to recreated the pdf. Any way possible to op

  • How to export book in CMYK?

    I'm trying to print a book from Aperture to a PDF using the ICC profile for the printing company. This profile is naturally CMYK. In the print dialogue box, simply selecting their profile and clicking "PDF" with our B&W laser printer gives a mess. Do

  • Erase Vista old partition HDDRecovery after migration to W7

    I bought my PC with Vista including a special partition DATA (E) containing HDDRecovery Since I installed Windows 7 and I created a new recovery disk. Is it possible to erase old partition E now ? Thank you for your answer.