Application Development 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: 

validating plant and prod scheduler

Former Member
0 Kudos

im validating plant and prod scheduler .

i.e if plant ne 2010 and production scheduler ne '63F'.

display message 'Order number is not valid'.

The tables are aufk and afko.

how to link them?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi,

select single werks

from aufk

into v_werks

where werks eq p_werks.

if sy-subrc eq 0.

MESSAGE e001.

endif.

(e001- error message created as text element)

pls reward if useful.

2 REPLIES 2

Former Member
0 Kudos

hi,

select single werks

from aufk

into v_werks

where werks eq p_werks.

if sy-subrc eq 0.

MESSAGE e001.

endif.

(e001- error message created as text element)

pls reward if useful.

Former Member
0 Kudos

Hi,

Do like this

Data: v_field type <production schedular field>.

Parameters: p_plant type werks_d.

Select single <production Schedular field> from AFKO into v_field where plant = p_plant.

if sy-subrc <> 0.

message...

endif.

Regards,

Satish