Skip to Content
0
Former Member
Apr 12, 2010 at 05:22 AM

For material document no. system is going in hang mode.Output not displaye

25 Views

My smartform is not getting generated after i cilick Print Preview......and the system goes into Hang mode......this is most probably because there are 13 material No.s in this Smartform.......Pls Tune the Query below :-

DATA: T1_MBLNR LIKE MSEG-MBLNR,

T2_MBLNR LIKE MSEG-MBLNR,

T_GRUND LIKE MSEG-GRUND.

*BREAK-POINT AT NEXT APPLICATION STATEMENT.

select matnr maktx

from makt

into table i_makt

for all ENTRIES IN i_mseg

where matnr = i_mseg-matnr.

SELECT SINGLE MBLNR FROM MSEG

INTO t1_mblnr

WHERE MBLNR = WA_MSEG-LFBNR

AND ( BWART = '103'

OR BWART = '122' ).

loop at i_mseg into wa_mseg WHERE BWART = '122'.

select SINGLE grtxt FROM t157e INTO g_grtxt

WHERE spras = 'EN'

AND bwart = '122'

AND grund = wa_mseg-grund.

wa_final-matnr = wa_mseg-matnr.

read table i_makt into wa_makt with key matnr = wa_mseg-matnr.

if sy-subrc = 0.

wa_final-maktx = wa_makt-maktx.

endif.

wa_final-meins = wa_mseg-meins.

wa_final-qty = wa_mseg-erfmg .

wa_final-grtxt = g_grtxt.

wa_final-doi = wa_mkpf-budat.

wa_final-po = wa_mseg-ebeln.

WA_FINAL-BWART = WA_MSEG-BWART.

WA_FINAL-sgtxt = WA_MSEG-sgtxt.

WA_FINAL-dmbtr = WA_MSEG-dmbtr.

WA_FINAL-waers = WA_MSEG-waers.

append wa_final to i_final.

endloop.

select single exnum from j_1iexchdr

into t_exnum1

where rdoc = wa_mseg-lfbnr.