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

Field Validation

Former Member
0 Likes
651

I have custom screen, where in i key a RFQ Number of lenght 10, but i shud check it with AUFNR of VIAUFKST which is of lenght 12. Please correct me in the code i wrote

data : T_RFQNO type VIAUFKST-AUFNR.

PAI Module.....

select single * from ZES_RFQ

into IS_RFQ

where BUKRS = ZES_RFQ-BUKRS

and RFQ_NO = ZES_RFQ-RFQ_NO

and SER_NO = ZES_RFQ-SER_NO.

if SY-SUBRC = 0.

message E138(ZSM) with 'RFQ Number already exists'.

else.

T_RFQNO = ZES_RFQ-RFQ_NO.

select single * from VIAUFKST

into VIAUFKST

where AUFNR = T_RFQNO.

if SY-SUBRC = 0.

else.

message E138(ZSM) with 'RFQ Number not possible'.

endif.

while in debugging if i change the value of T_RFQNO with preceeding zero's i get the required. if this is correct plz tell me how to add ZERO's to the number.

Thanks

Pratyusha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
617

use FM CONVERSION_EXIT_ALPHA_INPUT.

You need to pass your T_RFQNO to the FM and add zero in front.

5 REPLIES 5
Read only

Former Member
0 Likes
618

use FM CONVERSION_EXIT_ALPHA_INPUT.

You need to pass your T_RFQNO to the FM and add zero in front.

Read only

0 Likes
617

Hi ONG, Thanks for the reply

use FM CONVERSION_EXIT_ALPHA_INPUT.

You need to pass your T_RFQNO to the FM THIS PART IS VERY CLEAR

and add zero in front. NOT CLEAR.

Is the FM going to return the T_RFQNO with prceeding ZERO's or HOW?

Read only

0 Likes
617

Just pass your T_RFQNO into the FM, and the FM will auto add zero in front for u.

Read only

0 Likes
617

Thank You ONG, it solved the problem, but strange that i tried the same thing before some time and tht did not work.

Anyways thanks for the help

Read only

0 Likes
617

Maybe I got the god of solution...lol

Just kidding.

Glad to solve your problem.