Functionality This method allows you to change the installment plan items in aninstallment plan. You transfer the number of the installment plan to bechanged in the NUMBER> parameter and the changed data for theitems in the Installment_Changes> table. Note that it is only possible to remove clearing restrictions, not toset them. Before the change is made, the current installment plan items have tobe read using the GETDETAIL> method. For this, the parameterACCUMULATE> = 'X' must be set (see example) because theCHANGE> method only works with installment plan items insummarized form.Example ***************************************************> * Definitions> ***************************************************> * Internal Tables> DATA: tl_fkkop LIKE bapifkkop OCCURS 10,> tl_rfkinst LIKE bapirfkinst OCCURS 10.> * Work areas> DATA: wa_fkkop LIKE bapifkkop,> wa_rfkinst LIKE bapirfkinst.> **************************************************> * Read Installment plan> **************************************************> CALL FUNCTION 'BAPI_INSTMNTPLN_GETDETAIL'> EXPORTING> doc_no = p_opbel> accumulate = 'X'> * IMPORTING> * RETURN => * INSTPLANATTR => TABLES> installment_fkkop = tl_fkkop> .> *************************************************> * implement changes> *************************************************> LOOP AT tl_fkkop INTO wa_fkkop.> MOVE-CORRESPONDING wa_fkkop TO wa_rfkinst.> * ... > * do modifications in wa_rfkinst here> * ...> APPEND wa_rfkinst TO tl_rfkinst.> ENDLOOP.> **************************************************> * change installment plan> **************************************************> CALL FUNCTION 'BAPI_INSTMNTPLN_CHANGE'> EXPORTING> number = p_opbel> * IMPORTING> * RETURN => TABLES> installment_changes = tl_rfkinst.> .>Description The return code for the method is returned to a structure. Forinformation about what the individual fields stand for, see thedocumentation for the respective data element. Description This is where you transfer the number of the installment plan for whichyou would like to change the installment plan items. Description You can transfer the changed installment plan items in this table.Structure RFKINST> contains the key fields and those fields ofthe FKKOP structure that you can change. |