Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

MESSAGE class problem.

Former Member
0 Likes
1,038

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.

6 REPLIES 6
Read only

Kanagaraja_L
Active Contributor
0 Likes
979

I think it is not a Message class Problem when you are trying to view the form through VF03 it will send the Form by FAX/MAIl.

So Check the Output Medium in Tcode VF02/VF03.

and also check the SAP Inbox in Tcode SBWP.

Kanagaraja L

Read only

0 Likes
979

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

Read only

Former Member
0 Likes
979

Hi,

If you are writing the code user exit , which is called in update task ( i.e once the DB commit is done ) you are not supposed to give error mesage. Looks like you need to find some other user exit.

To trace the actual reason, please let me know your user exit.

- Krishnan

Read only

0 Likes
979

unfortunately its not an user exit.

this is a program that ive written and tag to a form (sapscript).

Read only

former_member404244
Active Contributor
0 Likes
979

Hi,

Try to execute ur code only for VF03 and for rest just skip ur code and see.

U can use SY-TCODE...

Regards,

Nagaraj

Read only

0 Likes
979

Prb solved Thank you.