04-10-2014 8:17 AM
Hi
We have requirement , where we have to pass some fixed text to notification's long text when notification is being created by TCS service order(Tcode- iw31).
Is there any exit/bapi/ fm to achieve same?
04-14-2014 7:40 AM
issue is solved.
I had to do implicit enhancement at end of FM ' IQS0_CREATE_NOTIF_TO_ORDER'.
Code is as below.
ENHANCEMENT 1 ZENH_IW31. "active version
* Declaration of local variables, workareas and internal tables
DATA: LTA_LINES TYPE STANDARD TABLE OF TLINE,
LWA_LINES TYPE TLINE,
ltp_zaccesstime TYPE zaccesstime.
IF SY-TCODE = 'IW31'. " Put condition for code
SELECT SINGLE zaccesstime
FROM equi
into ltp_zaccesstime
WHERE equnr = VIQMEL-equnr.
IF sy-subrc Eq 0.
LWA_LINES-TDFORMAT = '*'.
CONCATENATE 'Access Time:' ltp_zaccesstime INTO LWA_LINES-TDLINE SEPARATED BY space.
APPEND LWA_LINES TO LTA_LINES.
CLEAR: LWA_LINES.
ENDIF.
CALL FUNCTION 'IQS0_ADD_NOTIFICATION_LONGTEXT'
EXPORTING
i_qmnum = VIQMEL-QMNUM
* I_POST = ' '
* I_RESET =
tables
t_inlines = LTA_LINES
EXCEPTIONS
SHOW_MESSAGES = 1
OTHERS = 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDENHANCEMENT.
04-10-2014 9:08 AM
Hi Preeti,
I do not think there is need for Enhancements for the use I understood of yours.
SO10
With this Tcode you will be able to create a fixed text for use in the long texts of any Object (Notification Order etc)
Case1
After creating one such Fixed long text
Now run IW21, click on long text icon, click on the Include in the menu bar --> Text --> Standard
Now in the resulting pop-up do this.
All the long text created there is imported here.
Now if you create an Order through this Notification the Order will be created with this Long text.
Case2
If you are using a Maintenance Plan to create your Orders then have this text in a similar way to the Longtext of the Maintenance item. All the Orders triggered through this plan will be having this long-text.
Hope you find this information useful to you.
Jogeswara Rao K
04-10-2014 11:05 AM
Hi Jogeswara,
In this way each notification we will have to maintain long text.
We have to retrieve values from custom field added in EQUI table,that data should flow to notification when we are creating service order from transaction IW31.
04-10-2014 11:11 AM
Hi Preeti,
I think you need to explain your process in steps 1,2 ,3.... and indicate the role of long text.
Jogeswara Rao K
04-10-2014 11:24 AM
Hi Jogeswara,
Our whole requirement is as below.
1)Create new calendar field “Access time” in Location data tab in equipment master. This field should be selection field in which we will hard code some ranges and user can select it.Field should be mandatory so that user can not miss to fill it.User will provide us these hard code values.
Response : Done |
2) Create same field in service order under Location data tab so that we can pass Access time from equipment master to new field in Service order.
Response: Done, in new tab not in location tab.
3) This field “Access time” from equipment master should flow in notification long text also.
Response : searching user exit/ FM/BADI or BAPI.
We have done with 1 and 2 point, and treying to find user exit/ FM/BADI or BAPI to achieve point 3.
In our scnerio we have a ordertype YFO3 and YVIS for wich notification gets created while we are creating service order using IW31 Transaction.
so in long text of notification(created by IW31) “Access time” of EQUI should flow.
04-10-2014 11:32 AM
Hi Preeti,
In such case, you definitely need an FM and I think this is SAVE_TEXT
I do not think it is difficult to pass on the values and implement it for you.
Jogeswara Rao K
04-10-2014 11:40 AM
Hi Jogeswara,
I know this FM's but the problem is where to write code?
I tried user exits of IW31 as well as IW51's also but didn't get success.
04-10-2014 10:29 PM
04-14-2014 7:40 AM
issue is solved.
I had to do implicit enhancement at end of FM ' IQS0_CREATE_NOTIF_TO_ORDER'.
Code is as below.
ENHANCEMENT 1 ZENH_IW31. "active version
* Declaration of local variables, workareas and internal tables
DATA: LTA_LINES TYPE STANDARD TABLE OF TLINE,
LWA_LINES TYPE TLINE,
ltp_zaccesstime TYPE zaccesstime.
IF SY-TCODE = 'IW31'. " Put condition for code
SELECT SINGLE zaccesstime
FROM equi
into ltp_zaccesstime
WHERE equnr = VIQMEL-equnr.
IF sy-subrc Eq 0.
LWA_LINES-TDFORMAT = '*'.
CONCATENATE 'Access Time:' ltp_zaccesstime INTO LWA_LINES-TDLINE SEPARATED BY space.
APPEND LWA_LINES TO LTA_LINES.
CLEAR: LWA_LINES.
ENDIF.
CALL FUNCTION 'IQS0_ADD_NOTIFICATION_LONGTEXT'
EXPORTING
i_qmnum = VIQMEL-QMNUM
* I_POST = ' '
* I_RESET =
tables
t_inlines = LTA_LINES
EXCEPTIONS
SHOW_MESSAGES = 1
OTHERS = 2
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDENHANCEMENT.
12-09-2015 10:05 AM