Actually i have one doubt in message class

Actually i have one doubt in message class. I want create message for following logic.
If the records already exits in database table ,
whatever  input i will given in input fields like  entry type and material no ,it will need in message.
i want rise the error message in my code like "Record entry type B Material no 029585888 already exits in database table".
I done the coding like.........
in SE80.
    IF sy-subrc = 0.
      MESSAGE e039 with zdbt-enttyp
                        zdbt-matnr.
    ENDIF.
in SE91.
Record  entry type &1 Location &2 already exits in database table.
is it correct? it s not working properly..
could you advice me.......

Hello Raju
The only possible problem I see is that in your report you send a message of the wrong message class. Assuming that your message class is ZMSG then assure that your report begins with:
REPORT zreport MESSAGE-ID zmsg.
IF sy-subrc = 0.
MESSAGE e039 with zdbt-enttyp
zdbt-matnr.
ENDIF.
Regards
  Uwe

Similar Messages

  • Hi,all i'm murali,i have one doubt

    hi,all i have one doubt most of the times repeated in the interview ,plz solve me.
      1.    how will u raise exception management in function modules?
      2.    how to create a  check box?
      3.    in a invoice how can i find the sales order
       these r the questions plz give me the perfect answers for these .
    waiting  for reply.
    murali.

    Murali,
    1.
    Exceptions
    Our function module needs an exception that it can trigger if there are no entries in table SPFLI that meet the selection criterion. The exception NOT_FOUND serves this function:
    Source Code
    Having defined the parameter interface and exceptions, we can now write the source code of our function module. To do this, choose Source code in the Function Builder. This opens the ABAP Editor for the include program L of the exception or OTHERS occurs in the EXCEPTIONS addition of the CALL FUNCTION statement, the exception is handled by the calling program.
    If the calling program does not handle the exception
    The RAISE statement terminates the program and switches to debugging mode.
    The MESSAGE ..... RAISING statement display the specified message. How the processing continues depends on the message type.
    If the calling program handles the exception, both statements return control to the program. No values are transferred. The MESSAGE ..... RAISING statement does not display a message. Instead, it fills the system fields SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 to SY-MSGV4.
    Source Code of READ_SPFLI_INTO_TABLE
    The entire source code of READ_SPFLI_INTO_TABLE looks like this:
    FUNCTION READ_SPFLI_INTO_TABLE.
    ""Local interface:
    *"       IMPORTING
    *"             VALUE(ID) LIKE  SPFLI-CARRID DEFAULT 'LH '
    *"       EXPORTING
    *"             VALUE(ITAB) TYPE  SPFLI_TAB
    *"       EXCEPTIONS
    *"              NOT_FOUND
      SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID = ID.
      IF SY-SUBRC NE 0.
        MESSAGE E007(AT) RAISING NOT_FOUND.
      ENDIF.
    ENDFUNCTION.
    The function module reads all of the data from the database table SPFLI where the key field CARRID is equal to the import parameter ID and places the entries that it finds into the internal table SPFLI_TAB. If it cannot find any entries, the exception NOT_FOUND is triggered using MESSAGE...RAISING. Otherwise, the table is passed to the caller as an exporting parameter.
    Calling READ_SPFLI_INTO_TABLE
    The following program calls the function module READ_SPFLI_INTO_TABLE:
    REPORT DEMO_FUNCTION_MODULE.
    PARAMETERS CARRIER TYPE S_CARR_ID.
    DATA: JTAB TYPE SPFLI_TAB,
          WA   LIKE LINE OF JTAB.
    CALL FUNCTION 'READ_SPFLI_INTO_TABLE'
         EXPORTING
              ID        = CARRIER
         IMPORTING
              ITAB      = JTAB
         EXCEPTIONS
              NOT_FOUND = 1
              OTHERS    = 2.
    CASE SY-SUBRC.
      WHEN 1.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO.
      WHEN 2.
        MESSAGE E702(AT).
    ENDCASE.
    LOOP AT JTAB INTO WA.
      WRITE: /  WA-CARRID, WA-CONNID, WA-CITYFROM, WA-CITYTO.
    ENDLOOP.
    The actual parameters CARRIER and JTAB have the same data types as their corresponding interface parameters in the function module. The exception NOT_FOUND is handled in the program. It displays the same message that the function module would have displayed had it handled the error.
    2.  PARAMETERS p_check  AS CHECKBOX .
    3.You can find the information in table VBFA.
    VBELV - Your Sales Order Number
    VBTYP_N - 'M'
    VBELN is the invoice number.
    Don't forget to reward if useful.....

  • Hi experts              i have one doubt  while running dunning where can i see previous dunning notices.  vendor /customer

                    hi experts
             i have one doubt  while running dunning where can i see previous dunning notices.  vendor /customer

              hi
               thanks for you answer
    regards
    naveenkumar

  • I have one doubt on Checkbox Conditions

    Hi Friends,
    I have one doubt on Checkbox Conditions. I had download data into Excel Format. My requirement is suppose I have select 4 checkbox into table click on Download I want to download 4 records into Excel Format.
    Now I have Select 4 Checkbox click on download button total records is downloaded
    My Req:: I have select 4 checkbox into table click on Download I want to download 4 records into Excel Format.
    So I had done Coding also. What I am doing that coding is
    1.     I have to create one Value Node(IPoDetails_ExcelData)
    2.     Now Data is available in this Value Node (PoDetails_OutTab)
    3.     what I am doing here Get the data from this value node (PoDetails_OutTab) and set that data to this Value Node (IPoDetails_ExcelData). Finally add the data to this Value Node (IPoDetails_ExcelData).
              Could you check my code. If any problem in that code pls help me.
    public void onActiondownloadToExcel(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActiondownloadToExcel(ServerEvent)
         IPrivatePO_Details_ResultView.IPoDetails_ExcelDataNode ExcelNode = wdContext.nodePoDetails_ExcelData();
              IPrivatePO_Details_ResultView.IPoDetails_ExcelDataElement ExcelEle;   
        wdComponentAPI.getMessageManager().reportSuccess("ExcelNode:"+ExcelNode);   
              IPrivatePO_Details_ResultView.IPoDetails_OutTabNode StockNode = wdContext.nodePoDetails_OutTab();
         wdComponentAPI.getMessageManager().reportSuccess("StockNode:"+StockNode);
              IPrivatePO_Details_ResultView.IPoDetails_OutTabElement StockEle ;     
    //wdComponentAPI.getMessageManager().reportMessage(IMessageCO_EnterStockDetails.SF_UPLOAD, null ,false);
                for(int i = 0 ;i<StockNode.size();i++)
                        {                         //wdComponentAPI.getMessageManager().reportSuccess("StockNode.size:"+StockNode.size());
                             StockEle = StockNode.getPoDetails_OutTabElementAt(i);
                             //wdComponentAPI.getMessageManager().reportSuccess("StockEle:"+StockEle);
                             if(StockEle.getCheckBox()== true)
                         {                         wdComponentAPI.getMessageManager().reportSuccess("StockNodeCheck:"+StockEle.getCheckBox());
                             ExcelEle = ExcelNode.createPoDetails_ExcelDataElement();// Create Element
                             wdComponentAPI.getMessageManager().reportSuccess("ExcelEle:"+ExcelEle);               
                                  ExcelEle.setConf_Shp_Date(StockEle.getConf_Shp_Date());                           wdComponentAPI.getMessageManager().reportSuccess("Conf_Shp_Date:"StockEle.getConf_Shp_Date());                         wdComponentAPI.getMessageManager().reportSuccess("ExcelEleConf_Shp_Date:"ExcelEle.getConf_Shp_Date());
                                  ExcelEle.setMaterial(StockEle.getMaterial());
                                  ExcelEle.setMatl_Desc(StockEle.getMatl_Desc());
                                  ExcelEle.setOa_Quantity(StockEle.getOa_Quantity());
                                  ExcelEle.setOpn_Quantity(StockEle.getOpn_Quantity());
                                  ExcelEle.setPo_Item(StockEle.getPo_Item());
                                  ExcelEle.setPo_Number(StockEle.getPo_Number());                         wdComponentAPI.getMessageManager().reportSuccess("Po_Number:"StockEle.getPo_Number());                         wdComponentAPI.getMessageManager().reportSuccess("ExcelElePo_Number:"ExcelEle.getPo_Number());
                                  ExcelEle.setPo_Status(StockEle.getPo_Status());
                                  ExcelEle.setUom(StockEle.getUom());
                                  ExcelEle.setStat_Date(StockEle.getStat_Date());
                                  ExcelEle.setQuantity(StockEle.getQuantity());
                                  ExcelEle.setDeliv_Date(StockEle.getDeliv_Date());
                                  ExcelEle.setExpt_Shp_Date(StockEle.getExpt_Shp_Date());
                                  ExcelEle.setVendor_Material(StockEle.getVendor_Material());
                                  ExcelNode.addElement(ExcelEle);                    wdComponentAPI.getMessageManager().reportSuccess("H:::ExcelData::::"+ExcelNode.currentPoDetails_ExcelDataElement());
                                  wdComponentAPI.getMessageManager().reportSuccess("H:::ExcelData::::"+ExcelEle.getPo_Item());
    //                         wdThis.wdGetCO_POPendingController().downloadToExcelFile();
    //                         wdThis.wdGetCO_POPendingController().DownLoadToExcel();// Popup Window
                        //wdThis.wdGetCO_POPendingController().downloadToExcelFile();
                        //wdComponentAPI.getMessageManager().reportSuccess("Giiiiii");
                        ///wdThis.wdGetCO_POPendingController().DownLoadToExcel();
                        if(ExcelNode.size()>0)
                             //wdThis.wdGetCO_POPendingController().downloadToExcelFile(wdContext.nodePoDetails_ExcelData(),getReportingDelays());
                             //wdThis.wdGetCO_POPendingController().Downlaod();
                             //wdThis.wdGetCO_POPendingController().downloadToExcelFile();// This is Download Excel Data
    IThis is method in CC-downloadToExcelFile and This is Open Popup window DownLoadToExcel(). This method also in CC
                             wdThis.wdGetCO_POPendingController().DownLoadToExcel();
                             wdContext.nodePoDetails_ExcelData().invalidate();
              else     {
                     wdComponentAPI.getMessageManager().reportException("Please select any one po item from the table",true);
        //@@end
    Regards
    Vijay Kalluri

    Hi Vijay,
    Please try to use this to implement your scenario:
    public void onActiondownloadToExcel(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
         //@@begin onActiondownloadToExcel(ServerEvent)
         IPrivatePO_Details_ResultView.IPoDetails_ExcelDataElement ExcelEle = null;
        for(int i = 0; i< wdContext.nodePoDetails_OutTab().size(); i++)
                  ExcelEle = wdContext.createDetails_ExcelDataElement();
                  Here check condition for selected table checkbox column in nodePoDetails_OutTab()
                  if (wdContext.nodePoDetails_OutTab().getPoDetails_OutTabElementAt(i).get<Table Column Attribute>.getMdoNo
                                 ().equalsIgnoreCase("TRUE")
                           // Here you need to code for setting table row value in the node Details_ExcelData. Like same as below
         ExcelEle.set<Table column Name>(wdContext.nodePoDetails_OutTab().getPoDetails_OutTabElementAt(i).get<Table 
                                          Column Attribute>.getMdoNo())
         wdContext.nodeDetails_ExcelData().addElement(ExcelEle);
    Hope it helps
    Regards
    Arun

  • I have Doubt in Message class

    Hi all.
    I need to create lengthy message in message class.
    example: zreport message-id zmes.
    message s001.
    Right now i have message s001,it contains like "This record not applicable" but i want to change like "This is not applicable records for input user so you should give diffrent input in manual screen".capcity of message line nearly 70char only ,how can create lengthy message in message class?
    please help me.
    Regards,
    Jay

    Hi,
    U can break the 70 char text into two text elements.
    Then use as below:
    zreport message-id zmes.
    message s001 WITH text-001 text-002.
    Or you can do as
    DATA: v_text(70) Type c.
    CONCATENATE 'This is not applicable records for input user so you'
    'should give diffrent input in manual screen' INTO v_text.
    message s001 WITH v_text.
    Hope this solves ur problem.

  • Doubt in message class.

    Hi All.
    I have one input field like MATNR (Module pool),if i enter invalid Material no , i need error message with what we given in input field .i done it ,like
    Example: This Material no 000000000204004990 does not exit in MARA.
    But Now i want remove the leading zero’s in the message.like
    Example: This Material no 204004990 does not exit in MARA.
    How can i do?
    please help me.
    Regards.
    Raju.j

    hi raju,
    do this.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
                EXPORTING
                  input  = wf_matnr
                IMPORTING
                  output =  wf_matnr.
    Example:
    input = 00000000000123
    output = 123
    Rgds
    Anver

  • I have one doubts, Why does the screen go out automatically in way rest and activate when pressing any does key?

    I am a little scared, since for one week I received to the new Macbook Pro 13 i7, and does few days was working of strange way, since it was beginning to extinguish automatically the screen at any time and any key activates when pressing to enter the open session. I want to know if something is being put rare or is normal, or if desbalanceé the adjustment of economizer or screen or whatever it appears in the panel of system preferences. I have reestablished them almost all, but the problem persists.
    I need aid. I do not want that it passes nothing to him and that everything is working well.
    I will be thankful for its answers to them. Especially to the technical support

    I belive that upgrade to 10.8.4 has troubles.
    After this my macbook pro started to go to sleep even that I was working with it.
    This morning it became too much. I had worked fine in the evening and this morning the keyboard would not response. Each keypress made sound an evel "click sound".
    I ended up needing to reboot the computer.

  • I have one doubt on system global area while  executing packages

    Actually in package we store inter related objects together.
    the package contained subprograms will occupy memory in SGA
    when we calling subprograms which are present in the package.
    if occupy memory in SGA so the packages are how will give performence
    compare to the stand alone subprograms?
    and the data capacity SGA can store also reduces if subprograms occupy
    memory in the SGA. so it is some what degrading of performance.
    i want to know while executing subprogrms will these occupy SGA memory
    if occupy's the data capacity SGA can store also automatically reduced
    how package containde subprograms will give performance?
    If u know SGA role let me know?

    Hi MrHoffman, thanks for your reply!
    I know for a fact that the DNS is set to .local - it's the default one so I've never altered that. The changes that occurred seemed to happen after the recent apple security update was applied. If ".local" causes so much trouble is there a reason that it's the default? (I'm not that technically minded - it's just a wonder more than anything.)
    Upon closer inspection I can see that the hostname has had two hyphens added to it, where the spaces are in our business name. (Previously it was named without the spaces, just all typed as one word.)
    I guess that if there was a long delay in the DNS update then maybe it would account for the user suddenly being unable to connect/use the server.
    As for the users, I know where I can see the list of them, the thing is that previously there were only 4 in the list, now there's 85, including a new "System Administrator". It's functioning normally again, but I guess I was really looking to see if anyone else had seen the user list grow without prompting. If it's normal then that's totally fine with me, but as I say it freaked me aout a little when there are suddenly a bunch of new users on the list.
    Cheers again!
    M:

  • Amrish i have one doubt

    Amrish,
    I have 15 items in sales order, but how the system do the delivery is
    it has to take one item per day and should deliver upto 15 days....
    how it possible???
    If we do manually it is possible... but this should do automatically...
    for this i have go for sm35?

    Hi,
    I think you will have to go for a BDC.
    Second option to to split the scedule lines in 15 days automatically.
    And schedule the program for delivery creation on daily basis,so this should create a seprate delivery for each line item.
    Again a big Z coming into picture.
    Regards,
    Amrish Purohit

  • I have one doubt on BAPI

    Hi Experts,
    I am created RFC function module for placing in BOR, but it is not released ,
    can any one tell me anything happens or not.
    Thanks,
    Ravindra.

    Please search before posting, please use meaningful subject lines.
    Thread locked
    Thomas

  • Hi friends i have one doubt on price indicator.

    for subcontrcacting semifinished goods what should be the price control indicator( V/ S ). and i also like to know why.

    Hi.
    Price control indicator is totally depends on the customer requirement.
    If you opt for standard price you have the liberty to change over to moving avg price at any time.
    Also systems will, calculate the moving avg price and it will be displayed in the material master but this is only for statistical use only.
    But when you choose price control as V initially, you cannot revert back to S unless Costing department evaluates it.
    If it helps award me.
    Cheers!!!
    Umakanth

  • I HAVE ONE DOUBT ON DML  OPERATIONS?

    KINDLY GIVE ANSWERS PLZ
    ANOTHER QUESTION:
    I AM SELECTED ONE TABLE THAT TIME TABLE WILL BE LOCKED OR NOT?
    IF I SELECT A TABLE THE OTHER USER CAN ACCESS THE SAME??
    ANOTHER QUESTION:
    I AM OPENED TWO SQL* PLUS IN MY SYSTEM. ARE THEY COMES UNDER SINGE SESSION?
    OR TWO DIFFERENT SESSIONS?
    WITH THOSE CAN I FELL LIKE TWO DIFFERENT USERS?
    ANOTHER QUESTION:
    I AM UPDATEING MY TABLE AT THE TIME THE TOTAL TABLE WILL BE LOCKED
    AT THE SAME TIME OTHER USERS ALSO TRYING FOR SAME TABLE CAN HE EVEN SELECT THE TABLE???????
    AS PER MY KNOWLEDGE HE CAN NOT ACESS THE TABLE. AM I THINKING RIGHT?
    ANOTHER Q?
    MORE THAN ONE PROGRAMMER CAN SELECT A TABLE AT THE SAME TIME?
    ADVACED THANKS.

    KINDLY GIVE ANSWERS PLZ
    ANOTHER QUESTION:
    I AM SELECTED ONE TABLE THAT TIME TABLE WILL BE LOCKED OR NOT?
    IF I SELECT A TABLE THE OTHER USER CAN ACCESS THE SAME??
    A SELECT would not lock a table.
    ANOTHER QUESTION:
    I AM OPENED TWO SQL* PLUS IN MY SYSTEM. ARE THEY COMES UNDER SINGE SESSION?
    OR TWO DIFFERENT SESSIONS?
    Two Different Sessions
    WITH THOSE CAN I FELL LIKE TWO DIFFERENT USERS?
    Didn't quite get your question.
    ANOTHER QUESTION:
    I AM UPDATEING MY TABLE AT THE TIME THE TOTAL TABLE WILL BE LOCKED
    Only those rows which you are UPDATing will be locked.
    AT THE SAME TIME OTHER USERS ALSO TRYING FOR SAME TABLE CAN HE EVEN SELECT THE TABLE???????
    Yes. SELECT is always permitted
    ANOTHER Q?
    MORE THAN ONE PROGRAMMER CAN SELECT A TABLE AT THE SAME TIME?
    yES.
    ADVACED THANKS.
    Some users consider using Upper case to be Shouting/Offensive.

  • I have one doubt in javabeans plz tell me

    Can we create buttons with reusable components (beans).
    If yes, how can we make use it.

    Yes,
    u can create reusable component in Java Beans even button also, its easy.
    Bye
    Prabhat

  • Hi i have one doubt

    Hi,
    Datatype of varchar length would be changes in sql and plsql?
    Thanks,

    Why not!
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/datatypes.htm#CHDDCGEE
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/datatypes.htm#CHDEDACE
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10592/sql_elements001.htm#SQLRF50977

  • I have one doubt with the RMAN

    Hi everybody,
    Is there possible to store the RMAN backup in the different domian.... for example oracle is installed in the database1 domain and we can store the RMAN in database2 domain.
    Thank You

    Mohd khalid wrote:
    Hi everybody,
    Is there possible to store the RMAN backup in the different domian.... for example oracle is installed in the database1 domain and we can store the RMAN in database2 domain.
    Thank YouCould you elaborate more please? What do you mean with "domain"?

Maybe you are looking for

  • XDP data merging on MAC OS X issue.

    We have a problem to merge the xdp data with downloaded pdf form. To identify the problem and to find the solution I created a very simple example - just a form with one text field. The situation now is following: 1. On the server we have a form desi

  • How to setup startup script in Solaris 10

    Could anyone point me out how to setup a startup script at run level 3 or 2 in solaris 10 ? Any previous solaris such as 9, 8, I just write a script and put in /etc/init.d/, then link it to run level 3 or 2. But in solaris 10 is different now. I coul

  • Question about Byte Code

    Hello...can anyone tell me how I write a java program, compile it and get my byte code written into another file?? Thanks in advance!

  • Better Organization for iPhoto 06?

    Hi! Sooo I really like iPhoto and have been using it since Feb of 2007 when I purchased my Mac. Haven't upgraded to 08 yet because I've heard mixed reviews of it, kind of waiting to see if Apple will make an iLife 09 that will make people happier. An

  • HT201272 Will Apple give me all the music I purchased from iTunes for my new computer?

    My computer crashed so I bought a new one but my entire music library is gone. And to make matters worse it didn't back up on my external hard drive so I would like to get all the music I purchased from iTunes back on to my new computer. My only thou