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

Maintenance Plan

Former Member
0 Likes
924

Hi,

In Maintenace Plan i need the Values of Maintenance plan Cycle..

its storing in table MMPT-ZYKL1 and the value is comming like this 3.1104000000000000E+07 i am dividing by T006-ZAEHL.

Is there any FM to get the values of Maintenance plan Cycle...

3 REPLIES 3
Read only

Former Member
0 Likes
673

plz send me the solution....

Read only

Former Member
0 Likes
673

Hi Mohan,

try this

data f1 type f value '3.1104000000000000E+07'.
data f2(10)  type n.
 
move f1 to f2.

Now divide f2 by T006-ZAEHL.

Regards,

Satish

Read only

former_member386202
Active Contributor
0 Likes
673

Hi,

Try FM

*--Call the function module to get the data based on maintenance plan

CALL FUNCTION 'IWP1_READ_MAINTENANCE_PLAN_DB'

EXPORTING

i_warpl = wa_final-warpl

i_aktyp = space

IMPORTING

e_wmpla = wa_wmpla

TABLES

tab_wmpos = i_wmpos

tab_wiloa = i_wiloa

tab_wmmpt = i_wmmpt

tab_wmhis = i_wmhis

tab_wmhio = i_wmhio

tab_t351p = i_t351

EXCEPTIONS

invalid_number = 1

lvorm_set_for_plan = 2

plan_not_activ = 3

lokz_set_for_plan = 4

number_initial = 5

OTHERS = 6.

and to convert the value use FM

*--Call function module to convert cycle & offset from floating to

  • character

CALL FUNCTION 'FLTP_CHAR_CONVERSION_FROM_SI'

EXPORTING

char_unit = v_unit

decimals = lc_dec

fltp_value_si = v_offset

indicator_value = c_check

IMPORTING

char_value = v_cycle

EXCEPTIONS

no_unit_given = 1

unit_not_found = 2

OTHERS = 3.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Regards,

Prashant