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

Create functional location and classification

Former Member
0 Likes
1,476

Hi all,

We are trying to assign a classification to newly created functional location
but we get the following error:

    i -Assignment does not exist or is not valid on
    e -Class type 003, object type IFLOT, object PKD-TCA

    e -Object PKD-TCA does not exist

    i -Assignment was not created

this is our sequence for functional location:

CALL FUNCTION 'BAPI_FUNCLOC_CREATE'

     -> done, returns no errors


CALL FUNCTION 'BAPI_OBJCL_CREATE'

     -> return the errors written above


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'


note: we are using the same logic for assigning a classification to a newly created equipment.

this is our sequence for equipment:


CALL FUNCTION 'BAPI_EQUI_CREATE'

     -> returns no errors


CALL FUNCTION 'BAPI_OBJCL_CREATE'

     -> creates the classification data on the newly created equipment.


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

question: Is there a way to create the classification for the functional location without commiting the funcitonal location first?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
993

Hi Vincent,

You can try the following sequence

1. check the classification values before creating the functional location

     CALL FUNCTION 'CHAR_VALUE_CHECK2'

2. if the values are correct, you can create the functional location

     CALL FUNCTION 'BAPI_FUNCLOC_CREATE

3. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

4. assign the classification to the newly created functional location
    CALL FUNCTION 'BAPI_OBJCL_CREATE

Kind Regards

Bert

1 REPLY 1
Read only

Former Member
0 Likes
994

Hi Vincent,

You can try the following sequence

1. check the classification values before creating the functional location

     CALL FUNCTION 'CHAR_VALUE_CHECK2'

2. if the values are correct, you can create the functional location

     CALL FUNCTION 'BAPI_FUNCLOC_CREATE

3. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

4. assign the classification to the newly created functional location
    CALL FUNCTION 'BAPI_OBJCL_CREATE

Kind Regards

Bert