09-22-2014 3:20 PM
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.
09-22-2014 4:13 PM
Ankit:
Not sure what your question is. Also, searching ETTIFN will bring up many other threads.
regards,
bill.
09-22-2014 4:13 PM
Ankit:
Not sure what your question is. Also, searching ETTIFN will bring up many other threads.
regards,
bill.
09-23-2014 4:59 AM
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
09-23-2014 3:42 PM
09-24-2014 7:59 AM
09-24-2014 3:08 PM
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.
09-24-2014 10:00 PM
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 .
09-25-2014 2:06 PM
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