Skip to Content
Author's profile photo Akhilesh Singh

Operation Text Activation during Maintenance Order Confirmation

Purpose: Provide Operation all character details during maintenance order confirmation.

Application: whenever we have to confirm operation in IW42, then operation details (operation short text) display till 40 characters and access to above operation details move to maintenance order screen as well as this is time taken activities.

So, this functionality Provide operation details as up to 40 characters in order confirmation process.

Step1: Operation appears till 40 Characters which is unable to view all details.

TC: IW42

Step2: In table AFKO with ref to order and pass BEDID value in table AFVC for getting to OBJNR and click on long text operation for further details.

  TC: IW32

Click on Goto-Heaer

Step3: And take all details and pass this value in Function Module READ_TEXT by SE37.

TC: SE37

Step4: Now, click on operation text and there have appeared all character details during operation confirmation.

  TC: IW42

Step5: This logic provided to Technical consultant as they have create coding (screen no, crusher & etc) and finalize my requirement in standard process.

Coding details have below mentioned.

DATA: WS_LINE TYPE I,
ws_field
(30) TYPE c,
WS_VALUE
(255) TYPE C,
pcode
type syucomm,
val
(40) type c.

data: mandt like afvcmandt,
aufpl
like afvcaufpl,
vornr
like afvcvornr,
bedid
like afkobedid,
APLZL
LIKE AFVCAPLZL.

FIELDSYMBOLS: <aufnr>.

* Assign value of variable from calling prog to field symbol
ASSIGN (‘(SAPLCMFU)CMFUD-AUFNR’) TO <aufnr>.
*BREAK-POINT.
get cursor FIELD ws_field line ws_line VALUE WS_VALUE.
set CURSOR FIELD ‘AFRUD-UVORN’.

if systepl = .

if ( ws_field = ‘AFVGD-LTXA1’ ).

data: tname(70) TYPE C.
DATA: TDLINE LIKE TLINE OCCURS 0 WITH HEADER LINE,
TEXT TYPE STRING.
SELECT single bedid from afko into bedid WHERE aufnr <aufnr>.
SELECT single mandt aufpl APLZL into (mandt, aufpl, APLZL) from afvc
where bedid = bedid
*    AND aplzl = ws_line
and ltxa1 = ws_value.
CALL FUNCTION ‘CONVERSION_EXIT_ALPHA_INPUT’
EXPORTING
INPUT         = APLZL
IMPORTING
OUTPUT        = APLZL
.
CONCATENATE mandt aufpl APLZL into tname.
CALL FUNCTION ‘READ_TEXT’
EXPORTING
*       CLIENT                        = SY-MANDT
ID                            = ‘AVOT’
LANGUAGE                      = ‘E’
NAME                         
= TNAME
OBJECT                       
= ‘AUFK’
*       ARCHIVE_HANDLE                = 0
*       LOCAL_CAT                     = ‘ ‘
*     IMPORTING
*       HEADER                        =
TABLES
LINES                         = TDLINE[]
EXCEPTIONS
ID                            = 1
LANGUAGE                      = 2
NAME                         
= 3
NOT_FOUND                    
= 4
OBJECT                       
= 5
REFERENCE_CHECK              
= 6
WRONG_ACCESS_TO_ARCHIVE      
= 7
OTHERS                        = 8
.
IF SYSUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT TDLINE .
IF TDLINETDLINE IS NOT INITIAL.
CONCATENATE TEXT TDLINETDLINE  INTO TEXT SEPARATED BY space.
ENDIF.
ENDLOOP.
if text is NOT INITIAL.
MESSAGE TEXT TYPE ‘I’.

**        ELSE.
**          MESSAGE WS_VALUE TYPE ‘I’.
endif.
ENDIF.

*    endif.
endif.
*clear sy-ucomm.
*    endif.
******************************END OF CODE***********************************************************
ENDENHANCEMENT.

Best Regards,

Akhilesh Singh

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo K Jogeswara Rao
      K Jogeswara Rao

      Useful knowledge piece.

      Akhilesh!

      please mention which user-exit is used to write this code.

      Jogeswara Rao K

      Author's profile photo Akhilesh Singh
      Akhilesh Singh
      Blog Post Author

      Hi,

            There have using Enhancement point in standard program which is applied by Technical consultant.