Skip to content

Instantly share code, notes, and snippets.

View EkremGungormez's full-sized avatar

Ekrem Gungormez EkremGungormez

View GitHub Profile
SELECT * from mara INTO TABLE gt_mara WHERE matnr in s_matnr.
IF gt_mara[] IS NOT INITIAL.
SELECT matnr werks kwmeng vrkme
INTO TABLE gt_vbap
from vbap
FOR ALL ENTRIES IN gt_mara
WHERE matnr = gt_mara-matnr.
SELECT vbeln posnr matnr werks kwmeng vrkme
INTO TABLE gt_vbap2
tables: mara.
data : lt_mara type table of mara,
ls_mara type mara,
lt_mard type table of mard..
select-options : s_matnr for mara-matnr.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = lv_fname
i_begin_col = 1
i_begin_row = 2
i_end_col = 18
i_end_row = '9999'
TABLES
intern = lt_excel
EXCEPTIONS
@EkremGungormez
EkremGungormez / gist:3127909
Created July 17, 2012 08:04
Parameters Number Error in Abap Correct Way
TYPES: BEGIN OF name_of_global_structure,
"write some attributes here
END OF name_of_global_structure,
name_of_global_table_type TYPE TABLE OF name_of_global_structure.
data: name_of_global_internal_table TYPE STANDARD TABLE OF name_of_global_structure.
@EkremGungormez
EkremGungormez / gist:3127881
Created July 17, 2012 07:56
Parameters Number Error in Abap
TYPES: BEGIN OF name_of_global_structure,
"write some attributes here
END OF name_of_global_structure.
data: name_of_global_internal_table TYPE STANDARD TABLE OF name_of_global_structure.
"write some code here.
@EkremGungormez
EkremGungormez / gist:2725550
Created May 18, 2012 14:31
Collect Statement
DATA: BEGIN OF itabo OCCURS 0,
ogrno(10) TYPE n,
derskod(10) TYPE c,
not TYPE i,
sayi TYPE i,
END OF itabo.
DATA: BEGIN OF itabd OCCURS 0,
ogrno(10) TYPE n,
derskod(10) TYPE c,
@EkremGungormez
EkremGungormez / gist:2724210
Created May 18, 2012 09:17
abap inner join example
TABLES: MKPF,
MSEG.
DATA: BEGIN OF gs_ara,
mblnr type mkpf-mblnr,
mjahr TYPE mkpf-mjahr,
budat TYPE mkpf-budat,
tcode2 TYPE mkpf-tcode2,
usnam TYPE mkpf-usnam,
cpudt TYPE mkpf-cpudt,
@EkremGungormez
EkremGungormez / gist:2717527
Created May 17, 2012 08:57
Editable Alv update database table
REPORT ZBC0818_EDITABLEALV_ALINAN.
* Data declarations
DATA : itab TYPE STANDARD TABLE OF 'Database Table Name',"Output table
i_fieldcat TYPE STANDARD TABLE OF lvc_s_fcat,"Field catalog
i_modified TYPE STANDARD TABLE OF 'Database Table Name',"For getting modified rows
i_selected_rows TYPE lvc_t_row,"Selected Rows
w_selected_rows TYPE lvc_s_row,
w_modified TYPE 'Database Table Name',
wa TYPE 'Database Table Name',
w_variant TYPE disvariant,
="insert into Telephones (id,tel_no,operator_id,user_id,purchased_time)values("&""&A18&""&","&""&B18&""&","&""&C18&""&","&""&D18&""&","&""&E18&""&")"
insert into Cities(id,country_id,name) values(01,1,'ADANA')
insert into Cities(id,country_id,name) values(02,1,'ADIYAMAN')
insert into Cities(id,country_id,name) values(03,1,'AFYONKARAHİSAR')
insert into Cities(id,country_id,name) values(04,1,'AĞRI')
insert into Cities(id,country_id,name) values(05,1,'AMASYA')
insert into Cities(id,country_id,name) values(06,1,'ANKARA')
insert into Cities(id,country_id,name) values(07,1,'ANTALYA')
insert into Cities(id,country_id,name) values(08,1,'ARTVİN')
insert into Cities(id,country_id,name) values(09,1,'AYDIN')
insert into Cities(id,country_id,name) values(10,1,'BALIKESİR')