Read message form message class

HI All
i want to read message from message class (SE91) into my variable
there is a way to get it without raise a message?
just to read it to some variable and proceed with the program flow .
Regards
James

Hi James,
You can capture the message of SE91 with function module 'FORMAT_MESSAGE' .
Example:
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id     = i_message-msgid
lang = i_message-msgspra
no   = i_message-msgnr
v1   = i_message-msgv1
v2   = i_message-msgv2
IMPORTING
msg = g_msg
EXCEPTIONS
OTHERS = 0.
Regards,
Moqeeth.

Similar Messages

  • MESSAGE class problem.

    Hi ,
    I have coded an error message for my form by using below syntax.
    MESSAGE ID 'Z0' TYPE 'E' NUMBER '999' WITH 'Please maintain cust pricing grp 34 for' wa_zmas-matnr .
    It worked fine when i try to display the form with an error message in tcod : vf03
    Then i try to cancel this billing document in tcode : vf11 and able to save without a problem.
    Now my problem is, when i try to view this billing document again via tcode : vf03 again, there's is an error message shown by the system :
    Express document "Update was terminated" received from author "ABCDE".
    This indicates that my cancellation/reverse of this billing doc no its not successful.
    I was wondering is it cause by my above code but when i try to do the cancelation, it did not went through my coding? Please help.
    Thank you.

    Hi, below its my coding (bold).
    -i suspected its the error message. This is because once i uncomment the message class, the error will not appear.
    -i have problem in create billing too.
    -my process was, i create a new billing --> click on save button --> view my new billing via vf03  --> pop up error msg.
    -pop up error message : Express document "Update was terminated" received from author "USER01".
    -when i check my inbox msg, it shown below.
      Update was terminated
      System ID....   DEV
      Client.......   300
      User.....   DCABAP03
      Transaction..   VF01
      Update key...   16AE88DE0111F11EA300001A64635E5E
      Generated....   14.08.2009, 16:40:21
      Completed....   14.08.2009, 16:40:22
      Error Info...   Z0 999: Please maintain cust pricing grp 34
    - i realised that the error info it's the same with my coding.
    - my main purpose its to display this error message once i print preview the form via vf03 output type only.
    LOOP AT it_zmas INTO wa_zmas.
          IF wa_zmas-mtart = 'FIN' AND wa_zmas-fkimg NE '0'.
            LOOP AT tvbdpr WHERE posnr = wa_zmas-posnr AND matnr = wa_zmas-matnr.
    *read internal table it_zmas to save uecha, gross value and discount.
              READ TABLE it_zmas WITH KEY posnr = wa_zmas-posnr matnr = wa_zmas-matnr.
              IF sy-subrc = 0.
    *to retrieve uecha from tvbdpr and to compared with intab-posnr. intab posnr its taken from tvbdpr-uecha and tvbdpr-posnr.
                IF tvbdpr-uecha <> 0.
                  it_zmas-uecha = tvbdpr-uecha.
                ELSE.
                  it_zmas-uecha = tvbdpr-posnr.
                ENDIF.
    *to retieve cust pricing group and material table.
                SELECT SINGLE knumh INTO zknumh FROM a960
                  WHERE kschl = 'Z001'
                  AND zzkonda = '34'
                  AND matnr = wa_zmas-matnr
                  AND datab LE tvbdpr-prsdt
                  AND datbi GE tvbdpr-prsdt.
    *if there is cust pricing grp available continue else display error message.
                IF zknumh IS NOT INITIAL.
                  SELECT SINGLE kbetr INTO (zkbetr) FROM konp
                    WHERE knumh = zknumh.
    *determine gross value
                  it_zmas-gross_value = zkbetr * wa_zmas-fklmg.
                  LOOP AT intab WHERE matnr = wa_zmas-matnr AND posnr = it_zmas-uecha.
                    AT NEW posnr.
                      SUM.
                      zkwert = intab-kwert.
                    ENDAT.
                  ENDLOOP.
    *determine discount
                  it_zmas-discount = it_zmas-gross_value - zkwert.
                  MODIFY it_zmas.
                ELSE.
             *MESSAGE ID 'Z0' TYPE 'I' NUMBER '999' WITH 'Please maintain cust pricing grp 34'.*
                ENDIF.
                CLEAR zknumh.
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDLOOP.
    could anyone guide me or let me know what did i do wrongly? really appreciate your help.
    thank you.
    regards,
    sw
    Edited by: SW on Aug 14, 2009 10:48 AM

  • Write message to Job log with message class and message number

    hi folk,
    When running a background job I'm able to write a message to the job log using the statement - Message "some text..." type 'I'.
    In the Job log I can see the message "some text.." with a "default" message class and message number (but in my report i don't specify any message ID) so I have no idea it comes from.
    Then I try to send a message where I specify the message class/number etc...using message id 'Z1' number 000 with "some text..." In the job log I now can see the "right" message class "Z1" and the number 000, but the message is empty?
    Please advice how to write a message with the message class and message number.
    Best regards
    LinhNg

    Hi Linh,
    How did you provide the text "Some message"? Did you hard code it or used a text element?
    Regards,
    Immanuel.

  • How to maintain long texts in different languages in a message class

    Hi All,
    I have maintained a message and its transaltions in some other languages in a custom message class. I have maintined the long text in English language. But I am not getting how to maintain the long text in other languages.
    Please help.
    Regards
    Kiran

    Hi Kiran,
    Good!
    In the message class corresponding to that message give the place holders &&&&.
    Like 001    &&&&
    in the program.
    Message <class>001 with text-001 text-002 text-003 text-004.
    then you could disply long text.translation takes place if u enter in different language automatically.
    thanks,
    Sunil.

  • Selecting and moving many messages not working - try sorting by message classes

    I posted this a while back, and have an update now.
    I file my sent items.  Call me crazy, but I like to at the end of every quarter, move sent items from that quarter into sub folders.  It's usually 2-4000 items, and ever since I installed OL2010, I have had weird issues when trying to clean my Sent items.
    Example:  Select 2000 items, sorted by date from Sent Items.  Drag and drop to my 2009Q4 folder.  It then prompts me "Creating a new item from the selected items could take some time. Are you sure you want to create a new item from these 2000 items?"
    So I figured possible Ctrl is stuck down or something, so I right click, Move, select the folder.  Same issue.
    I start selecting smaller data sets.  I got to about 50-60 items at a time that I was able to move and not get that message.  I got frustrated and stopped working on it.
    This morning, I decided to re-test this.  Same issue presents itself.  So instead, I sorted by message class.  I was able to select 3800 message items.  The remaining items were messages with attachments, text/mobile messages, and calendar invite responses.
    It appears that some combination of selecting multiple message classes was triggering my issue.  I suspect the newest of them, the mobile messages to be the issue, so I deleted them, and retried, nope, same error, even selecting only the show message class types.   Would like to see this fixed, of course, and will be sending a frown with the link to this thread as well.
    Chris

    I had this problem too.  For me, simply sorting by message class, then finding all the calendar items and moving them first, then going back and doing the rest, allowed me to move them as I liked.   However, its not clear to me that I have
    all message classes (not sure what they all are), so it could be there are other message classes that cause problems when you move "mixed classes".   I do think this is an MS Outlook bug, but not clear anyone has reported it to MS.  ;-<
    You can prove this by simply selecting a calendar item and a msg, and try moving the two.  You will have this issue.
    However, you'd think that MS itself would be a vast user of MS Outlook and if we're discovering this, you'd think MS internal folks are too, so I'm deferring to them to self-resolve.   Until then, I'll just use this workaround.
    Definition of "Message classes" for others reading this...  You may have already inferred, but two examples of "classes" are a normal email (.msg) and a calendar item.  You can sort these by clicking on the "icon" field at the top of your email
    folder, just to the right of the "bell" (Reminders).   Not sure how to put a .JPG in this posting, since a picture would explain this much better than I can using words.

  • How to get the text of a message class

    Hi,
    I have a message class and added few message(with attributes) to that class.
    Now i want to read the text of the message based on the attributes and
    the message no.
    Example:
    Message 19 is - Where is &1. Where is &1. Where is &1. Where is &1.
    Information that i have :
        ls_msg-msgty = 'S' .
        ls_msg-msgid = 'AP_JATT_TDC_MSG_CL'.
        ls_msg-msgno = 19 .
        ls_msg-msgv1 = 'A'.
        ls_msg-msgv1 = 'B'.
        ls_msg-msgv1 = 'C'.
        ls_msg-msgv1 = 'D'.
    From the info that i have i want the text
    Where is A. Where is B. Where is C. Where is D.
    Is there any function modules which will provide me these details?
    Regards,
    Bikash.

    HI
    You can get the Text based on the Message attributes using the FMs
    FORMAT_MESSAGE
    MESSAGE_TEXT_BUILD.
    Use any one of them..
    It will work for u...
    <b>reward if Helpful</b>

  • Linking an entity table to a message class

    Is there any way to associate the contents of an entity table (v_tvk0 through v_tvk9) with a defined message class?
    Regards.

    if you want to pass internal table, then you have to use the table types. create the Table type (you can define in Se11 or you can define your own type pool and include in the properties section  )and refer it when you are defining the importing or exporting parameter.

  • How to increase the length of a message in message class

    Hi Friends,
    Is there any way to increase the length of a message in a message class as the maximum length is 72 chars.
    My requirement is I cannot use the Long text option.
    Thank You

    HI,
      We cannot change the message length in the message class
    but you can do one thing ,
    while giving the message in your msg class write till which you are allowed to and then you put '&'
    eg : this is message &
    now goto text elements and create a text element suppose T00
    and write the remaining text in that text element.
    and when you want to display the message do it like
    message i00(zmsg_class) with text-T00.
    it ll work.
    *****Reward if useful,
    Thanks & Regards,
    Sunny Suren .C.

  • SHA1 digest error for javax/mail/Message.class

    it's been 4 hrs that i am striving to get around this .....Does any body has any idea why this error appears and how to remedy it ....
    help will be much much appreciated....

    Either:
    1. Your mail.jar is corrupted, or
    2. You have more than one copy of the javax.mail.Message class in your CLASSPATH.

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

  • What is '&' used in message class

    Hi,
    What is '&' used in message class with the message no in SE91.
    Give me details idea on this.
    Best Regards,
    Chini

    If you use '&' operator in your message, then you can pass the text/literals whatever you want to get display in the message.
    For example,
    In a message clase zmsg, there is a message like this...
    018 Table & not exist
    you can call this message from your program by passsnig the table name in to this message...
    For example,
    ztablename = 'BUT000'.
    Message e018(zmsg) with ztablename.
    Filling Message Texts Dynamically *
    Message texts in table T100 can contain up to four ampersand characters (&) as placeholders. You can replace these at runtime using the WITH addition in the MESSAGE statement:
    MESSAGE ... WITH f1 ... f4.
    The contents of fields f1 ... f4 are then inserted sequentially into the message text in place of the placeholders.

  • Message without message class

    Hi All
    Is it possible to post a message in ABAP program without a message class (MESSAGE).
    Amol

    Hi amol,
    1. simple
    2. MESSAGE 'this is message' type 'I'.
      where I can be E,W,S etc.
      (It should be in Quotes)
      (or can be a variable also)
    regards,
    amit m.

  • How to deactivate a message or message class

    Dear Gurus,
    Can any body tell me is there any way to deactivate a message class/mesage?
    Thanks
    Praveen

    hi
    good
    go through this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/16/285d32996b25428dc2eedf2b0eadd8/content.htm
    thanks
    mrutyun^

  • Increase lenth of message in message class

    Hi all,
    I need to display an error mesasge in my program with 2 dynamic values.I have written something like this:
    MESSAGE S000(ZSRM) DISPLAY LIKE 'E' WITH W_EBELN W_NAME1.
    w_ebeln and w_name1 contain values at runtime.
    Now my problem is i need to change the text in the message class to a longer text.How can I do that?
    If I use WITH text-symbol option , how will I display the runtime values.Can someone help me with the syntax?
    Thanks!

    Yes, you can change the text.  What I sometimes do is create a message containing only & & & &.  Although there's some arbitrary maximum length that will display, simply do:
    message snnn(class) with up to four objects, which are text strings, constants, variables, etc.
    message 016 in class GR is useful for this....example:
    Message i016(gr) with
    'Unable to process doc/item' ivbap-vbeln ivbap-posnr 'due to snow in the Rockies.'
        display like 'E'.
    I believe there's a limit of four &'s.

  • Setting Message Class via Content-Type for Faxes

    Hello,
    I am trying to set the message class for inbound email messages (with a fax attachment) from the internet.  The class that I am trying to set is IPM.Note.Microsoft.Fax.CA.  Exchange 2013 SP1 is being used.
    I have a transport rule set up which evaluates criteria on the incoming message, and then sets the Content-Class header to fax-ca.  Unfortunately, even though the content-class header is being set (I can see this is the headers when the message gets
    to Outlook), the message class is not changing and the message still has the IPM.Note class.
    On the other hand, if the transport rule is modified to set the Content-Class to voice-ca, the message class changes to IPM.Note.Microsoft.Voicemail.UM.CA.
    So it seems that it works for voice-ca, but not fax-ca.  Is there an Exchange setting that I have missed?  Is there a reason why this wouldn't work for fax?
    Thanks.

    Hello,
    Thank you for your question.
    I am trying to involve someone familiar with this topic to further look at this issue.
    Thanks,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]

Maybe you are looking for

  • Problem in creating sales order in Make TO Order

    Hi all, We are trying to test the strategy 50 (Make to Order strategy) . To begin with we are trying to create the Sales order. However , we are getting the message "NO availibity check can be carried out for Material " we have assigned the checking

  • Daylight Saving logic

    Hi, I have to design a java application which includes time scheduled tasks. This program should run through out the year. But I have a problem with the day light saving time. According to our schedule, in april we need to set the clock 1 hour ahead

  • Ajax autocomplete on a tabular column

    Hello, Is it possible to add the autocomplete functionm of denes on a tabular column and how can i do that? Thanks for your help I think the problem resides in referencing the item in the register function how can I pass the id of the object in the t

  • OBIEE SSO with On Demand

    Hello, Has anyone attempted to integrate Oracle CRM On Demand with OBIEE before? I know CRM On Demand has a built in Analytics function, but we are looking at analyzing a large volume of sales data, and it would not be feasible (or possible?) to load

  • Can't open certain videos

    I click on the link to the web site. The site opens but I don't get the video that is there. I can get the video using Internet Explorer - I just prefer Firefox.