SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Need to update Installation Facts table ETTIFN

Former Member
0 Kudos

Hi all,

I need to update field WERT1 from table ETTIFN.

For the selected Installation with OPERAND = 'SDP', the value for WERT1 should set to 'X'.

I need to use BADI- BAPI_UTILINSTALLATION_CHANFACT.

Thanks in advance.

1 ACCEPTED SOLUTION

william_eastman
Advisor
Advisor
0 Kudos

Ankit:

Not sure what your question is.  Also, searching ETTIFN will bring up many other threads.

regards,

bill.

View solution in original post

7 REPLIES 7

william_eastman
Advisor
Advisor
0 Kudos

Ankit:

Not sure what your question is.  Also, searching ETTIFN will bring up many other threads.

regards,

bill.

0 Kudos

Hi,

I need to update a table ETTIFN ( Installation Facts - Normal ).

Which contains ANLAGE (Installation) OPERAND (Operand) fields as a primary fields and WERT1 (Entry value (installed value) for a device) along with the other fields.

I have Anlage and Operand, so for these values I need to update the field WERT1 with value 'X'.

But the thing is, I need to use BAPI for it - BAPI_UTILINSTALLATION_CHANFACT.

If there any other method, please suggest.

Hope this will give clarity.

Thanks,

Ankit

0 Kudos

That is the right way.  Use the bapi in your program.

0 Kudos

Thats the problem, I am not aware, how to use this BAPI.

0 Kudos

Ankit:

Have you searched the forum for other threads?  I can find several which mention the bapi.  Additionally, bapis have documentation available which describes how they work. 

Please also read After searching the space and researching the documentation, if you still have specific questions, then ask them here.

regards,

bill.

0 Kudos

Here is the sample coee -

*// Check if Installation has operand  first before the update
     CLEAR lv_count.

     CALL FUNCTION 'ISU_DB_ETTIFN_SELECT'
       EXPORTING
         x_anlage      = installation
         x_operand     = operand
         x_ab          = sy-datum
         x_bis         = sy-datum
       IMPORTING
         y_count       = lv_count
       EXCEPTIONS
         not_found     = 1
         not_qualified = 2
         OTHERS        = 3.

     IF sy-subrc EQ 0 AND lv_count GT 0.
       " Do nothing
     ELSE.

       ls_flag-operand = operand
       ls_flag-fromdate = from_date
       ls_flag-duedate = '99991231'.
       ls_flag-flag = 'X'.
       APPEND ls_flag TO lt_flag.

       CALL FUNCTION 'BAPI_UTILINSTALLATION_CHANFACT'
         EXPORTING
           number    = ls_object-installation
         IMPORTING
           return    = ls_bapireturn1
         TABLES
           flagtable = lt_flag.

       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
         EXPORTING
           wait   = 'X'
         IMPORTING
           return = ls_bapireturn2.


Mark the thread closed if your query is resolved .

former_member229976
Active Participant
0 Kudos

Hi,

BAPI_UTILINSTALLATION_CHANFACT IS available! It's been there for ages! (31.07.1998). Just test the above code. Only thing I'd add -> check the parameters of the function module, you might want to provide abap_true to UPDFORCE.

Kind regards
Uwe