04-13-2011 11:41 AM
Hi,
We have an issue in SAP PM.We are trying to send work completion form from a third party system along with the long text. Our problem is for few of the Work orders sent from the third party, even though the long text is populated the 'Long Text Display' button is not visible in the notification and hence we cannot see the text from 'IW33'. This is happening for few orders whereas rest are working fine. Can anyone please let me know where is the 'QMMA-INDTX' field populated and how does it work so that i can fix this issue.
Thank you in advance.
04-13-2011 4:07 PM
generally long text indicators get turned on by SAP update....so if you're using SAVE_TEXT, indicator is not updated. I've found that I can fix usually via very simple BDC/call transaction, open the document, navigate to text (Might not be necessary), change something(if needed), press save. You can try this by simply executing transaction online and saving....see if that results in SAP "seeing" the long text.
04-13-2011 4:07 PM
generally long text indicators get turned on by SAP update....so if you're using SAVE_TEXT, indicator is not updated. I've found that I can fix usually via very simple BDC/call transaction, open the document, navigate to text (Might not be necessary), change something(if needed), press save. You can try this by simply executing transaction online and saving....see if that results in SAP "seeing" the long text.
04-13-2011 4:46 PM
Hi Breakpoint,
As mentioned earlier, we are trying to send the data from a third party system, which is a mobile application. The long text is visible in change mode i.e. 'IW32'. but when we go to 'IW33' the long text button itself is not visible. When analysed we found that the 'QMMA-INDXT' field is not pouplaued and hence the button is not displayed. This is happening intermittently. Any help on this will be highly appreciated.
Thank you.
10-19-2011 8:44 AM
BAPI_ALM_NOTIF_DATA_ADD
FUNCTION ZZ_NOTIF_MAINT_ACTIVITY.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(QMNUM) TYPE QMNUM
*" VALUE(MANUM) TYPE AKNUM
*" VALUE(FENUM) TYPE FELFD
*" VALUE(QMANUM) TYPE QMANUM
*" VALUE(LONGTEXT) TYPE STRING
*" TABLES
*" XLINES STRUCTURE TLINE OPTIONAL
*" RETURN STRUCTURE BAPIRET2
*"----------------------------------------------------------------------
* Save Notification --> Maintenance Activities --> Longtext
*"----------------------------------------------------------------------
DATA: wa_viqmma type viqmma.
REFRESH RETURN.
*Exist check
select single * from viqmma into wa_viqmma where QMNUM = QMNUM
and MANUM = MANUM
and FENUM = FENUM
and QMANUM = QMANUM
and KZLOESCH = ' '. "Delete
if sy-subrc ne 0.
CONCATENATE QMNUM MANUM INTO return-message SEPARATED BY SPACE.
APPEND RETURN.
return-message = ' record does not exit in table VIQMMA'.
APPEND RETURN.
exit.
endif.
*String to XLINES table
IF XLINES IS INITIAL.
perform string_to_xlines tables XLINES
using longtext.
ENDIF.
PERFORM UPDATE_NOTIFICATION tables XLINES
USING QMNUM MANUM FENUM QMANUM.
ENDFUNCTION.
FORM UPDATE_NOTIFICATION tables XLINES structure TLINE
USING QMNUM MANUM FENUM QMANUM.
DATA: NUMBER LIKE BAPI2080_NOTHDRE-NOTIF_NO.
DATA: NOTIFHEADER_EXPORT like BAPI2080_NOTHDRE,
NOTIFACTV like BAPI2080_NOTACTVI occurs 0 with header line,
NOTIFACTV2 like BAPI2080_NOTACTVE occurs 0 with header line,
NOTFULLTXT like BAPI2080_NOTFULLTXTI occurs 0 with header line,
RETURN like BAPIRET2 occurs 0 with header line.
REFRESH NOTFULLTXT.
LOOP AT XLINES.
NOTFULLTXT-OBJTYPE = 'QMMA'. "Activity long text
*
concatenate FENUM QMANUM into NOTFULLTXT-OBJKEY. "see prg: LIQS4F10
NOTFULLTXT-FORMAT_COL = '*'.
NOTFULLTXT-TEXT_LINE = XLINES-TDLINE.
APPEND NOTFULLTXT.
ENDLOOP.
CALL FUNCTION 'BAPI_ALM_NOTIF_DATA_ADD'
EXPORTING
NUMBER = QMNUM
* NOTIFHEADER =
* TASK_DETERMINATION = ' '
* SENDER =
* ORDERID =
IMPORTING
* NOTIFHDTEXT =
NOTIFHEADER_EXPORT = NOTIFHEADER_EXPORT
TABLES
NOTFULLTXT = NOTFULLTXT
* NOTITEM =
* NOTIFCAUS =
* NOTIFACTV =
* NOTIFTASK =
* NOTIFPARTNR =
* KEY_RELATIONSHIPS =
RETURN = return.
*-Save
call function 'BAPI_ALM_NOTIF_SAVE'
exporting
number = NOTIFHEADER_EXPORT-notif_no.
*-Commit
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
IMPORTING
RETURN = RETURN
.
ENDFORM.
FORM STRING_TO_XLINES tables XLINES structure TLINE
using LONGTEXT.
DATA : it_outlines TYPE string_table.
DATA : wa_outlines TYPE string.
DATA : wa_line(5000) TYPE c.
DATA : wa_textlines TYPE tline.
wa_line = longtext.
* convert the string into the string table with field lenght of 132 character.
REFRESH it_outlines.
CALL FUNCTION 'IQAPI_WORD_WRAP'
EXPORTING
textline = wa_line
* delimiter = ' '
outputlen = 132
TABLES
out_lines = it_outlines
EXCEPTIONS
outputlen_too_large = 1
OTHERS = 2.
IF sy-subrc EQ 0.
* Loop through the table and append newline character if required.
LOOP AT it_outlines INTO wa_outlines.
IF sy-tabix EQ 1.
MOVE '*' TO wa_textlines-tdformat.
ELSE.
MOVE '' TO wa_textlines-tdformat.
ENDIF.
MOVE wa_outlines TO wa_textlines-tdline.
APPEND wa_textlines TO XLINES.
ENDLOOP.
ENDIF.
ENDFORM.