Skip to Content
0
Former Member
Feb 05, 2009 at 10:26 AM

'REUSE_ALV_POPUP_TO_SELECT'

457 Views

TYPES: begin of ty_final ,

MATNR type resb-matnr,

erfmg(12) type c,

stk(12) type c,

end of ty_final.

data: it_final type table of ty_final,

wa_final type ty_final.

data: begin of it_resb occurs 0,

MATNR type resb-matnr,

werks type resb-werks,

EBELN type resb-EBELN,

bdart type resb-bdart,

bdmng type resb-bdmng,

ENMNG type resb-ENMNG,

ebelp type resb-ebelp,

end of it_resb.

data: begin of it_resb1 occurs 0,

MATNR type resb-matnr,

werks type resb-werks,

EBELN type resb-EBELN,

bdart type resb-bdart,

bdmng type resb-bdmng,

ENMNG type resb-ENMNG,

ebelp type resb-ebelp,

end of it_resb1.

data: ebelp(5) type c.

data: rqty(12) type P DECIMALS 3.

data: wdqty(12) type p decimALS 3.

data: rqty1(12) type P DECIMALS 3.

data: wdqty1(12) type p decimALS 3.

data: difFqty(12) type P DECIMALS 3.

data: difFqty1(12) type P DECIMALS 3.

data: stk(12) type P DECIMALS 3.

data: stk1(12) type P DECIMALS 3..

data: redqty(12) type p decimals 3.

data: begin of it_mslb occurs 0,

matnr type mslb-matnr,

werks type mslb-werks,

lifnr type mslb-lifnr,

lblab type mslb-lblab,

end of it_mslb.

data: w_matnr type mseg-matnr,

w_werks type mseg-werks,

w_lifnr type mseg-lifnr,

w_ebeln type mseg-ebeln.

data: tstk_qty(12) type p decimals 3.

data: tstk(12) type c,

terfmg(12) type c.

tstk = stk.

terfmg = ymseg-erfmg.

condense tstk no-gaps.

CONDENSE terfmg no-gaps.

wa_final-erfmg = terfmg.

wa_final-stk = tstk.

append wa_final to it_final.

clear wa_final.

DEFINE m_fieldcat.

add 1 to ls_fieldcat-col_pos.

ls_fieldcat-fieldname = &1.

ls_fieldcat-ref_tabname = &2.

append ls_fieldcat to lt_fieldcat.

END-OF-DEFINITION.

TYPE-POOLS: slis. " ALV Global types

DATA:

l_exit,

ls_private TYPE slis_data_caller_exit,

ls_user TYPE ty_user_addr,

ls_fieldcat TYPE slis_fieldcat_alv,

lt_fieldcat TYPE slis_t_fieldcat_alv.

  • * Build the field catalog

m_fieldcat 'BNAME' 'USER_ADDR'.

m_fieldcat 'NAME_FIRST' 'USER_ADDR'.

m_fieldcat 'NAME_LAST' 'USER_ADDR'.

CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

EXPORTING

I_TITLE = 'SALES ORDER INFO'

I_ZEBRA = 'X'

I_TABNAME = 1

I_STRUCTURE_NAME = 'IT_FINAL'

TABLES

T_OUTTAB = it_final

EXCEPTIONS

PROGRAM_ERROR = 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.

please check this code in it_final data is coming but in from function module its not coming .. please guide me ..