Skip to Content
-1

how to idntify selected line item during pr creation.

Apr 06, 2017 at 11:03 AM

48

avatar image
Former Member

i want to display current line item material stock during pr creation in me51n, but problem is i just got the last item stock.. so how can i identify the line item in pr to display stock??

here my code is....

METHOD IF_EX_ME_PROCESS_REQ_CUST~CHECK.

DATA : LT_ITEM TYPE MMPUR_REQUISITION_ITEMS,

LS_ITEM TYPE MMPUR_REQUISITION_ITEM,

LS_ITEM_DATA TYPE MEREQ_ITEM.

DATA: LV_STK TYPE MBEW-LBKUM.

DATA: LV_STK_FINAL_MSG TYPE STRING.

DATA: LV_STK_FINAL TYPE STRING.

LT_ITEM = IM_HEADER->GET_ITEMS( ).

LOOP AT LT_ITEM INTO LS_ITEM .

CLEAR LS_ITEM_DATA.

LS_ITEM_DATA = LS_ITEM-ITEM->GET_DATA( ).

SELECT SINGLE LBKUM INTO LV_STK FROM MBEW WHERE MATNR = LS_ITEM_DATA-MATNR AND BWKEY = LS_ITEM_DATA-WERKS .

LV_STK_FINAL_MSG = LV_STK.

CONCATENATE 'Material Stock is ' LV_STK_FINAL_MSG INTO LV_STK_FINAL SEPARATED BY SPACE.

ENDLOOP.

IF SY-UCOMM EQ 'MECHECKDOC'. "it execute, when click ckeck

CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'

EXPORTING

TITEL = 'Information'

TEXTLINE1 = LV_STK_FINAL

TEXTLINE2 = ' '

START_COLUMN = 40

START_ROW = 6.

ENDIF.

ENDMETHOD.

so how can i identify line item?? any flag or indicator that identify the selected line..

10 |10000 characters needed characters left characters exceeded
Former Member

OK thanks sir,

i will be care full next time..

0
* Please Login or Register to Answer, Follow or Comment.

0 Answers