2016 Mar 21 3:53 PM
Hi experts, I'm traying to create a program to delete a Rebate Agreement in background. At first I've created a BI program but it did'nt work, (in foreground whe I chose delete it apear a pop-up do confirm deletition). I also try the using BAPI_AGREEMENTS, passing in the structure TI_BAPIAGRMNT the field OPERATION = 003 (DELETE) and also the field DEL_FLAG = 'X'. Can any one help me? Best regards , Elisete Fonseca
2016 Mar 21 4:09 PM
check class CL_EX_SD_ENH_REBATES Method IF_EX_SD_ENH_REBATES~V13A_DELETE to delete rebate agreement.
2016 Mar 21 4:09 PM
check class CL_EX_SD_ENH_REBATES Method IF_EX_SD_ENH_REBATES~V13A_DELETE to delete rebate agreement.
2016 Mar 22 11:32 AM
Hello Michael,
I've try the method, but it didn't work.
thanks.
2016 Mar 22 11:45 AM
2016 Mar 23 9:03 AM
Micheal, inside the method IF_EX_SD_ENH_REBATES~V13A_DELETE is call CALL METHOD CL_EXIT_MASTER=>CREATE_OBJ_BY_INTERFACE_FILTER, which returns the table EXIT_OBJ_TAB,converted into INSTANCE_FLT_CACHE, after that, it fails in the validation : "valid = sxrt_true' line 63.
2016 Mar 22 12:40 PM
Pretty much in the beginning (about line 40) of the coding in FM BAPI_AGREEMENTS
SAP is checking whether it is a deletion and reacts with an error message:
* Check whether agreement has to be deleted
PERFORM error_message_agrmnt USING '152'
2016 Mar 23 8:51 AM
Jürgen, In the FM BAPI_AGREEMENTS, in fact inside the perform is call the FM 'AGR_MAP_KNUMA_AG_GUID_GET_NEW', in case of deleting. In this FM, is reading a table (agr_map_knuma) which is empty. the place where this table is fullfilld FM AGREEMENTS_INBOUND, and is also empty in de DDIC table AGR_MAP_KNUMA.
2016 Mar 23 11:13 AM
Sorry I don't see this call that you mentioned.
I refer to this very initial section in the program:
And in the first call SAP is just checking the OPERATION = 003 (DELETE)
Operation 003 is something very different from adding a deletion indicator to an agreement.
Adding a deletion indicator is usually nothing else than an UPDATE operation.
Operation 003 is used to delete data permanently, which can't be allowed if there is other data depending on that.
2016 Mar 24 10:54 AM
Jurden,
I maybe didn't explain my self. I want to create a program to do the same action of de Tcode :
VBO2>delete: (deletes all the conditions and the Rebate Agreement):
acording to the operation in the BAPI_AGREEMENTS: you select in the CALL FUNCTION 'CND_MAP_OPERATION_TO_UPDKZ' (line35),returns: 003 Delete: Message contains objects to be deleted -> 'D' => Dump
004 Change: Message contains changes -> 'U' => Dump
005 Replace: This message replaces previous messages -> ' ' => do nothing
009 Original: First message for process -> 'I' => OK ( for creating a new)
023 Wait/Adjust: Data should not be imported -> ' ' => do nothing
and i can't solve may issue.
Thanks.
2016 Mar 24 11:02 AM