2010 Dec 21 8:17 AM
Hi All,
I've a requirement to fill a field called partner bank type (BSEG-BVTYP) during creation of park document using tcode F-63.
I tried using BTE with details as below :
- event = 2218
- function module = ZFI_INTERFACE_00002218 (copied from SAMPLE_INTERFACE_00002218)
below is the ABAP coding :
DATA: z_bvtyp LIKE bseg-bvtyp,
z_pswbt LIKE bseg-pswbt,
z_belnr LIKE bseg-belnr,
z_land1 LIKE t001-land1,
zline TYPE i.
DATA: BEGIN OF i_tab OCCURS 0,
bvtyp TYPE bvtyp,
END OF i_tab.
DATA: WA_BKPF TYPE vBKPF.
FIELD-SYMBOLS: <F1> TYPE FVBSEG.
CLEAR: WA_BKPF.
READ TABLE T_XVBKPF INTO WA_BKPF INDEX 1.
LOOP AT T_XVBSEG ASSIGNING <F1>
WHERE KOART = 'K'.
REFRESH: i_tab.
CLEAR: z_bvtyp, z_pswbt, z_belnr, zline.
SELECT SINGLE land1 INTO z_land1 FROM t001 WHERE bukrs EQ wa_bkpf-bukrs.
IF T_XVBSEG-pycur IS NOT INITIAL.
SELECT SINGLE bvtyp INTO z_bvtyp FROM lfbk
WHERE lifnr EQ T_XVBSEG-lifnr
AND bvtyp EQ T_XVBSEG-pycur.
IF sy-subrc EQ 0.
T_XVBSEG-bvtyp = z_bvtyp.
<F1>-bvtyp = 'IDR'.
ELSE.
SELECT bvtyp INTO TABLE i_tab FROM lfbk
WHERE lifnr EQ T_XVBSEG-lifnr.
LOOP AT i_tab.
IF i_tab-bvtyp(3) <> T_XVBSEG-pycur.
DELETE i_tab.
CONTINUE.
ENDIF.
ENDLOOP.
DESCRIBE TABLE i_tab LINES zline.
IF zline = 1.
LOOP AT i_tab.
<F1>-bvtyp = i_tab-bvtyp.
ENDLOOP.
ENDIF.
ENDIF.
ELSE.
SELECT SINGLE bvtyp INTO z_bvtyp FROM lfbk
WHERE lifnr EQ T_XVBSEG-lifnr
AND bvtyp EQ wa_bkpf-waers.
IF sy-subrc EQ 0.
<F1>-bvtyp = z_bvtyp.
ELSE.
SELECT bvtyp INTO TABLE i_tab FROM lfbk
WHERE lifnr EQ T_XVBSEG-lifnr.
LOOP AT i_tab.
IF i_tab-bvtyp(3) <> wa_bkpf-waers.
DELETE i_tab.
CONTINUE.
ENDIF.
ENDLOOP.
DESCRIBE TABLE i_tab LINES zline.
IF zline = 1.
LOOP AT i_tab.
<F1>-bvtyp = i_tab-bvtyp.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP. After I "save as complete" the document, the field is blank.
Anyone could help me please,
Thanks,
-M-
Hi All,
I've a requirement to fill a field called partner bank type (BSEG-BVTYP) during creation of park document using tcode F-63.
I tried using BTE with details as below :
- event = 2218
- function module = ZFI_INTERFACE_00002218 (copied from SAMPLE_INTERFACE_00002218)
below is the ABAP coding :
DATA: z_bvtyp LIKE bseg-bvtyp,
z_pswbt LIKE bseg-pswbt,
z_belnr LIKE bseg-belnr,
z_land1 LIKE t001-land1,
zline TYPE i.
DATA: BEGIN OF i_tab OCCURS 0,
bvtyp TYPE bvtyp,
END OF i_tab.
DATA: WA_BKPF TYPE vBKPF.
FIELD-SYMBOLS: <F1> TYPE FVBSEG.
CLEAR: WA_BKPF.
READ TABLE T_XVBKPF INTO WA_BKPF INDEX 1.
LOOP AT T_XVBSEG ASSIGNING <F1>
WHERE KOART = 'K'.
REFRESH: i_tab.
CLEAR: z_bvtyp, z_pswbt, z_belnr, zline.
SELECT SINGLE land1 INTO z_land1 FROM t001 WHERE bukrs EQ wa_bkpf-bukrs.
IF T_XVBSEG-pycur IS NOT INITIAL.
SELECT SINGLE bvtyp INTO z_bvtyp FROM lfbk
WHERE lifnr EQ T_XVBSEG-lifnr
AND bvtyp EQ T_XVBSEG-pycur.
IF sy-subrc EQ 0.
T_XVBSEG-bvtyp = z_bvtyp.
<F1>-bvtyp = 'IDR'.
ELSE.
SELECT bvtyp INTO TABLE i_tab FROM lfbk
WHERE lifnr EQ T_XVBSEG-lifnr.
LOOP AT i_tab.
IF i_tab-bvtyp(3) <> T_XVBSEG-pycur.
DELETE i_tab.
CONTINUE.
ENDIF.
ENDLOOP.
DESCRIBE TABLE i_tab LINES zline.
IF zline = 1.
LOOP AT i_tab.
<F1>-bvtyp = i_tab-bvtyp.
ENDLOOP.
ENDIF.
ENDIF.
ELSE.
SELECT SINGLE bvtyp INTO z_bvtyp FROM lfbk
WHERE lifnr EQ T_XVBSEG-lifnr
AND bvtyp EQ wa_bkpf-waers.
IF sy-subrc EQ 0.
<F1>-bvtyp = z_bvtyp.
ELSE.
SELECT bvtyp INTO TABLE i_tab FROM lfbk
WHERE lifnr EQ T_XVBSEG-lifnr.
LOOP AT i_tab.
IF i_tab-bvtyp(3) <> wa_bkpf-waers.
DELETE i_tab.
CONTINUE.
ENDIF.
ENDLOOP.
DESCRIBE TABLE i_tab LINES zline.
IF zline = 1.
LOOP AT i_tab.
<F1>-bvtyp = i_tab-bvtyp.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP. After I "save as complete" the document, the field is blank.
Anyone could help me please,
Thanks,
-M-
2010 Dec 21 8:59 AM
Hi,
Have you done the assignment of Event, Product, Ctrl, Appln with your Z function module ?
Regards,
Sujeet
2010 Dec 21 9:56 AM
Hi,
I did assigned ... I put break point and it's going through the BTE.
But when I save the document, it's empty again.
Regards,
-M-
2010 Dec 21 9:41 AM
I hope by using BERE t-code copied from SAMPLE_INTERFACE_00002218 into ZFI_INTERFACE_00002218
Once its done activate it.
next step u need to assign it.
if u Go to t-code: BF44 then that z* BTE should be assignable .
Here the issue happening due to BTE is not triggering at all.
2011 Jan 21 9:26 AM
2013 Apr 15 12:56 PM
Hi.
You should distinguish between 2 interfaces of BTE: 1)Publish&subscribe - where you can't change flow of data; 2)process - where you can change. Event 2218 belongs to first type of interface and you can't change anything of importing parameters of FM.
Regars, Macbs
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |