2007 Feb 17 8:56 AM
Hi experts,
In the program there are two screen. In the first screen-Screen5000- there are four buttons and when user pushes these buttons the second screen-Screen250- displays. But problem starts here. Second screen does not show any data from the itab.
Thanks
2007 Feb 17 9:10 AM
2007 Feb 17 9:28 AM
1. Assume the FCODE for button1 is BUTT1 , button2 is BUTT2, button3 is BUTT3, button4 is BUTT4 check u r coding in MODULE user_command_5000 INPUT by palcing break-point there.
MODULE user_command_5000 INPUT.
CASE sy-ucomm.
WHEN 'BUTT1'.
..............
WHEN 'BUTT2'.
..............
WHEN 'BUTT3'.
..............
WHEN 'BUTT4'.
................
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
2. check whether the fields u kept in screen 250 are taken by selecting dictionary/programfields ->Table/fieldname - ITAB
and click get from program button and place the fields in u r screen 250
2007 Feb 17 1:49 PM
Hi sreekanth.
Can you show me where I must put break point? And which clause must I use?
Thanks
Code:
INCLUDE ZFC_PROJE1TOP . " global Data
INCLUDE ZFC_PROJE1PBO . " PBO-Modules
INCLUDE ZFC_PROJE1PAI . " PAI-Modules
INCLUDE ZFC_PROJE1FRM . " FORM-Routines
PROGRAM ZFC_PROJE1.
TABLES : ZFC_CDTP_MESLEK, ZFC_CDTP_MUSTERI.
DATA : ITAB LIKE ZFC_CDTP_MUSTERI OCCURS 0 WITH HEADER LINE.
DATA : ITAB2 LIKE ZFC_CDTP_MESLEK.
DATA : BEGIN OF ITAB3 OCCURS 10,
MUSKD LIKE ZFC_CDTP_MUSTERI-MUSKD,
END OF ITAB3.
DATA : SUREC(1).
DATA : ISLEM TYPE I.
START-OF-SELECTION.
SELECT * FROM ZFC_CDTP_MUSTERI INTO TABLE ITAB.
CALL SCREEN 5000.
END-OF-SELECTION.
&----
*& Include ZFC_PROJE1PBO
&----
&----
*& Module STATUS_5000 OUTPUT
&----
text
----
MODULE STATUS_5000 OUTPUT.
SET PF-STATUS 'GUI'.
SET TITLEBAR 'BASLIK'.
LOOP AT SCREEN.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE. " STATUS_5000 OUTPUT
&----
*& Module STATUS_0250 OUTPUT
&----
text
----
MODULE STATUS_0250 OUTPUT.
SET PF-STATUS 'GUI2'.
SET TITLEBAR 'BASLIK2'.
IF SUREC EQ 'S'.
LOOP AT SCREEN.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDLOOP.
ELSEIF SUREC EQ 'U'.
LOOP AT SCREEN.
IF SCREEN-NAME EQ 'ITAB-MUSKD'.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ELSE.
SCREEN-INPUT = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ELSEIF SUREC EQ 'N'.
LOOP AT SCREEN.
SCREEN-INPUT = 1.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDMODULE. " STATUS_0250 OUTPUT
&----
*& Include ZFC_PROJE1PAI
&----
&----
*& Module USER_COMMAND_5000 INPUT
&----
text
----
MODULE USER_COMMAND_5000 INPUT.
CASE SY-UCOMM.
WHEN 'YENI'. PERFORM YENI.
WHEN 'DEGISTIR'. PERFORM DEGISTIR.
WHEN 'GORUNTULE'. PERFORM GORUNTULE.
WHEN 'SIL'. PERFORM SIL.
ENDCASE.
ENDMODULE. " USER_COMMAND_5000 INPUT
&----
*& Module USER_COMMAND_0250 INPUT
&----
text
----
MODULE USER_COMMAND_0250 INPUT.
CASE SY-UCOMM.
WHEN 'ONCEKI'. PERFORM ONCEKI.
WHEN 'SONRAKI'. PERFORM SONRAKI.
WHEN 'KAYDET'. PERFORM KAYDET.
WHEN 'GERI'. PERFORM GERI.
ENDCASE.
ENDMODULE. " USER_COMMAND_0250 INPUT
&----
*& Include ZFC_PROJE1FRM
&----
&----
*& Form YENI
&----
text
----
--> p1 text
<-- p2 text
----
FORM YENI .
SET SCREEN 250.
SUREC = 'N'.
ENDFORM. " YENI
&----
*& Form KAYDET
&----
text
----
--> p1 text
<-- p2 text
----
FORM KAYDET .
check SUREC eq 'U' or SUREC eq 'N'.
if SUREC eq 'N'.
select count( * ) from zFC_CDTP_MUSTERI into sy-tfill
where MUSKD = itab-MUSKD.
if sy-tfill ne 0.
message s004(ZSG_CL_MESAJ) with 'Bu Kod Zaten Kayıtlıdır'.
exit.
else.
clear zFC_CDTP_MUSTERI.
move-corresponding itab to zFC_CDTP_MUSTERI.
insert zFC_CDTP_MUSTERI.
append itab.
describe table itab lines islem.
endif.
elseif surec eq 'U'.
clear zFC_CDTP_MUSTERI.
move-corresponding itab to zFC_CDTP_MUSTERI.
modify zFC_CDTP_MUSTERI.
modify itab index islem.
endif.
surec = 'S'.
ENDFORM. " KAYDET
&----
*& Form GERI
&----
text
----
--> p1 text
<-- p2 text
----
FORM GERI .
LEAVE TO SCREEN 5000.
ENDFORM. " GERI
&----
*& Form DEGISTIR
&----
text
----
--> p1 text
<-- p2 text
----
FORM DEGISTIR .
if SUREC EQ 'S'.
SUREC = 'U'.
elseif SUREC eq 'U' or SUREC eq 'N'.
SUREC = 'S'.
ENDIF.
SET SCREEN 250.
ENDFORM. " DEGISTIR
&----
*& Form ONCEKI
&----
text
----
--> p1 text
<-- p2 text
----
FORM ONCEKI .
check SUREC eq 'S'.
check ISLEM ne 1.
ISLEM = ISLEM - 1.
ENDFORM. " ONCEKI
&----
*& Form SONRAKI
&----
text
----
--> p1 text
<-- p2 text
----
FORM SONRAKI .
check SUREC eq 'S'.
check ISLEM ne 1.
ISLEM = ISLEM + 1.
describe table itab lines ISLEM.
ENDFORM. " SONRAKI
&----
*& Form GORUNTULE
&----
text
----
--> p1 text
<-- p2 text
----
FORM GORUNTULE .
SUREC = 'S'.
SET SCREEN 250.
ENDFORM. " GORUNTULE
&----
*& Form SIL
&----
text
----
--> p1 text
<-- p2 text
----
FORM SIL .
DATA : ans(1).
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
DEFAULTOPTION = 'N'
TEXTLINE1 = 'KAYIT SILINECEK?'
TEXTLINE2 = ' '
TITEL = 'SIL'
START_COLUMN = 25
START_ROW = 6
CANCEL_DISPLAY = 'X'
IMPORTING
ANSWER = ans.
.
if ans = 'J'.
delete from zfc_cdtp_musteri where muskd = itab-muskd.
describe table itab lines sy-tfill.
if islem eq sy-tfill.
delete itab index islem.
islem = islem - 1.
else.
delete itab index islem.
endif.
endif.
ENDFORM. " SIL
2007 Mar 01 8:42 AM
Hi!
Give the break point inside MODULE STATUS_0250 OUTPUT and check is the data is there in the required work-area or the internal table. If it is not there then you can retrive it just after this module or in this module itself.
regards
Purnima.