Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member182535
Active Contributor

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 sy-ucomm,
val
(40) type c.

data: mandt like afvc-mandt,
aufpl
like afvc-aufpl,
vornr
like afvc-vornr,
bedid
like afko-bedid,
APLZL
LIKE AFVC-APLZL.

FIELD-SYMBOLS: <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 sy-stepl = .

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 SY-SUBRC <> 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 TDLINE-TDLINE IS NOT INITIAL.
CONCATENATE TEXT TDLINE-TDLINE  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

2 Comments
Labels in this area