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

validations

Former Member
0 Likes
514

Hi,

Iam doing some validations into one custom BAPI.Iam facing the problem to get the logic about this validations.Any body help of this logic.

Safety Rating Code [TI_ZFEAUSP-ATWRT] should be validated against Table CAWN where ATWRT = Safety Rating Code selected and Internal Characteristic [TI_ZFEAUSP-ATINN]: ‘0000013286’. In case of error, the message “class-ZF_EVEN, No.028” is to be given.

Please help me.

Thanks & Regards,

sudhakar

3 REPLIES 3
Read only

Former Member
0 Likes
488

Hi

It is something like this:

If one the input to the BAPI is Safety Rating Code (lets say IF_ATWRT), you need to have the following code:

*-(Assuming ATWRT is the primary key in CAWN)

<b>Select single ATWRT from CAWN where ATWRT = IF_ATWRT.

If sy-subrc NE 0.

MESSAGE E028(<message id>) with IF_ATWRT.

ENDIF.</b>

Regards,

Raj

Read only

dev_parbutteea
Active Contributor
0 Likes
488

Hi,

you may follow this logic:

select up to 1 rows from table cawn

  where ATWRT = TI_ZFEAUSP-ATWRT

  and    ATINN   = TI_ZFEAUSP-ATINN.

if sy-subrc <> 0.

[display error message

endif.

endselect

for the message , you may get it from table t100:

select single *

from t100

into wa_t100

where sprsl = language

and arbgb = message class

and msgnr = message number

Regards,

Sooness

Read only

Former Member
0 Likes
488

Hi,

Thanks for replies.I got an idea about this logic.iam assign points.

Thanks & Regards,

sudhakar