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

Skip Copied Standard Selection screen

former_member207873
Participant
0 Likes
1,650

Hi Experts,

I have included a selection screen block like that of a copied standard program (ZRM07MLBD) in my custom program as given below.

I want to enter values in this custom program and want to skip the copied standard selection screen. I am using submit statement for this.

SUBMIT ZRM07MLBD WITH MATNR IN MATNR WITH BUKRS IN BUKRS WITH WERKS IN WERKS WITH LGORT IN LGORT WITH CHARG IN CHARG

WITH BWTAR IN BWTAR WITH BWART IN BWART WITH SOBKZ EQ SOBKZ WITH DATUM IN DATUM AND RETURN.

But the problem happens when I enter inexisting company code or plant. Then it is showing the error in the status bar in the copied standard program. See the below screen shot.

I wanted to show the error message in the same custom program. But it is navigating to the copied standard program and showing the error from the program (ZRM07MLBD). How can I show the error message in the same custom program?

BR.

8 REPLIES 8
Read only

Former Member
0 Likes
1,529

Hello BR,

the std program is using the Message Class M7. The particular error message# is 348 and coming up from the code below.

Copying a Std prog is not actually copying into Z, it would also require copying of the Message classes, Includes etc, as and when required.

Please do copy the Message class also and use the same in the Z program.

Thanks,

Krishna Teja Peddada.

Read only

0 Likes
1,529

Hi Krishna,

With all due respect, your info is non sense. Message classes have nothing to do with the program, you don't need to copy a message class when copying a std program. You might need to copy includes, screens and pf-status IF you want to change these elements. Also, the problem described has absolute nothing to do with the message class.

Regards,

Custodio

Read only

0 Likes
1,529

Hi Custodio,

Thanks for clarifying me. I interpreted the issue in another way. I thought the error message was to be modified. But after seeing your response and reading the initial question again, I made myself clear.

I will take this as an alert to read the post twice before posting any reply

Thanks,

Krishna.

Read only

0 Likes
1,529

Hi Krishna,

I was a bit afraid you could take it as bullying. I'm glad you took it easy. I guess that's how we make each other better, isn't it?

Cheers,

Custodio

Read only

custodio_deoliveira
Active Contributor
0 Likes
1,529

Hi ABAP ABAP (I reckon this is not your real name),

The message is displayed in the program being called because there is where the selection screen is being validates (see AT SELECTION SCREEN).

If you want to display the message in the calling program, you need to validate the entry in said proigram, ie, BEFORE submitting to your copied program.

Regards,

Custodio.

Read only

0 Likes
1,529

Hi Custodio,

Can you give me a hint on how to proceed on this. In my custom program I am not writing any code related to ZRM07MLBD except the submit statement. So how should I show the error messages on the same selection screen of custom program. All the validation statements in ZRM07MLBD have to be brought into the custom program?

Read only

0 Likes
1,529

Hi,

Well, this is (one of ) the problem of copying std programs... Although you'd have this problem even if you submitted the std program and not the copy.

Anyway, yes, if you need ALL validations from std program to be performed/displayed in your custom program, you will need to copy it.

Alternatively, you may check with your functional and/or the business what is really important to validate upfront and implement in your custom program.

Cheers,

Custodio

Read only

vamsixk
Active Participant
0 Likes
1,529

Hi,

You can check how each field is being validated in your standard program.

Mostly the validations are carrie dout based on check table.

the table for company codes is t001.

Likewise check the validations for the rest of the fields.

and before you pass the selection criteria using the submit statement perform these validations in your custom program and display the error messages.

Regards,

Vamsi