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

WHILE DELETING A SALE ORDER GETTING A RUNTIME ERROR

Former Member
0 Likes
828

hi to all experts,

whenever i try to delete a particular sale order im getting a runtime error

stating that

Short text
    Screen: Illegal message



What happened?
    The current screen processing action was terminated since a situat
    occurred where the application could not continue.
    This is probably due to an error in the ABAP program or in the cur
    screen.

Error analysis
    The program attempted to issue a " " message during "Exit Command" processing.
    This is an illegal operation.
    The program was terminated.

    Screen name.............. "SAPMV45A"
    Screen number............ 4001



Trigger Location of Runtime Error
    Program                                 SAPMV45A
    Include                                 MV45AFZZ
    Row                                     370
    Module type                             (FORM)
    Module Name                             USEREXIT_SAVE_DOCUMENT

SourceCde

              message e001(zm) WITH text-335 ltab-kunnr text-334.
            else.
              if ktab-jkunnr <> ltab-kunnr.
                ktab-jkunnr = ltab-kunnr.

                jobsitecode = ltab-kunnr.
                CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                EXPORTING
                  input  = jobsitecode
                  IMPORTING
                  output = jobsitecode.

                SELECT SINGLE * FROM kna1 WHERE kunnr = jobsitecode.
                IF sy-subrc = 0.
                  ktab-jname1 = kna1-name1.
                  ktab-jstras = kna1-stras.
                ENDIF.

                chg_flg = 'X'.
              endif.
            endif.
          else.
            message e001(zm) WITH text-336.

* Validation for relationship between Sold-to Party and Ship-to Party
*          if ktab-ckunnr+0(4) NE ktab-jkunnr+0(4).
*            message e001(zm) WITH text-335 ktab-jkunnr text-337 ktab-ckunnr.
*          endif.

          custcode1 = ktab-ckunnr.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = custcode1
            IMPORTING
              output = custcode1.

          jobsitecode1 = ktab-jkunnr.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = jobsitecode1
            IMPORTING
              output = jobsitecode1.

          SELECT SINGLE * FROM knvp
          WHERE kunnr = custcode1
            AND vkorg = vbak-vkorg
            AND vtweg = vbak-vtweg
            AND spart = vbak-spart
            AND parvw = 'WE'



Error analysis
    The program attempted to issue a " " message during "Exit Command"
    This is an illegal operation.
    The program was terminated.

    Screen name.............. "SAPMV45A"
    Screen number............ 4001



Trigger Location of Runtime Error
    Program                                 SAPMV45A
    Include                                 MV45AFZZ
    Row                                     370
    Module type                             (FORM)
    Module Name                             USEREXIT_SAVE_DOCUMENT

1 ACCEPTED SOLUTION
Read only

former_member404244
Active Contributor
0 Likes
719

Hi,

Seems there is some problem with the user exit USEREXIT_SAVE_DOCUMENT..

Put a breakpoint and see.

Regards,

Nagaraj

hi to all experts,

whenever i try to delete a particular sale order im getting a runtime error

stating that

Short text
    Screen: Illegal message



What happened?
    The current screen processing action was terminated since a situat
    occurred where the application could not continue.
    This is probably due to an error in the ABAP program or in the cur
    screen.

Error analysis
    The program attempted to issue a " " message during "Exit Command" processing.
    This is an illegal operation.
    The program was terminated.

    Screen name.............. "SAPMV45A"
    Screen number............ 4001



Trigger Location of Runtime Error
    Program                                 SAPMV45A
    Include                                 MV45AFZZ
    Row                                     370
    Module type                             (FORM)
    Module Name                             USEREXIT_SAVE_DOCUMENT

SourceCde

              message e001(zm) WITH text-335 ltab-kunnr text-334.
            else.
              if ktab-jkunnr <> ltab-kunnr.
                ktab-jkunnr = ltab-kunnr.

                jobsitecode = ltab-kunnr.
                CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
                EXPORTING
                  input  = jobsitecode
                  IMPORTING
                  output = jobsitecode.

                SELECT SINGLE * FROM kna1 WHERE kunnr = jobsitecode.
                IF sy-subrc = 0.
                  ktab-jname1 = kna1-name1.
                  ktab-jstras = kna1-stras.
                ENDIF.

                chg_flg = 'X'.
              endif.
            endif.
          else.
            message e001(zm) WITH text-336.

* Validation for relationship between Sold-to Party and Ship-to Party
*          if ktab-ckunnr+0(4) NE ktab-jkunnr+0(4).
*            message e001(zm) WITH text-335 ktab-jkunnr text-337 ktab-ckunnr.
*          endif.

          custcode1 = ktab-ckunnr.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = custcode1
            IMPORTING
              output = custcode1.

          jobsitecode1 = ktab-jkunnr.
          CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = jobsitecode1
            IMPORTING
              output = jobsitecode1.

          SELECT SINGLE * FROM knvp
          WHERE kunnr = custcode1
            AND vkorg = vbak-vkorg
            AND vtweg = vbak-vtweg
            AND spart = vbak-spart
            AND parvw = 'WE'



Error analysis
    The program attempted to issue a " " message during "Exit Command"
    This is an illegal operation.
    The program was terminated.

    Screen name.............. "SAPMV45A"
    Screen number............ 4001



Trigger Location of Runtime Error
    Program                                 SAPMV45A
    Include                                 MV45AFZZ
    Row                                     370
    Module type                             (FORM)
    Module Name                             USEREXIT_SAVE_DOCUMENT

4 REPLIES 4
Read only

GauthamV
Active Contributor
0 Likes
719

hi,

open MV45AFZZ in se38 and change the logic in USEREXIT_SAVE_DOCUMENT.

Read only

Former Member
0 Likes
719

hi gautham,

what logic should i change in the user-exit

thanks

Read only

former_member404244
Active Contributor
0 Likes
720

Hi,

Seems there is some problem with the user exit USEREXIT_SAVE_DOCUMENT..

Put a breakpoint and see.

Regards,

Nagaraj

Read only

Former Member
0 Likes
719

what could be the error