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

Plz help for mandatory fields.

Former Member
0 Likes
739

Dear expert ,

I just achieved a functionality in one my sap module pools as follows:

Vendor <textbox> <mandatory> <textboxA>

Material <textbox> <mandatory> <textboxB>

Further i have made sure that entry is made by making <textbox> 'required'.

Also i have kept two way entry ie either by F4 list or by manually

typing vendor or material on their textboxes.

In case user takes path of F4 then he gets exact description of that vendor

in textboxA.Same case is for material also for textboxB.

Incase user types vendor or material and press enter same thing happens too.

But now how i get stuck is in manual entry part ie moment i type vebdor code

and press enter,instead displaying the vebdor description in textboxA,it says

material entry is mandatory

I want that first it display vendor name instead and then do anything further.

If i remove 'required' , things work but i want to make them mandatory without

checking on validations module in PAI and actually exploit natural sap functionality.

6 REPLIES 6
Read only

sridhar_meesala
Active Contributor
0 Likes
686

Hi,

Please use proper Subject

Handle the mandatory functionality manually with a code in PAI, and try to do the populating of <textboxA> in PBO so that first the field gets populated and then the mandatory chek happens.

Hope this helps you.

Thanks,

Sri.

Read only

0 Likes
686

What does this means practically sap 'required' clause is given just for funas it cannot be used practically ?

Read only

0 Likes
686

Hi,

It doesn't mean that we cannot use the required functionality practically. It all depends on the requirement and the ease to fulfill our requirement. According to your requirement here doing as mentioned will be easy. It doesn't mean that you have to write code even when there is only one field on the screen and you need to check the mandatory functionality. At that time you have to use the SAP provided required functionality.

Hope you understand.

Thanks,

Sri.

Read only

Former Member
0 Likes
686

Hi Aditya,

Whatever you have stated in your requirement needs to be realized manually. I guess you are expecting a behavior like on pressing of Tab, automatic validation of field should happen and then the description will be populated automatically. But, this windows like automatic validation doesn't happen here. The ABAP server or the NetWeaver Web AS sever cannot repsond to so many events like the Windows. So, it can't implement the normal windows feature like On Mouse Roll, Pressing of Tabs, etc.

So, you can check each of the fields in the PAI block. And then based on that you can flag a message or can validate further. You can also populate the fields based on the business logic in the PBO.

Have a look at the following demo code:

DEMO_DYNPRO_AUTOMATIC_CHECKS

Hope this will help.

Thanks,

Samantak

Read only

0 Likes
686

>Hi,

>It doesn't mean that we cannot use the required functionality practically. It all depends on the requirement and the ease to fulfill our requirement. According to your requirement here doing as mentioned will be easy. It doesn't mean that you have to write code even when there is only one field on the screen and you need to check the mandatory functionality. At that time you have to use the SAP provided required functionality.

>Hope you understand.

>Thanks,

>Sri.

When i try to exit by giving madatory it says me to fill that field only then it exits.

Next step if i give in PAI exit-command code ,yes it works but only for normal screen and not for subscreen.

You cannot use any special screen functions in subscreens.Too many barriers.

For next response i just wish to say atleast in SAP 4.7 abap i have made this possible for automatic

display of description.No issue till here

Edited by: Rob Burbank on Feb 25, 2010 3:12 PM

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
686

You have added 'REQUIRED' as the sap functionality for the material no...

Remove the obligatory and the do the validation in PAI, its not possible to do as you say