Skip to Content
0
Former Member
Jan 30, 2014 at 01:10 PM

whats wrong in my code ?

116 Views

Hi all.

I preparing a simple program for hr module. I was make join but fields are empty. I can't some tables but I already need them( like p1000-stext, s001-sptag ) Later I try "for all entries" method, but still doesn't work and this is my error text

The WHERE condition does not refer to the FOR ALL ENTRIES table. .

What I do ?

And this is all of my code.


REPORT Z_ORGTURLISTESI.

TABLES: pa0001, s001, t001, t001p, t501t, p1000, p0001.



""""" SEÇİM EKRANI """""
"Butonlar"
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN PUSHBUTTON (20) pb_but1 USER-COMMAND BUT1. "dgr seçmler
SELECTION-SCREEN PUSHBUTTON (20) pb_but2 USER-COMMAND BUT2. "arama yard
SELECTION-SCREEN PUSHBUTTON (20) pb_but3 USER-COMMAND BUT3. "sıralama
SELECTION-SCREEN PUSHBUTTON (20) pb_but4 USER-COMMAND BUT4. "org. yapısı
SELECTION-SCREEN END OF LINE.

"Seçim aralıkları"
SELECTION-SCREEN BEGIN OF BLOCK secim WITH FRAME TITLE text-001.

SELECT-OPTIONS: s_pernr FOR pa0001-pernr no intervals. "pers. numarası
SELECT-OPTIONS: s_bukrs FOR pa0001-bukrs no intervals. "şirket kodu
SELECT-OPTIONS: s_werks FOR pa0001-werks no intervals. "pers. alanı
SELECT-OPTIONS: s_btrtl FOR pa0001-btrtl no intervals. "pers. alt alanı
SELECT-OPTIONS: s_persg FOR pa0001-persg no intervals. "çalışan grubu
SELECT-OPTIONS: s_persk FOR pa0001-persk no intervals. "çal. alt grubu
SELECT-OPTIONS: s_abkrs FOR pa0001-abkrs no intervals. "bordro birimi
SELECT-OPTIONS: s_orgeh FOR pa0001-orgeh no intervals. "org. birimi

SELECTION-SCREEN END OF BLOCK secim.

"Pozisyon ve tarih seçimi aralıkları"
SELECTION-SCREEN BEGIN OF BLOCK secim2 WITH FRAME TITLE text-002.

SELECT-OPTIONS: s_plans FOR pa0001-plans OBLIGATORY no-extension. "poz.
SELECT-OPTIONS: s_sptag FOR s001-sptag no-extension . "tarih

*s_sptag-low = '29.01.2014'.
*s_sptag-high = '29.01.2014'.
*APPEND s_sptag.

SELECTION-SCREEN END OF BLOCK secim2.

"""""SEÇİM EKRANI BİTİMİ"""""

INITIALIZATION.
pb_but1 = 'Diğer Seçimler'.
pb_but2 = 'Arama Yardımları'.
pb_but3 = 'Sıralama'.
pb_but4 = 'Org. Yapısı'.



"""""DATALAR"""""
"""""DATALAR"""""
"""""DATALAR"""""
"""""DATALAR"""""

DATA: BEGIN OF itab1 OCCURS 0,

pernr LIKE pa0001-pernr, "pers. numarası
sname LIKE pa0001-sname, "çalışan/başvuran adı
bukrs LIKE pa0001-bukrs, "şirket kodu
butext LIKE t001-butxt, "şirket adı
kostl LIKE pa0001-kostl, "masraf yeri
sachp LIKE pa0001-sachp, "personel ana verileri sorumlusu
plans LIKE pa0001-plans, "pozisyon
stext LIKE p1000-stext, "nesne tanımı
werks LIKE pa0001-werks, "personel alanı
btext LIKE t001p-btext, "personel alt alanı texti
persg LIKE pa0001-persg, "çalışan grubu
ptext LIKE t501t-ptext, "çalışan grubu tanımı(yaka durumu)

END OF itab1.

DATA: BEGIN OF itab_pa OCCURS 0,

pernr LIKE pa0001-pernr, "pers. numarası
sname LIKE pa0001-sname, "çalışan/başvuran adı
bukrs LIKE pa0001-bukrs, "şirket kodu
kostl LIKE pa0001-kostl, "masraf yeri
sachp LIKE pa0001-sachp, "personel ana verileri sorumlusu
plans LIKE pa0001-plans, "pozisyon
werks LIKE pa0001-werks, "personel alanı
persg LIKE pa0001-persg, "çalışan grubu

END OF itab_pa.

DATA: BEGIN OF itab_t0 OCCURS 0,
butxt LIKE t001-butxt, "şirket adı
END OF itab_t0.

DATA: BEGIN OF itab_tp OCCURS 0,
btext LIKE t001p-btext, "personel alt alan texti
END OF itab_tp.

DATA: BEGIN OF itab_t5 OCCURS 0,
ptext LIKE t501t-ptext, "çalışan grubu tanımı(m.yaka, çırak vs)
END OF itab_t5.

DATA: gt_fieldcat TYPE lvc_t_fcat,
gs_layout TYPE lvc_s_layo.


"""""STRUCTERE"""""
DATA: BEGIN OF gs_pa,
pernr LIKE itab_pa-pernr, "pers. numarası
sname LIKE itab_pa-sname, "çalışan/başvuran adı
bukrs LIKE itab_pa-bukrs, "şirket kodu
kostl LIKE itab_pa-kostl, "masraf yeri
sachp LIKE itab_pa-sachp, "personel ana verileri sorumlusu
plans LIKE itab_pa-plans, "pozisyon
persg LIKE itab_pa-persg, "çalışan grubu
END OF gs_pa.

DATA: BEGIN OF gs_t0,
butxt LIKE itab_t0, "şirket adı
END OF gs_t0.

DATA: BEGIN OF gs_tp,
btext LIKE itab_tp-btext, "personel alt alan texti
END OF gs_tp.

DATA: BEGIN OF gs_t5,
ptext LIKE itab_t5-ptext, "çalışan grubu tanımı(m.yaka, çırak vs)
END OF gs_t5.



START-OF-SELECTION.
PERFORM get_data_pa.
PERFORM get_data_t1.
PERFORM get_data_tp.
PERFORM get_data_t5.
PERFORM transfer.


form GET_DATA_PA .


SELECT * FROM pa0001 AS p
INTO CORRESPONDING FIELDS OF TABLE itab_pa
WHERE
p~pernr IN s_pernr AND
p~bukrs IN s_bukrs AND
p~werks IN s_werks AND
p~btrtl IN s_btrtl AND
p~persg IN s_persg AND
p~persk IN s_persk AND
p~abkrs IN s_abkrs AND
p~orgeh IN s_orgeh AND
p~plans IN s_plans.

endform. " GET_DATA_PA


"""""PERFORMLAR"""""

form GET_DATA_T1 .

SELECT butxt FROM t001 INTO itab_t0
FOR ALL ENTRIES IN itab_pa
WHERE bukrs IN s_bukrs.
ENDSELECT.

endform. " GET_DATA_T1

form GET_DATA_TP .

SELECT btext FROM t001p INTO itab_tp-btext
" FOR ALL ENTRIES IN itab_pa
WHERE werks IN s_werks.
ENDSELECT.

endform. " GET_DATA_TP

form GET_DATA_T5 .

SELECT ptext FROM t501t INTO itab_t5-ptext
"FOR ALL ENTRIES IN itab_pa
WHERE persg IN s_persg.
ENDSELECT.


endform. " GET_DATA_T5

form TRANSFER ."""sorunu çözdükten sonra devam et"""