wa_ebeln-sign = 'I'. "I = include, E = exclude wa_ebeln-option = 'BT'. "EQ, BT, NE .... wa_ebeln-low = '11111111'. wa_ebeln-high = '99999999'. append wa_ebeln to r_ebeln. select ebeln ebelp statu aedat matnr menge meins netpr peinh from ekpo into table it_ekko where ebeln in r_ebeln.
RANGES: r_ustyp FOR usr02-ustyp.
LOOP AT gt_list.
r_ustyp-option = 'EQ'.
r_ustyp-sign = 'I' .
r_ustyp-low = gt_list-key.
APPEND r_ustyp.
ENDLOOP.
JOIN
select vbak~vbeln vbak~erdat vbak~auart
vbak~vkorg vbak~kunnr vbak~vdatu
vbap~posnr
vbap~matnr vbap~werks vbap~vstel
vbap~kwmeng vbap~vrkme vbap~netwr
vbap~meins vbap~prodh vbap~abgru vbap~zzilreqdeldate
vbap~zzreason vbap~zzreason1 vbap~zzilordqty
vbap~zzinuom vbap~zzlastcustqty vbap~zzlastsaveqty
vbap~zzlastunit vbap~zzlastrdd vbap~zzilweekdat
vbap~zzlcrdd vbap~zzlcuom vbap~pstyv
into corresponding fields of table lt_vbeln
from vbak as vbak inner join vbap as vbap
on vbak~vbeln = vbap~vbeln
where vbak~vbeln in s1_vbeln
and vbap~pstyv ne 'TAPA'.
SPLIT
Asağıdaki kodda sunu sağlıyoruz diyelimki elimizde
2000/2001/2002/2003/2000/2001 diye bir string olsun .
Bunları tek tek olacak sekılde '/' 'dan bolerek gt_split tablosuna atıyoruz .
Daha sonra burdan aynı kayıtları siliyoruz ve tekrar birlestiriyoruz . Bu komutla elimizdeki string degiskeni belli bir ayrıracla birbirlerine baglılarsa ıstedıgımız gibi ayırmıs oluyoruz .
DATA: BEGIN OF gt_split OCCURS 0,
split(50) TYPE c,
END OF gt_split.
*----->>> Added by SOZYURT CR9519 14.01.2013 10:57:20
SPLIT it_mara-variants AT '/' INTO TABLE gt_split .
SORT gt_split.
DELETE ADJACENT DUPLICATES FROM gt_split.
CLEAR : l_variant.
LOOP AT gt_split.
CONCATENATE l_variant '/' gt_split-split INTO l_variant.
ENDLOOP.
MOVE l_variant TO it_mara-variants.
*-----<<< Added by SOZYURT
like 9%
LIST BOX
modif id alv default 'A'.
at selection-screen output.
perform f_fill_list.
*&---------------------------------------------------------------------*
*& Form f_fill_list
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
form f_fill_list.
clear: gt_list, gt_list[].
gs_stab-key = 'A'.
gs_stab-text = text-015."Dialog
append gs_stab to gt_list.
gs_stab-key = 'B'.
gs_stab-text = text-016."System
append gs_stab to gt_list.
gs_stab-key = 'C'.
gs_stab-text = text-017."Com Data
append gs_stab to gt_list.
gs_stab-key = 'L'.
gs_stab-text = text-018."Ref
append gs_stab to gt_list.
gs_stab-key = 'S'.
gs_stab-text = text-019."Service
append gs_stab to gt_list.
call function 'VRM_SET_VALUES'
exporting
id = 'P_SELECT'
values = gt_list.
endform. "f_fill_list
Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP S/4 HANA Logistics Team Lead
Contact : serkurumsal@yandex.com
Social Plugin