Code: Alles auswählen.
DATA: lt_message type standard table of sepa_mandate,
ls_extensionin type bapiparex.
* gt_SEPA_MANT_MIG1 type Zcfr_sepa_mant_mig1. " warum globale variable
CALL FUNCTION 'BAPI_SEPA_MANDATE_CREATE1'
EXPORTING
I_APPLICATION = I_APPLICATION
* I_CREDITOR_ID = I_CREDITOR_ID
I_MANDATE_ID = I_MANDATE_ID
* IS_DATA_TO_CREATE = IS_DATA_TO_CREATE
IMPORTING
ES_MANDATE_CREATED = ES_MANDATE_CREATED
RETURN = RETURN
TABLES
extensionin = EXTENSIONIN.
Data: lv_data type string,
ls_MDT_SEPA type ZCD_MDT_SEPA,
ls_SEPA_MANT_MIG1 type ZCFR_SEPA_MANT_MIG1.
CONCATENATE ls_extensionin-VALUEPART1
ls_extensionin-VALUEPART2
ls_extensionin-VALUEPART3
ls_extensionin-VALUEPART4
into lv_data.
* ls_MDT_SEPA = lv_data.
clear: ls_SEPA_MANT_MIG1.
MOVE-CORRESPONDING: ls_MDT_SEPA to ls_SEPA_MANT_MIG1.
ls_SEPA_MANT_MIG1-MNDID = I_MANDATE_ID.
* append ls_SEPA_MANT_MIG1 to gt_SEPA_MANT_MIG1.
* formale Prüfung (Beitrag wirklich Betrag?, Währung korrekt?)
PERFORM extensions_save on commit.
PERFORM extensions_init on ROLLBACK.
ENDFUNCTION.
Code: Alles auswählen.
FORM EXTENSIONS_SAVE .
DATA: LS_SEPA_MANT_MIG1 TYPE ZCFR_SEPA_MANT_MIG1,
GT_SEPA_MANT_MIG1 TYPE ZCFR_SEPA_MANT_MIG1.
* LOOP AT GT_SEPA_MANT_MIG1
* INTO LT_SEPA_MANT_MIG1.
UPDATE SEPA_MANDATE SET ZZCD_LIMIT_AMOUNT = LS_SEPA_MANT_MIG1-ZCD_LIMIT_AMOUNT
ZZCD_LIMIT_CURR = LS_SEPA_MANT_MIG1-ZCD_LIMIT_CURR
WHERE MNDID = LS_SEPA_MANT_MIG1-MNDID.
* ENDLOOP.
ENDFORM.
Code: Alles auswählen.
FORM EXTENSIONS_INIT .
DATA: GT_SEPA_MANT_MIG1 TYPE ZCFR_SEPA_MANT_MIG1.
CLEAR: GT_SEPA_MANT_MIG1.
ENDFORM.
Code: Alles auswählen.
UPDATE SEPA_MANDATE SET ZZCD_LIMIT_AMOUNT = LS_SEPA_MANT_MIG1-ZCD_LIMIT_AMOUNT
ZZCD_LIMIT_CURR = LS_SEPA_MANT_MIG1-ZCD_LIMIT_CURR
WHERE MNDID = LS_SEPA_MANT_MIG1-MNDID.
Hi, ja um extentions Felder zu lesen und dann über BAPI in richtige Tabelle zu speichern,brauchts du in Dicktionari Struktur einlegen:Miss hat geschrieben:hi autohandel7,
ich habe deine Aussage nicht so ganz verstehen können. Die Z-Felder von mir sind in einer Appendstruktur einer SAP Standardtabelle implementiert.