Skip to Content
0

custom fields for bapi_alm_notif_create in extension in not working?

Feb 23 at 09:54 AM

145

avatar image

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.

https://blogs.sap.com/2013/12/11/handling-customer-fields-in-bapis-which-doesnt-have-extension-structure/

thanks for any clue how to solve this.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Raymond Giuseppi
Feb 23 at 10:29 AM
0
Show 1 Share
10 |10000 characters needed characters left characters exceeded

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>
0