Skip to Content
0
Aug 02, 2020 at 01:29 AM

RFC Error: The current statement is only supported for character-type data objects

80 Views Last edit Aug 03, 2020 at 05:16 AM 2 rev

This is the error i am getting..

I have Implemented the code in entity_set

method INVOICEHEADERSET_GET_ENTITY.
data:lv_invoice Type RE_BELNR,
lv_fiscal TYPE GJAHR,
ls_key_tab TYPE /IWBEP/S_MGW_NAME_VALUE_PAIR,
ls_rbkp TYPE rbkp .
clear er_entity.
READ TABLE it_key_TAB INTO ls_key_tab WITH KEY name = 'Invoicedocnumber'.
IF sy-subrc eq 0.
lv_invoice = ls_key_tab-value.
ENDIF.

READ TABLE it_key_TAB INTO ls_key_tab WITH KEY name = 'Fiscalyear'.
IF sy-subrc eq 0.
lv_fiscal = ls_key_tab-value.
ENDIF.

IF lv_invoice IS NOT INITIAL and lv_fiscal IS NOT INITIAL.
* SELECT SINGLE BELNR,BLART,BLDAT,
* BUDAT,BUKRS,WAERS,ZFBDT,MWSKZ1
* FROM rbkp into ( ls_rbkp-BELNR,
* ls_rbkp-BLART,
* ls_rbkp-BLDAT,
* ls_rbkp-BUDAT,
* ls_rbkp-BUKRS,
* ls_rbkp-WAERS,
* ls_rbkp-ZFBDT,
* ls_rbkp-MWSKZ1 )
* WHERE BELNR = lv_invoice.
SELECT SINGLE * FROM rbkp INTO ls_rbkp
WHERE BELNR = lv_invoice AND GJAHR = lv_fiscal.
IF sy-subrc eq 0.
er_entity-invoicedocnumber = ls_rbkp-BELNR.
er_entity-doc_type = ls_rbkp-BLART.
er_entity-doc_date = ls_rbkp-BLDAT.
er_entity-pstng_date = ls_rbkp-BUDAT.
er_entity-COMP_CODE = ls_rbkp-BUKRS.
er_entity-CURRENCY = ls_rbkp-WAERS.
er_entity-BLINE_DATE = ls_rbkp-ZFBDT.
er_entity-DEL_COSTS_TAXC = ls_rbkp-BLDAT.


ENDIF.

ENDIF.

I am using 'BAPI_INCOMINGINVOICE_CREATE' for my entity header structure.

The structure name is 'BAPI_INCINV_CREATE_HEADER'.

I have taken all the fields.

In the code above i have assigned only those fields which i want.

By checking st22 i got this runtime dump error.

Please someone help me out.

REGARDS

Attachments

0r42g.png (93.2 kB)
ctl1c.png (55.2 kB)
r52ye.png (12.7 kB)
v2fbc.png (55.2 kB)