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

output error message in VK11

Former Member
0 Likes
1,142

Hi,

I need to put an authority check before saving in Tcode VK11.

I used BADI SD_COND_SAVE_A to put the checking. I needed to output a message then go back to the same screen with the entered values in the screen still in it.

How Can I make the program go back to the screen with its values.

Below is my code:

AUTHORITY-CHECK OBJECT 'V_KONH_VKO'

ID 'ACTVT' FIELD c_activity

ID 'VTWEG' FIELD v_spart.

IF sy-subrc NE 0.

MESSAGE w012(zsd) WITH v_material.

ENDIF.

Thanks in advance!

Regards,

Marco

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
897

Hi Marco,

Try with this

IF sy-subrc NE 0.

MESSAGE w012(zsd) WITH v_material.

LEAVE TO SCREEN XXX.

ENDIF.

Hope this helps you. Reply for queries, shall post the updates.

Regards.

Kumar.

Hi,

I need to put an authority check before saving in Tcode VK11.

I used BADI SD_COND_SAVE_A to put the checking. I needed to output a message then go back to the same screen with the entered values in the screen still in it.

How Can I make the program go back to the screen with its values.

Below is my code:

AUTHORITY-CHECK OBJECT 'V_KONH_VKO'

ID 'ACTVT' FIELD c_activity

ID 'VTWEG' FIELD v_spart.

IF sy-subrc NE 0.

MESSAGE w012(zsd) WITH v_material.

ENDIF.

Thanks in advance!

Regards,

Marco

2 REPLIES 2
Read only

Former Member
0 Likes
898

Hi Marco,

Try with this

IF sy-subrc NE 0.

MESSAGE w012(zsd) WITH v_material.

LEAVE TO SCREEN XXX.

ENDIF.

Hope this helps you. Reply for queries, shall post the updates.

Regards.

Kumar.

Read only

0 Likes
897

Hi Kumar,

Thanks for the reply.

This is what Im looking for. But unfortunately it is having an error message ($$00000001 in function group) when ever I would change the values and hit the save button again.

When I debug it, whats happening is that an internal table is not getting refresh in this process thus calling the error message. There is no way I can refresh this table because it is not present in the BADI.