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: 

Creating Measurement document

Former Member
0 Kudos

Hi all,

I have an issue in creating a measuring document using the function module MEASUREM_DOCUM_RFC_SINGLE_001 through my interface.

I am passing the following as input in my interface:

CALL FUNCTION 'MEASUREM_DOCUM_RFC_SINGLE_001'
      EXPORTING
        measurement_point     = Measuring point
        secondary_index       = ' '
        reading_date          = system date
        reading_time          = system time
        short_text            = text
        reader                = sy-uname
        origin_indicator      = 'A'
        reading_after_action  = ' '
        recorded_value        = Difference reading
        recorded_unit         = ' '
        difference_reading    = gc_x
        code_catalogue        = ' '
        code_group            = ' '
        valuation_code        = ' '
        code_version          = ' '
        user_data             = Some custom fields that i hv to update in IMRG
        check_custom_duprec   = ' '
        with_dialog_screen    = ' '
        prepare_update        = 'X'
        commit_work           = 'X'
        wait_after_commit     = 'X'
        create_notification   = ' '
        notification_type     = 'M2'
        notification_prio     = ' '
      IMPORTING
        measurement_document  = measurement_document
        complete_document     = complete_document
        notification          = notification
        custom_duprec_occured = custom_duprec_occured
      EXCEPTIONS
        no_authority          = 1
        point_not_found       = 2
        index_not_unique      = 3
        type_not_found        = 4
        point_locked          = 5
        point_inactive        = 6
        timestamp_in_future   = 7
        timestamp_duprec      = 8
        unit_unfit            = 9
        value_not_fltp        = 10
        value_overflow        = 11
        value_unfit           = 12
        value_missing         = 13
        code_not_found        = 14
        notif_type_not_found  = 15
        notif_prio_not_found  = 16
        notif_gener_problem   = 17
        update_failed         = 18
        invalid_time          = 19
        invalid_date          = 20
        OTHERS                = 21.

Now the issue is, after i run this FM through my interface, my measurement document is created successfully and updates the IMRG table with the document. Now if i go to the t.code IK11 and try creating another measuring document with the same measuring point as mentioned in the importing parameter, to get the previous reading, it is not picking up the last measurement document, but it is picking some other old measuring document based on some standard condition. Whereas if i simply create one more equipment and create a measurement documents with the new measuring point thru IK11 individually, it is processing successfully. The problem has occured after running my interface.

Can anyone please help me.........<removed by moderator>

Regards,

Taarikha

Edited by: Thomas Zloch on Sep 27, 2011 2:02 PM

1 ACCEPTED SOLUTION

ChandraMahajan
Active Contributor
0 Kudos

Hi,

try exporting these many values only as shown below and see if it works. This is working perfectly fine in our system.

CALL FUNCTION 'MEASUREM_DOCUM_RFC_SINGLE_001'

EXPORTING

measurement_point = p_m_point

reading_date = sy-datum

reading_time = sy-uzeit

short_text = text-030

recorded_value = p_meas_read

prepare_update = 'X'

commit_work = 'X'

wait_after_commit = 'X'

notification_type = 'M2'

IMPORTING

measurement_document = p_meas_doc

EXCEPTIONS

no_authority = 1

point_not_found = 2

index_not_unique = 3

type_not_found = 4

point_locked = 5

point_inactive = 6

timestamp_in_future = 7

timestamp_duprec = 8

unit_unfit = 9

value_not_fltp = 10

value_overflow = 11

value_unfit = 12

value_missing = 13

code_not_found = 14

notif_type_not_found = 15

notif_prio_not_found = 16

notif_gener_problem = 17

update_failed = 18

OTHERS = 19.

IF sy-subrc = 0.

COMMIT WORK.

ENDIF.

Thanks,

Chandra

3 REPLIES 3

ChandraMahajan
Active Contributor
0 Kudos

Hi,

try exporting these many values only as shown below and see if it works. This is working perfectly fine in our system.

CALL FUNCTION 'MEASUREM_DOCUM_RFC_SINGLE_001'

EXPORTING

measurement_point = p_m_point

reading_date = sy-datum

reading_time = sy-uzeit

short_text = text-030

recorded_value = p_meas_read

prepare_update = 'X'

commit_work = 'X'

wait_after_commit = 'X'

notification_type = 'M2'

IMPORTING

measurement_document = p_meas_doc

EXCEPTIONS

no_authority = 1

point_not_found = 2

index_not_unique = 3

type_not_found = 4

point_locked = 5

point_inactive = 6

timestamp_in_future = 7

timestamp_duprec = 8

unit_unfit = 9

value_not_fltp = 10

value_overflow = 11

value_unfit = 12

value_missing = 13

code_not_found = 14

notif_type_not_found = 15

notif_prio_not_found = 16

notif_gener_problem = 17

update_failed = 18

OTHERS = 19.

IF sy-subrc = 0.

COMMIT WORK.

ENDIF.

Thanks,

Chandra

0 Kudos

Hi,

I tried using that. The measurement document is getting created. After running my program, if i try creating the doucment again with the same point thru IK11, the Total counter reading value must have the last reading, but it is showing the old value which is not the latest value.

Please help.

Thanks.

Regards,

Taarikha

0 Kudos

Hi,

The issue is resolved.

Thanks a lot!!!!.

Regards,

Taarikha