02-23-2018 9:54 AM
I try to implement the bapi bapi_alm_notif_create but I can't get the extensionin fields working.
We have one customer field in QMEL added in structure ZAQMEL
named ZZILART
I found this blog about it but cant believe this dirty sollution is really the way to go for extensionin fields for this bapi? is there another sollution and why is it in the bapi if it doesn't work anyway? documentation as usual also not clear on how to use it.
thanks for any clue how to solve this.
02-23-2018 10:29 AM
02-23-2018 10:29 AM
02-26-2018 1:51 PM
Thanks Raymond, I have implemented the note and extended the table BAPI_TE_QMEL and RIQS5
for future reference if more developers have the same problem here also the example code
ls_extensionin-structure = 'BAPI_TE_QMEL'.
*fields for extension are concatenated according to structure BAPI_TE_QMEL
ls_extensionin-valuepart1+12(3) = iv_ilart.
DATA ls_str(10000).
data: ls_cust_cs_fields type ZST_CS_CUSTOMHEADER.
ls_str = ls_extensionin-valuepart1.
ls_cust_cs_fields = IS_CUSTOM_FIELDS.
FIELD-SYMBOLS <fs1>.
DATA len TYPE i.
DATA offs TYPE i.
offs = 15.
DO .
ASSIGN COMPONENT sy-index OF STRUCTURE ls_cust_cs_fields TO <fs1>.
IF sy-subrc <> 0.
EXIT.
ENDIF.
DESCRIBE FIELD <fs1> LENGTH len in CHARACTER MODE.
MOVE <fs1> TO ls_str+offs(len).
offs = offs + len + 1.
ENDDO.
ls_extensionin-valuepart1 = ls_str(240).
ls_extensionin-valuepart2 = ls_str+240(240).
ls_extensionin-valuepart3 = ls_str+480(240).
append ls_extensionin to lt_extensionin.
<br>